Repository navigation
improve(tests): avoid WebSocket retry delays in native finalizer fixtures - #155008
Conversation
|
Codex review: needs maintainer review before merge. Reviewed September 21, 2026, 1:20 PM ET / 17:20 UTC (Revision 2). ClawSweeper reviewWhat this changesThe native finalization test server returns HTTP 426 for WebSocket attempts so Codex reaches its HTTP event-stream fixture without retry delays. Merge readiness✅ Ready for maintainer review The fixture optimization remains useful on current main. The introduced change matches Codex’s existing fallback contract, preserves the test assertions, and has no identified correctness or security blocker. Priority: P3 Review scores
Verification
How this fits togetherThese tests run the real Codex process against a local scripted provider to exercise OpenClaw’s finalization, authentication, cancellation, and cleanup behavior. The changed response controls transport selection before the existing authenticated requests reach that provider. flowchart LR
A[Native finalization tests] --> B[Real Codex process]
B --> C[Local provider fixture]
C --> D[WebSocket attempt receives 426]
D --> E[Authenticated HTTP request]
E --> F[Scripted event stream]
F --> G[Finalization and cleanup assertions]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +5. Total +5 across 1 file. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep the fixture aligned with Codex’s supported HTTP fallback while retaining the existing native-process coverage. Do we have a high-confidence way to reproduce the issue? Not applicable as a product bug; source inspection confirms the fixture’s unnecessary retry path, and the supplied native-run observations quantify it. Is this the best way to solve the issue? Yes. Returning the dependency’s existing fallback signal is a narrow fixture correction that preserves stock-client selection and the authenticated HTTP path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against e3c65f7de2ff. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
🦞👀 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. |
|
Merged via squash.
|
* commit '8a26ae487b5fb9b72ea2c12bf384e9c776659429': (154 commits) fix(ui): preserve skill group expansion when filtering (#150911) test(gateway): consolidate server history and lifecycle fixtures (#155063) test(codex): select HTTP fallback in native finalizer fixtures (#155008) improve: reduce isolated Gateway CI test time (#154366) test(gateway): await approval registration acknowledgments fix(workboard): explain blocked-card claim recovery (#154990) perf(agents): consolidate exec target policy tests (#155060) perf(config): consolidate environment test fixtures (#155062) fix(ui): keep the chat rail anchored through composer resize fix: recovery tests wait for committed outcomes (#154995) fix(codex): keep inference bursts from failing turns (#154945) fix(memory): keep generated REM reflections out of promotion rankings (#154994) fix(sqlite): reclaim scratch files when storage is full (#154937) test(cli): spawn the compiled Doctor entry in the output process test (#155055) fix(update): distinguish config validation execution failures (#154892) test(doctor): await session cleanup before deleting fixture state fix(update): report unavailable service inspection accurately (#154896) test(gateway): observe plugin approval response completion perf(msteams): reduce file-consent test scaffolding (#155050) fix(ui): retain saved permissions during delayed startup reads (#154982) ...
What Problem This Solves
Native Codex finalizer tests repeatedly retry WebSocket upgrades against a fixture that serves only HTTP/SSE, adding more than a minute per file run.
User Impact
There is no user-visible behavior change. The same nine native-process cases run faster, with authentication, shell execution, deadlines, finalization, and cleanup coverage retained. Peak RSS increased 2.41%; this is not a memory optimization.
Why This Change Was Made
Return HTTP 426 for GET /v1/responses so the stock client selects its supported HTTP fallback immediately. The existing authenticated POST/SSE path is unchanged. A real native route trace shows the baseline made seven GET requests returning 404 before POST succeeded; the candidate made one GET returning 426 followed by the same successful POST.
Evidence
Crabbox / Blacksmith Testbox run 35602882438, pinned main
5b71ab4fc0d8, passed all nine cases in every canonical full-file ABBA arm:The warm baseline versus candidate mean is 133.728s to 27.589s: about 106seconds (79.4%) saved. A1 retains its colder startup cost. All 231 native/owner siblings passed, including thread recovery and output fidelity; selected changed checks (530.364s), formatting, and independent P2 review passed. Downloaded source hashes match the candidate, and the lease is stopped. An initial proof driver stopped before testing because it treated the materialized candidate HEAD as baseline; the corrected driver separately verifies exact baseline/candidate hashes. Hosted PR CI remains required before landing.