Skip to content

fix(tier3): retain scores after verified timeout recovery - #222

Merged
rng1995 merged 8 commits into
mainfrom
feat/christopherk/recovered-trial-timeouts
Oct 30, 2026
Merged

rng1995 merged 8 commits into
mainfrom
feat/christopherk/recovered-trial-timeouts

Conversation

@chrisknvidia

@chrisknvidia chrisknvidia commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

A Harbor agent timeout can leave an error in the final result even after --stop-on-pass starts a fresh attempt that completes. Recognize recovery only when the native timeout, later scored attempt, task, agent, configuration, timestamps, and physical attempt coverage agree. Preserve the failed native result and diagnostics; never turn its reward into a score or zero-fill missing evidence.

The collector and report loader keep recovered history separate from active execution errors. Scored, recovered, and intentionally skipped attempts have distinct counts. Setup, transport, verifier, missing-result, ambiguous, and fixed-attempt-budget failures remain blocking. No backend configuration or dependencies change.

Verification

  • Read the contribution guidelines; signed-off commit
  • Focused recovery and rejection tests
  • Real Harbor 0.24.0 + Docker integration: actual agent deadline, fresh successful attempt, three completed wrong baseline attempts, native aggregation, report loading, HTML generation, and unchanged failed-result bytes
  • ruff check src tests
  • Wheel and source-distribution build
  • Full default suite executed: 13,821 passed, 27 skipped; 9 failures investigated
    • Eight failures reproduced on unchanged public main with the same environment (SDK compatibility and CLI golden output).
    • One FIFO timing test failed under parallel load and passed on isolated rerun; it also passed on unchanged main.
    • These existing/environment-sensitive failures are not hidden or changed by this PR.
  • Updated CHANGELOG.md
  • Reviewed added code, tests, and branch ancestry for private content

The Docker integration uses a deterministic agent and public python:3.12-slim; it does not call a live LLM provider. Run it with pytest -m integration tests/test_harbor_timeout_recovery_docker.py. Default tests exclude this Docker integration.

Release Impact

Fixes stop-on-pass timeout recovery without changing retry budgets, publication policy, or original artifacts.

@rng1995
rng1995 marked this pull request as ready for review October 22, 2026 14:34

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Automated review: 4 findings (0 P1, 2 P2, 2 P3); 4 posted inline.

No false recovery turned up. A different task checksum, model or config, a non-timeout error that mentions "timed out", setup timeouts, overlapping attempts, a timeout on the last attempt, a later unscored or errored attempt, and runs without --stop-on-pass all stay blocking. Runs with no timeouts produce identical results, files, loader output and terminal text to main, apart from three added keys.

Holding approval for the two P2s. Both fail safe, but they mean the main path does not work end to end yet. Harbor's own Job.run() stores metrics in the job result, and the rebuilt stats depend on listing order, so a genuine recovery is rejected and the run still ends failed.

Comment thread CHANGELOG.md Resolved
chrisknvidia and others added 3 commits October 29, 2026 02:46
… separately

Compare only trial-derived job statistics, independent of directory order, and move recovered timeouts out of the per-agent trial and job failures.

Signed-off-by: Christopher Kevin <[email protected]>
…overed-trial-timeouts

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

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed the full diff and all four prior review threads at 9d7407a. Verified populated job metrics, order-independent aggregation, active/recovered failure separation, and the narrowed JSON-summary release note. Merged current main, preserving both changelog sides. Validation: 353 focused tests passed and 2 skipped; one 0.1-second diagnostic timing assertion failed under concurrent load and passed on isolated rerun (1 passed). The real Harbor 0.24.0/Docker timeout-recovery integration passed, including unchanged failed-result bytes and report loading/generation. Ruff and sdist/wheel builds passed. No remaining code-review blocker found; GitHub checks on this exact head are still pending. This approval does not merge the PR.

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Re-reviewed after merging current main (618fc0f). The only textual conflict was CHANGELOG.md; the resolution preserves both the verified timeout-recovery release note and all upstream notes. The runner retains timeout recovery while including current scoped-report behavior, and current case-first reporting and shared deterministic checks remain intact. Focused revalidation: 46 timeout-recovery, negative-control, attempt-merge, scoped-report and case-findings tests passed; Ruff over src/tests, affected Harbor syntax checks, diff whitespace checks, and wheel/source-distribution builds passed. An earlier broader run was intentionally stopped after 92 passing tests to keep this conflict refresh bounded. No full-suite or Docker rerun is claimed for this refresh. No blocking findings on this commit.

@rng1995
rng1995 enabled auto-merge October 30, 2026 06:14

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed the latest main merge at 96473ca against d48fbe8, including the now-merged #227 and #242 changes and #257 inventory composition. The sole textual conflict was CHANGELOG.md; both timeout-recovery and bounded-chunk entries are retained. An independent reviewer verified the recovery collector, report-data changes and tests are unchanged from the prior approved version, and the runner preserves main's Unicode-facts configuration alongside timeout recovery.

Validation: 23 focused recovery and stop-on-pass/attempt-merge tests passed; Ruff over src/tests, affected-module compilation and whitespace checks passed. No unmerged index entries remain. The original branch was updated without force and GitHub reports this exact head mergeable against current main. Full suites and live-provider calls were not repeated; CI is separate from this approval.

@rng1995 rng1995 mentioned this pull request Oct 30, 2026
15 of 20 tasks

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed the conflict resolution against main b47d16c. The collector now combines both recovery metadata and the shared-metric scorer: each attempt retains its physical ordinal while the new cached scorer controls its pass result. Recovery strictness, shared metric/judge evidence and private pass pairing are preserved. The changelog retains both release notes, with timeout recovery placed alongside the related Harbor entry to avoid repeated top-of-section conflicts.

Validation: 59 focused timeout-recovery, metric-applicability and private-runtime-evidence tests passed, including two new pass/fail regression cases. A native retained-timeout + N/A-baseline probe preserves recovered history and correctly recomputes shared-metric lift. Independent review found no blocker; Ruff, formatting, syntax and whitespace checks pass. Full CI must pass on this exact head before the authorized merge; no branch-protection bypass is requested.

@rng1995
rng1995 merged commit dd81e6f into main Oct 30, 2026
20 checks passed
@rng1995
rng1995 deleted the feat/christopherk/recovered-trial-timeouts branch October 30, 2026 08:17
chrisknvidia added a commit that referenced this pull request Oct 30, 2026
* fix(tier3): recognize completed retries after agent timeouts
* fix(tier3): accept Harbor-written stats and report recovered timeouts separately

Signed-off-by: Christopher Kevin <[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.

2 participants