Skip to content

fix(reporting): show recovered timeout attempts accurately in Tier 3 attempt details - #416

Merged
rng1995 merged 9 commits into
mainfrom
naren/port-reporting-recovered-attempt-counts
Nov 12, 2026
Merged

rng1995 merged 9 commits into
mainfrom
naren/port-reporting-recovered-attempt-counts

Conversation

@rng1995

@rng1995 rng1995 commented Nov 9, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

With --stop-on-pass, a later scored attempt can recover an agent timeout (added in 0.7.0). The HTML Attempt Details table did not show this. For a case that timed out on attempt 1, passed on attempt 2 and skipped attempt 3, the row read 1 of 2 scored and passed on scored attempt 2, and nothing mentioned the timeout. Only one attempt was scored, so "scored attempt 2" was wrong. With two timeouts before a pass on attempt 3 it read 1 of 1 scored and passed on scored attempt 3.

  • The Attempt Scores cell shows a muted A1: timed out, recovered chip at the attempt's number, between the scored chips. The number comes from the arm's recovery list (conditions.<arm>.recovered_attempts, matched by case ID). That list is bounded and can be compacted away, so when it does not cover every recovered attempt of the case, the cell shows the count instead (1 timed out, recovered).
  • The report publishes a bounded number of attempt rows per run, so a later recovered case can have scored attempts but no rows. Its cell then adds scored attempt details omitted (or no attempts recorded when it has no scored attempts), so the recovered chip does not read as the whole history.
  • Scored Attempts adds the case's attempts_recovered to its denominator. The example row now reads 1 of 3 scored. The cell's tooltip says how many recovered timeouts it includes.
  • The Result column says passed on attempt N instead of passed on scored attempt N. N is the physical attempt number, not a count of scored attempts, so the old wording was wrong whenever an earlier attempt was not scored.
  • When any row has a recovered timeout, the section hint says Attempt Scores lists the scored attempts and any recovered timeouts, explains "Timed out, recovered", says the chip shows the attempt number when the report has it and otherwise a count, and says the timeout counts in the attempt total under Scored Attempts (the second number), not in the scored count. Without recovery the hint is unchanged.
  • tier3 evaluate prints one line per agent with recovered timeouts, for example opencode: 1 agent timeout recovered by a later scored attempt (1 with skill); the timed-out attempt is not scored and stays in the run history. Until now the terminal never mentioned recovery.
  • reporting/html.py normalizes a case's attempts_recovered to a non-negative count when the field is present, like the other attempt counters. Cases without the field are not changed.
  • Docs: a paragraph in docs/tier3-live-evaluation.mdx after the --stop-on-pass cost note, including the count form of the chip. CHANGELOG entry under Unreleased > Fixed.

Why the physical denominator

The other option was to keep the denominator without recovered attempts (1 of 2 scored) and add (+1 recovered timeout). This PR counts them instead:

  • Without recovery the denominator is already the configured attempt budget: scored, skipped (stop-on-pass) and missing attempts add up to --n-attempts. A recovered timeout was the only attempt left out.
  • The chips and the Result column use attempt numbers. 1 of 2 scored next to passed on attempt 2 reads as if the case had only two attempts.
  • The section hint already measures a case against the full budget (counts as passed for Pass@3), and the pass@k JSON does too (max_attempts_possible is cases x attempts).

Why

A reader of the HTML report saw a wrong attempt label and a denominator that did not match the configured attempts, with no sign that a timeout had happened. The run-level hero line and tier3-benchmark.md mention recovered timeouts, but only for the best agent, and the terminal said nothing.

Kept from public

