Skip to content

fix: let updates finish when plugins change no config and openclaw.json is read-only - #201331

Merged
fuller-stack-dev merged 11 commits into
openclaw:mainfrom
fuller-stack-dev:fix/update-skips-empty-plugin-config-write
Nov 18, 2026
Merged

fuller-stack-dev merged 11 commits into
openclaw:mainfrom
fuller-stack-dev:fix/update-skips-empty-plugin-config-write

Conversation

@fuller-stack-dev

@fuller-stack-dev fuller-stack-dev commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

When openclaw.json is a file the updater may not replace, such as a link to a provisioned read-only file, a core update with official npm plugins installed reports failed (post-update-failed) and tells you to stop the Gateway and run openclaw update repair. That happens even though the update finished: the new core serves, /readyz is 200, and both plugins are installed at their new versions (install records, packages on disk, and the local plugins list inventory). The next plain openclaw update then says already-current and leaves the failed record in place. The failure report's instruction, openclaw gateway stop, also refuses in a non-interactive shell unless you add --force.

User Impact

An update whose plugin work changes no configuration now succeeds on a config file it cannot write, and leaves that file byte-for-byte unchanged. A plugin update that does need a config change is still refused on such a file, exactly as before. When an update does leave maintenance unfinished, the report now names openclaw gateway stop --force (for the managed service), the same command openclaw update repair names.

Why This Change Was Made

After plugin convergence, the updater published the plugin install records together with a config-file write, even when convergence had changed no config path. With nothing to write, that write only restamped the file, and a refused write failed an otherwise complete update. Now, when no config path changed, the updater publishes the install records alone through the existing records-only commit and skips the config write.

Root cause, and the hypothesis it replaced
  • Throw site. A diagnostic copy of the candidate recorded the stack in the process that ran plugin convergence. The throw is captureConfigRootWriteTarget (src/config/io.write-safety.ts), reached from the publication's transformConfigFileWithRetry in updatePluginsAfterCoreUpdateWithLease. The error is a non-retryable ConfigMutationConflictError, with publishing: true, cohort: false, configChanged: false and changedPaths: []. The install records were already at the new versions before publication started, because without a cohort the plugin updater commits them plugin by plugin. So the publication's rollback had nothing to restore, and the state was consistent.
  • Hypothesis replaced. The first theory was that a first update from a published updater fails because it has no plugin cohort, so a convergence failure is rethrown instead of being owed. Falsifier: with a cohort, this same error still rethrows. pluginConvergenceFailureBlocksUpdate treats a refused config write as blocking, and so does stage.publishing. Both are deliberate (fix(update): a plugin step that throws after a core update rolls the whole update back #200507) and documented as never owed. Owing without a cohort would not change the outcome. This PR leaves both rules alone.
  • Broken invariant. A plugin publication with nothing to commit to the config file must not be able to fail a converged plugin phase. Its owner is the publication block in updatePluginsAfterCoreUpdateWithLease. The new branch lives in src/cli/update-cli/update-command-plugin-records.ts, which only that owner imports.
  • Freshness and target. The decision reads the config with the same pending deferred plugin migration facts the update's other reads use. It also checks the config path proof captured when the update read the config for write (assertConfigPathForWrite, the same check the config-write path runs), both before deciding and after the index write. So a config link re-pointed to another file mid-update fails the publication with "config target changed since last load", as a write would, and its records are not kept. It runs the same beforeCommit and recovery authority checks before the index write. After the write it re-reads the config: if the config no longer reads as valid, the index write is restored and the phase reports the existing plugin-config-conflict deferral. A valid unrelated edit in that window is kept, as the config-write path keeps it.
  • Cohort (main-to-main). The index writer records the cohort's records publication the same way on both branches. No config publication is recorded when no config was written, so a later rollback leaves the file alone; a written config is still restored.
  • Retired path. A config file holding legacy plugins.installs no longer reads as valid on main (it is rejected as a retired field), so a records-only branch for it is unreachable and none is kept.

Behavior change for main-to-main updates

When plugin convergence changes no config path, the config file is no longer rewritten. That means no meta.lastTouchedVersion restamp, no backup rotation and no config-audit row for that no-op. I checked every reader of meta.lastTouchedVersion, and none needs this write:

  • future-version warnings and persistValidatedDowngradeConfig, which restamps a downgrade on its own;
  • Doctor's migration source version;
  • the bundled-discovery inference, which is guarded by the canonical SQLite row;
  • immutable-protection and cohort-recovery diffs, which both ignore the stamp.

An update that changes no plugins already never reached this write, so a stamp the update did not refresh was already a normal state.

Update behavior for published drivers

The fix lives in the candidate, so it applies on the first update from published updaters. With migrated state, 2026.11.5 hands finalization to the candidate's update-migrated-finalize worker, and the candidate's own plugin publication runs there with no cohort; with this change it no longer writes the config. The published parent accepts the worker's result and keeps the candidate's terminal record. No marker, schema, protocol, config key or stored field changes. OPENCLAW_CONFIG_READONLY=1 is unaffected: both 2026.11.5 and main refuse openclaw update up front in that mode, before any staging (observed: 2026.11.5 exits in 1.3 s with the read-only refusal).

Evidence

End-to-end proof, in words. This is a real install driven by a real published updater, not a seeded fixture. In a disposable Docker container, npm install -g [email protected] installs the published release from the npm registry. openclaw doctor --fix seeds state, openclaw plugins install installs the real official packages @openclaw/zalo and @openclaw/voice-call from npm, and openclaw gateway install runs the Gateway as a managed service. Then openclaw.json becomes a link to a read-only file. The installed 2026.11.5 openclaw update command then updates to a package cut from the candidate, through its shipped entry point, with no test hooks. The future plugin versions are the published 2026.11.5 packages restamped with a newer version and served from a local npm registry that proxies everything else to npmjs.org.

After the update, the cell checks the shipped surfaces:

  • the update's own --json result and its run record;
  • openclaw update status --json;
  • the Gateway's /readyz and openclaw gateway probe, for the serving version;
  • openclaw plugins list --json (the local plugin inventory, not a query of the running Gateway), and each plugin's install record against its package on disk;
  • the config file's bytes.

Then it removes the fault and runs a plain openclaw update again. On the base, the published updater's update exits 1 and records failed. On the head, it exits 0 and records succeeded, the Gateway serves the new version with /readyz 200, and the local plugin inventory lists both plugins as loaded at the new version. A negative-control run of the same cell also requests another update channel, which is a real config write. That write is still refused end to end, and the failure report from the shipped CLI names the working gateway stop --force command.

Red, green and negative-control recordings

All three recordings run the same lane as committed: published [email protected], the two official npm plugins, and openclaw.json a link to a read-only file. Each first update goes to a future core cut from the candidate. Each recording ends with observations read from the cell's own captures. The cell asserts the update exit code and run record status. It also checks that openclaw update status --json is readable and names the update's own run, that no owed step was left, that a fresh /readyz probe in that run succeeded, that the serving version matches, that the plugin records match their packages on disk and the local plugins list inventory lists them as loaded (this reads the local inventory; it does not query the running Gateway), and that the config bytes are unchanged.

base/red, 3e0d3687c5d. The first update exits 1: error / post-update-failed, run failed, rollback not-attempted: state-migrated-no-rollback, while the Gateway serves the new version with /readyz 200 and the local plugin inventory lists both plugins as loaded at the new version. The report says openclaw gateway stop, which refuses an unattended shell.

published-driver-plugin-publication-base-red-3e0d3687c5d-r2.mp4

head/green, a8b99203816 (candidate packed at 90ac53240b9; the commits after it change only the e2e harness, a lane script entry and a comment). The first update exits 0 with the run succeeded, and the same serving and plugin observations hold. The next plain openclaw update exits 0 as already-current, with no failed record and nothing owed.

published-driver-plugin-publication-head-green-a8b99203816.mp4

head/negative control, a8b99203816 (OPENCLAW_PUBLISHED_DRIVER_PLUGIN_FAULT=refused-channel-change). The same first update also passes --channel beta, which needs a real config write against the read-only config.

  • That write is still refused: exit 1, run failed, with the same is a symlink refusal from the shipped CLI.
  • The Gateway serves the new version with /readyz 200. The plugins stay at 2026.11.5, because the refusal comes before plugin convergence.
  • The report now names openclaw gateway stop --force for the managed service, so the new wording is captured from the shipped CLI.
published-driver-plugin-publication-negative-control-a8b99203816.mp4

What changed after the recordings. git diff a8b99203816..HEAD is a merge of main (2840dc974fc) plus three harness-only commits, d1da62a9520, e612b2363e0 and 91dbd6bfb77, which touch only scripts/e2e/published-driver-update-docker.sh, scripts/e2e/lib/upgrade-survivor/published-driver-plugin-publication.mjs, the shared plugin fixture packer scripts/e2e/lib/update-first-hop-package-fixtures.mjs (an optional target version), its test, and the lane's package.json script entry. The four production files are byte-identical between 90ac53240b9 (the recorded candidate) and the head. The merged main commits change no update, config-write, plugin install-record or harness code; the closest is #201220, which adds a plugin manifest field for the Customize sidebar.

The final harness was rerun on head 91dbd6bfb77 with the same candidate, both the green cell and the negative control. See "Recorded lane cells" under Commands and results.

Full raw logs are not attached because the Crabbox artifact store rejected uploads (crabbox artifacts publish: http 401 Unauthorized). The decisive excerpts below come from the sanitized captures. Container hostnames and the synthetic gateway token are redacted; nothing else is changed.

base/red: first update result and run record (3e0d368)
$ openclaw update --yes --json --tag <future core cut from the candidate>
exit code 1
status: error   reason: post-update-failed
run: status failed, phase finished, reason post-update-failed, 2026.11.5 -> 2026.11.6-first-hop.0
rollbackOutcome: not-attempted / state-migrated-no-rollback
step "post-update verification": exitCode 1
  stderrTail: Config writes need a regular file, but /home/appuser/.openclaw/openclaw.json is a symlink.
              Point OPENCLAW_CONFIG_PATH at the real file, or replace the symlink with that file.
next action: ... stop the Gateway first (`openclaw gateway stop`), then run `openclaw update repair` to finish maintenance.
after the update: /readyz 200; serving 2026.11.6-first-hop.0; plugins voice-call and zalo at 2026.11.6-first-hop.0 (record and disk), loaded
cell: AssertionError [ERR_ASSERTION]: The first update succeeds   (cell exit 1)
head/green: first update and the next update (a8b9920)
$ openclaw update --yes --json --tag <future core cut from the candidate>
exit code 0
status: ok
run: status succeeded, 2026.11.5 -> 2026.11.6-first-hop.0; update status lastRun is this run, succeeded, no owed rows
openclaw.json: same bytes as before the update (asserted by the cell)
after the update: /readyz 200 (fresh probe); serving 2026.11.6-first-hop.0; plugins voice-call and zalo at 2026.11.6-first-hop.0, loaded
$ openclaw update --yes --json          (fault removed, no newer release)
exit code 0, skipped / already-current; update status lastRun is this run, skipped; owed steps none
cell: plugin publication cell passed   (cell exit 0)
head/negative control: a real config write is still refused (a8b9920)
$ openclaw update --yes --json --tag <future core cut from the candidate> --channel beta
exit code 1
status: error   reason: post-update-failed
run: status failed; rollbackOutcome not-attempted / state-migrated-no-rollback
step "post-update verification": Config writes need a regular file, but /home/appuser/.openclaw/openclaw.json is a symlink. ...
next action: ... stop the Gateway through its service owner first (`openclaw gateway stop --force` for the managed service), then run `openclaw update repair` to finish maintenance.
after the update: /readyz 200; serving 2026.11.6-first-hop.0; plugins voice-call and zalo still 2026.11.5, loaded; openclaw.json unchanged
cell: refused channel change cell passed   (cell exit 0)
Stack from the process that ran plugin convergence (diagnostic candidate, logging only)

A diagnostic copy of a base candidate packed at f8727fdcd3a logged these facts from the plugin publication catch block. It changes no behavior. The process is the candidate's adopted finalization driver, which a 2026.11.5 updater hands the run to after state migration.

publication {"changedPaths":[],"previousRecords":{"voice-call":"2026.11.5","zalo":"2026.11.5"},
             "convergenceChanges":[],"convergenceConfigChanges":[],
             "nextRecords":{"voice-call":"2026.11.6-first-hop.0","zalo":"2026.11.6-first-hop.0"}}
records-before-publication {"voice-call":"2026.11.6-first-hop.0","zalo":"2026.11.6-first-hop.0"}
caught ConfigMutationConflictError: Config writes need a regular file, but /home/appuser/.openclaw/openclaw.json is a symlink. ...
    at captureConfigRootWriteTarget (dist/write-lock-*.mjs)
    at writeConfigFileFromContext (dist/io.write-*.mjs)
    at dist/io.factory-*.mjs
    at runConfigLockScope (dist/write-lock-*.mjs)
    at async withConfigWriteLock (dist/write-lock-*.mjs)
  retryable false, publishing true, cohort false, configChanged false, restoredChannels false
records-at-catch / records-after-rollback {"voice-call":"2026.11.6-first-hop.0","zalo":"2026.11.6-first-hop.0"}

Published-driver Docker cell (new lane published-driver-plugin-publication): a first update from published [email protected], with @openclaw/zalo and @openclaw/voice-call installed, while openclaw.json is a link to a read-only file in a read-only directory.

base 3e0d3687c5d head a8b99203816
first openclaw update --yes --json exit 1, error / post-update-failed, run failed, rollback not-attempted: state-migrated-no-rollback exit 0, run succeeded
Gateway after the update serving the new version, /readyz 200 serving the new version, /readyz 200
plugins (records, disk, plugins list) both at the new version, loaded both at the new version, loaded
openclaw.json unchanged unchanged bytes (asserted by the cell)
next plain openclaw update exit 0, already-current; the failed record stays exit 0, no failed record, nothing owed
  • The corrupt-plugin mode of the same cell (one plugin's target tarball truncated) is unchanged on head: run succeeded, a per-plugin warning for voice-call, and the next update converges it.
  • Owner tests in src/cli/update-cli/update-command-plugins.persistence.test.ts run the real updatePluginsAfterCoreUpdate with real config and index stores:
    • symlinked config with no config change, without a cohort, with a cohort (then rolled back), and with a pending deferred plugin migration: publishes the records and leaves the file's bytes and link alone;
    • symlinked config with a real config change: still rejects with the same is a symlink error and publishes no records (negative control);
    • writable config with a real change, with and without a cohort: written as before, and a cohort rollback restores it;
    • a config edit after the decision: a valid edit is kept and the records publish; an edit that leaves the config invalid defers with plugin-config-conflict and restores the index;
    • update authority revoked before the index write: rejects, with no index write, no registry refresh and no config change;
    • config link re-pointed to another valid file during convergence, with the update's real prepared write options: rejects with "config target changed since last load" and keeps no records; the same link left alone publishes (red on the previous head, green now).
  • Red on base: the no-change symlinked rows fail with the is a symlink rejection, and the writable no-change row fails because the file gets restamped. Mutation checks: removing the post-write freshness check, or the authority hook before the index write, each fails its test.
Commands and results
  • node scripts/run-vitest.mjs src/cli/update-cli/update-command-plugins.persistence.test.ts src/cli/update-cli/update-command-config-fence.test.ts src/cli/update-cli/update-recovery-guidance.test.ts test/scripts/docker-e2e-plan.test.ts: 35, 15, 27 and 46 passed.
  • Neighbor update and plugin suites on the final code: 20 files, 458 tests passed (update-cli.plugin-convergence, update-command-{contention,convergence-authority,doctor-*,finalize-refusal,killed-run.process,lifecycle,plugin-caller,plugins.degradation,post-update}, update-command.test, update-config-provenance.integration, install-record-commit{,.retention}, update-cohort-recovery).
  • test/scripts/eager-import-closure.test.ts (23 passed) and test/scripts/update-restart-module-outcome.test.ts (1 passed).
  • pnpm tsgo:all: passed. oxlint --type-aware on the touched files: clean. pnpm check:docs: passed. git diff --check: clean.
  • pnpm check:baseline-ratchets --base 3e0d3687c5d --no-merge-base: all ratchets ok, including test-lines, max-lines and session-identity.
  • Final harness cells on head 91dbd6bfb77, same candidate, under the Docker lock: the green symlinked-config cell passed in 459 s (plugins stamped with the core target 2026.11.6-first-hop.0, the config still the same link with unchanged managed bytes, the next update clean), and the refused-channel-change cell passed in 329 s.
  • Harness cell on head e612b2363e0, same candidate (packed at 90ac53240b9): OPENCLAW_PUBLISHED_DRIVER_PLUGIN_PUBLICATION=1 OPENCLAW_PUBLISHED_DRIVER_PLUGIN_FAULT=refused-channel-change bash scripts/e2e/published-driver-update-docker.sh <candidate.tgz> <artifacts> with no driver argument. It defaulted to driver=2026.11.5 and passed in 330 s. The channel write was refused with the symlink error. Both plugins stayed at 2026.11.5 in records, on disk and in the local inventory. update status names the run failed with nothing owed, and the Gateway serves the new core with /readyz 200.
  • Recorded lane cells on the committed harness (a8b99203816): head symlinked passed in 353 s, head refused-channel-change passed in 277 s, and base symlinked failed at The first update succeeds in 254 s. All stayed inside the wrapper's 1125 s envelope.
  • Earlier lane cells, via OPENCLAW_PUBLISHED_DRIVER_PLUGIN_PUBLICATION=1 [OPENCLAW_PUBLISHED_DRIVER_PLUGIN_FAULT=corrupt-plugin] bash scripts/e2e/published-driver-update-docker.sh <candidate.tgz> <artifacts> 2026.11.5: head symlinked passed in 344 s (391 s while recorded alongside the base cell), head corrupt-plugin passed in 426 s, base symlinked failed at The first update succeeds in 261 s (303 s recorded). The wrapper envelope is 1125 s.

Changes to existing tests

  • test/scripts/update-first-hop-package-fixtures.test.ts: one new case for the plugin fixture packer's target version; existing cases unchanged.
  • test/scripts/docker-e2e-plan.test.ts: the new lane's plan test no longer runs the package script against a fake wrapper that only echoed its arguments; that could not detect dispatch to the wrong entry, and the real Docker cell proves dispatch. The planner assertion, including the lane command, stays.
  • src/cli/update-cli.finalizer.test.ts: "refreshes post-Doctor state with requested channel undefined" checks that plugin publication writes against the post-Doctor config (baseHash post-doctor). Its sync result changed no config, so it now took the records-only branch, wrote nothing, and failed in CI. It now syncs a real config change and still proves the write uses post-Doctor state. Before the next push, all 25 top-level src/cli/update-cli.*.test.ts files were run locally: 342 tests passed.
  • update-command-config-fence.test.ts: the plugins flow fences an executor revocation inside the plugin config write. Its convergence result changed no config, so it now took the records-only branch and never reached that write. It now returns a real config change, so it still proves the config-write fence. The records-only fence has its own new test.
  • update-command-plugins.persistence.test.ts: "rolls back the tentative index after a config failure" and "preserves reference activation only with explicit intent" each changed no config, so they would have passed without writing anything. Each now carries a real config change and still proves its original behavior. The cases that pin "a refused config write fails" and "no cohort keeps failing" are untouched.

Nearby fix

openclaw gateway stop refuses a non-interactive shell without --force (runDaemonStop, src/cli/daemon-cli/lifecycle.ts). The red recording shows the old instruction as the shipped CLI prints it. The negative-control recording shows the new instruction printed by the shipped CLI on the head, after a refused channel write. The update report for a healthy Gateway with unfinished maintenance now names openclaw gateway stop --force for the managed service, matching repair's own next action. Its test is red on base. The same plain gateway stop wording remains in status.ts, update-command-service-plan.ts, update-maintenance-error.ts, update-command-service-publication.ts, update-recovery-guidance.ts (cleanup guidance) and update-repair-command.ts. That is a follow-up.

Review

A fresh, independent read-only review (separate agent, given the diff and the behavior contract) found no blockers.

  • Fixed with failing-first tests:
    • the records-only read missed the update's pending deferred plugin migration facts;
    • two existing tests had become vacuous;
    • there was no records-only fence test;
    • there was no real cohort rollback after a records-only publication.
  • Also fixed: docs scope and wording, and the plan test's command assertion.
  • Not taken: rejecting other wrapper flags combined with the new mode. The wrapper already ignores unrelated mode flags.

autoreview does not run on this machine, so it was not run.

ClawSweeper rating

The local ClawSweeper review (GPT 6.2 Sol) runs offline against this branch.

  • Round 1 (head 2423fb365fc): overall D, proof D, patch C. Three P2 findings, all verified as real and fixed:
    • Records-only publication skipped the config path proof. It now runs the same assertConfigPathForWrite check the write path uses, with a failing-first test.
    • The Docker cell could pass when update history was unreadable. It now requires readable history whose lastRun is the update's own run, with the expected status and no owed rows.
    • The Docker cell's baseline plugin versions followed npm latest. A fixture registry now pins them to the published 2026.11.5 packages.
    • The low-value fake-wrapper plan assertion was removed.
    • The proof gap for the gateway stop --force wording is stated under "Nearby fix".
  • Round 2 (head 90ac53240b9): overall D, proof D, patch C. Three P2 findings in the new lane, all verified as real and fixed:
    • The lane shared .artifacts/published-driver-update with its sibling lanes. It now uses its own directory.
    • Readiness could be read from a stale probe file. The cell now deletes the file first and accepts it only after a successful probe in the same run.
    • The baseline npm pack and fixture packing had no timeout. Both are now bounded by the cell deadline.
    • Proof notes: the green capture predated the final checks, and the new stop instruction had no shipped-CLI capture. All three recordings were redone on the committed harness, and the negative-control mode now captures the new instruction from the shipped CLI.
  • Round 3 (head 2840dc974fc): overall C, proof B (sufficient real-behavior proof), patch C. One P2 and two P3 findings in the lane, all verified as real and fixed in d1da62a9520 after the round limit, so they have not been re-rated:
    • The negative control now also requires the openclaw.json is a symlink refusal in post-update verification, so an unrelated failure cannot pass it. On the captured runs this assertion matches the negative control and rejects the green capture.
    • A direct wrapper call in this mode now defaults to its own artifact directory.
    • The plugin observation is named after the local inventory it reads.
    • The patch tier was held at C by the lane findings above. The production change drew no findings in this round.
  • Round 4 (head d1da62a9520, landing review): overall C, proof B, patch C. One P2 and two P3 findings, again only in the lane and the proof wording. All were verified, and the two lane findings were real:
    • A direct wrapper call in plugin publication mode with no driver argument used the dist-tag latest as the fixture package version. The wrapper now defaults this mode to 2026.11.5, and the cell rejects anything that is not a concrete release version. Red: node .../published-driver-plugin-publication.mjs <tgz> <dir> latest got past argument checks on d1da62a9520. Green: it now fails at once with "Expected a concrete driver release version".
    • The refused-channel control did not check that the plugins stayed at the driver release, or that the failed run was recorded. It now asserts both plugins' records, disk packages and local inventory at the driver version, and that update status names this run as failed with nothing owed. The earlier recorded negative-control capture already satisfied these facts.
    • Proof wording: plugins list reads the local plugin inventory, not the running Gateway. The body now says so wherever it reports plugins as loaded.
    • Fixed in e612b2363e0 (harness only) and rerun as a Docker cell (see Commands and results).
  • Round 5 (head e612b2363e0): overall C, proof B, patch C. Two new lane findings, both verified as real and fixed in 91dbd6bfb77; the production change again drew none:
    • P2: the cell stamps the future plugin tarballs from the driver plugin version (2026.11.5 + 1) but advertises and asserts the core target (candidate version + 1). These match today only because the candidate is also 2026.11.5; the lane will break once main moves past the driver release. Fix: the shared packFuturePluginFixture takes an optional target version, and the lane stamps each plugin with the core target, then asserts the packed version equals what the registry advertises. Its new test in test/scripts/update-first-hop-package-fixtures.test.ts was red before the change (a 2026.11.5 plugin packed for a 2026.11.7-first-hop.0 core came out as 2026.11.6-first-hop.0) and is green now; without a target the packer behaves as before for its other callers.
    • P3: the green cell compares openclaw.json bytes through the link but does not assert the entry is still a symlink to the managed file (the owner unit tests do). Fix: the green cell and the negative control both assert with lstat/readlink that openclaw.json is still the link to the managed file, and compare the managed file's own bytes.
    • A further reviewer-style read of the lane found no other check that relies on two values happening to match, reads through the link instead of on it, or would pass if its step never ran.
  • Round 6 (head 91dbd6bfb77): overall B, proof B, patch B, "patch is correct". One P3 lane finding, left open:
    • Open (lane, P3): if an update leaves a plugin record pointing at a missing package, the cell's observe throws while reading that package's package.json, before it saves update status, readiness and the plugin inventory. The cell still fails in that case; it only loses some diagnostics. This is a lane diagnostics follow-up, not a correctness gap in the production change.
  • An earlier attempt at round 1 aborted on a dirty checkout before reviewing and produced no rating. A round 2 run started with a stale base was stopped before it finished and rerun with the branch's merge base.

CI on 91dbd6bfb77

Run 44408383488, tested merge 8caa21cf8ff (91dbd6bfb77 into main at c5ef395ba72). git diff --name-only c5ef395ba72 8caa21cf8ff lists exactly this PR's files. Every other job passed or was skipped.

  • checks-fast-baseline-ratchets: on attempt 1 "The hosted runner lost communication with the server" and the ratchet step was cancelled before it ran. That is infrastructure, so it was rerun once and passed. Locally pnpm check:baseline-ratchets --base 6018bc9ce69 --no-merge-base is also all ok.
  • Four test jobs failed only in Gateway and agent tests that this PR does not change, and the same cases fail on main:
    • checks-node-changed-compact-large-13-1: src/gateway/server.cron-session-cleanup.test.ts (revoked operator authority) and five src/agents/openclaw-tools.sessions-steering.test.ts "persists steering provenance" cases.
    • checks-node-changed-compact-large-2: src/gateway/server-methods/agent.visitor-access.test.ts (revoked before and after commit).
    • checks-node-changed-compact-large-39-2: src/gateway/server.sessions-send-owner-continuation.test.ts ("enforces owner authority at the final plugin write after an inline wait expires (success)", a timeout).
    • checks-node-changed-extensions-bundle-32: src/gateway/server.talk-consult-history.test.ts ("keeps host-authenticated node approval cancellation", both callback cases; Linux-only cases).
  • The evidence for those four:
    • The scheduled main run 44401396829 (95d6e4b6fe7, Linux) fails exactly these cases, every one of them.
    • Run locally on main at c5ef395ba72 (the tested merge's main parent), the same nine cases in the first three jobs fail. The talk-consult cases are Linux-only and skip on macOS, so the scheduled main run is their baseline.
  • The changed code runs only inside openclaw update: updatePluginsAfterCoreUpdate, the records-only publication, and the recovery guidance. The one shared function, commitPluginInstallRecordsOnly, gained an optional parameter that its other callers do not pass. None of the failing tests runs an update.

Earlier heads had the same inherited Gateway failures, an android-ktlint failure from a Maven Central "429 Too Many Requests", and single unrelated extension flakes. No job was rerun just to get green.

Not proven

  • No CI workflow selects the new lane yet. It ran locally on OrbStack only.
  • A --no-restart first update and Windows/macOS service managers were not exercised.

@clawsweeper

clawsweeper Bot commented Nov 18, 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.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation cli CLI command changes scripts Repository scripts docker Docker and sandbox tooling size: L labels Nov 18, 2026
When plugin convergence after a core update changes no config path, publish the install records without writing openclaw.json. A config file the update cannot replace, such as a link to a provisioned read-only file, no longer fails an update whose plugin work converged, and the file keeps its bytes. A real config change against such a file is still refused.

The update report for a healthy Gateway with unfinished maintenance now names `openclaw gateway stop --force`, the command that works in a non-interactive shell and the one repair names.

Adds the published-driver-plugin-publication Docker lane: a published 2026.11.5 updater's first update with two official npm plugins and a symlinked read-only config.
@fuller-stack-dev
fuller-stack-dev force-pushed the fix/update-skips-empty-plugin-config-write branch from 7152694 to 7dacf06 Compare November 18, 2026 16:16
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Nov 18, 2026
@clawsweeper

clawsweeper Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR publishes plugin install records without rewriting unchanged configuration and corrects the managed-service stop command in recovery guidance.

Example: Upgrade from openclaw 2026.11.5 with zalo and voice-call installed and openclaw.json symlinked to a provisioned read-only file.

  • Before: Plugin publication attempts an unnecessary config replacement and reports post-update-failed despite a healthy updated Gateway.
  • After: Publication updates the plugin index, preserves the config bytes, and allows the update to succeed.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The production repair is focused and source-supported, but a consumer test fails and the reported shipped-entry-point proof is not attached.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🦪 silver shellfish (2/6) 1 actionable review finding remain.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: A completed core and plugin update is reported as failed because publication tries to rewrite an unchanged provisioned config.
Reason: The maintainer-authored direction follows the best-effort update contract and preserves operator configuration and genuine write refusals.

Merge readiness

⛔ Needs changes before merge - 1 item remains

Keep open: this maintainer-authored PR addresses a source-confirmed update failure, but a retained finalizer test fails because it still requires the config write this change intentionally removes.

Priority: P2
Reviewed head: 7dacf0600ae6a9b70291abf5f2054befe9bad7fe

Before merge

  • Update the finalizer regression for records-only publication (P2) - The no-requested-channel case makes plugin synchronization report a change while leaving the post-Doctor config unchanged. This PR therefore takes the records-only branch and never calls replaceConfigFile, but the retained assertion still requires its baseHash to equal post-doctor. Exact-head CI check checks-node-changed-compact-large-29-1 fails here with undefined instead. Update this consumer test to verify that publication uses the post-Doctor config and records without requiring a config replacement, retaining its fresh-snapshot coverage.

Findings

  • [P2] Update the finalizer regression for records-only publication — src/cli/update-cli.finalizer.test.ts:316

Tests

  • Missing end-to-end proof: Attach the reported 2026.11.5-to-candidate CLI upgrade trace or terminal recording showing successful publication, preserved config and plugin records, healthy Gateway, and clean retry; redact IPs, keys, phone numbers, and non-public endpoints.
Agent review details

How this fits together

The CLI updater feeds plugin convergence results into the existing install-index and config publication owner, then refreshes plugin metadata before final update verification.

flowchart TD
  A[Update command] --> B[Plugin convergence]
  B --> C[Changed config paths]
  C --> D[Records-only commit]
  C --> E[Config and records commit]
  D --> F[Plugin registry refresh]
  E --> F
  F --> G[Update verification]
Loading

Technical review

Best possible solution:

Keep the existing records-only publication owner and config-write refusals, and update the finalizer regression to verify publication from the fresh Doctor snapshot without requiring a config rewrite.

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

Main's unconditional config publication and explicit symlink refusal establish the reported failure path; this read-only review did not execute the reproduction.

Is this the best way to solve the issue?

Skipping an empty config write at post-core publication fixes the cause using an existing persistence owner, preserves real-change refusals, and avoids changing exception policy or adding configuration.

Full review comments:

  • [P2] Update the finalizer regression for records-only publication — src/cli/update-cli.finalizer.test.ts:316
    The no-requested-channel case makes plugin synchronization report a change while leaving the post-Doctor config unchanged. This PR therefore takes the records-only branch and never calls replaceConfigFile, but the retained assertion still requires its baseHash to equal post-doctor. Exact-head CI check checks-node-changed-compact-large-29-1 fails here with undefined instead. Update this consumer test to verify that publication uses the post-Doctor config and records without requiring a config replacement, retaining its fresh-snapshot coverage.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.94

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 24c2e742bb0f.

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

Acceptance criteria:

  • node scripts/run-vitest.mjs src/cli/update-cli.finalizer.test.ts src/cli/update-cli/update-command-plugins.persistence.test.ts src/cli/update-cli/update-command-config-fence.test.ts
  • pnpm tsgo:all
  • git diff --check

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 8e6129a adds src/plugins/install-record-commit.ts:548 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 8e6129a813f8; files: src/plugins/install-record-commit.ts)
  • Jason (Json): Raw commit c48b829 adds src/cli/update-cli/update-command-plugins.ts:165 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: c48b8293ae67; files: src/cli/update-cli/update-command-plugins.ts)
  • Vincent Koc: Raw commit ef11eae adds src/plugins/install-record-commit.ts:395 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: ef11eae39b29; files: src/plugins/install-record-commit.ts)
  • ooiuuii: Raw commit 7641aa8 adds src/plugins/install-record-commit.ts:351 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 7641aa80c23b; files: src/plugins/install-record-commit.ts)

