Repository navigation
fix(plugins): prevent config conflicts during legacy plugin installation - #154539
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 21, 2026, 6:53 AM ET / 10:53 UTC (Revision 3). ClawSweeper reviewWhat this changesThe PR prevents legacy plugin registration during installation-time kind inspection while preserving slot selection, and extends the existing installation regression tests. Merge readiness✅ Ready for maintainer review This remains a useful fix: current main and the latest release retain the failing path. No blocking defect was found, and the updated installation and upgrade evidence resolves the previous proof blocker. Priority: P1 Review scores
Verification
How this fits togetherThe plugin installer determines which exclusive capability slots a plugin owns before saving its configuration. Legacy plugins expose that information through module exports; registration should occur after installation settings are committed. flowchart TD
A[Plugin installation] --> B[Read manifest metadata]
B --> C{Kind declared?}
C -->|Yes| E[Select capability slots]
C -->|No| D[Read legacy exports without registration]
D --> E
E --> F[Commit installation settings]
F --> G[Activate plugin registration]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +3, Tests +1. Total +4 across 3 files. View PR surface stats
Review metricsNone. Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Keep legacy kind discovery within the existing validation loader and reserve registration for post-commit activation. Do we have a high-confidence way to reproduce the issue? Yes: current main calls legacy registration before committing installation settings with the original config hash, so a registration-time configuration write can cause the reported conflict. This review verified the source path and inspected supplied runtime observations without executing it. Is this the best way to solve the issue? Yes: selecting the existing validation mode removes premature registration while retaining exported kinds, slot selection, conflict guards, and normal activation; retrying the stale write would leave the unwanted side effects intact. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 2d3dd99f5642. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
landpr-approve-unrelated-red |
|
Merged as d510628. Legacy plugin kind inspection now avoids registration-time configuration writes, fixing first-install conflicts while preserving normal registration and existing settings. Verified first install, reinstall, and a published 2026.9.5 updater installing the candidate, plus 53 focused tests. Exact-head review passed; unrelated hosted CI failures are recorded above. Thanks @goutamadwant for the fix and @obviyus for the maintainer repair and verification. |
* commit '0883394977d1fb3af657635967f6e447bd7fff9a': (72 commits) fix(ui): await scheduled rail layout in focus test fix(cron): keep healthy active runs from delaying job lists (#154421) fix(plugins): prevent config conflicts during legacy plugin installation (#154539) perf(gateway): reduce repeated session-list work (#154551) fix(tasks): retain admitted work across list retries (#154338) perf(gateway): speed up transcript artifact downloads (#154726) chore(ui): refresh control ui locales (#154580) fix(release): keep two extended-stable months eligible (#154777) fix(tests): avoid avatar descriptor reuse race (#154747) perf(plugins): reduce callback scope overhead (#154625) fix(ui): include final request time in completed work summaries (#149240) fix(ai): avoid retrying conflicting Responses terminal statuses (#149242) fix: identify malformed Code Mode JavaScript as input errors (#149222) fix(doctor): settle imported JSONL transcript leftovers (#154413) fix(cloud): restore node bootstrap with bundled browser runtime (#154654) test(ui): await publication state notifications (#154768) fix(plugins): keep unchanged plugins running across metadata refreshes (#151281) fix: keep chat panel accessibility targets within each pane (#153478) fix: forced Gateway restarts cancel healthy subagent work (#154300) improve: reduce session delivery reader imports (#154740) ...
…ion (openclaw#154539) Closes openclaw#154325 ## What Problem This Solves Fixes first-install configuration conflicts when a legacy plugin's registration callback writes configuration while the installer is still inspecting its kind. ## User Impact Legacy plugins can install successfully on the first attempt instead of leaving settings written but the plugin disabled. Exported plugin kinds, exclusive-slot selection, post-install registration, and existing settings are preserved. No configuration or storage migration is introduced by this fix. ## Why This Change Was Made Slot inspection now selects the loader's existing validation mode, which reads the legacy kind before returning without calling registration. The mode travels in the existing report parameters; no additional loader, retry, or separate configuration writer is added. Ordinary diagnostics retain their current registration behavior. The regression extends the existing first-install table: a legacy registration callback writes a marker, and installation must not invoke it. The standalone test file and its database-lane entry were removed. ## Evidence - Real source-built CLI → isolated Gateway installation reproduced the original config-hash conflict after a joined public-SDK configuration write. The plugin was not enabled. A manifest-declared-kind plugin with the same write, and a legacy plugin without a write, both installed successfully. - With the fix, all three installations succeeded. The legacy callback observed the enabled entry before its configuration write. A subsequent CLI setting and forced reinstall preserved the authored setting. All owned Gateway groups, children, and ports settled. - The consolidated regression failed on the original registration path (one legacy case failed; six controls passed). Final slot/inspection suites passed **53 tests** in 33.04 seconds total runner time. The existing 32-case inspection file reported 30.54 seconds including transformation; it exercises real registration/resource retirement and config persistence, and the regression reuses its existing setup. Scoped type-aware lint, formatting, and both source-size ratchets passed. - The canonical candidate package passed its tarball integrity checks. In an isolated **local Docker Linux/arm64** environment on Node 24.19.0, the actual npm-published **2026.9.5 updater** ran `update --tag /inputs/candidate.tgz --yes --no-restart --json` and completed with `status: ok`. The installed build changed from release `ec9c1a13db89` to candidate `2a0b8a39dcbd2355ec164f6c7555088a7b483609`, despite both packages using version 2026.9.5. - That upgrade preserved the existing legacy plugin's entry, install record, selected slot, and user setting. The resulting candidate Gateway then completed a new config-writing legacy installation and forced reinstall. Installed payload hashes matched the candidate. Native cleanup verified the Gateway process and port closed; the proof container was deleted and confirmed absent. The updater retained a Doctor advisory for the fixture's synthetic plaintext Gateway token. No real credentials or operator Gateway/state were used. The proof uses locally authored legacy plugins, not the reporter's particular plugin or its crash sequence; it does not claim a service restart or a cross-platform upgrade matrix. The publication preserves the contributor's original commit and has the same complete source tree as the tested and packaged candidate: `1f864e2437a7f719061cc96d69a09d7be7c69eec`. Co-authored-by: Ayaan Zaidi <[email protected]>
Closes #154325
What Problem This Solves
Fixes first-install configuration conflicts when a legacy plugin's registration callback writes configuration while the installer is still inspecting its kind.
User Impact
Legacy plugins can install successfully on the first attempt instead of leaving settings written but the plugin disabled. Exported plugin kinds, exclusive-slot selection, post-install registration, and existing settings are preserved. No configuration or storage migration is introduced by this fix.
Why This Change Was Made
Slot inspection now selects the loader's existing validation mode, which reads the legacy kind before returning without calling registration. The mode travels in the existing report parameters; no additional loader, retry, or separate configuration writer is added. Ordinary diagnostics retain their current registration behavior.
The regression extends the existing first-install table: a legacy registration callback writes a marker, and installation must not invoke it. The standalone test file and its database-lane entry were removed.
Evidence
update --tag /inputs/candidate.tgz --yes --no-restart --jsonand completed withstatus: ok. The installed build changed from releaseec9c1a13db89to candidate2a0b8a39dcbd2355ec164f6c7555088a7b483609, despite both packages using version 2026.9.5.The updater retained a Doctor advisory for the fixture's synthetic plaintext Gateway token. No real credentials or operator Gateway/state were used. The proof uses locally authored legacy plugins, not the reporter's particular plugin or its crash sequence; it does not claim a service restart or a cross-platform upgrade matrix.
The publication preserves the contributor's original commit and has the same complete source tree as the tested and packaged candidate:
1f864e2437a7f719061cc96d69a09d7be7c69eec.