Repository navigation
fix: preserve the running installation when an agent updates its Gateway - #201570
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. What this changesTeach agents to consult installation documentation and preserve the serving installation when choosing a Gateway update procedure. Example: An authenticated owner says “Update yourself” to a Gateway served directly from a Git checkout.
Review scores
ProductKind: Preference · Worth it: Needs a maintainer decision · Fix scope: Complete Merge readiness⛔ Blocked before merge - 1 item remains Keep open: this PR offers a focused, useful change, but replacing the explicitly accepted update-selection policy still needs an owner decision. Priority: P2 Decision needed
Before merge
FindingsNone. Agent review detailsHow this fits togetherThe shared control renderer supplies maintenance instructions to regular and native-harness prompts; agents consume those instructions when selecting existing update tools or host procedures. flowchart TD
A[Owner update request] --> B[Agent prompt]
C[Shared control renderer] --> B
B --> D[Installation documentation]
D --> E[Host authorized update procedure]
E --> F[Gateway restart and verification]
Technical reviewBest possible solution: Approve installation-aware selection in the existing shared renderer, or retain the previously accepted restriction if that remains the intended maintenance policy. Do we have a high-confidence way to reproduce the issue? Source confirms the exact-revision restriction and the updater's possible service-launch conversion; the supplied live results exercise the proposed alternative, but this review ran no target code. Is this the best way to solve the issue? The patch uses the existing shared prompt owner and updates its consumers without adding machinery; whether its broader method selection is desired remains a product-policy decision. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 2d9c5d679497. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource 0, Tests +7, Docs +4. Total +11 across 6 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReviewed November 19, 2026, 2:28 AM ET / 07:28 UTC (Revision 3). |
|
@clawsweeper re-review The Evidence section now records the owner-driven Git update on c7371f3, including independent before/after serving commits and health after restart, and the separate npm path and schema refusal. |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Co-authored-by: Beru <[email protected]>
Co-authored-by: Beru <[email protected]>
Co-authored-by: Beru <[email protected]>
Co-authored-by: Beru <[email protected]>
Co-authored-by: Beru <[email protected]>
Co-authored-by: Beru <[email protected]>
Co-authored-by: Beru <[email protected]>
Co-authored-by: Beru <[email protected]> Co-authored-by: sallyom <[email protected]>
c7371f3 to
f7b6f72
Compare
Co-authored-by: sallyom <[email protected]>
Co-authored-by: sallyom <[email protected]>
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
…202654 * origin/main: (34 commits) fix(ui): restore Skills first-visit asset limits (#202694) fix: restore Skills discovery recovery checks (#202747) fix(database): report disabled memory after a port (#202630) test(ui): settle live event imports before cursor assertions (#202752) fix: keep installed plugins in the Featured list instead of hiding them fix: keep PostgreSQL transcript and health totals numeric (#202629) fix(ui): show only SKILL.md in plugin skill previews fix: preserve the running installation when an agent updates its Gateway (#201570) chore(ui): refresh control ui locales (#202744) fix: show saved child results when idle delivery expires (#202732) perf(state): adopt producer-owned read commands (#202731) fix(cli): restore dashboard Gateway start and install recovery (#202085) fix: make plugin catalog artwork easier to recognize fix: restore queued compaction writer-fence coverage (#202709) fix(ui): remove resting chrome from Customize settings gears chore(ui): refresh control ui locales (#202734) fix: distinguish a recovered gateway from its failed update checks fix(ui): keep known plugin details visible while loading fix(cli): connect through gateway.remote.edgeAuth without a Gateway token fix: make the Plugins catalog clear when disconnected ...
) * feat(gateway): add restricted writer transport and steer discovery * refactor(gateway): retain publication owner across writer expansion * feat: prepare restricted connections for Session Share steering OpenClaw-Publication: d030c287-b7c5-8326-aa7e-a2b07b373ac6 * fix(gateway): distinguish disabled publication purposes at handshake * Publish openclaw/cool-shrimp OpenClaw-Publication: 096bcc30-6af3-892d-a6b9-456f24a4f5ba * merge: bring main into the steering transport branch and regenerate the config baseline * Merge remote-tracking branch 'origin/main' into land/steer-transport-202654 * origin/main: (34 commits) fix(ui): restore Skills first-visit asset limits (#202694) fix: restore Skills discovery recovery checks (#202747) fix(database): report disabled memory after a port (#202630) test(ui): settle live event imports before cursor assertions (#202752) fix: keep installed plugins in the Featured list instead of hiding them fix: keep PostgreSQL transcript and health totals numeric (#202629) fix(ui): show only SKILL.md in plugin skill previews fix: preserve the running installation when an agent updates its Gateway (#201570) chore(ui): refresh control ui locales (#202744) fix: show saved child results when idle delivery expires (#202732) perf(state): adopt producer-owned read commands (#202731) fix(cli): restore dashboard Gateway start and install recovery (#202085) fix: make plugin catalog artwork easier to recognize fix: restore queued compaction writer-fence coverage (#202709) fix(ui): remove resting chrome from Customize settings gears chore(ui): refresh control ui locales (#202734) fix: distinguish a recovered gateway from its failed update checks fix(ui): keep known plugin details visible while loading fix(cli): connect through gateway.remote.edgeAuth without a Gateway token fix: make the Plugins catalog clear when disconnected ... * merge: bring main into the steering transport branch and regenerate the config baseline * merge: bring main into the steering transport branch and regenerate the config baseline * merge: bring main into the steering transport branch and regenerate protocol output Co-authored-by: Vincent Koc <[email protected]> Co-authored-by: vincentkoc <[email protected]>
…way (openclaw#201570) * fix: preserve the running installation when an agent updates its Gateway Co-authored-by: Beru <[email protected]> * fix: shorten the Gateway update rule Co-authored-by: Beru <[email protected]> * fix: default to the built-in updater without requiring it Co-authored-by: Beru <[email protected]> * fix: check the running installation before choosing an updater Co-authored-by: Beru <[email protected]> * fix: select the source workflow for a directly served checkout Co-authored-by: Beru <[email protected]> * fix: follow the existing installation method for Gateway updates Co-authored-by: Beru <[email protected]> * fix: scope installation guidance to Gateway update requests Co-authored-by: Beru <[email protected]> * fix: consult installation instructions before choosing an updater Co-authored-by: Beru <[email protected]> Co-authored-by: sallyom <[email protected]> * fix: limit in-place Gateway updates to authorized source procedures Co-authored-by: sallyom <[email protected]> * test: exercise the documented built-in Gateway update action Co-authored-by: sallyom <[email protected]> --------- Co-authored-by: Dmitry Golubev <[email protected]> Co-authored-by: sallyom <[email protected]> Co-authored-by: Beru <[email protected]>
…claw#202654) * feat(gateway): add restricted writer transport and steer discovery * refactor(gateway): retain publication owner across writer expansion * feat: prepare restricted connections for Session Share steering OpenClaw-Publication: d030c287-b7c5-8326-aa7e-a2b07b373ac6 * fix(gateway): distinguish disabled publication purposes at handshake * Publish openclaw/cool-shrimp OpenClaw-Publication: 096bcc30-6af3-892d-a6b9-456f24a4f5ba * merge: bring main into the steering transport branch and regenerate the config baseline * Merge remote-tracking branch 'origin/main' into land/steer-transport-202654 * origin/main: (34 commits) fix(ui): restore Skills first-visit asset limits (openclaw#202694) fix: restore Skills discovery recovery checks (openclaw#202747) fix(database): report disabled memory after a port (openclaw#202630) test(ui): settle live event imports before cursor assertions (openclaw#202752) fix: keep installed plugins in the Featured list instead of hiding them fix: keep PostgreSQL transcript and health totals numeric (openclaw#202629) fix(ui): show only SKILL.md in plugin skill previews fix: preserve the running installation when an agent updates its Gateway (openclaw#201570) chore(ui): refresh control ui locales (openclaw#202744) fix: show saved child results when idle delivery expires (openclaw#202732) perf(state): adopt producer-owned read commands (openclaw#202731) fix(cli): restore dashboard Gateway start and install recovery (openclaw#202085) fix: make plugin catalog artwork easier to recognize fix: restore queued compaction writer-fence coverage (openclaw#202709) fix(ui): remove resting chrome from Customize settings gears chore(ui): refresh control ui locales (openclaw#202734) fix: distinguish a recovered gateway from its failed update checks fix(ui): keep known plugin details visible while loading fix(cli): connect through gateway.remote.edgeAuth without a Gateway token fix: make the Plugins catalog clear when disconnected ... * merge: bring main into the steering transport branch and regenerate the config baseline * merge: bring main into the steering transport branch and regenerate the config baseline * merge: bring main into the steering transport branch and regenerate protocol output Co-authored-by: Vincent Koc <[email protected]> Co-authored-by: vincentkoc <[email protected]>
…aw#194058) Failed-update triage now captures the operator's environment before managed candidate admission, so a coding agent installed only on the operator's PATH is still offered when the Gateway service's PATH differs. Restores the operator-environment contract from openclaw#134490 and keeps the launch confirmation from openclaw#143139. Proof: shipped CLI on isolated Linux (Crabbox) with a running systemd Gateway: accept launches the operator-only agent, decline starts nothing, base 18bee8e reports no agent found; published 2026.11.1 upgrades to the fix with settings intact. Co-authored-by: TorstenW <[email protected]> Co-authored-by: Peter Steinberger <[email protected]> Co-authored-by: steipete <[email protected]> (cherry picked from commit 7c702c3) Release adaptation: Capture invoking operator env before candidate admission, forward to interactive triage only; preserve latest target selectors, confirmation and lease cleanup ordering. Exact three authorized production paths plus real lifecycle regression. Follow-up dispositions: ad4863d fix: preserve the running installation when an agent updates its Gateway (openclaw#201570); dc73ec0 fix: let updates finish when another tool briefly reads OpenClaw's databases (openclaw#202541); d07b530 fix: clarify PostgreSQL schema upgrades for Git installs (openclaw#202098); e60ea9f test(update): add a Git release upgrade-survivor scenario (openclaw#201956); 2ef6f7b fix(update): build and serve Git releases outside node_modules (openclaw#201917); dbc1aa0 fix: keep the openclaw command and Gateway working after updating a pnpm install (openclaw#201735); f5e7641 fix: Git checkout updates across a schema change no longer end as post-update-failed after the new release starts (openclaw#201600); 2183caf fix: Git checkout updates no longer fail before the new release starts on a schema change or a busy database (openclaw#201463); 47e8649 fix: explain why Doctor cannot restore a scheduled job’s account (openclaw#201550); 8f2cfd4 fix: remove updater-only restrictions from agent maintenance guidance; cb5cfb2 fix: keep a doubtful killed-update recovery on the repair path (openclaw#201361); 24cb734 fix: keep carried-over scheduled jobs running after updates (openclaw#200653); d1276e1 feat(doctor): check OpenClaw ID member roles and honor an optional roles default (openclaw#197785); 0a39956 fix: finish updates when another tool reads OpenClaw's databases during the update (openclaw#201330); ea1c9d5 fix(update): settle remounted package publications before admission (openclaw#201336); 66b5212 fix(update): isolate malformed retained-install markers (openclaw#201199); 7e79c83 fix: let the next update finish a killed source checkout update (openclaw#201009); d905d8a fix: let the next update finish a killed update after the machine restarted (openclaw#200994); fdf0c95 fix: let the next update finish a killed update that had already installed the new version (openclaw#200866); 0c19bcd chore(release): close out 2026.11.5 on main (openclaw#200577); a1940e0 fix(matrix): keep explicit recovery available during deferred migration (openclaw#200805); 18b4776 improve: explain package baseline drift during updates (openclaw#200802); 1ad4cad fix(doctor): reclaim macOS updater runtimes blocked by non-updater processes (openclaw#200732); 427c857 fix: keep one missing archived transcript from blocking every update (openclaw#200733); 802e3f7 fix(update): keep valid cold archives from blocking updates (openclaw#200659); 23fca1a fix: let the next update continue after a killed update when nothing is left to repair (openclaw#200680); 3afe212 fix: let Doctor publish unchanged plugin migrations in any order (openclaw#200658); f65e4db fix(doctor): reclaim runtimes blocked by unrelated Linux processes (openclaw#200657); dab086c fix(update): let candidate Doctor read plugin dependencies from the staged package (openclaw#200595); 3447bee fix(update): keep updates going when the predecessor writes during its stop (openclaw#200569); 0ce9c77 fix: let the next update settle a package publication that a killed update left behind (openclaw#200550); ae31ea3 fix(update): repair handoffs in the journal-pinned lease store (openclaw#200532); 74020ea fix: continue updates when initial SQLite capture is stale (openclaw#200328); 6747b1e feat(update): run Git checkout installs from releases behind the release link (openclaw#199706); e3f8a67 fix(state): keep completed retained agent stores out of startup upgrade (openclaw#200284); 3c512c5 fix(gateway): move managed update lease operations off the main thread (openclaw#200169); ea69fcb chore(release): close out 2026.11.4 on main (openclaw#199956); 618bf31 fix(state): bound startup upgrade copies and pruning to owned state (openclaw#199929); e4a3093 perf(update): replace the candidate canary with a runtime contract check (openclaw#198268); 5dbf569 fix(update): plugin failures never fail an update or Gateway health; 764761e fix(update): refuse missing host prerequisites in one line and record a cause per attempt; 4c4fef4 fix(ui): update dialog claims installation before progress is confirmed (openclaw#199254); 136e1f6 fix(update): retrying an update from a dev checkout is refused after a killed update (openclaw#198673); 3bd03da fix(update): avoid duplicate database copies while the Gateway is stopped (openclaw#198148); 68a839b fix: isolate held agent databases until explicit restoration (openclaw#198180); e333f7e chore(ci): drop retired test-lines allocation records (3/3) (openclaw#197657); fd6fa47 fix: converge Gateway updates with environment-only service overrides (openclaw#196371); 7cf5e75 fix: clarify split-install updates and blocked Doctor repairs (openclaw#196342); 6ff8c86 fix(update): retain lazy sqlite catalog generation (openclaw#197095); 930e1f7 fix: keep stable updates and recovery free of premature migrations (openclaw#196474); a15f737 fix: preserve external plugin data during update rehearsal (openclaw#196301); 92798ae fix: updates survive interrupted heartbeat runs (openclaw#195656); c1e55e2 fix(update): restore LaunchAgent registration after repair contention (openclaw#195406); 715c610 fix(doctor): repair retained ISO session end timestamps (openclaw#194685); 689cfc8 fix(update): reclaim dead closing triage repair leases (openclaw#194503); 86bc89e fix(doctor): keep standing Codex parameter advice out of retirement blockers (openclaw#193650); 691bc8d fix(backup): read the backup engine without copying the live database (openclaw#194234); 000542f fix(backup): backups and updates fail on slow storage when a header probe batch misses its deadline (openclaw#194239); 31a65d5 fix(update): skip --no-lazy-fetch on Git versions without it (openclaw#194198); e45e99d fix(update): preserve dev update sources in tag-only Git clones (openclaw#193109) Validation: Baseline2 intended operator-agent failures/32 controls passed; candidate34/34passed (194058-green.log). Accept launches synthetic operator-only CLI with expected env, decline starts nothing. Isolated updater flow, not live systemd/upgrade qualification. Co-authored-by: RomneyDa <[email protected]> (cherry picked from commit 6689fd575ada8fe40a9593784deac18ec73041cd) (cherry picked from commit 92e7a9fa223b0dc35801f25f70be90b472d9a6b7)
Related: #200978
What Problem This Solves
The current agent guidance requires an exact revision before an agent can use Git to update its own Gateway, even when the service already runs directly from that checkout. Selecting a different method can change how the Gateway starts: the built-in Git updater can redirect a directly served checkout to a release launcher.
User Impact
Standard installations still use the built-in updater. On a directly served Git checkout, an ordinary owner update request can use the documented in-place procedure without an exact revision, but only when the host independently authorizes it for that caller. Other Git updates retain the exact-revision requirement. The agent reports a blocker rather than guessing, and switching installation methods remains a separate operator request.
Why This Change Was Made
Identifying the installation was not enough: in the earlier live Git test at
59120292, the agent checked status and still chose the built-in updater, which deferred to the external supervisor. The shared prompt now distinguishes standard installs from the narrow source-server exception and tells the agent to consult the host or installation documentation. Runtime permissions and the built-in slash-command, Control UI, and scheduled update routes are unchanged. The chat update guide reflects the distinction.Evidence
Gateway owner regression (
bc86ee2): Both Slack/launchd and Discord/foreground cases reproduced the old prompt-anchor failure before the test-only fix. The updated test reads the advertised built-inupdate.runaction and still exercises the real tool and handler path, checking requester attribution and restart handoff. All 17 Gateway owner tests passed locally (60 seconds wall time); targeted Gateway-methods typecheck, lint, formatting, andgit diff --checkpassed. No runtime code changed in this commit.Separate baseline CI failure: The two Skills route asset-request assertions that failed on the previous PR head also failed on scheduled
mainCI, down to the same deferred asset. This is evidence for those two assertions, not a blanket exception for another failure or a later head.Prompt proof (
a813c514): The four new prompt regression cases failed on the prior renderer and passed with the narrowed guidance. All 125 focused tests passed, including regular/native prompt parity and tool-prefix stability. Six generated prompt snapshots matched; targeted agents typecheck, lint, formatting, andgit diff --checkpassed. Codex autoreview (P0–P2,7a4298bftoa813c514) produced a scoped-clean report. The live update scenarios below were run on the earlierc7371f38head, not rerun on the later heads.Stable-to-candidate upgrade (operator-driven npm). Started the integrity-verified public npm release 2026.11.5 (
e13cf15e) with 13 existing configuration values, upgraded the same npm installation to the reviewed runtime (c7371f38), and restarted the Gateway. The candidate had an unpublished fixture version label; all 17,065 packaged JavaScript files matched the reviewed build.The CLI and config paths stayed the same. All 13 original values survived unchanged; migration added 14 keys. Authenticated
config.getconfirmed seven selected values on the running candidate, including a 343-second agent timeout and disabled cron. This verifies upgrade compatibility, separately from the agent-driven tests below.The Git installation successfully updated in place. On PR head
c7371f38, the authenticated owner sent only “Update yourself.” In an isolated directly served Git installation, a real model inspected the checkout, installation docs and host lifecycle commands. It chose and ran the documented source update under the existing supervisor. No operator performed the update or supplied a target or command in chat.Independent observations across restart (780 samples):
c7371f38101b2f54(test target integrating upstream #201557)The checkout path, Gateway launch command, service definition and configuration matched before and after. The source updater logged
OK 101b2f5447a (main); the new process and its build identity were checked independently, not inferred from the agent's reply.Global npm installation: same request, different procedure. The starting fixture was an unpublished npm prerelease containing this PR's runtime, labeled
2026.11.5-beta.201570. The agent read the installed documentation and selectedupdate.run. The updater used npm to stage the genuine public stable2026.11.5package (builde13cf15e, npm exit 0). Activation was correctly refused: the starting state used schema 40 and the release supports only 36. Across 176 observations, the original package path, serving build, PID 177 and config stayed unchanged and healthy. This verifies npm selection and safe refusal, not a completed npm upgrade. An explicitly requested migration was not live-tested.Both disposable test Gateways and their temporary model credentials were removed.