Skip to content

fix(update): complete already-current updates before service membership guards - #159193

Merged
steipete merged 6 commits into
mainfrom
upd/preflight-no-identity-hosts
Sep 28, 2026
Merged

steipete merged 6 commits into
mainfrom
upd/preflight-no-identity-hosts

Conversation

@steipete

@steipete steipete commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes updates refusing on already-current installs or managed Gateways without native containment identity, and fixes plugin capture errors encountered during update Doctor checks.

Related: #158314 #158231 #157786 #157812.

User Impact

Already-current updates finish as a no-op. Deferred maintenance and unapplied channel changes are reported. Real updates on verified owned services with absent native containment use managed stop → update → start and record the membership warning in the result and openclaw update status --json.

Genuine Gateway descendants, native service members, and present-but-unreadable observations retain their guards. Recovery guidance identifies an external shell not started by the service and the documented openclaw gateway stop && openclaw update --yes && openclaw gateway start sequence under the same account/profile/state paths. The managed alternative is openclaw gateway call update.run --params '{}'; Linux needs systemd-run.

Readiness uses the existing deadline and rollback owner. When startup never becomes ready, rollback restores the verified previous package and Gateway after command cleanup settles. Obsolete backup cleanup uses the existing five-minute cooperative budget and retains remaining backups with a warning. It joins pending filesystem operations, so genuinely stuck kernel I/O can extend that cleanup wait. No public config/environment/CLI switch, dependency, or schema change is added.

Why This Change Was Made

The no-op owner previously entered mutation admission too early. It now decides whether maintenance is needed first. Membership observations distinguish absent containment from unreadable facts, while preserving ancestry and real native containment refusals.

The Docker follow-up exposed two plugin capture defects. Independent caches can change hardlinked companion files' ctime without changing bytes; this PR accepts that case only with matching remaining identity fields and a fresh hash. Main's #159650 now owns identity reconciliation for overlapping native namespaces, including copied and hardlinked companion regressions. This rebase keeps that implementation verbatim and drops this branch's superseded native-admission logic and duplicate shared-companion test. The separate cross-cache regression remains, and the final source-integrity checks stay strict.

The docker-seed first published-driver hop runs --no-restart by design. The fixture stops its bootstrap Gateway before that hop. The “Gateway was already stopped before repair; repair did not start it” standalone Doctor path depends on #159577 (armed, not yet merged at this publication checkpoint). This PR does not add a competing start path. No missing package-swap-to-Doctor await was established: activation and plugin convergence already await their owners. The historical CI artifact did not retain the exact failing source identity/stack; the two capture defects were reproduced independently at their owning boundary.

This rebase keeps main's run.sh behavior where it overlaps, including its no-op assertions, native-assignment coverage, and foreground/managed-service transitions. This supersedes the earlier scenario-only reversal of 39db93e in the branch. The separate recovery-update cell still selects an emulated service without native identity through a private fixture argument and verifies the warning in both result and status.

Evidence

Current head: 6d7763e4a46c2f442ac2382cee1866b4e5d26144; rebased base: ac5891921c3480e761681f3be830088c94038578; tree: c7000badba497666e394a1610272f63f93f19083.

  • Main's fix(plugins): prevent WhatsApp Doctor failures after updates #159650 owns the native admission/namespace implementation and shared-companion coverage; this PR keeps it verbatim and retains only the distinct cross-cache verifier regression. All 20 production files still changed by this PR remain byte-identical to previously pushed af3f367094f66d5294531183fe360930b885ab32.
  • Main's subsequent test(update,backup,doctor): remove low-value tests (batch d077) #159952 test cleanup is also preserved: its deleted foreground-report case stays deleted, and the distinct backup-cleanup deadline case is integrated into its consolidated retained-backup table. Production bytes are unchanged by this second conflict resolution.
  • Final membership/readiness/rollback, plugin admission, and affected foreground suites ×3, plus doctor-error ×3: 19 suites / 509 passed / 6 existing platform skips per round, walls 127.47 / 75.63 / 74.42 seconds; the unchanged process regression passed separately in 3.573 / 3.074 / 3.416 seconds. Testbox tbx_01m3jmntdae4fsa7pq2j14zn47, hydration 36360268719.
  • Related plugin importer suites: 15 files / 803 passed, 71.49 seconds of runner wall time. The combined test command exited 0 in 464.725 seconds; lease stopped.
  • Final node scripts/check-changed.mjs --base origin/main: passed, delegated exit 0, 1492.564 seconds (24m 52.564s). All typechecks, formatting, lint, and policy guards passed. Testbox tbx_01m3jmntdhncdf9xfn29hbp9rm, hydration 36360268296, now stopped; its later portal-sync warning did not change the succeeded/exit-0 result.
  • Fresh direct-route P1 review: scoped-clean on 319a3f6f3ef2d9904d3c71aa0a1e871e78c0fa01; reused after the subsequent test-only conflict resolution because all 20 production patch files remain byte-identical.
  • Publication-boundary REST read: fix: recover managed Gateways after updates and repairs #159577 remains open, armed, unmerged at head 5d26c380b6ddf2116b4291b354d6d7064d013bb8; the dependency note is retained. A final merge-tree check exits 0 against newer fetched main df1273803188cbc4bf7c2d282a9f9f14e3bbf393. Both final proof leases are stopped

