Skip to content

test: add multi-agent headless harness matrix and session summary tests (#21) - #24

Merged
zeekay merged 1 commit into
hanzoai:mainfrom
tranhoangtu-it:test/multi-agent-harness-smoke-matrix-21
Nov 29, 2026
Merged

zeekay merged 1 commit into
hanzoai:mainfrom
tranhoangtu-it:test/multi-agent-harness-smoke-matrix-21

Conversation

@tranhoangtu-it

Copy link
Copy Markdown
Contributor

Closes #21
/claim #21

Summary

  • Added end-to-end headless single-prompt integration tests in tests/multi_agent_harness_matrix.rs exercising the compiled gen binary across all four harnesses:
    • gen "inspect repo" (dev default backend)
    • gen --claude "inspect repo" (claude backend)
    • gen --codex "inspect repo" (codex backend)
    • gen --gemini "inspect repo" (gemini backend)
  • Spawns a pure-std stand-in harness + hanzo-mcp stdio JSON-RPC server against a local loopback HTTP mock cloud (/v1/models, /v1/agents/sessions, /events, terminal PATCH) with isolated HOME/LOCALAPPDATA/PATH (NO_COLOR=1, HANZO_NO_AUTO_MCP=1).
  • Verifies per-harness MCP attachment (hanzo __mcp --ledger ... -- hanzo-mcp --project-dir ...), Claude's --strict-mcp-config + JSON config shape, Gemini's no-per-run-MCP isolation and absence of GEMINI_CLI_SYSTEM_SETTINGS_PATH, live tools/call ledger recording via hanzo_gen::ledger::read, cloud session events + terminal status, and hanzo dev · session summary formatting on stdout.
  • Added cli_flag_matrix_parses_headless_single_prompt_variants covering dev, --claude, --codex, --gemini, --no-mcp, --project-mcp, --no-link, and --ask option resolution.
  • Added a Headless Single-Prompt & Troubleshooting section in README.md covering single-prompt invocations, --no-mcp / --project-mcp, Gemini's one-time gemini mcp add -s user hanzo hanzo-mcp, --no-link, and running cargo test --locked on Linux / WSL2.
  • Kept Cargo.lock and src/ untouched and kept all source/test files under 1,000 lines (tests/multi_agent_harness_matrix.rs: 722 lines).

Reproducible Build & Test Output

Linux (x86_64-unknown-linux-gnu, rustc 1.98.1, hanzo.yml CI parity)

$ rustfmt --edition 2021 --check tests/multi_agent_harness_matrix.rs
(exit 0, 0 diff)

$ HOME="$ro" cargo test --locked -- --test-threads=4   # chmod 0555 read-only HOME
test result: ok. 416 passed; 0 failed; 0 ignored (unit tests)
test result: ok. 1 passed; 0 failed; 0 ignored (tests/filesize.rs)
test result: ok. 2 passed; 0 failed; 0 ignored (tests/multi_agent_harness_matrix.rs)
test result: ok. 3 passed; 0 failed; 0 ignored (tests/signals.rs)

$ env -u HOME cargo test --locked -- --test-threads=4
test result: ok. 416 + 1 + 2 + 3 passed; 0 failed

$ HOME="$tmp" cargo test --locked -- --test-threads=4  # verified $tmp stays empty
test result: ok. 416 + 1 + 2 + 3 passed; 0 failed

$ cargo clippy --locked --all-targets -- -D warnings
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 13.15s
(0 warnings, exit 0)

Windows (x86_64-pc-windows-msvc, rustc 1.98.1)

$ cargo test --locked --test multi_agent_harness_matrix --test filesize
     Running tests\filesize.rs
test source_files_under_1000_lines ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; finished in 0.01s

     Running tests\multi_agent_harness_matrix.rs
test cli_flag_matrix_parses_headless_single_prompt_variants ... ok
test headless_matrix_attaches_mcp_streams_cloud_and_prints_handoff_summary ... ok
test result: ok. 2 passed; 0 failed; 0 ignored; finished in 5.80s

Signed-off-by: Trần Hoàng Tú <tuth@ominext.com>
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-28T11:20:38.928197Z
We couldn’t complete this review. Comment @codex review to try again.
0306d62 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@zeekay

zeekay commented Nov 29, 2026

Copy link
Copy Markdown
Member

Thorough, hermetic cross-platform harness matrix covering dev, --claude, --codex, and --gemini, real gen __mcp JSON-RPC proxying, tool ledgers, and session summaries (442/442 cargo test green on main). Merging!

@zeekay
zeekay merged commit d73889e into hanzoai:main Nov 29, 2026
1 check passed
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.

[Intern] Multi-agent harness smoke matrix & session summary integration tests

3 participants