Repository navigation
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: needs maintainer review before merge. Reviewed September 5, 2026, 7:34 PM ET / 23:34 UTC. ClawSweeper reviewWhat this changesKeeps the Gateway observing active updates until completion or shutdown so connected clients receive late final progress. Merge readiness✅ Ready for maintainer review This remains a useful, focused repair: current main still abandons observation after 45 minutes. The retained real-request proof supports the fix, and no introduced correctness defect was found. Priority: P2 Review scores
Verification
How this fits togetherThe Gateway watcher reads the durable update ledger and broadcasts changes to connected clients. The Control UI uses those events to fetch the authoritative result and release its update controls. flowchart LR
A[Update request] --> B[Updater writes ledger]
B --> C[Gateway watcher]
C --> D{Run terminal?}
D -->|No| C
D -->|Yes| E[Final progress event]
E --> F[Control UI refreshes result]
D -->|Acknowledged run| G[Deduplicated final notice]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource -5, Tests +9. Total +4 across 2 files. View PR surface stats
Review metricsNone. Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Observe the authoritative run until terminal state or teardown, preserving notice deduplication and shutdown ownership. Do we have a high-confidence way to reproduce the issue? Yes: current-main source stops observation at 45 minutes, and a later terminal ledger change cannot reach that stopped watcher. Contributor evidence demonstrates the corresponding real-request failure; this read-only review did not execute tests. Is this the best way to solve the issue? Yes: removing observer abandonment repairs the documented progress contract at its owner without inventing recovery authority or changing the ledger. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 67e8e2da4b10. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (7 earlier review cycles)
|
|
The product proof and current-head review are complete. Both CI failures on The new assertion at The exact main parent The approved unrelated-CI route applies to these proved failures. The exact-head review and all other required checks remain enforced. Please keep this head stable while the guarded landing completes. |
|
landpr-approve-unrelated-red |
|
Thanks @TheAngryPit — merged as f284a91e0aca from reviewed head b2d8bafa7c6c. Contributor credit and Ayaan's co-author trailer are verified. Bug: a real update can finish after 45 minutes while a passive client misses its terminal event and the Updates page stays locked. Fix: observe the durable run until completion or Gateway shutdown, preserving notice draining.
The integration build also passed a fresh shipped-request/shutdown acceptance and 137 focused lifecycle tests. Exact-head reviews passed. The long observations remain bound to their original builds; the later main refreshes preserve the relevant watcher path. No installation or managed restart is claimed. CI exception: applied the recorded approved exception to completed run 33998492262, attempt 1. Both failures are reproduced on the exact main parent
The parent-relative diff of c91b1eaab768 in #139409 adds an assertion on |
* origin/main: (95 commits) perf(build): avoid unrelated gateway artifact scans (#127757) fix(update): deliver terminal progress after long updates (#139289) fix(ui): show session hover cards for local chat URLs (#139384) perf(ui): reuse unchanged transcript key snapshots (#139400) fix(ui): make subagent sessions view-only (#139381) fix: open agent state on SQLite builds without extensions (#139487) perf(skills): detach cached metadata from source strings (#139478) fix(ui): show primary user in multi-agent profile hero (#136736) perf(sessions): stop decoding the session row four times per SQLite entry patch (#136361) refactor(exec): share package-manager option scans (#139482) fix(ci): authorize frozen mobile release candidates (#139441) fix: avoid session deletion slowdown in large session stores (#139467) perf(gateway): reuse node invocation idle timers (#139354) fix(auth): preserve selected profiles across plugin scopes (#139413) fix(discord): retain voice input until transcription completes (#139484) fix(agents): name Gateway storage failures in run-failure copy (#139409) fix: keep subagent checks responsive in large session stores (#139450) fix(memory): index notes when optional embeddings cannot start (#139463) fix: refresh pending approvals when reopening chat (#139457) fix(tooling): preserve Git hook choices during install (#139461) ...
…39289) Keep active update observation until the ledger records a terminal outcome or the Gateway stops. Preserve notice draining during shutdown. Real shipped requests held for 46 minutes reproduced the missing passive terminal event and locked page on baseline, while the candidate delivered one event and unlocked without reload. The integrated head retains that active watcher logic and passes a fresh shipped request, shutdown acceptance, and 137 focused lifecycle tests. Related: openclaw#139284; the separate CLI initialization work remains outside this repair. Co-authored-by: Ayaan Zaidi <[email protected]>
Related: #139284. This fixes the Gateway watcher workstream; the separate CLI initialization work in #139288 is outside this PR.
What Problem This Solves
A connected operator can miss an update's terminal progress when the update remains active for more than 45 minutes. The durable run completes, but the passive Updates page can remain on Staging with configuration controls disabled.
Why This Change Was Made
Remove the watcher's elapsed-time cutoff and start timestamp. Observe an active run until its terminal outcome or Gateway teardown. The ledger retains ownership of the result. The refreshed head preserves main's notice-draining shutdown behavior from #139304. Production code is net −5 lines.
User Impact
Late completion reaches connected clients, allowing the Control UI to read the terminal row and release its update interlock. Existing acknowledgement and final-notice deduplication remain intact.
Evidence
The long comparison used actual shipped
gateway call update.runrequests, normally authenticated passive clients, and the built Updates page. An isolated controller paused only each request's real Git clean-check child for 46 minutes, then resumed that same child. The unchanged updater returned its own dirty-checkout refusal. No fake clock, manual ledger admission/completion, command shim, installation, or managed-service simulation was used for these requests.672adca9aa6f198bf65d99f6skipped: dirty, no restartskipped: dirty, no restartA fresh source-blind validator passed all nine long-request acceptance clauses. The baseline also emitted its existing expiry-time duplicate Staging event; it never emitted a terminal event through observation and deliberate disconnect. Thus the direct CLI response and direct notice did not hide the passive-client failure.
After this proof completed, a real test conflict with #139304 required integration with main. The integrated head
166b0227a9f0has a separate clean build and fresh source-blind shipped-request acceptance over a 15-second real child hold: natural refusal, one matching terminal event, one acknowledgement and final notice, unchanged-page unlock, and independently verified clean shutdown. The completed long observations retain their original build identities. The integrated watcher preserves the same active polling and terminal logic; the imported change adds shutdown custody for pending notices. No separate 46-minute observation is claimed for the integration commit. The contributor subsequently refreshed main through8d35b0e2d91dand current headb2d8bafa7c6c. The watcher, tests, updater, ledger, notice path, update UI, and dependency pins remain unchanged from the tested integration. Retained observations stay bound to build166b0227a9f0; fresh exact-head review checks that reuse.This proves refused unmanaged Git updates. It does not claim successful installation or managed restart. The two retained long-run builds reported
serviceRestartSafe=false / runtime-verification-failed; that limitation was preserved. The fresh integration build reports its generated build identity normally. No existing build stamp was rewritten.The existing configuration-write protection is the Control UI interlock. Direct authorized configuration requests remain a separate unchanged policy. This PR does not add killed-updater recovery or close the umbrella issue.
Actual late shipped request: baseline stays locked, candidate completes
Baseline after natural completion at more than 46 minutes:
Candidate after natural completion on its unchanged passive page:
Retained 50-minute watcher transition recording
This separate recording shows the earlier canonical-ledger stimulus reaching the connected UI after 50 minutes, followed by usable controls. It is complementary watcher evidence, not the shipped-request admission/completion proof above and not an actual installation. The excerpt preserves the original transition and removes unrelated waiting time.
retained-late-watcher-transition.mp4