Skip to content

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

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

test(e2e): Add neural-network integration test.#385
sitaowang1998 wants to merge 28 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 support for multiple activation functions.
    • Added MessagePack payload encoding/decoding for task inputs and outputs.
  • Tests
    • Introduced an async end-to-end test that submits the generated network to Spider and verifies returned outputs match in-process simulation.
  • Bug Fixes
    • Updated the standard test executor to exclude end-to-end tests, avoiding duplicate execution.

@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

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 3db62bd2-ddeb-4e4f-a57c-68e056c237f1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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 matches 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