Repository navigation
Conversation
Add seven harness conformance scenarios that state the response the outcome ladder reports for each run and the Environment Server's action on it: context_overflow (vllm_model's propagated context-length 400), context_overflow_length (vllm_model's default empty length stop), deadline_before_reply, deadline_after_reply, harness_no_result (the tool call kills the supervised harness), model_401 and model_503. New checks: outcome.http_ok, outcome.ladder, outcome.disposition, model.retries_bounded (P0) and outcome.target (P1). Checks that cannot apply (final answer, verifier evidence of an ungraded run, tool results of a killed harness) report not_applicable. The runner maps each adapter's run-deadline key, holds a never-answered request until the harness disconnects, witnesses the agent's HTTP status, and treats a failure row as a measurement where the scenario allows the run to go ungraded. Simple Agent skips the scenarios that need a run deadline or a harness process. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
…e-scenarios Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
…e-scenarios Signed-off-by: yaoyu-33 <[email protected]>
A scripted-model smoke over every registered harness found checks that failed identically on every harness, before and after the adapter migrations, so the expectations were wrong rather than the adapters. - deadline_before_reply, deadline_after_reply: the run deadline cancels the held model request, so the run ends on a failed model call; rollout_ended_on_failed_model_call is expected unhealthy. - deadline_after_reply: steps.attempt_accounting treated the cancelled request as a policy response that needs a step. A request cut before any reply (no status, no response, an error category) is a failed attempt like an HTTP error, so it may stay unbound. - harness_no_result: the Environment Server keeps a failure row for the retried run, which has no response usage, so rollout_token_count_mismatch is expected unobserved. - model_error: the ladder reports the 400 as model_request_rejected, which the Environment Server fails, so it takes model_401's health expectations. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
This was referenced Nov 10, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Harness conformance scenarios for the shared outcome ladder (#5870). Stacked on
feat/agent-outcome-ladder, so the diff shows only the conformance changes.Each new scenario states the response the ladder reports for the run (
Scenario.outcomes) and the Environment Server's action on it: verify (a graded rollout inrollouts.jsonl), retry (a failure row with_ng_failure_terminal: false) or fail (_ng_failure_terminal: true).context_overflowvllm_model's propagated context-length 400 (invalid_request_error,code: context_length_exceeded, noRetry-After)incomplete→ verify, orfailed+model_request_error400 → verifyincompletecontext_overflow_lengthvllm_model's default empty completion: Chatfinish_reason: length, zero usage; Responsesincomplete/max_output_tokenswithnemo_gym_context_window_exceeded(checked againstVLLMConverter)incomplete→ verify, orcompleted→ verifydeadline_before_replyincomplete→ verify, or (transitionalretry_deadline_before_reply)failed+unknown→ retryincompletedeadline_after_replyincomplete→ verifyharness_no_resultfailed+agent_run_error→ retrymodel_401failed+model_request_rejected→ failmodel_503failed+model_request_error503 → retry, and the agent replies within 30 s of its first model requestmodel_errorkeeps the definition #5870 gave it.New checks
outcome.http_ok(P0): the agent answers the Environment Server's/v1/responseswith HTTP 200, never a 5xx. The runner wraps the agent app to witness the status (witness.json→agent_replies).outcome.ladder(P0): the response's status and exactng_agent_outcomematch one of the scenario's outcomes. Acompletedorincompleteresponse must carry nong_agent_outcome(this flags a stalemodel_context_limitleft on an incomplete response).outcome.disposition(P0): the Environment Server took that outcome's action, read from the graded record or the failure row's_ng_failure_terminal.model.retries_bounded(P0,model_503): decision 6's bounded harness retries.outcome.target(P1): the ladder's report once its transitional rules are gone.Checks that cannot apply now report
not_applicable:model.finishedandverifier.answerwhen the script never gives the final answer,verifier.*and the artifact verifier scope when the Environment Server did not grade the run, andtools.executed/tools.witness_*when the tool call kills the harness.Runner changes
episode.DEADLINE_KEYSmaps each adapter's run-deadline key (verified against each config class, and a unit test reads the annotations):timeout(int) for OpenCode, Pi, Codex, Kilo Code and OpenClaw;sandbox_runner_timeout_secondsfor Hermes, Stirrup and NOOA. A scenario'srun_deadline_secondssets it; otherwise it is the probe--timeout. Codex, Kilo Code, Hermes and Stirrup used their adapter defaults before (600 s to 6 h).harness_no_result's tool call walks up from its shell to the outermost ancestor carrying the supervisor'sNEMO_GYM_SUPERVISOR=<identity>marker, kills those ancestors, then every other process with that identity (onegrep -lzscan), then itself. The supervisor is markeddetached, so it survives and reports the harness's exit. Checked on a Linux host: harness and its helper gone, supervisor alive, no marked process left; without a supervised ancestor it exits 97 and kills nothing.model_error. Collection raisesIncompleteEvaluationErrorfor such an episode; under feat(agent): add the shared outcome ladder for harness runs #5870model_error(model_request_rejected→ fail) would otherwise turn into a runner execution error once adapters migrate.registry.LACKS: Simple Agent runs inside the Gym agent server, with no run deadline and no harness process, so it skipsdeadline_before_reply,deadline_after_replyandharness_no_result. The summary lists them underskipped_scenarios;ci_tableandtableexpect each harness's own scenario list.model_checksnow compares an incomplete Responses reply by itsincomplete_details.reason, which is what capture records as the call's finish reason.Why
Plan step 1, PR "1E": every registered harness must run these events through the same ladder, and the adapter-migration PRs need an A/B measurement of today's behavior against the ladder's. No separate issue: this is the conformance part of the outcome-ladder work in #5870.
Calibration from the smoke matrix
The smoke matrix below found P0 checks that failed for every harness, the same on both sides. These were wrong expectations, not adapter bugs, and
90a4af722ccorrects them:deadline_before_replyanddeadline_after_replyexpectrollout_ended_on_failed_model_callto be unhealthy (DEADLINE_HEALTH). The held request's capture has no status, no response anderror_category: cancelled, and it is the chain's last call.steps.attempt_accounting(checker.py) let only HTTP errors (status 400 or above) go without a step. A request cut before any reply (no status, no response, an error category) is now a failed attempt too. This is the same shapecalls.responsealready accepts. It failed in all 16deadline_after_replyruns.harness_no_resultexpectsrollout_token_count_mismatchto be unobserved: the failure row has no response, so there is no usage to compare.model_errorusesFAILED_MODEL_HEALTH, likemodel_401. A harness that passesmodel.terminal_errorreportsmodel_request_rejected, which leaves a terminal failure row with no usage. An adapter not yet migrated (Simple Agent included) fails this check alongsidemodel.terminal_error.Validation
pytest scripts/harness_conformance/tests tests/unit_tests/rollouts/harness_capabilities tests/unit_tests/agents/test_outcome_ladder.py: 584 passed, 15 skipped (macOS; the Linux kill test is skipped there).tests/unit_tests/test_import_linter_coverage.py,test_public_api_facades.py,tooling/test_migrate_imports.py,test_fern_docs_links.py: 941 passed.90a4af722c): 10 new or changed tests, all failing on the previous head.test_focused_checks.py,test_health.py,test_outcome_scenarios.pyandtest_behavior.py: 190 passed. Related suites: 1,383 passed. All 138 saved smoke episodes were re-checked with the new code. Only the targeted checks changed, and they now pass on every harness that reports the ladder's outcome.pre-commit run --files <touched>: passed.ng_agent_outcomemodel_errormodel_request_error400model_request_rejected; adapter not migrated)context_overflowmodel_request_error400incomplete✗)context_overflow_lengthmodel_401model_request_error401model_request_rejected)model_503model_request_error503All other scenarios pass P0 as before; the three deadline/kill scenarios are skipped.
Smoke evidence
Scripted-model smoke on a Linux host, with no real model. All 9 registered harnesses ran the 8 scenarios on two sides:
0078c8bfd0, withmain's adapters.That is 138 episodes, plus 6 skips: Simple Agent lacks the deadline and kill scenarios. No episode had an execution error or a witness violation.
What the scenarios caught on B, now fixed or reported in the adapter PRs:
model_request_error400 in Codex, Stirrup and NOOA. The fix is the sharedmodel_http_error_outcomein feat(agent): add the shared outcome ladder for harness runs #5870, used by the adapter PRs.harness_no_resultstill answered 500 in Hermes, Stirrup and NOOA (refactor(agent): move Hermes, Stirrup, BrowseComp and NOOA to the outcome ladder #5879).model.retries_boundedfails; decision 6).After the calibration, a rerun on the same host gave:
harness_no_resultpasses the token check but still fails the outcome checks, because Pi's adapter on this branch answers 500.model_errorfailsmodel.terminal_errorand the token check, because no PR migrates Simple Agent yet.Final heads (B′): this head (
90a4af722c) with the four adapter PRs at their final heads merged on top (no conflicts). This run reran only the rows the fixes changed:context_overflow;harness_no_resultanddeadline_after_reply;harness_no_resultandmodel_error.13 of the 14 cells pass every P0 check. The calibrated deadline health checks and
steps.attempt_accountingpass on every deadline cell. The exception is Stirrup'sharness_no_result: its outcome is right (200 failedagent_run_error, retried), but the trajectory checks fail because Stirrup's runner reports its observations only in the output file a killed run never writes.Harness-specific results this PR leaves alone:
deadline_before_reply.deadline_after_reply, and health oncontext_overflow_length(7 empty length stops).steps.accounting_gaponharness_no_result.Compatibility
Conformance tooling only. The non-blocking harness conformance check will show the new scenarios failing for adapters that do not report through the ladder yet; the adapter-migration PRs stacked on #5870 are expected to turn them green.
🤖 Generated with Claude Code