Skip to content

Sweep fix: Lab scores qa-bench runs that exit 1 or 3 from write_report - #2106

Merged
r3dbars merged 1 commit into
mainfrom
claude/sweep-fix-lab-qa-bench-exit
Oct 8, 2026
Merged

r3dbars merged 1 commit into
mainfrom
claude/sweep-fix-lab-qa-bench-exit

Conversation

@r3dbars

@r3dbars r3dbars commented Oct 7, 2026

Copy link
Copy Markdown
Owner

Split out of #2101 (one PR per bug). Confirmed bug from the Haiku sweep.

What was wrong

transcripted-qa-bench.sh's write_report writes qa-report.md and results.tsv, then returns 1 on any FAIL row and 3 on any SKIP or hard-WARN row. --skip-build always records a SKIP, so it always exits 3. LabExperimentRunner treated any nonzero exit as a dead process and returned before QAResultsAnalyzer ran, so the run showed as Failed with no metrics or step breakdown.

Failing tests

QABenchExitCodeTests runs the real runner against a fake repo whose qa-bench script writes the files and exits with a given code.

  • testQABenchHoldExitStillScoresSkippedRun, testQABenchHoldExitIsNotReportedAsAPass and testQABenchFailExitKeepsStepBreakdown went red ("Experiment process exited with code 3."), then green.
  • From review: testQABenchAbortAfterPassingStepsStillFails (exit 1, PASS rows only, no report; was scored passed), testQABenchAbortWithEmptyResultsStillFails (was warning) and testQABenchFailExitWithoutFailRowsStillFails (was passed) went red, then green.
  • testQABenchCrashWithoutReportStillFails and testQABenchUnknownExitStillFailsEvenWithReport guard the failure side.

Fix

For the QA and transcription-corpus benches, an exit of 1 or 3 gets analyzed only when it came from write_report:

  • qa-report.md must exist. results.tsv alone proves nothing, because the script truncates it at startup and can exit 1 elsewhere (cd "$REPO_ROOT" || exit 1, set -u aborts).
  • An exit 1 also needs at least one FAIL row.
  • FAIL rows still become hard gates, so the run is still Failed, now with the breakdown. Exit 3 adds a warning, so the run shows Warning, not Passed.
  • Timeouts, other exit codes, and runs that never reached write_report still fail like before.

Checks

  • swift test --package-path Tools/TranscriptedLab --jobs 4: 16 tests pass
  • swift build for transcripted-lab and TranscriptedLab: pass
  • Tools/TranscriptedLab/script/build_and_run.sh --verify: pass, run by hand
  • bash check.sh: everything else passed. It reports build_and_run.sh --verify as BLOCKED (invalid-command) because agent-check.py won't run a bare-path matrix command. That was already true on main, so this check isn't covered by check.sh.

Independent review: approve with nits (3 rounds, reviewed as part of #2101). No open nits for this fix.

🤖 Generated with Claude Code

transcripted-qa-bench.sh's write_report writes qa-report.md, then exits
1 when a step FAILed or 3 when a step was skipped or held (always the
case with --skip-build). LabExperimentRunner treated any nonzero exit as
a failed process and never ran QAResultsAnalyzer, so those runs lost
their whole breakdown.

Now exit 1/3 gets analyzed only when it came from write_report:
qa-report.md must exist (results.tsv exists from the script's first line
and can't prove that), and exit 1 also needs a FAIL row. FAIL rows still
become hard gates; exit 3 adds a warning. Timeouts, other exit codes,
set -u aborts, and the early cd failure still fail as before.
@r3dbars
r3dbars marked this pull request as ready for review October 8, 2026 10:22
@r3dbars r3dbars added the waiting-on-human Needs a human (Justin) to look before anything else happens label Oct 8, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-08T10:25:51.802880Z 0bdbab4 Draft marked ready
🔒 Security Review ✅ Completed 2026-10-08T10:27:08.403644Z 0bdbab4 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@r3dbars
r3dbars merged commit 8bbcf8b into main Oct 8, 2026
12 checks passed
@r3dbars
r3dbars deleted the claude/sweep-fix-lab-qa-bench-exit branch October 8, 2026 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waiting-on-human Needs a human (Justin) to look before anything else happens

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant