Repository navigation
Conversation
|
Codex review: needs maintainer review before merge. Reviewed September 24, 2026, 10:56 AM ET / 14:56 UTC (Revision 6). ClawSweeper reviewWhat this changesThe branch retains Gateway suspension status during restart, allows authenticated controller reconnects, adds optional lifecycle details to status replies, and repairs related test fixtures and CI test selection. Regression provenancePossible regression — probable (reproduction; reviewed change). No predecessor PR is attributed. Merge readiness✅ Ready for maintainer review Current main and the latest release still lose suspension status after restart retirement. The branch addresses that gap, repairs the earlier validator compatibility finding, and has no remaining actionable finding in this review. Priority: P1 Review scores
Verification
How this fits togetherAn external deployment controller polls the Gateway suspension coordinator through authenticated WebSocket RPC while work drains. Restart admission controls which connections and requests remain available before teardown. flowchart LR
A[Deployment controller] --> B[Authenticated WebSocket]
B --> C[Gateway RPC admission]
C --> D[Suspension coordinator]
E[Restart lifecycle] --> D
D --> F[Status reply]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +80, Tests +296, Docs +26, Other +16. Total +418 across 23 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep restart progress tied to the live Gateway lifecycle, with read-only status for the original suspension and authorization enforced at every reconnect and RPC boundary. Do we have a high-confidence way to reproduce the issue? Yes. Current main still has the retirement-to-running path, and the PR supplies a pinned-base failing RPC observation; this read-only review did not execute current main. Is this the best way to solve the issue? Yes. The coordinator retains observation without restoring lease authority, and the opt-in response avoids changing the released default wire shape. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against bc9a4e70329f. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (5 earlier review cycles)
|
|
Pull request was converted to draft
|
🦞👀 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. |
Pull request was converted to draft
2362b2f to
fb2ad45
Compare
* commit '02ad6b76b1a2ee2b414b170072e6e3e606fda3d4': (134 commits) fix(build): scope normalization declarations to package sources (#157174) fix: exit after validating Codex model references (#157323) fix(gateway): guard workspace adoption during active work (#157259) fix(update): rebuild stale Git runtimes when source is already current (#156996) fix: require a click before diagnosing failed updates (#157359) test(release): provide sealed artifact inputs to writer fixtures fix(ios): preserve chat state and adapt layout when iPad windows resize (#156683) fix(test): prepare native UI fixtures before compilation fix(test): await outbound delivery readiness before assertions fix: clarify deferred Codex catalog refresh warnings (#157352) fix(skills): refresh skills after watched directories are replaced (#156324) ci: reduce Node fixture overhead and defer seven release matrices (#157341) chore(test): stop Codex Computer Use and Signal batching tests flaking under load (#157334) fix(gateway): retain owned suspension status during restart (#157258) fix(ci): scope desktop status assertions to the selected worker chore(i18n): refresh native locales (#157337) test(daemon): use the native PowerShell probe budget (#157289) fix(exec): avoid gateway stalls during background task writes (#157177) test(cli): isolate preaction title setter state fix(test): synchronize Git backoff cancellation readiness (#157315) ...
* commit 'c4333da677cbdfe1bbaf783ed01c363ff39e93b8': (100 commits) fix(test): stop preflight mocks leaking into shared workers (#157207) fix(build): scope normalization declarations to package sources (#157174) fix: exit after validating Codex model references (#157323) fix(gateway): guard workspace adoption during active work (#157259) fix(update): rebuild stale Git runtimes when source is already current (#156996) fix: require a click before diagnosing failed updates (#157359) test(release): provide sealed artifact inputs to writer fixtures fix(ios): preserve chat state and adapt layout when iPad windows resize (#156683) fix(test): prepare native UI fixtures before compilation fix(test): await outbound delivery readiness before assertions fix: clarify deferred Codex catalog refresh warnings (#157352) fix(skills): refresh skills after watched directories are replaced (#156324) ci: reduce Node fixture overhead and defer seven release matrices (#157341) chore(test): stop Codex Computer Use and Signal batching tests flaking under load (#157334) fix(gateway): retain owned suspension status during restart (#157258) fix(ci): scope desktop status assertions to the selected worker chore(i18n): refresh native locales (#157337) test(daemon): use the native PowerShell probe budget (#157289) fix(exec): avoid gateway stalls during background task writes (#157177) test(cli): isolate preaction title setter state ...
* commit '02ad6b76b1a2ee2b414b170072e6e3e606fda3d4': (122 commits) fix(build): scope normalization declarations to package sources (#157174) fix: exit after validating Codex model references (#157323) fix(gateway): guard workspace adoption during active work (#157259) fix(update): rebuild stale Git runtimes when source is already current (#156996) fix: require a click before diagnosing failed updates (#157359) test(release): provide sealed artifact inputs to writer fixtures fix(ios): preserve chat state and adapt layout when iPad windows resize (#156683) fix(test): prepare native UI fixtures before compilation fix(test): await outbound delivery readiness before assertions fix: clarify deferred Codex catalog refresh warnings (#157352) fix(skills): refresh skills after watched directories are replaced (#156324) ci: reduce Node fixture overhead and defer seven release matrices (#157341) chore(test): stop Codex Computer Use and Signal batching tests flaking under load (#157334) fix(gateway): retain owned suspension status during restart (#157258) fix(ci): scope desktop status assertions to the selected worker chore(i18n): refresh native locales (#157337) test(daemon): use the native PowerShell probe budget (#157289) fix(exec): avoid gateway stalls during background task writes (#157177) test(cli): isolate preaction title setter state fix(test): synchronize Git backoff cancellation readiness (#157315) ...
* test(ui): cover stack-free tooltip disconnect cleanup * fix(build): scope normalization declarations to package sources Give normalization-core its own TypeScript project so declaration generation does not load the repository-wide source set. Preserve the existing DTS build command and compiler policy. * Merge normalization declaration scope for tooltip proof * commit '81aeccb3db80136a118d6d2f98b67d836ec25e51': fix(build): scope normalization declarations to package sources * fix(ui): avoid retaining tooltip anchors in abort reasons * Merge main to include native wrapper source inventory repair * commit '02ad6b76b1a2ee2b414b170072e6e3e606fda3d4': (134 commits) fix(build): scope normalization declarations to package sources (#157174) fix: exit after validating Codex model references (#157323) fix(gateway): guard workspace adoption during active work (#157259) fix(update): rebuild stale Git runtimes when source is already current (#156996) fix: require a click before diagnosing failed updates (#157359) test(release): provide sealed artifact inputs to writer fixtures fix(ios): preserve chat state and adapt layout when iPad windows resize (#156683) fix(test): prepare native UI fixtures before compilation fix(test): await outbound delivery readiness before assertions fix: clarify deferred Codex catalog refresh warnings (#157352) fix(skills): refresh skills after watched directories are replaced (#156324) ci: reduce Node fixture overhead and defer seven release matrices (#157341) chore(test): stop Codex Computer Use and Signal batching tests flaking under load (#157334) fix(gateway): retain owned suspension status during restart (#157258) fix(ci): scope desktop status assertions to the selected worker chore(i18n): refresh native locales (#157337) test(daemon): use the native PowerShell probe budget (#157289) fix(exec): avoid gateway stalls during background task writes (#157177) test(cli): isolate preaction title setter state fix(test): synchronize Git backoff cancellation readiness (#157315) ... Co-authored-by: Vincent Koc <[email protected]>
…#157258) Keep the suspension owner's status readable when restart commits, including authenticated controller reconnects. Retain owner and phase as read-only lifecycle facts while preserving foreign-token conflicts and refusing resume after committed shutdown. Preserve the published v4 response shape by default; includeLifecycle explicitly opts into metadata. The original failing CI shard passes all 568 tests without weakening its legacy assertion. The published 2026.9.6 CLI and response schema also pass against the candidate with 200 active roots. The installed updater runs first. This change affects the next driver's polls once the fixed Gateway is running; a full native deployment was not part of this proof. Repair an inherited startup-cleanup test race by awaiting the real close notification before advancing fake timers. Twenty standalone file runs and three original-shard replays pass without weakening physical-exit assertions. Keep combined CI include selections inside each of the six media/UI project owners. The regression fails on the five missing intersections; the corrected original 138-file selection passes all 3,313 active tests in their proper environments.
* test(ui): cover stack-free tooltip disconnect cleanup * fix(build): scope normalization declarations to package sources Give normalization-core its own TypeScript project so declaration generation does not load the repository-wide source set. Preserve the existing DTS build command and compiler policy. * Merge normalization declaration scope for tooltip proof * commit '81aeccb3db80136a118d6d2f98b67d836ec25e51': fix(build): scope normalization declarations to package sources * fix(ui): avoid retaining tooltip anchors in abort reasons * Merge main to include native wrapper source inventory repair * commit 'f11e16cd65951f284264bd202b49984e21091cf5': (134 commits) fix(build): scope normalization declarations to package sources (openclaw#157174) fix: exit after validating Codex model references (openclaw#157323) fix(gateway): guard workspace adoption during active work (openclaw#157259) fix(update): rebuild stale Git runtimes when source is already current (openclaw#156996) fix: require a click before diagnosing failed updates (openclaw#157359) test(release): provide sealed artifact inputs to writer fixtures fix(ios): preserve chat state and adapt layout when iPad windows resize (openclaw#156683) fix(test): prepare native UI fixtures before compilation fix(test): await outbound delivery readiness before assertions fix: clarify deferred Codex catalog refresh warnings (openclaw#157352) fix(skills): refresh skills after watched directories are replaced (openclaw#156324) ci: reduce Node fixture overhead and defer seven release matrices (openclaw#157341) chore(test): stop Codex Computer Use and Signal batching tests flaking under load (openclaw#157334) fix(gateway): retain owned suspension status during restart (openclaw#157258) fix(ci): scope desktop status assertions to the selected worker chore(i18n): refresh native locales (openclaw#157337) test(daemon): use the native PowerShell probe budget (openclaw#157289) fix(exec): avoid gateway stalls during background task writes (openclaw#157177) test(cli): isolate preaction title setter state fix(test): synchronize Git backoff cancellation readiness (openclaw#157315) ... Co-authored-by: Vincent Koc <[email protected]>
What Problem This Solves
Fixes a deployment controller losing its own suspension status when an installation-replaced restart or an authorized interruption begins under load. The controller could defer a valid update after its suspended predecessor reported
status: "running"; a fresh polling connection could also fail with HTTP 503.User Impact
The same owner can keep polling during restart, including over a fresh authenticated WebSocket. Default status responses preserve the published v4 shape. Callers can explicitly request owner and phase metadata with
includeLifecycle: true. Foreign tokens still conflict; committed shutdown cannot be resumed, renewed, or armed again. No new configuration, cache, state store, or protocol-version change.Update behavior: the installed driver and running Gateway execute first. This candidate cannot repair an older resident's current shutdown; once installed, it changes the status that the next update driver polls. The published OpenClaw 2026.9.6 CLI and shipped response schema were exercised against the candidate Gateway. The host-side release driver is outside this repository; its complete native deployment/cutover was not exercised. RPC access ends when server teardown closes request admission and transports; recorded
exitingfacts do not keep a closed transport alive.Why This Change Was Made
The exact transition was
markGatewayRestartDraining()→invalidateSuspendAdmission()→ coordinator clearscurrentand retains onlyretiredForLifecycleReset→getGatewaySuspendStatus()returnsrunning. This reproduces the running branch of the driver's grouped “running, conflicting, recovering, or malformed” error; there is no evidence of a second suspension or literal foreign-token conflict.Reuse the existing retired suspension for read-only progress, bound to the exact restart AbortSignal. Preserve the
drainingdiscriminator and the default response shape. With explicitincludeLifecycle: true, addownerId(the original request ID) andphase: draining | interrupting | exiting. Refresh blockers and write custody without restoring lease authority. Ready status also carries owner attribution when requested. The coordinator owns this opt-in so direct legacy readers remain compatible too; resume parameters stay separate and closed. The teardown owner recordsexiting; lifecycle reset invalidates the record.HTTP upgrade and connect admission now share the coordinator's reconnect decision. Authentication remains mandatory, node/worker connects remain fenced, and ordinary RPC admission stays closed. The Swift protocol model is regenerated from the schema.
Net production change: 80 TypeScript lines + 16 generated Swift lines = 96 lines.
Evidence
All heavy validation used
blacksmith-testbox, profileopenclaw-check, against pinned source basefe846d3c9498plus the candidate patch. All leases were stopped after use.running. The fix retains owner/phase after expiry and settlement, refuses foreign tokens and resume, and invalidates the record after lifecycle reset. Final case bodies: 86 ms and 5 ms.Gateway websocket admission closed. The fix passes fresh controller status, foreign-token refusal, ordinary-RPC refusal, node-connect refusal, and teardown'sexitingpublication. It extends an existing server fixture without adding another server boot.2026.9.6 (eb377ac)prepared 200 active roots and polled before/after committed restart; its shipped closed response schema accepted both default replies. Explicit lifecycle opt-in returned the richer owner/phase reply.tbx_01m39fz6t03g5rt0tkdmykzysp(environment)pnpm install --frozen-lockfilerepaired that. RPC baseline: expected 2 failures, 26 passes. Intermediate sibling run exposed two old exact-response expectations; updated them for additive metadata.pnpm protocol:gen:swiftand changed-check dry run passed. Two subsequent full-sync attempts timed out before executing.tbx_01m39gynkfhwkhvy8nhnqg0e4b(environment)expectDefined. Per-file tests and bothnode scripts/check-changed.mjs -- <paths>invocations then passed. A later transport-proof run hit another sync timeout before execution.tbx_01m39kz4srdpcbg586jf8r7heh(environment)pnpm tsgo:core, Gateway-server test typecheck, and focusedrun-oxlintpassed.--base origin/mainline-cap checking compared unrelated newer base changes and flagged three untouched extension files; using the actual pinned base passed.pnpm check:import-cyclespassed.tbx_01m39pjcm4njwce6n2b7qrxwws(environment)Per-file cost (
pnpm test <file> --maxWorkers=1): suspension RPC admission 9.97 s; final real-server node shutdown 28.70 s; suspension coordinator 9.11 s; restart/suspension ordering 8.67 s. These include runner/import overhead.Focused tests cover
server-methods.suspension-admission,server.node-shutdown,gateway-suspend-coordinator, its handoff sibling,restart-suspension, suspend handlers, protocol schemas, preauthentication hardening, connect suspension admission, and startup admission. SwiftLint was unavailable on Linux and remains owned by macOS CI. Shallow Testbox history skipped the environment-variable base-budget comparison; this patch adds no environment variables. No sync bypass was used.The first published head exposed a real compatibility regression: ClawSweeper identified shipped closed validators, and CI job
checks-node-changed-compact-small-9failed on an extraownerIdin an existing direct coordinator read. The repair defaults to the legacy shape instead of weakening that assertion. The original failing test took 34 ms; its CI lane reported 567 passed / 1 failed in 134.65 s before the fix.CI fixture repair
The compatibility regression is green on the second CI run. That run (
36005740827) tested merge revision43716e42f3efand found a separate race in the Codex startup-cleanup tests introduced by #157229: validation first awaits real catalogfs.realpath()I/O, but the fixture advanced fake timers and immediately assumed cleanup had begun. CI observed two failures; an exact-source, original-order replay reproduced one failure with 829/830 Codex tests passing (the preceding 216-test memory group passed).A five-line fixture repair waits for the existing close notification before the existing timer flush. It preserves stdin-destruction, unsettled-acquisition, and explicit physical-exit assertions; no production code, sleeps, retries, or broader mocks were added. The branch was replayed onto the original CI base
dda6e1ceda39; before this fixture edit its tree was identical to the tested merge revision. The suspension implementation is unchanged.blacksmith-testbox/openclaw-check,tbx_01m39td5pt2h1c2ccz54zvrty2(environment): original shard replay reproduced the failure; stopped.blacksmith-testbox/openclaw-check,tbx_01m39tr85pgmj9c0g01yvf3sss(environment): frozen dependency setup and source-byte verification, then 20/20 standalone file runs, 132 tests each. First measured wall 38.54 s includes compiler preparation; warm runs were roughly 13–17 s. This is an existing file; the repair adds no tests. Independent review found no actionable P0–P2 issue. Stopped before the commit changed HEAD.blacksmith-testbox/openclaw-check,tbx_01m39vbq15n5jjmw6yzk3h27wp(environment): 3/3 original-shard passes, 1,565 tests across 74 files per pass, using the original four-group plan and two workers.pnpm tsgo:extensions:testand focusedrun-oxlintpassed with zero warnings/errors. Combined remote command: 22m47.461s. Lease stopped. The final head also has a fresh ClawSweeper review with no actionable findings.GitHub CI initially hit a merge-ref startup failure; a reconciled close/reopen attached a real run. CI run
36009704906passed the repaired Codex tests and exposed the separate selector defect described below; the final push includes both bounded test-infrastructure repairs.Combined CI selection repair
Run
36009704906, jobchecks-node-changed-compact-large-2, exposed a deterministic routing defect: the same selected Node media tests ran under media, media-understanding, TUI, and finallyui-isolated/jsdom. The first three configurations each repeated 99 passing files / 2,533 passing tests; the wrong jsdom environment then caused 47 assertion failures and one suite-load failure. The Gateway methods portion of that job passed 2,321 tests plus its 62 isolated tests.Enable the existing include-file intersection in the five affected sibling configs; UI timing already uses it. Keep the helper's intentional default override contract, selected inventory, worker counts, and test assertions unchanged. One exported-config regression checks all six owners using a mixed include list. This adds five test-config lines and no runtime production code.
blacksmith-testbox/openclaw-check,tbx_01m39x5s8dwy8398wx3wmhm2mc(environment):pnpm test test/vitest-scoped-config.test.ts --maxWorkers=1: the new regression fails with exactly five incorrect selections; 104 other tests pass.pnpm tsgo:test:rootand focused lint on the six changed files passed; zero warnings/errors. Combined fixed proof command: 8m56.680s.Final outcome
Merged automatically by squash as
86192cd70df7949122351f54565eb8b891bcbc13on 2026-09-24 at 15:15 UTC. Final headc84dcbd921e42eec51401a9f972f4b67aa77e8b9passed CI run 36015341973, including the iOS smoke job. The workflow completed successfully in 1,592 seconds wall (creation to completion; includes build/native/queue time). No per-file timing artifact was published; per-file costs above are the measured Testbox runs. Final ClawSweeper review reported no actionable findings. All eight Testbox leases are stopped.