fix(codex): bound app-server timeout fallout#87022
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed May 26, 2026, 5:38 PM ET / 21:38 UTC. Summary PR surface: Source +282, Tests +185. Total +467 across 17 files. Reproducibility: no. high-confidence live reproduction was run in this review. The linked issue and current source identify the timeout/failover path, but the PR author still says a live Codex account timeout against a real app-server session was not exercised. Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance: Risk before merge
Maintainer options:
Next step before merge Security Review detailsBest possible solution: Land only after maintainer approval of the timeout-retirement policy and redacted live Codex-provider proof showing a timed-out app-server session no longer poisons auth/fallback state or reuses a wedged shared client. Do we have a high-confidence way to reproduce the issue? No high-confidence live reproduction was run in this review. The linked issue and current source identify the timeout/failover path, but the PR author still says a live Codex account timeout against a real app-server session was not exercised. Is this the best way to solve the issue? Unclear until live proof and maintainer policy approval exist. The lease-aware retirement path is a plausible narrow fix, but it changes availability and auth/fallback behavior in a timeout recovery path. AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against a818556dd9c2. Label changesLabel justifications:
Evidence reviewedPR surface: Source +282, Tests +185. Total +467 across 17 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
ClawSweeper PR egg 🎁 Pass real behavior proof to wake the egg and unlock a hatchable treat. Where did the egg go?
|
7f62935 to
5bc2fee
Compare
|
Behavior addressed: Codex app-server turn timeouts now best-effort interrupt/unsubscribe and retire the shared client with lease-aware cleanup; harness-owned timeout classifications no longer rotate/fallback unless a concrete retryable reason is present. Real environment tested: local macOS targeted Vitest runs plus Blacksmith Testbox changed gate. Exact steps or command run after this patch:
Evidence after fix: targeted Codex extension suites passed (313 tests before the second-retirement regression fix; then 249 shared/run-attempt tests and 20 shared-client tests after the fix). Failover-policy suite passed (31 tests). Autoreview reported clean with no accepted/actionable findings after the lease call-path and factory fixes. Observed result after fix: timeout retirement no longer closes an actively leased shared app-server client immediately, second retirement attempts on an already-retired leased client stay lease-aware, and default non-run-attempt factory callers do not leak leases. What was not tested: live Codex account timeout against a real app-server session was not exercised; proof is unit/integration-style targeted tests plus changed gate. |
Summary
Refs #86948.
Verification
pnpm test src/agents/pi-embedded-runner/run/failover-policy.test.ts -- --reporter=verbosenode scripts/run-vitest.mjs run --config test/vitest/vitest.extension-codex.config.ts --configLoader runner extensions/codex/src/app-server/run-attempt.test.ts extensions/codex/src/app-server/shared-client.test.ts --reporter=verbosenode scripts/run-vitest.mjs run --config test/vitest/vitest.extension-codex.config.ts --configLoader runner extensions/codex/src/app-server/run-attempt.test.ts --reporter=verbosepnpm check:changedvia Blacksmith Testboxtbx_01ksjy9hvhe1700kv8sh1ahvmn.agents/skills/autoreview/scripts/autoreview --mode localcleanReal behavior proof
Behavior addressed: Codex app-server turns that time out after being accepted no longer leave the same shared app-server client available for later turns, and harness-owned timeout failures no longer mark auth profiles failed or trigger model fallback.
Real environment tested: Local macOS checkout for targeted Vitest; Blacksmith Testbox for
pnpm check:changedtypecheck/lint/guards.Exact steps or command run after this patch: See Verification commands above.
Evidence after fix: Codex app-server timeout regression test now expects
turn/interrupt,thread/unsubscribe, and client close. Failover-policy tests cover harness-owned prompt, assistant, idle, and classified timeout paths.Observed result after fix: Targeted Vitest passed; final Testbox
check:changedexited 0; final autoreview reported no accepted/actionable findings.What was not tested: Live Codex provider reproduction of issue #86948; reporter should still retry latest main/beta to confirm the original event-loop saturation scenario is gone.