Repository navigation
fix: plugins update rewrites config for install-record-only updates - #98422
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 17, 2026, 12:30 AM ET / 04:30 UTC. Summary PR surface: Source +198, Tests +431, Other +17. Total +646 across 25 files. Reproducibility: no. current-main runtime reproduction was executed in this read-only review, but the source path and supplied Windows before transcript establish a high-confidence source reproduction of the unnecessary config replacement. Review metrics: 3 noteworthy metrics.
Stored data model Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land a rebased version that keeps authored config byte-identical for true install-record-only updates, preserves atomic validation and rollback, and demonstrates the authenticated current-head Gateway refresh and restart-planning path in a real isolated setup. Do we have a high-confidence way to reproduce the issue? No current-main runtime reproduction was executed in this read-only review, but the source path and supplied Windows before transcript establish a high-confidence source reproduction of the unnecessary config replacement. Is this the best way to solve the issue? Yes, the records-only commit boundary is the narrowest maintainable fix because it preserves existing config writes for real authored-config changes; the remaining deficiency is proof of the newly added live Gateway refresh path, not an identified alternative design. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against a0fac37f141e. Label changesLabel justifications:
Evidence reviewedPR surface: Source +198, Tests +431, Other +17. Total +646 across 25 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
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. How this review workflow works
|
|
@clawsweeper re-review Freshness rollback fix and after-fix isolated CLI proof were added in 24bdd18d73; the PR body now includes the real update output and validation commands. |
|
🦞🧹 I asked ClawSweeper to review this item again. |
24bdd18 to
e007cb6
Compare
|
@clawsweeper re-review The branch is now at d7d22cc with the records-only update rollback fixes, gateway watcher/reload fixes, full after-fix proof in the PR body, passing local proof policy, and clean local autoreview recorded in the Evidence section. |
|
🦞🧹 I asked ClawSweeper to review this item again. |
d7d22cc to
0c11206
Compare
2b03942 to
fa3792f
Compare
Co-authored-by: luyifan <[email protected]>
Co-authored-by: luyifan <[email protected]>
fa3792f to
a8e065e
Compare
|
Merged via squash.
|
…penclaw#98422) * Avoid config rewrites for plugin index updates * Preserve config freshness for records-only plugin updates * Validate records-only plugin update config * fix(plugins): reload index-only updates Co-authored-by: luyifan <[email protected]> * chore(protocol): refresh generated clients Co-authored-by: luyifan <[email protected]> * fix(gateway): wire plugin refresh handler --------- Co-authored-by: Peter Steinberger <[email protected]>
…penclaw#98422) * Avoid config rewrites for plugin index updates * Preserve config freshness for records-only plugin updates * Validate records-only plugin update config * fix(plugins): reload index-only updates Co-authored-by: luyifan <[email protected]> * chore(protocol): refresh generated clients Co-authored-by: luyifan <[email protected]> * fix(gateway): wire plugin refresh handler --------- Co-authored-by: Peter Steinberger <[email protected]>
Fixes #98419
What Problem This Solves
After a core upgrade,
openclaw plugins update <exact official npm spec>could reject an update at the config-write step even when the only durable change was an installed-plugin index record. On Windows 11 with OpenClaw 2026.6.11, updating Brave from the beta package to the matching stable package downloaded successfully, then tried to replace a larger user-authoredopenclaw.jsonwith a smaller projected config. The size-drop guard correctly rejected that unrelated rewrite and left plugin drift unresolved.This PR is limited to install-record-only plugin updates. Legacy
plugins.installscleanup, hook updates, and plugin-id migrations still use the existing config-writing path when they genuinely change authored config.Why This Change Was Made
plugins updatecompares the projected source config, after stripping persisted install records, with the mutation-start source config. When those shapes are equal, it commits only the SQLite installed-plugin index and leavesopenclaw.jsonbyte-identical.The records-only commit keeps the existing safety barriers:
A successful records-only update sends an authenticated internal
plugins.refreshRPC to the configured local Gateway. The Gateway clears the installed-index cache and same-config echo tokens, rereads the unchanged config plus fresh SQLite metadata, then uses the existing reload planner. This replaces the earlier artificial config mtime touch: there is no config rewrite, no configutimes, and no watcher on the shared SQLite database.If no Gateway is running, or the running Gateway predates
plugins.refresh, the durable update still succeeds and the existing restart instruction remains the recovery path.User Impact
Operators can repair official plugin version drift without rewriting or shrinking unrelated config. Size-drop protection remains intact. Concurrent root/include edits and newly invalid plugin config still fail closed and roll back the index. A running current Gateway receives the metadata change even though config bytes and hash remain unchanged.
Evidence
Real Windows 11 before evidence from an upgrade to
[email protected]:Real after-fix CLI proof from this branch, using an isolated temporary Windows home/state/config:
Regression coverage now proves:
plugins.refreshis anoperator.admincontrol-plane method with strict empty params;plugins.installs.<id>;Maintainer validation:
No
CHANGELOG.mdedit; contributor release-note context is preserved here and in the squash message.