Tests

  • tests/test_harbor_timeout_recovery.py: 9 new tests, 12 with parameters. Seven of them build real Harbor attempt jobs with the module's native_attempt helper, collect them and render the HTML report; four of those seven edit the collected payload first and render it with HTMLReporter. Two check the tier3 evaluate terminal output.
    • a timeout on attempt 1 and a pass on attempt 2 of 3: the row reads A1: timed out, recovered A2: 1.00 PASS 1 of 3 scored 1.00 passed on attempt 2, the whole hint text matches (including "the scored attempts and any recovered timeouts" and "not in the scored count"), and the tooltip appears;
    • a scored fail, a timeout, then a pass: the recovered chip sits between them, 2 of 3 scored, passed on attempt 3;
    • control without recovery (a scored fail, then a pass): only the Result wording changes (2 of 3 scored, passed on attempt 2), the hint keeps "the scored attempts only", and there is no recovered chip or terminal line;
    • each row reads attempt numbers from its own arm: a baseline row with a recovery list shows A1: timed out, recovered, and a with-skill row without one shows 1 timed out, recovered;
    • after the real condition compaction (_compact_agent_conditions, which large multi-agent reports apply to non-best agents) drops the recovery list, the row shows 1 timed out, recovered and the hint does not claim the chip keeps its attempt number;
    • a recovered case with no attempt rows shows scored attempt details omitted next to A1: timed out, recovered, or no attempts recorded when it has no scored attempts (2 cases);
    • attempts_recovered set to "1", -3 or true renders like a case without recovery: 1 of 2 scored, no recovered chip, tooltip or hint (3 cases);
    • tier3 evaluate prints the recovery line for the collected run;
    • render_result on a hand-built result with six agents prints one line for each agent with recovered timeouts: it sums both arms, pluralizes, and prints nothing for zero, boolean, text or missing counts.
  • The collect helper now takes any number of attempt jobs; existing calls are unchanged.
  • Fail-before: with src/ from main d717f22cf, all 12 new test items fail and the module's other 19 tests pass. With only reporting/html.py from main, the 3 invalid-count items fail: "1" raises TypeError: '>' not supported between instances of 'str' and 'int' and -3 reads 1 of -1 scored.
  • On the branch: tests/test_harbor_timeout_recovery.py 31 passed.
  • After merging main d717f22cf: the 68 test modules that render the HTML report or the Tier 3 terminal result, or read docs/tier3-live-evaluation.mdx and the CHANGELOG (including tests/reporting, tests/test_tier3_result_display.py, tests/test_harbor_timeout_recovery.py, tests/test_ci_workflows.py, tests/test_oss_packaging.py and tests/test_ci_change_classifier.py): 4707 passed, 6 skipped.
  • The branch now includes main d717f22cf. The merge had one conflict, the Attempt Details block of report.html.j2 with feat(tier3): fail cases on unmet goals and security issues, independent of lift #395, resolved as described above. A follow-up commit updates the new tests to main's PASS and FAIL chip labels and its threshold sentence in the hint.
  • ruff check and ruff format --check are clean on the changed Python files, and scripts/check_oss_boundary.py passes.

🤖 Generated with Claude Code

rng1995 and others added 6 commits November 7, 2026 21:09
…ails

With --stop-on-pass, a later scored attempt can recover an agent timeout.
The HTML Attempt Details row left the timed-out attempt out of its
denominator and said "passed on scored attempt N" for the physical attempt
number, so a timeout on attempt 1 and a pass on attempt 2 of 3 read
"1 of 2 scored" and "passed on scored attempt 2", with no sign of the
timeout.

- Show a muted "A<k>: timed out, recovered" chip at the attempt's number,
  read from the arm's recovery list, or the recovered count when that
  bounded list does not cover the case.
- Count recovered attempts in Scored Attempts, so the denominator stays the
  case's attempt budget ("1 of 3 scored").
- Say "passed on attempt N".
- Print one line per agent with recovered timeouts in tier3 evaluate.
- Normalize a case's attempts_recovered in the HTML context.

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Explain under --stop-on-pass how a later scored attempt recovers an agent
timeout, how the HTML Attempt Details row and tier3 evaluate show it, and
that a fixed attempt budget has no recovery. Add the CHANGELOG entry.

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

Add a reporter test that sets a collected recovered case's
attempts_recovered to "1", -3 and True. The HTML report must render the
row like a case without recovery (1 of 2 scored, no recovered chip,
tooltip or hint). Without the attempts_recovered normalizer in
reporting/html.py, "1" raises a TypeError and -3 reads "1 of -1 scored".

Drive the multi-agent terminal cases through render_result() with a
hand-built result instead of importing the private line helper, and
split them from the collected-run check.

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Once a row shows a recovered timeout chip, the hint no longer says
Attempt Scores lists the scored attempts only: it lists the scored
attempts and any recovered timeouts. It also says a recovered timeout
counts in the attempt total under Scored Attempts (the second number),
not in the scored count. Without recovery the hint is unchanged.

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

