Repository navigation
feat(tier3): fail cases on unmet goals and security issues, independent of lift - #395
Conversation
Signed-off-by: Christopher Kevin <[email protected]>
Signed-off-by: Christopher Kevin <[email protected]>
Signed-off-by: Christopher Kevin <[email protected]>
Signed-off-by: Christopher Kevin <[email protected]>
Signed-off-by: Christopher Kevin <[email protected]>
Signed-off-by: Christopher Kevin <[email protected]>
Signed-off-by: Christopher Kevin <[email protected]>
|
@rng1995 @mosheabr I'd like your input on the verdict policy in this PR before it lands, since it changes what PASS means for Tier 3:
Happy to adjust the defaults based on your feedback. |
Signed-off-by: Christopher Kevin <[email protected]>
Signed-off-by: Christopher Kevin <[email protected]>
rng1995
left a comment
There was a problem hiding this comment.
Automated review: 15 findings (0 P1, 4 P2, 11 P3); 15 posted inline.
Checked the new attempt verdict (goal and security gates, Codex wrapper exemption, behavior warning) through the collector's pass@k, count rows, stop-on-pass and shared-metric pass lift, the run headline, and every surface it feeds (HTML Attempt Details and preview budget, BENCHMARK.md, tier3-benchmark, evaluate terminal, validate CLI, live marks), with probes on the PR head and an origin/main archive.
Tests: the PR's new and touched test files pass (566 passed, 4 skipped in 12 files; 345 passed in a second run of 11 files), and the existing suites for the changed modules pass (938 passed in 9 files, including the benchmark golden card, case summary, results location and failure-reason tests; 150 passed in 7 more).
Merges cleanly into main. #397 rewrites the same verdict headline (reporting/cli.py, report.html.j2, tier3/result_display.py, tests/test_tier3_result_display.py), so whichever lands second needs a real rebase; #405 (29 lines in reporting/cli.py plus a result_display.py import), #406 (result_display.py import, tests/reporting/test_tier3_failure_reasons.py), #399 (tests/reporting/test_tier3_failure_reasons.py), #407 (reporting/cli.py) and #384/#387/#388 (one collector.py import line) have smaller conflicts; the rest are CHANGELOG.md only.
#397's pass_at_k_summary and HTML pass@k text say an attempt passes at "Overall >= 0.50", which is wrong once these goal and security gates land, so land this before #397. #225's new _add_gym_live_marks still marks a pass on Overall alone, so with both merged a Gym case with an unmet goal shows a live check mark and a final FAIL; whichever of #225/#395 lands second should route it through attempt_verdict.
#376's new HTML key says the Verdict passes when one agent scores at least 0.70 on every dimension; after this PR a goal or security failure sets FAIL first, so that key and its N/A row describe the old gate.
Behavior warning with other PRs: under #403, deterministic check results appended to details.behavior_check.results are counted as steps ("missed expected step 1 of 2") or reported without naming the failed check; under #382, a judge abstention (passed: null) is reported only as "missed expected behavior (behavior 0.50)". #402 deliberately leaves placeholder ground_truth values such as "None" alone, so with this PR a goal judged against one now fails the case outright instead of only lowering Overall.
Signed-off-by: Christopher Kevin <[email protected]>
Signed-off-by: Christopher Kevin <[email protected]>
SkillEvaluator CI resultsRequired gate: Skipped Only Tier 1 blocks CI; Tier 2 and Tier 3 are advisory.
Commit: |
Signed-off-by: Christopher Kevin <[email protected]>
Signed-off-by: Christopher Kevin <[email protected]>
…ng-answer-fails-overall Signed-off-by: Christopher Kevin <[email protected]> # Conflicts: # CHANGELOG.md
…ng-answer-fails-overall Signed-off-by: Christopher Kevin <[email protected]>
Signed-off-by: Christopher Kevin <[email protected]> # Conflicts: # CHANGELOG.md # src/skillevaluator/evaluation/tier3_report.py # src/skillevaluator/reporting/cli.py # src/skillevaluator/tier3/result_display.py
Signed-off-by: Christopher Kevin <[email protected]>
Signed-off-by: Christopher Kevin <[email protected]>
NVIDIA#376 moved the dimension cells into _dimension_cell and added a baseline-only case to the same functions this branch changed. Keep both: the baseline-only text from main, and the baseline N/A text for a dimension a no-skill baseline can't score, now checked inside _dimension_cell. NVIDIA#395 fails a case whose goal accuracy is below 1.0, so the default-run fixture in the test scores the with-skill goal accuracy 1.0 and behavior check 0.8. The five-dimension and three-dimension scores still differ, 0.94 and 0.9333, and the expected lift and the two rejection cases move with them. Signed-off-by: Saibernard Yogendran <[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]>
Brings in main up to d717f22 (#450). Conflicts: - src/skillevaluator/evaluation/tier3_report.py: both sides rewrote the _agent_quality_verdict docstring. Main (#395) added a required-check FAIL after the never-activated check; the branch lets a dimension below 0.40 fail the agent when another dimension has no score. Kept main's summary line ("required checks, then dimensions") and the branch's explanation of the missing-dimension rule. The function body merged without conflict: main's required-check FAIL runs first, then the branch's dimension gate. - CHANGELOG.md: both sides appended to Unreleased > Fixed. Kept main's tier3 compare entry and put this branch's verdict entry after it. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
) * feat(tier3): add opt-in tolerance for baseline-only agent timeouts 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]> * docs(tier3): document baseline timeout tolerance 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]> * fix(tier3): rank tolerated agents below complete peers and tighten the 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]> * docs(tier3): describe baseline timeout ranking, notes and recorded keys 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]> * fix(reporting): keep the tolerated-baseline notes clear of other report 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]> * docs(tier3): rewrap the baseline timeouts section Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(tier3): refuse baseline timeouts in native multi-step tasks by name 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]> * fix(tier3): keep tier3 view findings on the canonical best agent 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]> * fix(reporting): show each tolerated-baseline note on its own line in 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]> * docs(tier3): say which skipped agents keep tier3 view off a tolerated 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]> * fix(tier3): keep the terminal findings panel off a lone tolerated agent 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]> * docs(tier3): name the tier3 evaluate findings panel for tolerated agents 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]> * refactor(reporting): keep tolerated-baseline hunks apart from open report 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]> * fix(tier3): take the run verdict from the agents that set the best agent 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]> * fix(tier3): judge baseline timeouts only on baselines that ran, against 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]> * test(tier3): give the tolerated agent a met goal in the verdict test 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]> * fix(tier3): take the verdict's counts from the agents the verdict reads 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]> * docs(tier3): say how baseline-timeout tolerance meets reuse and cost 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]> * docs(changelog): note reused baselines and cost limits for baseline-timeout 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]> * test(tier3): check cost-limit tolerance on the runner's per-attempt jobs 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]> * fix(tier3): keep baseline-timeout tolerance out of the comparison identity 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]> * docs(tier3): note cost-limit attempt matching and comparison pairing 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]> * fix(tier3): reject oversized timeout token evidence safely Signed-off-by: Narendran Raghavan <[email protected]> --------- Signed-off-by: Narendran Raghavan <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
Summary
Before this change, a Tier 3 case passed whenever its Overall score (the average of the five dimensions) was at least 0.5. A wrong answer or an unsafe action could still pass if the other metrics pulled the average up. The run headline looked only at per-dimension averages, so a single unsafe case among many safe ones still showed PASS.
This PR adds required checks on top of the existing scoring. Scores, dimensions and Skill Lift are numerically unchanged.
goal_accuracy(when scored)goal not met (goal accuracy 0.00)security(when scored)security issue (security 0.50): <finding>. Unsupported native Codex wrapper warnings are exempt, because they are an evaluator limitation and not agent behavior.behavior_checkmissed expected step 1 of 2 (behavior 0.50). It still lowers Overall.RUN_FAILS_ON_ANY_FAILED_CASE). Failures only in the no-skill arm don't change the headline.The shared verdict (
tier3/attempt_verdict.py) drives pass counts and rates, "cases needing review",--stop-on-passand CI gates.Reporting
evaluate,validate, the HTML report andBENCHMARK.mdnow:FAIL — 2 of 4 cases failed: 1 goal not met, 1 security issuerequired_checks,correct_answersandsecurity_clean.Example (real run, 4 cases, re-rendered offline)
Known trade-offs
curl/wgetwill fail. An allowlist for expected commands could follow.Verification
docs/reports.mdx)make lint(ranruff check/ruff format --checkon the touched files)make test(ran the focused tests only: 169 passed)make buildAlso ran
git diff --checkandfern check. Ran realevaluateandvalidatebefore and after the change on a 4-case dataset: correct answer, wrong ground truth, acurlsecurity warning and a missed step.Release Impact
CHANGELOG.md