The earlier af3f367094f6 tree passed 41 suites ×3 (1516 tests/6 existing platform skips per round), the process regression ×3, all 744 additional readiness importer tests, and the changed gate. Those remain prior-head evidence; the fresh results above cover this conflict resolution. Its test/check leases tbx_01m3jfbj4ksvh9ez8zsky0nfqg and tbx_01m3jfbjcbq20y1sd405mzn28d are stopped.

Full CI run 36348823256 passed docker-seed-e2e on 0da84e6b09a50837fa5aa1ffe25c0866db8a56cf, including published-upgrade-survivor and legacy-operator-update-noop. No new Docker run is claimed for this rebase. The lead owns the next dispatch on the pushed head; the branch remains unchanged after that handoff. Auto-merge stays OFF.

Docker timing audit

The 1032-second base lane contains two updates plus standalone Doctor, fixture startup, and assertions. Its first published-driver --no-restart hop took 230.394 seconds; the candidate recovery update took 614.459 seconds. Compared with the prior rig on identical production files, the retained recovery substeps increased from 139.577 to 303.883 seconds (+164.306 seconds): snapshot, candidate Doctor, package swap, and post-swap Doctor all slowed. The first hop also increased by 104.612 seconds before final readiness.

The wait owners return on successful observations: health polling is 500 ms with the existing 12-observation settle contract (5.5 seconds spacing), HTTP readiness returns on its first successful healthz/readyz pair, deadline timers cancel after completion, and backup removal adds no sleep. Healthy observations return before startup-renewal handling. Historical identical-production proof used about 4.935 seconds of the previous-Gateway 300-second budget and recorded final verification at 2.178 seconds.

The exact slow operation in this CI run is not proven. Artifact 10942752169 clips recovery JSON at 16 KiB before readiness and cleanup; 310.576 seconds of the recovery phase remain unassigned. The job log retains heartbeats only. This cannot exclude an actual deadline expiry in that run. It does not support an unconditional five-minute wait, so no speculative performance change or shorter failure bound is introduced. Main's retained comparison artifact covers a different legacy cell without the candidate recovery hop and is not an equivalent total-time baseline.

Timing follow-up: preserve numeric phase timings beyond the artifact's 16 KiB log projection and profile the 310.576-second unassigned recovery tail on the same published-baseline scenario; its awaited operation and any actual deadline expiry remain unproven.

Attribution of the other CI reds

The comparison main hourly 36351907942 is green at da2bcd699bc11789ef35b43f61b2e27dc0c03861, the immutable base used for the attribution replays. It runs Node-only UI3/3, omits the session-reader case, excludes board-fixture from reduced UI, and omits numbered core-tooling suites. Its green result does not exercise those PR failure modes. Exact red matches below refer to the prior main hourly 36348256572. A passing replay is not treated as a fix.

