Skip to content

test(e2e): Add neural-network integration test. - #385

Open
sitaowang1998 wants to merge 38 commits into
y-scope:mainfrom
sitaowang1998:nn-test-driver
Open

test(e2e): Add neural-network integration test.#385
sitaowang1998 wants to merge 38 commits into
y-scope:mainfrom
sitaowang1998:nn-test-driver

Conversation

@sitaowang1998

@sitaowang1998 sitaowang1998 commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

Description

This PR adds neural-network integration test, with the following change:

  • tests/huntsman/e2e/src/nn: New mod contains neural network helpers.
    • neuron.rs: Neuron activation enums and mapping to task name and evaluate function.
    • wiring.rs: Wiring outputs to inputs.
    • network.rs: NeuralNetwork struct that holds all neural network information and conversion to TaskGraph.
  • tests/huntsman/e2e/payload_serde.rs: Helpers that serialize/deserialize task msgpack input/output payload.
  • taskfiles/test.yaml: Excludes e2e tests from test:rust-unit-tests task.

Checklist

  • The PR satisfies the contribution guidelines.
  • This is a breaking change and that has been indicated in the PR title, OR this isn't a
    breaking change.
  • Necessary docs have been updated, OR no docs need to be updated.

Validation performed

  • Run neural network test on a Spider stack. The test codes are in another branch.
  • GitHub workflows pass.

Summary by CodeRabbit

  • New Features
    • Added an end-to-end neural-network workflow with layered neuron graphs, deterministic wiring, and multiple activation functions.
    • Added MessagePack payload encoding and decoding for task inputs and outputs.
  • Tests
    • Added an asynchronous end-to-end test that submits generated networks and verifies results against in-process simulation.
  • Bug Fixes
    • Updated standard test execution to exclude end-to-end tests, preventing duplicate runs.

@sitaowang1998
sitaowang1998 requested a review from a team as a code owner July 10, 2026 06:25
@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@sitaowang1998, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 115 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: ae7ecdd0-5795-410d-a365-eec2cb2cfd0c

📥 Commits

Reviewing files that changed from the base of the PR and between 0a24773 and 45d13b8.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (1)
  • tests/huntsman/e2e/Cargo.toml

Walkthrough

Adds a layered neural-network workload to the Huntsman e2e crate, including deterministic wiring, MessagePack payload helpers, Spider execution validation, and exclusion of e2e tests from the unit-test executor.

Changes

Neural network end-to-end validation

Layer / File(s) Summary
Network model and deterministic wiring
tests/huntsman/e2e/Cargo.toml, tests/huntsman/e2e/src/lib.rs, tests/huntsman/e2e/src/nn/*
Defines activation mappings, validates and generates deterministic layer wiring, and provides task-graph construction plus in-process simulation.
MessagePack payload codec
tests/huntsman/e2e/src/payload_serde.rs
Adds input encoding and output decoding with round-trip, floating-point, struct, multi-value, and malformed-payload tests.
Spider-backed network validation
tests/huntsman/e2e/tests/nn.rs, taskfiles/test.yaml
Adds a deterministic asynchronous Spider comparison test and excludes e2e tests from the standard unit-test executor.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant test_nn
  participant NeuralNetwork
  participant SpiderTestDriver
  participant Spider
  test_nn->>NeuralNetwork: simulate deterministic inputs
  test_nn->>NeuralNetwork: build task graph
  test_nn->>SpiderTestDriver: submit graph and encoded inputs
  SpiderTestDriver->>Spider: execute dense-neuron tasks
  Spider-->>SpiderTestDriver: return outputs
  SpiderTestDriver-->>test_nn: decode output payload
  test_nn->>test_nn: compare outputs with simulation
Loading

Possibly related PRs

  • y-scope/spider#377: Adds the huntsman-nn-core implementations and neuron::dense_* task wrappers exercised by this e2e stack.
  • y-scope/spider#379: Provides the SpiderTestDriver infrastructure used by the new e2e network test.

Suggested reviewers: linzhihao-723

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding a neural-network end-to-end integration test.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants