Repository navigation
fix(test): retain Gateway recovery failure diagnostics - #146925
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. Reviewed September 13, 2026, 6:26 AM ET / 10:26 UTC. ClawSweeper reviewWhat this changesThe Gateway recovery test reports its current step, recovery phase, child-process status, and bounded logs before cleanup while preserving the original failure. Merge readiness⛔ Blocked before merge - 2 items remain Keep open: this is a focused, useful diagnostic improvement absent from current main. No introduced correctness defect was found, and the protected maintainer label excludes cleanup closure. Priority: P3 Review scores
Verification
How this fits togetherThe recovery test drives an isolated built Gateway through synthetic provider failures and credential recovery. Its diagnostics help developers investigate failed requests before the fixture stops the Gateway. flowchart TD
A[Synthetic provider failures] --> B[Gateway recovery test]
B --> C[Built Gateway requests]
C --> D{Test outcome}
D -->|Failure| E[Capture phase and bounded logs]
E --> F[Preserve original error]
D -->|Success| G[Fixture cleanup]
F --> G
Before merge
Agent review detailsSecurityNone. PR surfaceTests +29. Total +29 across 1 file. View PR surface stats
Review metricsNone. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep failure reporting local to the recovery fixture, reuse bounded instance logs, and preserve the existing error and cleanup contracts. Do we have a high-confidence way to reproduce the issue? Yes, at source level: a rejected recovery RPC previously escaped without attaching the instance log tail. No runtime failure was reproduced during this read-only review. Is this the best way to solve the issue? Yes. The patch uses the existing log owner and reports context before cleanup, while a nested catch prevents diagnostic failures from replacing the test error. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 1393a714309f. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
* temp/pr-146802: (51 commits) improve: reduce worktree filesystem stalls and archive syncs (#146906) fix(ui): avoid extra chat rail work while replies stream (#146883) improve(ui): speed up populated Usage timelines (#146947) test(gateway): retain auth recovery failure diagnostics (#146925) fix(tests): create private temporary home directories (#146931) fix(backup): preserve discovery under concurrent state writes (#146912) fix: keep queued deliveries in their original state directory (#146917) fix(discord): settle voice waveform work before releasing input (#146885) fix(memory): preserve newer indexes and disclose automatic rebuild costs (#146908) fix: retain route ownership while discovering conversations (#146927) refactor: reuse plugin fixture shell runner (#146920) fix(worker): stop preparing disabled live previews (#146896) fix(runtime): support Bun across tooling suite (#146807) chore(i18n): refresh native locales (#146924) perf(secrets): limit expiry metadata to transient credentials (#146882) fix(ui): preserve queued refreshes during session discovery (#146535) test(ui): wait for quiet scrolling and close named file tabs (#146836) fix(ui): prevent Usage hour filters from freezing during DST (#146919) test(ui): share browser page cleanup across layout fixtures (#146805) ci: balance complete PR runtime test groups (#146916) ...
* commit 'ccfd2377cd07d1ad3a583ba64d08e29a065f7061': (1587 commits) fix(ui): avoid recapturing chat drafts during UI updates (#146884) fix(ui): show system uptime in the debug overlay (#146960) fix(retry): honor waits beyond the native timer limit (#145718) fix(ui): keep chat history idle when run status changes (#146802) fix(ui): reuse persisted text during chat streaming (#146831) refactor(qa): share harness drift result construction (#146903) test(agents): coordinate settings lock contention (#146949) fix(worker): avoid repeatedly serializing screenshot history (#146907) fix(secrets): stop buffered upload writes after cancellation (#146840) perf(doctor): avoid unnecessary state runtime imports (#146926) improve: reduce compaction request estimation work (#146961) fix(ci): wait for forwarded avatar imports before assertions (#146729) perf(workers): skip configured Git author lookups (#146833) fix: admit borrowed memory writes through the agent database owner (#146760) fix(discord): prevent voice playback gaps and stale turn controls (#146798) improve: reduce worktree filesystem stalls and archive syncs (#146906) fix(ui): avoid extra chat rail work while replies stream (#146883) improve(ui): speed up populated Usage timelines (#146947) test(gateway): retain auth recovery failure diagnostics (#146925) fix(tests): create private temporary home directories (#146931) ... # Conflicts: # test/tsconfig/tsconfig.core.test.agents-other.json # test/tsconfig/tsconfig.core.test.agents-root.json
Related: #146547
What Problem This Solves
A failed RPC in the built Gateway recovery test reports only a WebSocket closure, losing the Gateway diagnostics needed to investigate it.
User Impact
No runtime behavior changes. Future test failures include the existing bounded Gateway log tail, recovery phase, current step, and observed child exit facts. The original Gateway 1006 cause remains unresolved.
Why This Change Was Made
Capture diagnostics before fixture cleanup, then rethrow the original error even if diagnostic output fails. Requests, assertions, deadlines, and cleanup stay unchanged.
Evidence
Focused typed lint, Gateway-root typechecking, formatting, independent review, and exact-head CI passed.
The unchanged recovery test file passed both cases before (
10d36d1) and after (33d1d81) on the same Linux Testbox with Node 24.19.0, using separate exact checkouts and normal builds: 30.51s before, 30.78s after. Both verified persisted failure state, credential refresh, the recovered response, and the configured catalog. Testbox run completed successfully and its lease stopped; its backing Actions status may reflect lease cleanup.No failure was injected or reproduced, so failure-output behavior remains source-reviewed. The original unresolved closure is retained in CI run 34750584650.