Skip to content

feat(tier3): add opt-in tolerance for baseline-only agent timeouts - #430

Merged
rng1995 merged 27 commits into
mainfrom
naren/port-tier3-baseline-timeout-tolerance
Nov 12, 2026
Merged

rng1995 merged 27 commits into
mainfrom
naren/port-tier3-baseline-timeout-tolerance

Conversation

@rng1995

@rng1995 rng1995 commented Nov 9, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • New opt-in flag --tolerate-baseline-timeouts / --no-tolerate-baseline-timeouts on tier3 evaluate and validate, and the matching harbor.tolerate_baseline_timeouts key in evals/config.yml. The CLI value overrides the key. The default is off, and runs without it behave exactly as on main.
  • With the option on, an agent whose with-skill arm completed cleanly stays scored when its without-skill baseline fell short only because attempts hit Harbor's AgentTimeoutError while the agent was still working. The option judges only a baseline with at least one such timeout (a --stop-on-pass attempt that a later attempt recovered does not count). Any other failed baseline fails exactly as on main, with no rejection code or warning. Every rule must hold:
    • the with-skill arm scored every attempt with no errors, and grading is not custom_only;
    • the baseline ran in this run: a baseline reused with --reuse-baseline is left alone, as with --skip-baseline, and attempts that a cost limit left not_run are not expected, so they do not count as missing;
    • every missing baseline attempt is a trial that ended in AgentTimeoutError, matched case by case and, when each attempt runs as its own labelled job (--stop-on-pass or a cost limit), attempt by attempt. Native multi-step tasks are not covered: Harbor 0.24 records their agent timeouts only on the step and counts the trial as completed, so such a baseline is refused with its own code, step_timeout_not_supported;
    • every trial in the baseline job is scored, recovered or one of those timeouts, and each baseline error is one the timeouts produce: the N errored job failure (Harbor's count includes recovered timeouts), the per-trial runtime and reward lines, and the missing-cases and coverage lines;
    • every timed-out attempt shows agent output (agent_result.n_output_tokens or a trajectory's total_completion_tokens above zero);
    • each timed-out attempt left an agent log, and no log shows a known provider overload, rate limit, quota or authentication error identifier. This is a best-effort check on narrow identifiers: Anthropic, OpenAI and Google error types and codes (rate_limit_error, insufficient_quota, RESOURCE_EXHAUSTED, ...), Error code: 429, a JSON or Python status/statusCode of 429 or 529, 429 Too Many Requests, and the Claude Code and Codex forms;
    • every other agent completed, at least one of them completed both arms, and every runner launch error is a tolerated baseline's own timeout message. Tolerance is all or nothing, so it never applies to a run that fails for another reason, and a single-agent run never qualifies.
  • A tolerated agent's status becomes succeeded. Its conditions.without_skill stays failed with its errors, its attempt totals still count the missing attempts, and its baseline scores, Skill Lift, pass@k lift and security attribution stay empty (main already computes none of them for a failed arm).
  • Reports rank a tolerated agent below every agent with a complete baseline, in the canonical report and in the findings panel that tier3 evaluate prints with --verbose. A tolerated run always has such a peer, so the best agent, overall score and lift come from complete evidence, also when the tolerated agent scored higher. Both apply this before preferring agents that activated the skill. The panel falls back to a tolerated agent only when no complete agent would rank in the canonical report. When the canonical best agent is a complete agent the panel skips (for example, one that never activated the skill), the panel shows no findings, as main does for such an agent. This also holds when the terminal summary has dropped that agent and only one tolerated agent is left: the panel ranks it against every agent before it shows its findings. Runs without a tolerated agent keep main's choice.
  • The run verdict reads the same agents as the best agent, and so do the verdict reason and the correct-answer, required-check and security-clean counts that main records with it. A tolerated agent that passes every dimension does not make the run PASS beside a complete peer that fails, and when every complete agent never activated the skill the verdict is INCONCLUSIVE (the Insights message then says the skill never activated for an agent with a complete baseline). When one complete agent decides the verdict, the result payload, the agent_eval message, the BENCHMARK.md headline and Tier 3 row and the report.html lead therefore agree. With several complete agents, the payload verdict (PASS when any of them passes) can still differ from the best agent's own result in those reports, as it already does on main. Runs without a tolerated agent keep main's verdict.
  • BENCHMARK.md and report.html (Tier 3 overview) keep the "Needs attention" note while any agent is tolerated, and add one line per tolerated agent, for example Baseline incomplete for opencode (1 of 2 attempts scored): kept by --tolerate-baseline-timeouts, so its baseline and uplift are not reported. In report.html each line is its own block, shown under whichever overview lead applies, including the inconclusive one for a best agent that never activated the skill. The Tier 3 row keeps other execution failures need attention.
  • The decision is recorded in result.json, in <agent>/baseline_timeout_tolerance.json and in run_config.json (harbor.tolerate_baseline_timeouts, only when on):
    • agents.<agent>.baseline_timeout_tolerance: the timed-out attempts (at most 32 listed; failed_attempts is the exact count);
    • agents.<agent>.baseline_timeout_tolerance_rejection: the code of the rule that did not hold;
    • the run-level baseline_timeout_tolerance: the tolerated agents and the launch errors they explain (at most 32 listed, with explained_launch_errors_total and explained_launch_errors_truncated).
      The run lists a warning per tolerated or refused agent, so the terminal shows it as degraded.
  • report_data.load_agent_data honors the agent file only while it still matches the on-disk arms (with-skill succeeded with full coverage, baseline failed with exactly the recorded counts). The file is a generated agent artifact, so a rerun without the option removes it.
  • The run is still not complete publication evidence, and it does not satisfy a blocking Tier 3 gate: the missing baseline attempts keep its attempt coverage short.
  • Code: new pure module tier3/harbor/baseline_timeouts.py (rules, records, run-level decision, the report helpers); the collector gathers the evidence (attempt_slots from _condition_execution_summary, trial results, logs) and settles the decision before the run-level policy and comparison are built; the runner passes the flag through and drops only the launch errors of tolerated agents, and only while their count matches the record; baseline_store leaves the key out of the comparison identity.
  • Docs: new "Baseline timeouts" section (including the multi-step limit, cost limits, reused baselines and run comparisons) and flag row in docs/tier3-live-evaluation.mdx, rows in docs/cli-reference.mdx (both commands) and docs/eval-datasets.mdx, and the new file and keys in the run-directory list of docs/reports.mdx. CHANGELOG entry under Unreleased > Added. tests/golden/cli_surface.json regenerated (4 additive entries).

Why

The Tier 3 verdict reads only with-skill dimensions, but one baseline attempt that hits the agent execution timeout fails that agent, and any failed agent fails the whole run. The run then has no overall score or verdict, although the skill's own arm completed. Slow agents on long tasks hit this often. The option lets a user keep those runs readable without hiding the gap: the baseline stays failed and visible, uplift is not reported, the headline and verdict come from agents with complete evidence, and publication still requires complete coverage.

Kept from public

Tests

  • New tests/tier3/test_baseline_timeouts.py (74 tests):
    • collector on synthetic arm-level Harbor jobs: off by default the agent and run still fail; on, the agent stays scored with a failed, unscored baseline, no lift, a None comparison baseline, the record, the bounded run record, the run warning and the explained launch error; trajectory completion tokens count as progress
    • refusals (agent and run stay failed, with the code and warning): no output tokens (2), no agent log, provider errors in the log (8: Anthropic and retry-event forms, Codex's status line, the OpenAI SDK's Error code: 429 with a 'status': 429 body, OpenCode's statusCode 429, a bare 429 Too Many Requests, insufficient_quota, RESOURCE_EXHAUSTED), a log runtime error (2), a stray trial, an errored count with no matching trial, another failure beside a timeout, a timeout recorded only on a native multi-step task's step (the trial built with Harbor's own TrialResult model; refused as step_timeout_not_supported), a failed peer, a single agent, an extra launch error (2); custom_only grading, --skip-baseline and a baseline reused with --reuse-baseline leave the option inert (3)
    • a cost limit that never admitted one case for the tolerated agent, on attempt jobs merged by the runner's _merge_attempt_jobs with its per-attempt launch error: that case is not a missing baseline attempt, so only the timed-out attempt is missing (1 of 2 scored), the agent is tolerated and the launch error is explained
    • a baseline that failed without an agent timeout (verifier timeout, agent exit) is left as on main: no rejection code and no warning (2)
    • a baseline the runner killed for the Google ADC token lifetime is never tolerated: all trials cancelled (left as on main), a timeout beside a cancelled trial, and a timeout beside a trial without a result (3)
    • reports, with two tolerated agents scoring 0.94 and their complete peer 0.64: the payload's best agent, overall score and lift come from the peer, the findings panel picks the same agent, and the rendered tier3-benchmark.md and report.html show the completed-agent result, the "Needs attention" line, the Tier 3 row suffix and one tolerated-agent line per agent (in HTML, separate blocks)
    • reports with a complete peer that never activated the skill: the payload names the peer and its verdict is INCONCLUSIVE, the findings panel's agent choice is empty instead of the tolerated agent (both argument orders), and the HTML inconclusive overview and tier3-benchmark.md still name the tolerated agent
    • the run verdict with a tolerated agent that passes every dimension and meets every goal (2 cases: a complete peer that fails its dimensions, and one that never activated the skill): the payload and summary verdicts (FAIL, INCONCLUSIVE), the agent_eval message, the tier3-benchmark.md headline and Tier 3 row and the report.html lead all give the peer's result, and in the inconclusive case the Insights message says the skill never activated for an agent with a complete baseline
    • the verdict's counts with three agents, where the best agent fails a goal, a lower-scoring complete agent passes and a tolerated agent passes too: the summary's correct-answer, required-check and security-clean counts are the complete agent's
    • the terminal findings panel through render_result, with that never-activated peer (3 cases): with one or two tolerated agents it prints no findings and writes no findings.json; with no tolerated agent the one activated agent keeps its panel, as on main
    • the evidence check directly: an unbound job failure or summary error, an extra or missing trial failure, a different runtime reason, no case identities, and an unmapped case
    • stop-on-pass attempt jobs built with Harbor's own models and merged by the runner's _merge_attempt_jobs: timeouts matched by attempt; a launch error for an attempt that did not time out is refused; and a recovered timeout on one case beside two unrecovered timeouts on another is tolerated (the job reports 3 errored)
    • load_agent_data and build_agent_eval_payload reload the tolerated agent as succeeded, publication evidence and gate coverage stay incomplete, a record that no longer matches the baseline is ignored, and a rerun without the option removes it
    • pure rules: check_failures (12 cases), select_tolerated (all or nothing, agent-name prefixes, no clean peer, 5 unbindable launch errors including the ADC-lifetime message), settle, build_record bounding, and run_record bounding with unexplained_launch_errors (drops a tolerated agent's errors past the published sample, keeps every error when the count does not match)
    • engine: run_harbor_eval with Harbor faked and the real collector: off by default the launch error fails the run; harbor.tolerate_baseline_timeouts: true drops only the explained launch error and records the key; the engine argument overrides the key; a non-boolean key is rejected; the comparison identity leaves the key out, so the run's complete baseline is a --reuse-baseline source and its with-skill arms a --compare-to prior for the same run without the option, while the tolerated baseline is not a source
    • CLI: validate forwards both flag spellings, and EvaluationOptions reaches tier3.commands.evaluate
  • Fail-before:
    • against main, the file does not import (the new module is missing). With main's src/ plus only the new module, it has 53 failed and 21 passed; the 21 are the module's pure-rule tests.
    • against this branch before the first review repairs (d5dccde1's src/ with only the new module copied in), it has 30 failed and 44 passed. The 30: the two report tests (ranking with two tolerated agents, and the never-activated peer), the 2 verdict tests, the 2 tolerated cases of the terminal findings panel test, the multi-step test, the mixed stop-on-pass test, the 2 no-timeout tests and the all-cancelled case (rejection recorded for a timeout that never happened), the 5 new provider forms (the run succeeded), the engine test (the old run record has no total, so the launch error stays), 9 tests that check the new run record shape, and the 4 tests added after the merge with main (reused baseline, cost limit, verdict counts and comparison identity).
    • against this branch before the second review repairs (a764807f), it has 11 failed and 63 passed: the 4 tests added after the merge with main, the multi-step test (refused as no_progress_evidence, not by name), the never-activated peer test (verdict PASS; the panel's choice also named opencode), the two-agent report test (no block style for the HTML notes, which ran together), the 2 tolerated cases of the terminal findings panel test, and the 2 verdict tests.
    • against this branch before the third review repairs (24bd23b6), it has 8 failed and 66 passed: the 4 tests added after the merge with main, the terminal findings panel test with one tolerated agent, which printed opencode's findings and wrote its findings.json, the never-activated peer test (verdict PASS) and the 2 verdict tests.
    • against this branch before the fourth review repairs (a0b38f6c), it has 7 failed and 67 passed: the 4 tests added after the merge with main, the 2 verdict tests (payload verdict PASS from the tolerated agent beside a FAIL or INCONCLUSIVE headline) and the never-activated peer test (verdict PASS).
    • on the merge with main d717f22 before the follow-up commits (bf930681), the branch's own file had 2 failed and 68 passed: the 2 verdict tests, whose tolerated agent scored goal accuracy 0.8 and so failed its own verdict under feat(tier3): fail cases on unmet goals and security issues, independent of lift #395's rule. The final file against that commit's src/ has 4 failed and 70 passed: the reused baseline (a run record was still written), the cost limit (refused as unbound_error), the verdict counts (the tolerated agent's, with no baseline counts) and the comparison identity (it still carried the key).
    • against this branch before the fifth review repairs (dfdb8eb7), it has 1 failed and 73 passed: the comparison identity test (the persisted identity carried harbor.tolerate_baseline_timeouts, so a run without the option would refuse the source).
  • Full suite (pytest -n 6 tests): 27439 passed, 35 skipped, 6 failed. The 6 are environment-only. Five also fail on main on this machine: test_actual_workflow_bootstrap_ignores_consumer_pythonpath in tests/ci/test_all_tier_preflight.py, the 2 test_isolated_feedback_launcher_uses_trusted_siblings_from_any_consumer_directory cases in tests/ci/test_feedback.py, and the 2 test_sidecar_retains_* tests in tests/test_harbor_secure_docker_environment.py. The sixth, test_bounded_harbor_process_timeout_preserves_redacted_diagnostic_tail in tests/test_harbor_runner_status.py, is a Harbor bounded-process timeout test that failed under the parallel run's load and passes alone. A targeted run of the 171 test modules for the changed files and the CHANGELOG and docs readers (11502 passed) failed only on 3 of the same environment-only tests.
  • On the merge with main (d717f22) and the follow-up commits, the new test file and the Tier 3 display and report tests (tests/test_tier3_result_display.py, tests/reporting/test_tier3_scoped_reports.py, test_report_redesign.py, test_reporters.py, test_advisory_skip_verdict.py) give 804 passed.
  • On a probe merge of this branch and fix(reporting): describe a failed Tier 3 arm as incomplete, not as not run #407's branch after its own merge of main d717f22 (369a5d6), which has no conflicts, the same 6 modules plus fix(reporting): describe a failed Tier 3 arm as incomplete, not as not run #407's tests/reporting/test_tier3_incomplete_arms.py and tests/test_public_benchmark_gate.py give 1365 passed. The two-agent report fixture with the option on then renders the tolerated agent's gap in BENCHMARK.md in this PR's line, fix(reporting): describe a failed Tier 3 arm as incomplete, not as not run #407's ### Agent coverage bullet and fix(reporting): describe a failed Tier 3 arm as incomplete, not as not run #407's Tier 3 row suffix.
  • ruff check and ruff format --check are clean on the 16 changed Python files, and scripts/check_oss_boundary.py passes.

🤖 Generated with Claude Code

rng1995 and others added 15 commits November 7, 2026 01:34
With --tolerate-baseline-timeouts (or harbor.tolerate_baseline_timeouts),
an agent whose with-skill arm completed cleanly stays scored when its
baseline fell short only through attempts that hit AgentTimeoutError while
the agent was still producing output. The timeouts must account for every
missing attempt, by case and by attempt label, every baseline error and
launch error must be one they produce, no timed-out log may show provider
overload, rate limit or authentication errors, and another agent must have
completed both arms. Tolerance is all or nothing per run.

The baseline condition stays failed, baseline scores and lift stay empty,
and the run is still not complete publication evidence. The decision is
recorded in result.json, in <agent>/baseline_timeout_tolerance.json (which
report loading honors only while it matches the arms on disk) and as a run
warning. The default is off.

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Add a "Baseline timeouts" section and flag row to the Tier 3 guide, the
flag to the validate and tier3 evaluate references, the config key to the
eval config table, and an Unreleased > Added CHANGELOG entry.

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…e baseline timeout rules

- Reports rank an agent kept with a failed baseline below every agent with a
  complete baseline, in the canonical report and in the tier3 view findings
  choice, so the best agent, overall score and lift come from complete
  evidence. Before, a tolerated agent that outscored its complete peer became
  the best agent and BENCHMARK.md said there was no complete agent result.
- completed_agent_result keeps needs_attention set while any agent is
  tolerated, and BENCHMARK.md and report.html name each tolerated agent with
  its scored baseline attempts.
- The option judges only a baseline with an unrecovered AgentTimeoutError;
  any other failed baseline fails as before, with no rejection or warning.
- A stop-on-pass job failure may count recovered timeouts, which Harbor
  includes in its errored total.
- The provider check knows more 429 and quota identifiers: Error code: 429,
  a status or statusCode field of 429 or 529, 429 Too Many Requests,
  insufficient_quota and RESOURCE_EXHAUSTED.
- The run-level record publishes at most 32 explained launch errors with an
  exact total; the runner drops a tolerated agent's launch errors only while
  their count matches it.
- Tests pin a runner-killed baseline (cancelled trial, trial without a
  result) as never tolerated.

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Say which attempts fail an agent by default, that the provider check is
best effort on known identifiers, how reports rank and name a tolerated
agent, and list the new file and result.json keys on the reports page.

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…rt edits

Name tolerated agents in the HTML Tier 3 overview, after the "needs
attention" sentence, instead of the hero detail list, and list the new
agent file after the arm directories in the reports page. Open report
changes rewrite the hero and add a bullet after lift.json, so these spots
keep the hunks disjoint.

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Harbor 0.24 records a native multi-step task's agent timeout only on the
step and still counts the trial as completed. The trial then has no root
exception, no trial-failure row and no errored count to bind, so the
option refused it with an unrelated reason (for example
untyped_trial_failure or no_progress_evidence). Refuse it with
step_timeout_not_supported and its own message instead, and say in the
docs and CHANGELOG that native multi-step tasks are not covered.

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The canonical report ranks every complete agent above any agent kept by
--tolerate-baseline-timeouts and only then prefers agents that
activated the skill. The tier3 view findings choice dropped
never-activated agents first, so with a complete peer that never
activated the skill it named the tolerated agent while BENCHMARK and
HTML named the peer. The view now falls back to a tolerated agent only
when no complete agent would rank canonically; otherwise it shows no
findings, as main does for a never-activated best agent.

The HTML Tier 3 overview also printed the tolerated-agent notes only in
the completed-agent branch, so an inconclusive run (best agent never
activated) lost them. They now follow every overview branch whenever a
completed-agent result exists, as in BENCHMARK.md.

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…HTML

With two or more agents kept by --tolerate-baseline-timeouts, the HTML
Tier 3 overview emitted the notes as adjacent inline spans, so they ran
together ("...are not reported.Baseline incomplete for ..."). Make each
note a block, as BENCHMARK.md puts each on its own line, and extend the
report test to two tolerated agents.

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
… agent

The list holds every skipped agent that was not kept with a failed
baseline; the final check keeps only those the canonical report can
rank. Comment only.

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The terminal summary drops agents that never activated the skill before it
picks the agent for the findings panel. When a complete peer never
activated the skill and one tolerated agent was left, the panel showed the
tolerated agent's findings while the canonical report named the peer as best
agent. Rank such a lone tolerated agent against every agent, as the
canonical report does, and show no findings when it is not the best one.
Runs without a tolerated agent keep main's single-agent behavior.

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The findings panel that ranks tolerated agents below complete peers is
printed by tier3 evaluate with --verbose, not by tier3 view, which only
opens report.html.

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…port edits

Two open pull requests now edit the lines next to this branch's reporting
hunks: one adds a dataset provenance rule after the Tier 3 overview lead
style, and one adds a verdict reason to the completed-agent result. Put the
tolerated-baseline style rule just above the overview lead style, and add
the tolerated-agent fields after the completed-agent result is built, so
neither change touches their lines. Behavior is unchanged.

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
With --tolerate-baseline-timeouts, the best agent came from the agents
with a complete baseline, but the verdict still read every succeeded
agent. A tolerated agent that passed every dimension made the run PASS
while the best agent, the completed-agent headline and the Tier 3 row
said FAIL or INCONCLUSIVE.

The verdict now reads the same agents as the best agent. Insights say
that the skill never activated for an agent with a complete baseline
when a tolerated agent was set aside. Runs without a tolerated agent
keep main's verdict.

The CHANGELOG entry now states that every other agent must complete,
at least one with both arms, and that the verdict comes from the agents
with a complete baseline. The docs say the same.

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@rng1995
rng1995 marked this pull request as ready for review November 9, 2026 19:50
rng1995 and others added 9 commits November 10, 2026 14:59
Conflicts and how they were resolved:

- CHANGELOG.md: main added the repository CI onboarding entry at the end
  of Unreleased > Added, where this branch had added its
  --tolerate-baseline-timeouts entry. Both entries are kept; this
  branch's entry stays last in the list, after main's.
- src/skillevaluator/evaluation/options.py: main appended the
  reuse_baseline, compare_to, budget and price_file fields to
  EvaluationOptions, and this branch appended tolerate_baseline_timeouts.
  Main's fields come first and this branch's field is appended after
  them, so positional construction keeps main's order.
- src/skillevaluator/tier3/harbor/collector.py (3 hunks): main added
  expected_attempts_by_case to _condition_execution_summary and
  budget_not_run to collect_harbor_results, and this branch added
  attempt_slots and tolerate_baseline_timeouts beside them. Both
  parameters are kept in each signature and both keyword arguments in
  the without-skill summary call. Main's reused-baseline path does not
  set without_arm_suffix or without_task_entry_ids, so this branch's
  without_identity assignment moves into the fresh-baseline path, where
  those names are set; a reused baseline keeps an empty identity instead
  of raising NameError.
- src/skillevaluator/tier3/harbor/report_data.py: main imports
  resolve_should_trigger and this branch imports baseline_timeouts; both
  imports are kept.
- src/skillevaluator/tier3/harbor/runner.py: main passes budget_not_run
  and this branch passes tolerate_baseline_timeouts to
  collect_harbor_results; both are kept.

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…st budget limits

Main now reuses a retained baseline (--reuse-baseline) and lets a run
budget leave attempts unrun. Adapt the baseline-timeout tolerance to both:

- A reused baseline did not run in this collection, so it has no
  timeouts to judge. The option is inert with it, as with
  --skip-baseline: no run record, no rejection code and no warning.
- The residual coverage check and the case identities for timed-out
  trials now use the baseline arm's budget-adjusted expectations
  (cases, attempts per case), as the arm's own summary does. Attempts
  the budget never admitted are not missing attempts, so a budgeted run
  whose only missing baseline attempts are agent timeouts is tolerated
  instead of refused as unbound_error.

Tests: a reused-baseline run with the option on records no tolerance
state, and a budgeted run that never admitted case-003 for an agent
tolerates that agent's case-002 timeout (2 of 2 expected baseline
attempts, 1 scored). Both fail on the merge commit's src.

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Main (#395) now fails an agent's quality verdict when a with-skill case
scores goal accuracy below 1.0, before the dimension thresholds. The
verdict test's tolerated agent is meant to pass everything, but it used
the shared fixture scores (goal accuracy 0.8), so its own verdict became
FAIL. Its with-skill arm now scores goal accuracy 1.0. The test still
checks that the run verdict, best agent and every headline come from the
complete peer that fails or never activates the skill.

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Main (#395) records a verdict reason and the correct-answer,
required-check and security-clean counts from the agent that holds the
run verdict: the best agent when its own result matches, otherwise the
first agent that does. With a tolerated agent, the run verdict reads only
the agents with a complete baseline, but that fallback still searched
every agent, so a tolerated agent listed first could supply the counts
of a PASS it did not decide. The fallback now searches the same agents
the verdict reads. Runs without a tolerated agent keep main's choice.

Test: three agents, where the tolerated claude-code passes, opencode has
the top score but misses a goal (FAIL), and codex passes with a lower
score. The summary's counts are codex's. On the merge commit's src they
were claude-code's, with no baseline counts.

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…limits

The Baseline timeouts section now says that attempts a cost limit left
not_run are not missing baseline attempts, and that the option does not
apply to a baseline reused with --reuse-baseline, which did not run in
the current run.

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…imeout tolerance

The Unreleased entry now says the option needs both arms run in the
same run, not a --reuse-baseline baseline, and that attempts a cost
limit left not_run are not counted as missing.

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A cost limit makes the runner run every attempt as its own Harbor job
and merge them, with one launch error per failed attempt. The cost-limit
test now builds those attempt jobs with Harbor's own models, merges them
with the runner's _merge_attempt_jobs and passes the per-attempt launch
error, instead of an arm-level job. opencode's case-b was never admitted
on either arm, and its baseline's second case-a attempt timed out: the
agent is tolerated with 1 of 2 baseline attempts scored, and the launch
error is explained. On the merge commit's src it is refused as
unbound_error.

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ntity

The option only decides how a finished run's baseline gaps are reported;
it changes no execution. Recording harbor.tolerate_baseline_timeouts in
the comparison identity made --reuse-baseline, --compare-to and history
treat runs with and without it as different environments, so a run with
the option refused an otherwise compatible source without it. Treat the
key like the other operational settings.

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…for baseline timeouts

A cost-limited run also runs each attempt as its own job, so its
baseline timeouts are matched attempt by attempt, as with --stop-on-pass.
Say that the option is not part of what --reuse-baseline, --compare-to
and tier3 history compare.

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found a malformed-telemetry path that can abort result collection when baseline timeout tolerance is enabled.

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new baseline-timeout cross-page links also need published site routes.

Comment thread docs/cli-reference.mdx Resolved

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the full production diff, callers and tolerance/coverage contracts. Fixed oversized integer token evidence crashing the collector and repaired four published-documentation links in b086374; both inline threads are resolved. Both collector-source regressions failed before the fix. Validation: 98 affected tests passed with locked dependencies, both regressions passed again after formatting, make lint and pinned Fern check passed, and the wheel built successfully. Current main merged without conflicts. This PR remains open; no merge was performed.

@rng1995
rng1995 enabled auto-merge (squash) November 12, 2026 20:15
Signed-off-by: Narendran Raghavan <[email protected]>

# Conflicts:
#	CHANGELOG.md

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Concurrent-merge integration review at 4c6f02a167defc347decf898c1cd07cddaf3ca63: The actual CHANGELOG overlap preserves every independent entry and places this PR’s complete entry after its assigned existing bullet in the same Unreleased subsection. No production conflict required manual edits. Focused contracts: 110 passed in 817.87s (0:13:37). Lint passes; pinned Fern validation reports 0 errors and only the existing authenticated-redirect warning.

The signed-off fix was pushed normally after live open/head/base guards and clean merge checks against captured main a72a611963ac5328c63931c92fbcfbc88cf730aa and actual base main at a72a611963ac5328c63931c92fbcfbc88cf730aa. Fresh exact-head hosted CI is pending. No PR was merged by this review.

@rng1995
rng1995 merged commit 0f4395d into main Nov 12, 2026
27 checks passed
@rng1995
rng1995 deleted the naren/port-tier3-baseline-timeout-tolerance branch November 12, 2026 21:09
rng1995 added a commit that referenced this pull request Nov 12, 2026
Brings in #410, #412, #413, #419, #421, #425, #430 and #444. Conflicts: CHANGELOG.md (kept both Unreleased Fixed entries) and evaluation/options.py (kept main's tolerate_baseline_timeouts field and this PR's backend field).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
rng1995 added a commit that referenced this pull request Nov 12, 2026
main's #430 added --tolerate-baseline-timeouts and harbor.tolerate_baseline_timeouts,
but only the Harbor runner reads them. After the main sync, a NeMo Gym run accepted
either and silently ran without the tolerance, the same gap the budget and
baseline-reuse options had.

Gym now rejects the option when it is on, from the flag or the config key, before
dataset generation, a run folder or a Gym launch, with the same "is not supported
with --backend nemo-gym yet" message. Off is Gym's own behavior, so
--no-tolerate-baseline-timeouts stays allowed and, as on Harbor, overrides a config
key that turns it on. The docs list the new rejected flag and key.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
rng1995 added a commit that referenced this pull request Nov 13, 2026
* chore: start Nemogym integration

Signed-off-by: Christopher Kevin <[email protected]>

* feat(tier3): add selectable NeMo Gym execution backend

Add `tier3 evaluate --backend harbor|nemo-gym` (default harbor). With
nemo-gym, the evals.json cases are generated as the same task folders and
run by NeMo Gym's own orchestrator, agent harness and Docker sandbox in a
separate pinned process. Rollouts are normalized back into trial results,
so the shared collector, scores, lift and reports are reused, and
result.json records the backend and Gym version. Unsupported options are
rejected before execution with no fallback to Harbor.

Also credit SKILL.md reads wrapped in `bash -lc '...'`, which NeMo Gym's
Codex agent records, as skill activation.

Signed-off-by: Christopher Kevin <[email protected]>

* test(tier3): score shell-wrapped SKILL.md reads in the plugin-signal test

The scored activation check now credits `bash -lc 'cat .../SKILL.md'`, so move that case from the lenient-only group to its own test.

Signed-off-by: Christopher Kevin <[email protected]>

* fix(tier3): honor run options and result contract on the NeMo Gym backend

- Resolve unset options from evals/config.yml as Harbor does and reject config-set features Gym cannot honor (stop_on_pass, timeout_multiplier, agent_runtime_preflight, base_image_mode, custom Dockerfile modes).
- Apply --skip-with-skill and --max-cases, and pass one --agent-model string per agent.
- Reject --agent-runtime-preflight, and reject unsupported Gym flags before --autopilot writes a dataset.
- Write run_config.json and the run_config/attempt_policy/report_status/duration result fields so result discovery finds Gym runs.
- Launch Gym with only the host variables a Harbor backend may receive, plus the policy and judge credentials.

Signed-off-by: Christopher Kevin <[email protected]>

* fix(tier3): honor config agent models and resources on the NeMo Gym backend

Use harbor.agents.<agent>.model and harbor.resources (cpus, memory_mb) when no flag overrides them, reject the Harbor-only config keys Gym cannot honor (task_source native_harbor, agent_workdir, pre_agent_setup, setup_commands, passthrough_env, resources.storage_mb), and list the supported keys in the docs.

Signed-off-by: Christopher Kevin <[email protected]>

* fix(tier3): address NeMo Gym backend review findings

Merge Gym launch errors into results, tolerate truncated rollout JSONL, stage harbor.runtime_env into agent tasks, forward only Harbor's Docker-backend environment allowlist, publish the latest link, record dataset snapshot and publication target, run Gym in its own process group with graceful shutdown, resolve the Gym binary and version robustly, require a policy key for a custom model URL, validate SKILL_EVAL_NEMO_GYM_TIMEOUT_S, reject skill_workspace.decoy_manifest and harbor.timeout_multiplier, skip Harbor runtime preflight for tier3 PATH --backend nemo-gym, and drop duplicated CHANGELOG entries.

Signed-off-by: Christopher Kevin <[email protected]>

* fix(tier3): let CLI overrides win in NeMo Gym config checks

Skip a config key in nemo_gym_config_errors when its flag is given, read the workflow's environment_kwarg param, and stop rejecting the passthrough_env/setup_commands aliases that load_evals_config already normalizes (passthrough_env now reaches the agent via runtime_env staging).

Signed-off-by: Christopher Kevin <[email protected]>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(tier3): address round-3 NeMo Gym review findings

Isolate the Gym version probe, stage judge overrides into the verifier,
keep partial rollouts as scored arms, let Codex inherit runtime_env,
refresh Vertex ADC per launch, harden process cleanup and log redaction,
reject MCP servers, native Harbor tasks, URL credentials and Windows
before any work, stage every arm once before the first launch, remove
staged tasks/jobs as Harbor does, and carry failed status into reports.

Signed-off-by: Christopher Kevin <[email protected]>

* feat(tier3): support --timeout-multiplier on the NeMo Gym backend

Scale each staged task's agent, verifier and environment-build timeouts
by Harbor's multiplier before Gym runs, since Gym enforces the task's own
timeouts. Validate the multiplier as Harbor does and record it in
run_config.json.

Signed-off-by: Christopher Kevin <[email protected]>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* feat(tier3): live case progress and doctor for the NeMo Gym backend

Fill the live per-case progress rows from Gym's rollouts.jsonl as attempts
finish, and add tier3 doctor --backend nemo-gym to check the Gym CLI,
version, docker CLI, settings and agent/env-mode support.

Signed-off-by: Christopher Kevin <[email protected]>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* test(golden): add tier3 doctor --backend to the CLI surface snapshot

Signed-off-by: Christopher Kevin <[email protected]>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* feat(tier3): support agent_workdir, pre_agent_setup and --copy-repo on NeMo Gym

Gym reads [environment].workdir and [environment.healthcheck] from task.toml,
and builds the repo-context COPY lines, so the staged Harbor tasks carry these
settings unchanged. The baseline-isolation rule for pre_agent_setup matches
Harbor's.

Signed-off-by: Christopher Kevin <[email protected]>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* feat(tier3): support skill_workspace.decoy_manifest on NeMo Gym

Resolve the frozen decoy selection with Harbor's helpers, stage the same
verified snapshot into every arm, and record the manifest in run_config.json.

Signed-off-by: Christopher Kevin <[email protected]>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* feat(tier3): accept custom_dockerfile_mode preserve on NeMo Gym

Without a shared base image, preserve and rebase build the same image, as on
Harbor; record the mode in run_config.json.

Signed-off-by: Christopher Kevin <[email protected]>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* feat(tier3): run native evals/harbor tasks on NeMo Gym

Resolve task_source like Harbor and stage native tasks with Harbor's own
native staging; record the resolved source in run_config.json.

Signed-off-by: Christopher Kevin <[email protected]>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* feat(tier3): support harbor.base_image_mode on NeMo Gym

Build Harbor's shared eval base image for reuse/rebuild and stage the task
Dockerfiles on top of it, honouring --custom-dockerfile-mode.

Signed-off-by: Christopher Kevin <[email protected]>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(tier3): keep engine failures in re-rendered reports

Fall back to the run's result.json when no engine result is passed, and mark
the payload summary and affected agents failed, not only the root.

Signed-off-by: Christopher Kevin <[email protected]>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(tier3): address NeMo Gym review round 4

- Codex inherits the task environment on every docker launch; reject
  an unsupported SKILL_EVAL_NEMO_GYM_SANDBOX.
- Score a numeric reward.txt when reward.json is missing, as Harbor does.
- Redact rollout row failure text before it reaches trial results.
- Run the full Gym preflight before --autopilot writes a dataset, and
  reject a missing dataset before a run dir is reserved.
- Reject [[environment.mcp_servers]] in native task.toml files.
- Keep Gym's process group killed on a second interrupt and tolerate the
  macOS EPERM race; record other stop errors against the arm.
- Apply --override-cpus/--override-memory-mb to native tasks and scale
  the default 600 s verifier timeout with --timeout-multiplier.
- Exclude the results root from the repo context, report a failed base
  image build as degraded, and start the reporter with the run plan.
- Refresh the Vertex policy token whenever the policy uses the provider
  key; score live Gym marks from verifier logs and skip normalized jobs.
- tier3 doctor --backend nemo-gym probes the Docker daemon and resolves
  each agent's policy endpoint; document doctor --backend.

Signed-off-by: Christopher Kevin <[email protected]>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* chore(gitleaks): allowlist the synthetic NeMo Gym policy key test value

Signed-off-by: Christopher Kevin <[email protected]>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* docs(tier3): state that NeMo Gym supports only --env-mode docker

Signed-off-by: Christopher Kevin <[email protected]>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(tier3): report excess NeMo Gym rollouts instead of dropping them silently

Signed-off-by: Christopher Kevin <[email protected]>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(tier3): reject incompatible Gym CLIs and excess rollouts

Signed-off-by: Narendran Raghavan <[email protected]>

* fix(tier3): bound Gym help output and contain probe processes

Signed-off-by: Narendran Raghavan <[email protected]>

* fix(tier3): keep unattributed engine errors off agents, keep Ctrl-C on stop failure, replace legacy memory key

Signed-off-by: Christopher Kevin <[email protected]>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(tier3): reject a NeMo Gym CLI without the Harbor task-folder interface before staging

Signed-off-by: Christopher Kevin <[email protected]>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix: recognize public Gym TARGET positional help

Signed-off-by: Narendran Raghavan <[email protected]>

* fix(tier3): validate Gym runtime_env and max_agents before reserving a run folder

Resolve the judge and harbor.runtime_env environment before
_reserve_run_dir, so an unset ${VAR} or an operator-owned name leaves no
results/ folder behind, as on Harbor. Reject --max-agents and
harbor.max_agents below 1 on the Gym path with Harbor's message.

Signed-off-by: Christopher Kevin <[email protected]>

* fix(tier3): reject --tolerate-baseline-timeouts for --backend nemo-gym

main's #430 added --tolerate-baseline-timeouts and harbor.tolerate_baseline_timeouts,
but only the Harbor runner reads them. After the main sync, a NeMo Gym run accepted
either and silently ran without the tolerance, the same gap the budget and
baseline-reuse options had.

Gym now rejects the option when it is on, from the flag or the config key, before
dataset generation, a run folder or a Gym launch, with the same "is not supported
with --backend nemo-gym yet" message. Off is Gym's own behavior, so
--no-tolerate-baseline-timeouts stays allowed and, as on Harbor, overrides a config
key that turns it on. The docs list the new rejected flag and key.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>

* docs: use site paths for the Execution backends links

The --backend row in the CLI reference and the SKILL_EVAL_NEMO_GYM_BIN row
in the environment variables page linked to tier3-live-evaluation.mdx by
file path. Published pages need the /skills/skillevaluator/<slug> form, as
docs/AGENTS.md requires.

Signed-off-by: Christopher Kevin <[email protected]>

* fix(tier3): end a NeMo Gym run when its process group will not stop

When a timed-out gym eval run could not be stopped (killpg refused or the
leader was not reaped), the failure was recorded against the arm and the
next arm launched beside Gym servers and sandboxes that might still be
running.

_run_gym now makes one last bounded SIGKILL and reap after a failed stop and
checks the group is empty. If it still cannot confirm that, it raises
GymCleanupError; the runner reports the agent as failed and aborts instead
of starting another arm.

Signed-off-by: Christopher Kevin <[email protected]>

* fix(tier3): keep finished Gym arms when a group cannot be confirmed stopped

Re-raising GymCleanupError ended the evaluation before collection, so the
arms and agents that had already finished lost their scores: no result.json,
report or latest. Now nothing else is launched beside the group, each skipped
arm is recorded as not started, and the run is still collected and saved as
failed with the cleanup error.

On Ctrl-C, SIGTERM or SIGHUP the interrupt still ends the run, but a failed
cleanup progress event now says Gym may still be running, instead of only
"Aborted!".

_group_is_gone reaps our own zombies in the group before each probe, so
SkillEvaluator as PID 1 (or a subreaper) without an init no longer reports an
already-dead group as running.

New tests cover a member that outlives the leader, a retried EPERM probe, the
Linux subreaper case, the interrupt event, and a finished arm kept beside a
hung one.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>

* fix(tier3): show the Gym cleanup warning in the summary

When an earlier arm finished, the summary without --verbose folded the
cleanup error into "N failure detail(s)", so with --progress off nothing said
that Gym's servers or sandboxes may still be running. Record it as a warning
too, which the summary always prints, and record that the arm timed out
before its stop failed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>

* fix(tier3): give Gym the same missing-dataset advice as Harbor

#456 made create-eval-dataset default to --grounding auto, which needs
evals/EVAL.md, --prompt or a matching trace, and rewrote Harbor's
missing-dataset error to say so. The Gym backend kept its own copy of the old
message, which told users to run create-eval-dataset, and that now fails
without guidance. Both backends now use one shared message.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>

---------

Signed-off-by: Christopher Kevin <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
Co-authored-by: Narendran Raghavan <[email protected]>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Narendran Raghavan <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
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