Skip to content

Fix 10 failing tests (structure_mapper confidence, hardcoded path, e2e slot assertions, cpp StateStore call) - #40

Open
shentonyan wants to merge 3 commits into
HuangPuStar:masterfrom
shentonyan:fix/test-suite-repairs
Open

shentonyan wants to merge 3 commits into
HuangPuStar:masterfrom
shentonyan:fix/test-suite-repairs

Conversation

@shentonyan

Copy link
Copy Markdown

Summary

Fixes 10 tests that fail on a fresh checkout of master (b3f6505). Three commits, each independent:

  1. sglang_trace_analyze/orchestrator/structure_mapper.py: in _map_one, when a call stack is present and the layer is resolved, confidence was never assigned, so the function raised UnboundLocalError. It now defaults to "high", which is what test_build_mapping_with_call_stack already expects. Same commit: harness_evolve/tests/test_publish.py resolves the harness_default seed relative to the test file instead of a machine-specific absolute path (3 tests).
  2. tests/e2e/* (4 tests): scoreboard.list_claims() returns one row per GPU, free or held. The tests assumed a released slot disappears from the list. They now only count rows with status == "held". test_remote_job_flow's during-run check had the same flaw and always passed; it now also requires status == "held".
  3. gen_infer_framework_cpp/tests (2 tests): drop the task_type argument from StateStore.init_or_resume, which no longer accepts it.

Test results

Fresh clone, CI-style install, METAINFER_DISABLE_NETWORK=1 PYTHONDONTWRITEBYTECODE=1 python -m pytest:

Python before after
3.11 16 failed, 1628 passed 6 failed, 1638 passed
3.12 16 failed, 1628 passed 6 failed, 1638 passed

The 6 that remain are unrelated to this change and are described in the linked issue. On 3.10 one timing-sensitive test in test_supervisor.py also failed intermittently when I ran several suites in parallel; it passes on its own.

No production code other than the structure_mapper.py fix is touched.

Related issue: #39

shentonyan and others added 3 commits October 4, 2026 21:59
…ed seed path in test_publish

- sglang_trace_analyze/structure_mapper._map_one: when a call stack is present
  and the layer is resolved, 'confidence' was never assigned, raising
  UnboundLocalError. Default to 'high' (matches test_build_mapping_with_call_stack).
- harness_evolve/tests/test_publish.py: resolve the dcu_kernel_auto_opt
  harness_default seed relative to the test file instead of a machine-specific
  absolute path, so the tests run on any checkout.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
scoreboard.list_claims() is documented as a snapshot of every GPU, free or
held, so a released slot still appears as a row with status='free'. The four
e2e tests asserted that no row exists for the slot (or that the list is empty)
and therefore failed after a successful release. Filter on status == 'held'.

test_remote_job_flow's during-run check had the same flaw and always passed;
it now also requires status == 'held'.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
StateStore.init_or_resume(task_id) no longer takes task_type (run.json does not
store it; requirements.json is the source of truth). Two cpp framework tests
still passed it and raised TypeError.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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.

1 participant