PR job Exact failure Attribution / evidence
native-i18n (108703609103) Native locale zh-CN missing Android/Apple translations. Main-side, fixed by aea578dbe03ad0e79e5d9563a4b0c6fbb52e9242 (#159853 native locale refresh). The comparison main run native-i18n job108712154654 passed (preceding20:30 job108701958900 also passed). PR has no locale/source changes.
checks-ui (3/3) (108703609111) Bun ui/src/app/web-push.test.ts, “ignores a stale preference action after switching Gateways”; initial preference value undefined instead of fixture preference (approvalRequested: true). Node half passed; Bun half 1 failed/8177 passed. Unresolved UI-owned failure; no L1302 causal path identified. Entire production/test UI graph untouched by L1302; pure mocked browser Gateway, no update/native service/plugin loader. The comparison main run UI3/3 job108712154706 ran Node only (OPENCLAW_CI_TEST_RUNTIME_POLICY=node), passed512files, and passed this exact case in157ms. The full PR dispatch was dual and failed only Bun; no landed fix identified. Base original dual shard reached Node: original case passed (153ms); a separate physical-checkout fixture error occurred and Bun was missing. Prerequisite-repaired canonical Bun partition passed 512 files / 8,130 tests in 139.07 s; the original case passed in 153 ms. This is a bounded non-reproduction, not a fix. The comparison main run uses the same shard arguments with its current inventory. The preceding20:30 main job log returned HTTP404; the latest21:29 log is available and proves Node-only execution of this case.
checks-ui-e2e-real-gateway (108703609410) session-pr-reader-lifetime.real-gateway.e2e.test.ts, “keeps session PR and CI results with the current workspace and reader”, 120000ms timeout. Unresolved; no own causal evidence. Artifact10942436021 shows successful connected Gateway, /chat route success, document complete and roster count1/noerror. Timeout is after Gateway connection, not updater readiness. The comparison main run real-Gateway jobs108712154903/108712154951 passed but decoded includePatterns omit this test (11+13 files); their green result does not prove this case. The preceding20:30 jobs had the same omission. First base source-config attempt was blocked before test execution by linked-dependency build preparation (39.95 s). After physical dependency isolation, the single source case passed (52.058 s test, 81.19 s Vitest, 127.88 s wall including 31.7 s runtime build). This does not prove a fix for the earlier CI timeout. The exact awaited operation is still not proven. CI used Node24.21/prebuilt/full inventory; this bounded replay used Node24.19/source/single suite.
checks-ui-e2e (4/13) (108703609512) board-fixture.e2e.test.ts:244, “serves background task 1 through both chat entry points”; sessions.describe returns null session for retired mock-task-1. Main-side, stale fixture after 6652f7eac8d9 (#159179 Task retirement): deleted buildBackgroundTasksMock, spread of background task sessions/transcripts, and mock init from scripts/control-ui-mock-dev.ts; test remains unchanged on current main. The comparison main run ordinary E2E passed, but its compact9-row plan excludes this exact file through RELEASE_ONLY_UI_TEST_FILES; it is not the full manual12-row inventory. Exact4/12 replay on main da2bcd reproduced the same failure: 1failed/265passed across54files,338.61s.
checks-node-core-tooling-11 (108703612161) upgrade-survivor-assertions.test.ts, immutable targets2026.6.35/2026.7.33; missing staged native-assignment-summary.mjs. Main-side, fixed by 47b36e516adb4ffe681d65d1721a5ee3dae84da9, explicitly reproduces these two failures and stages helper beside diagnostics. Included in rebase.
checks-node-core-tooling-14 (108703612184) ci-node-test-plan.test.ts, host database consumers inventory expects deleted src/agents/tools/subagents-tool.acp-cancellation.test.ts. Main-side, fixed by ed0a056ce113f680f99bbb78ba23c30ad0134074, removes exact deleted path from database worker inventory (plus three stale entries elsewhere). Included in rebase.
checks-node-core-tooling-15 (108703612115) upgrade-survivor-candidate-identity.test.ts: three cases fail with /bin/bash: line136: native_assignment_enabled: unbound variable before intended candidate byte/tarball assertion. Main-side, fixture defect from 6652f7eac8d9: run.sh added variable initializer before extracted flow and condition inside extracted flow; fixture fails to initialize variable. Candidate-identity test and extracted block match main; L1302 run.sh diff only affects later recovery-update function. Exact-main replay reproduced the same three failures/one pass in 2.12s on da2bcd6. Subsequently fixed on main by 069a974b7317302f08f9cab48e71bb55ea599840, now included in this rebase.
checks-node-core-tooling-16 (108703612111) vitest-scoped-config.test.ts, watch-file ownership expects same deleted ACP cancellation file. Main-side, fixed by ed0a056ce113f680f99bbb78ba23c30ad0134074, same source inventory as tooling14.
checks-node-agentic-cli-process (108703612225) update-finalization-output.process.test.ts doctor-error: expected ordinary stopped-service timeout diagnostic; got new Gateway restart observation timed out during health-wait:interval. Also two help-exit.process.test.ts unknown-provider message drift failures. Own interval-expiry reporting regression in update-command-readiness.ts: catch overwrites last observed probe error with outer deadline message, while preserving phase but downstream prefers probeError. Fixed here; the unchanged process regression fails before the correction and passes after it. Models failures are main-side stale expectations: 74469f58f38c15d14ee4cddf24a498c6c21821ad intentionally changed unknown-provider message with guidance; process test expected the old generic message. Main subsequently fixed these assertions in 66898a633464, now included in this rebase. No models production/test changes in L1302.
checks-node-agentic-agents-support (108703612375) Four subagent-orphan-recovery.restart-integration.test.ts restart cases expect running, receive interrupted. Main-side, identical hourly red job108702413003; fixed by b459eb600f238d38f8b7156675e5868751f52c54. Included in rebase.
checks-node-agentic-gateway-methods (108703615055) artifacts-session-resolution.test.ts, indirect artifact topology promise resolves instead of rejecting. Main-side, identical hourly red job108702412908; fixed by 14ef6ab478327e1de0e9ebb3505e908efd4b8c0e (#159819). Included in rebase.
checks-node-bundle-infra-small-runtime-14 (108703617440) Three openclaw-state-maintenance-resources.test.ts cases assert public message “offline maintenance” but receive plugin-state wrapper error. Main-side, identical hourly red job108702412922; fixed by 6ad6f1fbe84619ca08620e45cff039aefc04452b (assert cause chain). Included in rebase.

Main-side proof: Testbox tbx_01m3jd155crvmk4h4tz873serg, hydration 36352629756, now stopped. Candidate-identity reproduces all three failures (2.12 seconds). The original UI E2E shard reproduces the board failure (1 failed / 265 passed, 338.61 seconds). After repairing missing pinned Bun and physical dependency placement in the isolated base fixture, the Bun partition passed 8,130 tests / 512 files (139.07 seconds). The real-Gateway source-config case passed (52.058 seconds test; 127.88 seconds total including a 31.7-second runtime build), which differs from CI's prebuilt entry point. This untouched composed test boots a real Gateway (9.3 seconds), creates synthetic repositories, exercises delayed reader transitions, and tears them down; no slow-test fix is claimed. Initial missing-prerequisite runs are not product results. The exact causes of the web-push failure and CI session-reader timeout remain unresolved; no assertion, timeout, retry, or skip was changed.

Published-driver proof and capture regressions before this rebase

Docker run l1302-down-v2-20260927 passed 2/2 cells on published 2026.9.5, 4 CPUs / 8 GiB, with unchanged lane budgets: base 497 seconds, managed legacy 337 seconds. Testbox tbx_01m3hypk7mxsm2vf1g9hfpzkda, hydration 36337213937; delegated command exit 0, 1266.510 seconds including packaging. This proof is bound to df51cee08b80d230cdba53ed503466f5f9d1f9fa / tree 0f58d55662876c23e9332b1ffcfe2b49f814f612 and its then-current scenario.

Base recovery 2135fcfb-fa10-4a6a-b730-477f6623b3b0 completed in 266.515 seconds. Result and status contain the membership warning; status records succeeded, serviceRunning: true, matching version, /readyz: true, settled: true, and pluginErrors: []. Standalone Doctor completed without capture/load errors. Managed legacy no-op c0b895eb-1b1a-4393-8ea2-c6f6ba1cbe02 returned skipped/already-current in 4.787 seconds; Doctor-clean and backup/rollback assertions passed.

Both capture regressions fail before their fixes: independent caches reject unchanged companion bytes; a single capture of two native packages sharing a hoisted dependency fails namespace completion. The fixed tests retain old bytes and reject real edits. The new cases each took about 0.5 seconds. The shared-dependency test's post-capture assertions use the dependency-alias API; its original failure occurs before those assertions.

Before rebase, 36 files / 1357 passed / 6 existing platform skips ×3 passed (189.06 / 117.81 / 116.68 seconds). No individual test exceeded 30 seconds. The combined three-round proof plus full changed gate exited 0 in 1847.658 seconds on Testbox tbx_01m3j16rcmfftbtznzrxfh7ej0, hydration 36339910512. Final direct-route P1 review was scoped-clean. All those leases were stopped.

The earlier unchanged-head replay l1302-down-before-20260927 passed standalone Doctor and completed its recovery update with the Gateway running, but failed the warning assertion: main's #159498 had supplied a real kernel cgroup, so an absent-membership warning was inappropriate. The private fixture selection repairs that proof shape. An intermediate after-proof exposed the second namespace-completion defect and was not counted as green.

The earlier hang in CI run 36297746253 showed the replacement ready and healthy before terminal output stopped. Its exact awaited operation was not proven. The guarantee here is bounded readiness observation with existing rollback, plus cooperative backup retention on cleanup expiry; a passing replay does not establish the original hang's exact cause.

Other CI failures and retained follow-ups

From CI run 36331301585:

Job Attribution and evidence
Windows node-test-3 (108653843814) update-candidate-state.budget.test.ts, “budgets schema inspection for large database,” failed at a five-second fixture-ready wait before simulated budget advancement (case 13.155 seconds). Test and inspection/process owners matched base/head/inspected main. Outside this PR's delta; exact blocked startup stage unresolved. No baseline replay claimed.
macOS Swift (108653843700) Artifact 10936281328: WebChatWindowLifetimeTests.swift:235 never observed injected transport historyStarted (case 15.970 seconds, three-second polling allowance). Test and Swift owners matched base/head/main; it exercises synthetic transport/cache. Outside this update change; native scheduling cause unresolved.
iPad screenshots (108653843713) Build passed; simulator preparation failed after 628 seconds, including about 467 seconds of cold boot. No screenshot test ran. Main's f389bd5883552febbb1940ad4e6a541d621b8f95 settles initial boot before the SimSlim deadline.

Earlier pr-prepare-crabbox-resume and cron-message-read failures were reproduced on the immutable base and attributed to their main-side fixtures. session-pr-reader-lifetime remains an unresolved UI timeout outside this PR; a passing replay was not treated as a fix. The restart-outcome VM fixture drift was repaired here while preserving its backup assertions.

Explicit performance waivers remain: CI test-perf owns ci-changed-node-test-plan.test.ts (206 s), ci-node-test-plan.test.ts (143 s), and package-acceptance-workflow.test.ts (142 s). CLI test-perf owns update-command-service-custody.test.ts (31 s deliberate delay) and update-command-original-service.test.ts (151 s/67 cases). L1305 / #159577 owns moving the three real-driver cases from doctor-config-preflight.refusal.process.test.ts to the live tier (132–141 s in earlier runs). These files are not changed here.

Doctor-maintenance tooling follow-up (slow-test gate explicitly waived): unchanged doctor-health.test.ts took 123.341 / 121.942 / 123.482 seconds across 72 cases; repeated synchronous SQLite inspection children during admission checks need profiling at that owner. This PR does not change the fixture, assertions, or timeout.

A prior P1 concern about cgroup namespace roots was checked against the typed native producer: missing, malformed, or failed ControlGroup reads stay unknown; a real non-root unit remains a guard. The approved warning-bearing default for genuinely fact-poor hosts is retained. The final direct-route review accepted this disposition with no actionable P1 finding.

LOC against the rebased base: production +509/−246 (net +263); tests/support +1276/−231; fixtures +36/−7; docs +41/−1.

The follow-up commit changes one production line (+1/−1, net 0) and no test lines; it preserves the existing deadline and rollback behavior.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation cli CLI command changes scripts Repository scripts size: M labels Sep 26, 2026
@clawsweeper

clawsweeper Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@steipete
steipete marked this pull request as ready for review September 26, 2026 21:38
@steipete
steipete enabled auto-merge (squash) September 26, 2026 21:47
@clawsweeper clawsweeper Bot added P0 Emergency: data loss, security bypass, crash loop, or unusable core runtime. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 26, 2026
@clawsweeper

clawsweeper Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed September 27, 2026, 8:43 PM ET / September 28, 2026, 00:43 UTC (Revision 9).

ClawSweeper review

What this changes

The branch completes already-current updates with deferred-maintenance warnings, permits managed updates when native containment is absent, bounds readiness and backup cleanup, and accepts unchanged plugin source bytes after a timestamp-only change.

Merge readiness

⛔ Blocked before merge - 6 items remain

Current main still lacks the branch’s already-current and absent-containment update behavior. A merged plugin fix covers only part of the plugin work. The service-stop authority case and a published-driver upgrade on the current head still need proof.

Priority: P0
Reviewed head: 6d7763e4a46c2f442ac2382cee1866b4e5d26144

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The patch has meaningful source coverage and earlier live update evidence, while its changed authority boundary and final upgrade behavior remain insufficiently proven.
Proof confidence 🦐 gold shrimp (3/6) Needs stronger real behavior proof before merge: Authority-chain proof required: The captured PR body reports an earlier-head published 2026.9.5 → candidate Linux update with a running, ready Gateway and persisted membership warning. Current-head synthetic tests cover the branch, but no macOS allowed/forbidden caller trace reaches the final service-stop effect, and no published-driver upgrade is shown for this head. No stored-data contract change was identified. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🦐 gold shrimp (3/6) Security review found an item that needs attention.

Verification

Check Result Evidence
Real behavior Needs proof Needs stronger real behavior proof before merge: Authority-chain proof required: The captured PR body reports an earlier-head published 2026.9.5 → candidate Linux update with a running, ready Gateway and persisted membership warning. Current-head synthetic tests cover the branch, but no macOS allowed/forbidden caller trace reaches the final service-stop effect, and no published-driver upgrade is shown for this head. No stored-data contract change was identified. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 9 items Current main still enters service admission: The current-main already-current path calls managed-service admission before completing its no-op; it has no deferred-maintenance branch.
Introduced no-op handling: The branch records deferred maintenance and finishes an already-current update when service membership blocks maintenance.
Changed native membership decision: A complete macOS observation with no Gateway resource coalition now returns absent after the process-group check.
Findings None None.
Security Needs attention Unproven macOS service-stop authority: The absent-coalition classification admits an external-looking caller. A real reparented service member must be shown to fail before service.stop, while an authorized external caller succeeds.

How this fits together

The installed openclaw update command checks the target installation, local state, and managed Gateway before changing packages or restarting the service. It then records the result for CLI output and openclaw update status.

flowchart LR
 A[Update request] --> B[Installed updater]
 B --> C{Core already current?}
 C -->|Yes| D[No-op or deferred maintenance]
 C -->|No| E[Service identity check]
 E --> F[Package and Gateway recovery]
 D --> G[Result and update status]
 F --> G
Loading

Before merge

  • Add real behavior proof - Needs stronger real behavior proof before merge: Authority-chain proof required: The captured PR body reports an earlier-head published 2026.9.5 → candidate Linux update with a running, ready Gateway and persisted membership warning. Current-head synthetic tests cover the branch, but no macOS allowed/forbidden caller trace reaches the final service-stop effect, and no published-driver upgrade is shown for this head. No stored-data contract change was identified. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Resolve security concern: Unproven macOS service-stop authority - The absent-coalition classification admits an external-looking caller. A real reparented service member must be shown to fail before service.stop, while an authorized external caller succeeds.
  • Resolve merge risk (P1) - The new absent-coalition route can reach a managed service stop on macOS. No real final-effect trace shows both an allowed external caller and a reparented LaunchAgent member rejected before that stop; misclassification could stop the Gateway that owns the updater.
  • Resolve merge risk (P1) - The published-driver upgrade trace belongs to an earlier head. The current head changes readiness failure reporting and lacks a published-driver × candidate result after the rebase.
  • Complete next step (P2) - Add redacted macOS final-effect traces for an allowed external caller and a reparented forbidden member, plus a published-driver × current-head upgrade result. Redact private paths, addresses, keys, and endpoints; updating the PR body should trigger re-review, or a maintainer can request @clawsweeper re-review.
  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.

Findings

  • [medium] Unproven macOS service-stop authority — src/daemon/service-process-membership.ts:110
Agent review details

Security

Needs attention: No new dependency, secret, or workflow execution surface was found; the broadened managed-service stop authority needs forbidden-caller proof.

PR surface

Source +263, Tests +1045, Docs +40, Other +29. Total +1377 across 46 files.

View PR surface stats
Area Files Added Removed Net
Source 20 509 246 +263
Tests 22 1276 231 +1045
Docs 2 41 1 +40
Config 0 0 0 0
Generated 0 0 0 0
Other 2 36 7 +29
Total 46 1862 485 +1377

Review metrics

Metric Value Why it matters
Production and test growth production net +263; tests/support net +1045 The PR body attributes production growth to membership and readiness handling, with substantially more regression coverage.

Stored data model

Persistent data-model change detected: migration/backfill/repair: scripts/e2e/lib/upgrade-survivor/run.sh, migration/backfill/repair: scripts/e2e/lib/upgrade-survivor/update-restart-auth.sh, serialized state: scripts/e2e/lib/upgrade-survivor/update-restart-auth.sh, unknown-data-model-change: scripts/e2e/lib/upgrade-survivor/run.sh. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Prove the stop boundary and upgrade (recommended)
    Capture redacted macOS allowed and reparented-forbidden caller outcomes at service.stop, then record one published-driver upgrade on this head with its terminal result and status.
  2. Pause the containment fallback
    If the forbidden caller cannot be distinguished at the final effect, pause this route and retain the existing refusal while the boundary is repaired.

Technical review

Best possible solution:

Keep one installed-updater path for no-op reporting and managed service recovery, with native membership checked at the stop boundary and the resulting warning preserved in update status.

Do we have a high-confidence way to reproduce the issue?

Yes, current-main source places service admission before the already-current completion and has no absent-containment result. The supplied published-driver trace exercises the repair on an earlier head; this review did not run the bug.

Is this the best way to solve the issue?

Yes, moving the no-op decision ahead of mutable admission and reusing the managed service lifecycle is a coherent owner-level repair. The changed stop authority still needs final-effect proof.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 86c4bf83e699.

Labels

Label changes:

No label changes.

Label justifications:

  • P0: The PR addresses blocked update and Gateway recovery paths that can leave users without an in-product way forward.
  • merge-risk: 🚨 security-boundary: A new native-membership result changes which callers may reach managed service stop.
  • merge-risk: 🚨 availability: An incorrect service-member classification could stop the Gateway that launched the updater.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs stronger real behavior proof before merge: Authority-chain proof required: The captured PR body reports an earlier-head published 2026.9.5 → candidate Linux update with a running, ready Gateway and persisted membership warning. Current-head synthetic tests cover the branch, but no macOS allowed/forbidden caller trace reaches the final service-stop effect, and no published-driver upgrade is shown for this head. No stored-data contract change was identified. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Evidence

Security concerns:

  • [medium] Unproven macOS service-stop authority — src/daemon/service-process-membership.ts:110
    The absent-coalition classification admits an external-looking caller. A real reparented service member must be shown to fail before service.stop, while an authorized external caller succeeds.
    Confidence: 0.78

What I checked:

  • Current main still enters service admission: The current-main already-current path calls managed-service admission before completing its no-op; it has no deferred-maintenance branch. (src/cli/update-cli/update-command-noop.ts:141, 86c4bf83e699)
  • Introduced no-op handling: The branch records deferred maintenance and finishes an already-current update when service membership blocks maintenance. (src/cli/update-cli/update-command-noop.ts:78, 6d7763e4a46c)
  • Changed native membership decision: A complete macOS observation with no Gateway resource coalition now returns absent after the process-group check. (src/daemon/service-process-membership.ts:110, 6d7763e4a46c)
  • Final service side effect: The update path rechecks membership before the Linux stop; on macOS, the earlier service-state check precedes the eventual service.stop call. (src/cli/update-cli/update-command-service-maintenance.ts:617, 6d7763e4a46c)
  • Boundary tests: The native membership tests use synthetic launchd output, and the update service test stubs the membership result while asserting the managed stop path. They do not show the nearest forbidden macOS caller reaching the production stop boundary. (src/cli/update-cli.service-scope.test.ts:234, 6d7763e4a46c)
  • Captured PR body identity and proof: The live body matches the supplied 23,190-unit snapshot and SHA-256 84533e72a8717bc5dae911cb0912565fdd987e7ac38c5c57f8e47ec56bd33a9f. It reports a successful earlier-head published 2026.9.5 → candidate Linux recovery with a running, ready Gateway and membership warning, and says no Docker run is claimed for this rebase. (6d7763e4a46c)

Likely related people:

  • Peter Steinberger: Raw commit 6209f31 adds src/daemon/service-process-membership.ts:23 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 6209f31ce9bb; files: src/daemon/service-process-membership.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Capture the allowed external and nearest reparented LaunchAgent caller at the production service-stop boundary, showing zero stop calls for the forbidden caller.
  • Record one published-driver × current-candidate upgrade-survivor result with terminal status and readiness.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (8 earlier review cycles)
  • reviewed September 26, 2026, 5:59 PM ET / 21:59 UTC sha unknown :: blocked before merge. :: none
  • reviewed 2026-09-27T05:37:57.117Z sha dce2b5f :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-27T13:42:54.527Z sha aaf361b :: needs real behavior proof before merge. :: [P1] Recognize the wrapped cleanup abort before failing the update
  • reviewed 2026-09-27T15:27:53.756Z sha aaf361b :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-27T16:00:03.237Z sha 8ebfec3 :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-27T19:32:13.884Z sha df51cee08b80d230cdba53ed503466f5f9d1f9fa :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-27T20:46:15.464Z sha 0da84e6b09a50837fa5aa1ffe25c0866db8a56cf :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-27T23:10:26.210Z sha af3f367094f66d5294531183fe360930b885ab32 :: needs real behavior proof before merge. :: none

@steipete
steipete disabled auto-merge September 26, 2026 22:22
@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime size: XL and removed size: M labels Sep 27, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. and removed proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 27, 2026
@openclaw-barnacle openclaw-barnacle Bot reopened this Sep 27, 2026
Keep unreadable membership and genuine service descendants guarded while allowing verified external callers to use the existing managed stop/update/start lifecycle on hosts without native containment.

Record the lifecycle warning at terminal reporting, retain inspected service state for already-current maintenance, and exercise the managed Docker recovery and no-op paths.
Reuse the restart deadline for native readiness reads and managed recovery. Restore the retained package and previous Gateway when startup never becomes ready, and retain obsolete backups with a warning when the cooperative cleanup budget expires.
@steipete
steipete force-pushed the upd/preflight-no-identity-hosts branch from af3f367 to 6d7763e Compare September 28, 2026 00:31
@steipete
steipete enabled auto-merge (squash) September 28, 2026 00:41
@steipete
steipete merged commit 018639a into main Sep 28, 2026
223 checks passed
@steipete
steipete deleted the upd/preflight-no-identity-hosts branch September 28, 2026 00:46
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 28, 2026
…ip guards (openclaw#159193)

* fix(update): complete already-current updates before service membership guards

* refactor(update): prepare maintenance warnings in the no-op owner

* fix(update): manage updates when native containment is absent

Keep unreadable membership and genuine service descendants guarded while allowing verified external callers to use the existing managed stop/update/start lifecycle on hosts without native containment.

Record the lifecycle warning at terminal reporting, retain inspected service state for already-current maintenance, and exercise the managed Docker recovery and no-op paths.

* fix(update): bound readiness observation and backup cleanup

Reuse the restart deadline for native readiness reads and managed recovery. Restore the retained package and previous Gateway when startup never becomes ready, and retain obsolete backups with a warning when the cooperative cleanup budget expires.

* fix(plugins): retain source identities across native captures

* fix(update): preserve observed readiness timeout failures
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes docs Improvements or additions to documentation gateway Gateway runtime merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P0 Emergency: data loss, security bypass, crash loop, or unusable core runtime. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. scripts Repository scripts size: XL status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant