Skip to content

fix(tier3): keep per-trial activation diagnostics for failed arms - #664

Merged
chrisknvidia merged 8 commits into
mainfrom
fix/christopherk/failed-arm-trial-diagnostics
Nov 16, 2026
Merged

chrisknvidia merged 8 commits into
mainfrom
fix/christopherk/failed-arm-trial-diagnostics

Conversation

@chrisknvidia

@chrisknvidia chrisknvidia commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

When a Tier 3 arm fails or is only partly scored, the report withholds that arm's aggregate quality and lift (unchanged). But it also dropped every per-trial row for the arm, so the per-trial activation projection (activation_validation) disappeared, even for attempts that were scored. A failed run therefore gave no activation evidence at all, and an attempt missing from the report looked the same as one that never ran.

After this change:

  • Scored attempts in a failed arm keep their trial rows and their activation_validation.
  • Errored or unscored attempts appear as scored: false with observed_activation: unknown and an attempt_unscored diagnostic. They are never shown as not_invoked.
  • Aggregate quality, lift, case summaries, recommendations, dataset_summary, resources and BENCHMARK.md for the failed arm are unchanged. Retained rows are marked diagnostic_only and kept out of those summaries.
  • Token usage still counts each attempt exactly once, with the correct scored or unscored status.

This is one behavior change spread over three modules, because the parts can't land separately:

  • tier3/harbor/report_data.py keeps the diagnostic rows.
  • evaluation/tier3_report.py projects those rows while keeping them out of score-bearing summaries.
  • tier3/token_usage.py stops treating every canonical trial as scored.

Landing only one or two of these would double-count tokens or score errored attempts. In arms that did not succeed, reward artifacts with evaluation_status failed/error are now classified as unscored. That way, retained errored rows project unknown and each attempt is counted once with its correct status. On main, a real Codex attempt whose judge failed was loaded as a scored reward with trusted not_invoked. Succeeded arms are not touched. The collector never marks an arm succeeded when it contains failed rewards, and a test checks that a succeeded arm's aggregates don't change.

Found during real Tier 3 runs on NVIDIA Build with OpenCode and Codex: one with-skill arm had 3 of 8 attempts scored, and the report's trials list for it was empty.

Verification

  • I am familiar with the Contributing Guidelines
  • Added or updated focused tests (tests/reporting/test_failed_arm_trials.py: retained scored rows, errored rows project unknown, no token/attempt double counting, per-arm parity of quality, lift, case summaries, recommendations, dataset_summary, resources and BENCHMARK.md against the same payload with the diagnostic rows removed, succeeded-arm aggregates unchanged; 9 of 12 fail on main, all pass here)
  • Updated documentation for user-visible changes (no docs describe the failed-arm trials list)
  • Ran make lint
  • Ran make test (focused tests/reporting + token usage/report suites: 2483 passed; full suite left to CI)
  • Ran make build
  • Did not add credentials, private datasets, or proprietary benchmark content

Re-projecting a saved real failed run with this branch: an errored with-skill attempt now shows observed_activation: unknown with attempt_unscored, and a scored one shows not_invoked / matched with its reward and trajectory artifact links.

Release Impact

  • No user-visible release note needed
  • Updated CHANGELOG.md

Signed-off-by: Christopher Kevin <christopherk@nvidia.com>
Signed-off-by: Christopher Kevin <christopherk@nvidia.com>
Signed-off-by: Christopher Kevin <christopherk@nvidia.com>
Signed-off-by: Christopher Kevin <christopherk@nvidia.com>
Signed-off-by: Christopher Kevin <christopherk@nvidia.com>
devin-ai-integration[bot]

This comment was marked as resolved.

Signed-off-by: Christopher Kevin <christopherk@nvidia.com>

@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 at 987cdf4. The production changes hold up apart from the token double-count that Devin flagged on token_usage.py:231. I reproduced it and added a repro and fix suggestion to that thread, so I have not opened a duplicate.

What I checked and found correct:

  • Failed arms keep scored and errored trials as diagnostic_only rows, built from diagnostic_rewards*.
  • Errored attempts get scored: false and an attempt_unscored activation diagnostic.
  • Aggregate quality, lift, dataset_summary and resources still come from withheld or empty data.
  • _condition_quality_available covers the same arm statuses that load_agent_data withholds, so the new resources gating changes nothing for succeeded arms.
  • Failed runs take the "Evaluation incomplete" branch, so per-trial failure counts never reach _build_conclusions.
  • The CHANGELOG entry sits under Unreleased > Fixed.

tests/reporting/test_failed_arm_trials.py passes (12). Please add a no-trial_id case there with the fix.

A failed arm keeps each scored reward twice: as a diagnostic report trial
and as a usage-only attempt. Token usage drops the trial when the
usage-only copy carries the same trial_id, but rewards from older runs
have no trial_id, so both copies carried None, nothing matched, and the
attempt's tokens and observed-attempt count were counted twice.

When a withheld arm's scored rewards are turned into the diagnostic trials
and the usage-only copies, give every reward without a usable trial_id the
name of the trial directory it was read from, so both copies share one
identity. A trial directory holds one attempt, so two attempts never share
it, even when they share a case ID (retries) and identical token counts.
Rewards with a valid trial_id keep it, logical trial grouping is unchanged,
and the rewards of an arm that succeeded load exactly as before.

Signed-off-by: Christopher Kevin <christopherk@nvidia.com>
Signed-off-by: Christopher Kevin <christopherk@nvidia.com>
@chrisknvidia
chrisknvidia merged commit 940ed63 into main Nov 16, 2026
27 checks passed
@chrisknvidia
chrisknvidia deleted the fix/christopherk/failed-arm-trial-diagnostics branch November 16, 2026 13:39
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