The collector publishes a bounded number of attempt rows per run, so a
later recovered case can arrive with scored attempts but no rows. Its
Attempt Scores cell then showed only "A1: timed out, recovered", which
read as the whole history while the scored attempt was missing. Such a
cell now adds "scored attempt details omitted", or main's
"no attempts recorded" when the case has no scored attempts. Rows
without a recovered timeout are unchanged.

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

The Attempt Details hint said a recovered timeout "keeps its attempt
number". A row whose arm has no recovery list for the case (condition
compaction in a large multi-agent report drops it, and the list is
bounded) shows a count chip such as "1 timed out, recovered" instead.
The hint now says the chip shows the attempt number when the report has
it, and otherwise a count. The docs paragraph says the same.

A new test runs the real condition compaction on a recovered run and
checks the count chip and the hint.

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:49
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown

Evaluation run

SkillEvaluator CI results

Required gate: Skipped

Only Tier 1 blocks CI; Tier 2 and Tier 3 are advisory.

Skill Tier 1: Static and Security Validation Tier 2: Deduplication Tier 3: Live Agent Evaluation Report
No skills evaluated SKIPPED · issues unknown · No selected skills changed; Tier 1 evaluation did not run. SKIPPED · issues unknown · No selected skills changed; evaluation did not run. SKIPPED · issues unknown · No selected skills changed; evaluation did not run. Report

Commit: fbfe1b517df3a7aae74f16967b6c4fc3102e841a · Environment: docker

rng1995 and others added 2 commits November 10, 2026 14:12
Merge public main d717f22 into the branch.

One file conflicted, src/skillevaluator/reporting/templates/report.html.j2,
in the Tier 3 Attempt Details block, where main now judges each attempt
by its attempt verdict (goal accuracy and security thresholds) and the
branch shows recovered agent timeouts:

- Row setup: kept main's per-trial attempt verdict map and dropped the
  old goal-accuracy lookup that main removed; kept the branch's flag for
  rows with a recovered timeout.
- Section hint: kept main's sentence on the goal accuracy and security
  thresholds, and the branch's "and any recovered timeouts" wording and
  its sentence on the "Timed out, recovered" chip.
- Attempt Scores cell: kept both the branch's recovered-timeout chips
  placed at their attempt numbers and main's per-attempt verdict, PASS or
  FAIL label and reason tooltip.
- Result cell: kept main's verdict-based outcome (main dropped the
  "goal not met" pill the branch had reworded) and applied the branch's
  wording, "passed on attempt N", since N is the attempt's number.

CHANGELOG.md, docs/tier3-live-evaluation.mdx, reporting/html.py,
tier3/result_display.py and tests/test_harbor_timeout_recovery.py merged
cleanly; the branch's CHANGELOG entry stays where it was under
Unreleased / Fixed.

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

Main now labels each Attempt Details chip PASS or FAIL from the attempt
verdict and adds the goal accuracy and security thresholds to the
section hint. Update the recovered-timeout tests to expect those labels
and that hint sentence; the recovered chips, attempt totals and
"passed on attempt N" wording they check are unchanged.

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.

Reviewed recovered timeout counts and ordinals, per-arm HTML details, malformed count handling and literal terminal notices, including callers and the PR test coverage. No additional actionable findings.

Validation on a clean merge candidate with current main (ce52a098), using the repository lockfile: 12 passed,19 deselected in165.18s. The exact PR head e2adceee9707 has all 10 required CI checks successful and merges without conflicts. The remote head is unchanged by this review.

@rng1995
rng1995 merged commit 4a34bd3 into main Nov 12, 2026
22 checks passed
@rng1995
rng1995 deleted the naren/port-reporting-recovered-attempt-counts branch November 12, 2026 19:58
rng1995 added a commit that referenced this pull request Nov 12, 2026
Brings in main through b38b71b (#416, #417, #420, #422, #423, #428,
#429, #467). Merged without conflicts; CHANGELOG, docs, decoys.py and
eval_core/checks.py auto-merged with both sides' edits in separate hunks.

Signed-off-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