Skip to content

fix(mars): route verification and refinement using matching agent IDs - #346

Merged
codelion merged 1 commit into
algorithmicsuperintelligence:mainfrom
liuzhengyang699:fix/mars-agent-id-routing
Oct 11, 2026
Merged

codelion merged 1 commit into
algorithmicsuperintelligence:mainfrom
liuzhengyang699:fix/mars-agent-id-routing

Conversation

@liuzhengyang699

Copy link
Copy Markdown
Contributor

MARSAgent uses integer IDs, but generate_solution stores them as strings. The verifier compares these values directly, so agent 0 can verify its own answer, the temperature-diversity preference cannot find the author, and both improvement paths silently skip generated solutions because no original agent matches.

Compare IDs as strings when selecting a verifier and locating the author for refinement. This preserves integer-ID compatibility and the existing fallback for aggregated solutions or a single agent.

The regressions use real generation, verification, and improvement methods with mocked model responses. They cover all three authors in sequential and parallel mode, checking the selected peer, feedback passed to the author, updated answer, and token accounting. All six pipeline cases fail before the fix.

Validation: python -m pytest tests/test_mars_agent_routing.py tests/test_mars_parallel.py tests/test_mars_workspace_verification.py tests/test_mars_aggregation_sampling.py -q passed 26 tests and 4 subtests. Ruff on the new tests and git diff --check passed. No live model calls.

@codelion
codelion merged commit c0dc4f0 into algorithmicsuperintelligence:main Oct 11, 2026
6 checks 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.

2 participants