PR surface

Source +82, Tests +246, Docs +11, Config +1, Other +439. Total +779 across 13 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 4 147 65 +82
Tests 4 252 6 +246
Docs 1 13 2 +11
Config 1 1 0 +1
Generated 0 0 0 0
Other 3 441 2 +439
Total 13 854 75 +779

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Review metrics

Metric Value Why it matters
Production versus regression coverage Production +147/-65 LOC; tests and E2E tooling +693/-8 LOC. Most growth supplies the published-updater fixture and distinct config, cohort rollback, deferred-migration, and publication-authority coverage.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: An advanced provisioned-config installation can report a failed update despite successful core and plugin convergence; the repair has a limited, concrete scope.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦪 silver shellfish.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 18, 2026, 11:32 AM ET / 16:32 UTC.

…ig path

Check the config path proof captured for the update before and after the records-only publication, so a re-pointed config link cannot receive records planned for another config. The published-driver cell now pins its baseline plugin versions through a fixture registry and requires readable update history that names the update's own run.
…cell

Give the lane its own artifact directory, read readiness only from a successful probe in this run, bound fixture fetches by the cell deadline, and add a refused-channel-change mode: a real config write against the read-only config still fails the update, and the report names a Gateway stop that works unattended.
…default

The negative control now requires the symlink refusal in post-update verification, the wrapper selects the plugin publication cell's artifact directory with its entry point, and the plugin observation is named after the local inventory it reads.
@fuller-stack-dev
fuller-stack-dev merged commit 5242bce into openclaw:main Nov 18, 2026
463 of 476 checks passed
@fuller-stack-dev

