Repository navigation
fix(gateway): recover startup under load - #132186
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
2fc86a9 to
a5588fa
Compare
|
Codex review: found issues before merge. Reviewed August 29, 2026, 2:17 AM ET / 06:17 UTC. ClawSweeper reviewWhat this changesThe branch combines Gateway startup and Windows recovery work with agent continuation delivery, SQLite metadata repair, and Control UI reconnect bootstrap changes. Warning SQLite table change This PR modifies persisted SQLite tables in Regression provenancePossible regression — probable (reviewed change; failure trace). No predecessor PR is attributed. Merge readiness⛔ Blocked by patch quality or review findings - 8 items remain Keep this protected maintainer PR open: its new continuation handoff can strand a child completion on abort or pre-queue failure, and completed Control UI bootstrap tasks are never eligible to run again. Priority: P1 Review scores
Verification
How this fits togetherGateway startup binds health/readiness before initializing runtime services. Agent continuation results and Control UI connection events then use delivery and bootstrap coordinators to reach users and the browser. flowchart LR
A[Gateway startup] --> B[Health and readiness]
B --> C[Runtime services]
C --> D[Continuation delivery]
B --> E[Control UI connection]
E --> F[Bootstrap coordinator]
D --> G[User-visible completion]
Before merge
Findings
Agent review detailsSecurityNone. Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Use a one-shot continuation-settlement owner that releases child delivery on every pre-queue abort/error, evict bootstrap keys after both fulfillment and rejection, and then validate the native Windows supervisor path. Do we have a high-confidence way to reproduce the issue? Yes—source-reproducible. An abort at finalization entry or a rejected status send occurs after child ownership is held but before any false settlement is registered, while the lifecycle waker rejects that held state. Is this the best way to solve the issue? No. The branch needs failure-total continuation release and successful-task eviction; these are narrower owner-boundary repairs than adding retries or downstream fallbacks. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against c18ea5805101. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (8 earlier review cycles)
|
f60711f to
fedefa7
Compare
6e8ab9d to
849bdfa
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
de210e8 to
9ee827c
Compare
Windows Scheduled Task evidence (limited)Redacted Windows evidence was captured on September 1, 2026 for PR head
This is proof of InteractiveToken scheduling, Scheduler ownership, endpoint reachability, and cleanup only. It is not a passing task-supervisor integration result: the canonical |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Merged via squash.
|
* fix(gateway): recover startup under load * fix(ci): preserve gateway recovery checks after rebase * refactor(ui): split bootstrap theme runtime * fix(ui): handle reactive gateway refreshes * fix(agents): preserve yielded requester settlement * fix(cli): cover gateway readiness mocks * test(ui): await scheduled profile appearance refresh * fix(ci): keep daemon lifecycle suite within its limit * fix(gateway): probe TLS readiness * fix(gateway): remove unused probe exports * fix(agents): gate continuations on completion owners * refactor(agents): isolate ACP spawn results * fix(ui): remove duplicate bootstrap ownership * fix(ui): compact reconnect bootstrap work * fix: complete continuation and bootstrap cleanup * refactor(reply): split deferred final flush * fix(ci): restore startup checks * perf(ui): compact connection bootstrap * perf(ui): defer connection bootstrap scheduler * test(ui): await deduplicated bootstrap work * test(ci): track qa setup suppression * test(infra): split media persistence fixtures * fix(ci): restore daemon lifecycle fixture * test(auto-reply): cover revoked continuation delivery * fix(ci): clear rebase lint drift * test(agents): split terminal resolution state coverage * fix(daemon): preserve interactive task logon * fix(gateway): load current TLS runtime * test(cli): align TLS probe mock * perf(ui): defer workshop admission owner * chore(ui): refresh boot manifest * fix(ui): keep session roster immediate * fix(reply): release continuation after commentary failure * fix(ui): capture connected client for bootstrap work * test(cli): keep lifecycle mock within lint budget --------- Co-authored-by: Galin Iliev <[email protected]>
What Problem This Solves
Large or partially recovered OpenClaw installations could start slowly without a complete explanation of where time was spent. Repeated workspace skill indexing and duplicate Control UI reconnect bootstrap requests added avoidable work, while a NULL
app_versioncould force unnecessary metadata writes on each reopen.Windows Gateway operation also lacked durable Task Scheduler supervision for restart, exact process-tree shutdown, and duplicate-start prevention. Backup ACL failures did not always report the actionable path, principal, and rights context. An interactive continuation could emit a visible waiting status yet lose its final outcome if delivery failed before the handoff completed.
Why This Change Was Made
The change adds a reproducible, non-sensitive startup-load fixture and benchmark; makes startup phases attributable through readiness; reuses the skill index for a workspace snapshot; and defers non-readiness-critical work until health is available. It repairs current-schema metadata persistence and the reopen fast path.
It also introduces a Task Scheduler-owned Windows supervisor using the existing Job Object support, separate health/readiness reporting, sanitized ACL diagnostics, failure-total continuation settlement, and a connection-epoch coordinator that bounds and deduplicates non-page Control UI bootstrap requests. No configuration option, SQLite schema version, or paid dependency is introduced.
User Impact
Operators with incident-scale local state receive health availability sooner and a fully attributable path to readiness. Reconnecting Control UI tabs avoid redundant loading. Windows Gateway restarts and shutdowns are owned as a single process tree, backup permission failures identify the data needed to repair access, and every accepted interactive continuation either hands off after its waiting status is delivered or releases terminal delivery on every earlier abort or error.
Evidence
3f81742ea3d44c9cc223925e305a983d62ea42ac.openclaw/ci-gateis successful and GitHub reports no failed or pending checks.git diff --checkalso passed.@pnpm/[email protected]. Exact-head hosted CI is the authoritative full validation.InteractiveTokenscheduling, Scheduler process ownership, cleanup, and isolated/healthzand/readyzHTTP 200 responses. It is deliberately limited: it was captured on the earlierde210e8head, and the successful isolated run omitted--task-supervisorafter the canonical task-supervisor path exited with Windows result 134. It is not represented as a passing task-supervisor integration test.