Skip to content

fix: accept Codex reports after recovered stream errors - #149

Merged
zzxwill merged 1 commit into
masterfrom
fix/codex-recovered-errors
Oct 21, 2026
Merged

zzxwill merged 1 commit into
masterfrom
fix/codex-recovered-errors

Conversation

@zzxwill

@zzxwill zzxwill commented Oct 21, 2026

Copy link
Copy Markdown
Collaborator

A Codex CLI stream can emit a reconnect error, recover, and finish with a valid finding and turn.completed. Jury previously rejected it immediately at the transient error, losing the completed review result. The parser now requires a new assistant report and completed turn after an error, while keeping terminal turn failures, nonzero exits, malformed output, incomplete turns, and stale reports rejected. Raw retry diagnostics remain saved.

Five added regressions cover recovered findings, recovery independent of error wording, stale or incomplete output, terminal failures, and nonzero process exits. The fixtures are synthetic equivalents of the observed event order; no private transcript is committed.

Validation on 5be1270e2fd17e8e034d5481893858f2b2792b24:

  • node --test test/codex-output.test.js: 11/11 pass. On unchanged master with the new tests, 8 passed and 3 failed; the recovery tests rejected the reconnect diagnostic.
  • Replaying the preserved original stream: rejected before; exact final assistant finding accepted after. The raw artifact SHA256 is unchanged.
  • node scripts/ci-check.mjs test: 325/325 pass, exit 0.
  • node scripts/ci-check.mjs test:package: installed-package checks pass, 55 packaged files, exit 0.
  • Actual Jury: NO NEW FINDINGS, exit 0, one clean round, 40.2 seconds. Reviewer and judge were selected as Codex; no judge invocation was needed because the reviewer found no issues.

Actual command, run from the isolated worktree:

GIT_AUTHOR_NAME=zzxwill GIT_COMMITTER_NAME=zzxwill node bin/jury.js review --dir /Users/bytedance/Documents/Codex/2026-10-20/task/codejury-codex-recovery --trunk master --reviewer codex --judge codex --rounds 2 --summary 'Review Codex recovered-error parsing: accept a new completed assistant report and turn after reconnect diagnostics, while preserving terminal failures, malformed output, nonzero exits, incomplete turns and stale-report rejection. Scope is lib/agents.js, its synthetic regression fixtures and changelog.' --web=false --push=false > ../codex-recovery-review-evidence/jury-first.log 2>&1
jury_status=$?
printf '%s\n' "$jury_status" > ../codex-recovery-review-evidence/jury-first.exit
exit "$jury_status"

The read-only reviewer independently ran the 11 focused tests but could not start the full suite because its sandbox disallowed creating the temporary test directory. The full and package checks above ran independently. Recovery itself is demonstrated by offline replay and synthetic subprocess fixtures; the fresh actual review did not encounter a live 429. No provider, authentication, permission or billing setting changed.

@zzxwill
zzxwill marked this pull request as ready for review October 21, 2026 20:52
@zzxwill
zzxwill merged commit 5214a04 into master Oct 21, 2026
15 of 16 checks passed
@zzxwill
zzxwill deleted the fix/codex-recovered-errors branch October 21, 2026 20:52
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