Copy link
Copy Markdown
Member Author

Merged via explicitly authorized admin squash with attributed pre-existing CI failures.

@fuller-stack-dev
fuller-stack-dev deleted the fix/update-skips-empty-plugin-config-write branch November 18, 2026 23:48
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 19, 2026
…on is read-only (openclaw#201331)

* fix(update): publish plugin records without an empty config write

When plugin convergence after a core update changes no config path, publish the install records without writing openclaw.json. A config file the update cannot replace, such as a link to a provisioned read-only file, no longer fails an update whose plugin work converged, and the file keeps its bytes. A real config change against such a file is still refused.

The update report for a healthy Gateway with unfinished maintenance now names `openclaw gateway stop --force`, the command that works in a non-interactive shell and the one repair names.

Adds the published-driver-plugin-publication Docker lane: a published 2026.11.5 updater's first update with two official npm plugins and a symlinked read-only config.

* test(e2e): record the published-driver plugin cell before asserting

* test(update): keep the post-Doctor publication check on a real config change

* fix(update): bind records-only plugin publication to the planned config path

Check the config path proof captured for the update before and after the records-only publication, so a re-pointed config link cannot receive records planned for another config. The published-driver cell now pins its baseline plugin versions through a fixture registry and requires readable update history that names the update's own run.

* test(e2e): isolate and bound the published-driver plugin publication cell

Give the lane its own artifact directory, read readiness only from a successful probe in this run, bound fixture fetches by the cell deadline, and add a refused-channel-change mode: a real config write against the read-only config still fails the update, and the report names a Gateway stop that works unattended.

* test(e2e): pin the refused channel write and the cell's own artifact default

The negative control now requires the symlink refusal in post-update verification, the wrapper selects the plugin publication cell's artifact directory with its entry point, and the plugin observation is named after the local inventory it reads.

* test(e2e): default the plugin publication cell to a release and pin the refused control's plugins

* test(e2e): stamp lane plugin fixtures with the core target and check the config link itself
RomneyDa added a commit that referenced this pull request Nov 19, 2026
* improve(ci): avoid duplicate release source guard scans

* fix(ci): classify recovery browser test server ownership (#200402)

(cherry picked from commit a62e4e1)

* fix(ci): restore package harness startup

Copy the runtime process dependency manifest into the dependency-free packaging fixture so the CLI reaches argument validation. The existing startup assertion continues to reject missing modules.

(cherry picked from commit 84262af)

* test(facetime): preserve child process exports in audio fixture (#200419)

Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit 36549cb)

* test(browser): align fixtures with navigation and CLI contracts (#200428)

Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit d0daf88)

* fix: restore Codex qualification fixture contracts (#200450)

* fix: restore Codex run-attempt qualification coverage

Use the complete typed transcript recorder fixtures and assert post-acceptance submission after prompt persistence, matching #199695. No production behavior or timeout changes.

Co-authored-by: RomneyDa <[email protected]>

* test: align Codex refresh callback fixtures

Co-authored-by: RomneyDa <[email protected]>

---------

Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit 8f0d03f)

* fix(crabbox): join heartbeat command cleanup before retirement (#200466)

(cherry picked from commit 6247dc4)

* fix(agents): retain ambiguous completed-answer receipts

* fix(qa): ignore workspace context when detecting continuation

---------

Co-authored-by: Vincent Koc <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit 60e0e21)
Release adaptation: Preserve baseline authored-request continuation classifier and extractToolOutput import; newer #201244 behavior already exists. Apply runtime-context split and regression without downgrading it.:
Backport review: #201130 selected by sibling; #201331 and #198760 are independent package script changes. #201244 classifier already present-equivalent on baseline.:
(cherry picked from commit ad2ae0e0e2bf242ab0df9f9ca29f4f848caf478c)
RomneyDa added a commit that referenced this pull request Nov 19, 2026
…on is read-only (#201331)

* fix(update): publish plugin records without an empty config write

When plugin convergence after a core update changes no config path, publish the install records without writing openclaw.json. A config file the update cannot replace, such as a link to a provisioned read-only file, no longer fails an update whose plugin work converged, and the file keeps its bytes. A real config change against such a file is still refused.

The update report for a healthy Gateway with unfinished maintenance now names `openclaw gateway stop --force`, the command that works in a non-interactive shell and the one repair names.

Adds the published-driver-plugin-publication Docker lane: a published 2026.11.5 updater's first update with two official npm plugins and a symlinked read-only config.

* test(e2e): record the published-driver plugin cell before asserting

* test(update): keep the post-Doctor publication check on a real config change

* fix(update): bind records-only plugin publication to the planned config path

Check the config path proof captured for the update before and after the records-only publication, so a re-pointed config link cannot receive records planned for another config. The published-driver cell now pins its baseline plugin versions through a fixture registry and requires readable update history that names the update's own run.

* test(e2e): isolate and bound the published-driver plugin publication cell

Give the lane its own artifact directory, read readiness only from a successful probe in this run, bound fixture fetches by the cell deadline, and add a refused-channel-change mode: a real config write against the read-only config still fails the update, and the report names a Gateway stop that works unattended.

* test(e2e): pin the refused channel write and the cell's own artifact default

The negative control now requires the symlink refusal in post-update verification, the wrapper selects the plugin publication cell's artifact directory with its entry point, and the plugin observation is named after the local inventory it reads.

* test(e2e): default the plugin publication cell to a release and pin the refused control's plugins

* test(e2e): stamp lane plugin fixtures with the core target and check the config link itself

(cherry picked from commit 5242bce)

Co-authored-by: RomneyDa <[email protected]>
github-actions Bot pushed a commit to clawhaven/openclaw that referenced this pull request Nov 23, 2026
…on is read-only (openclaw#201331)

* fix(update): publish plugin records without an empty config write

When plugin convergence after a core update changes no config path, publish the install records without writing openclaw.json. A config file the update cannot replace, such as a link to a provisioned read-only file, no longer fails an update whose plugin work converged, and the file keeps its bytes. A real config change against such a file is still refused.

The update report for a healthy Gateway with unfinished maintenance now names `openclaw gateway stop --force`, the command that works in a non-interactive shell and the one repair names.

Adds the published-driver-plugin-publication Docker lane: a published 2026.11.5 updater's first update with two official npm plugins and a symlinked read-only config.

* test(e2e): record the published-driver plugin cell before asserting

* test(update): keep the post-Doctor publication check on a real config change

* fix(update): bind records-only plugin publication to the planned config path

Check the config path proof captured for the update before and after the records-only publication, so a re-pointed config link cannot receive records planned for another config. The published-driver cell now pins its baseline plugin versions through a fixture registry and requires readable update history that names the update's own run.

* test(e2e): isolate and bound the published-driver plugin publication cell

Give the lane its own artifact directory, read readiness only from a successful probe in this run, bound fixture fetches by the cell deadline, and add a refused-channel-change mode: a real config write against the read-only config still fails the update, and the report names a Gateway stop that works unattended.

* test(e2e): pin the refused channel write and the cell's own artifact default

The negative control now requires the symlink refusal in post-update verification, the wrapper selects the plugin publication cell's artifact directory with its entry point, and the plugin observation is named after the local inventory it reads.

* test(e2e): default the plugin publication cell to a release and pin the refused control's plugins

* test(e2e): stamp lane plugin fixtures with the core target and check the config link itself

(cherry picked from commit 5242bce)

Release adaptation: Adapted existing compensated install-record owner with beforePersistentEffect forwarding. Preserved target and authority guards; added only new source regressions and existing cohort support imports. Omitted absent sourceSnapshot API and new Docker workflow. Corrected malformed import insertion caught by formatter before capture. Final simplification removes unavailable automatic-cohort fixture imports and tests; preserves baseline-owned archive-record regression boundaries.

Co-authored-by: RomneyDa <[email protected]>
tideclaw-bot pushed a commit that referenced this pull request Nov 24, 2026
…on is read-only (#201331)

Baseline adaptation: Use the baseline records-only owner and its verification/compensation hook, retain Nix and path refusal, and reject real edits on a provisioned config link.

(cherry picked from commit 5242bce)

Co-authored-by: RomneyDa <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes docker Docker and sandbox tooling docs Improvements or additions to documentation P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. scripts Repository scripts size: XL status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant