fix(doctor): archive conflicting plugin install index#90267
fix(doctor): archive conflicting plugin install index#90267mushuiyu886 wants to merge 2 commits into
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed June 11, 2026, 12:37 PM ET / 16:37 UTC. Summary PR surface: Source +42, Tests +43. Total +85 across 2 files. Reproducibility: unclear. The review failed before ClawSweeper could establish a reproduction path. Review metrics: none identified. Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Risk before merge
Maintainer options:
Next step before merge
Review detailsBest possible solution: Retry the Codex review after fixing the execution failure. Do we have a high-confidence way to reproduce the issue? Unclear. The review failed before ClawSweeper could establish a reproduction path. Is this the best way to solve the issue? Unclear. Retry the review first so ClawSweeper can evaluate the actual issue and fix direction. AGENTS.md: unclear because the file could not be read completely. Codex review notes: model internal, reasoning high; reviewed against 575cae59d486. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +42, Tests +43. Total +85 across 2 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
|
da2dcfe to
10a6055
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
@clawsweeper re-review |
|
🦞👀 Command router queued. I will update this comment with the next step. Re-review progress:
|
eead5be to
272eafb
Compare
Summary
plugins/installs.jsoncan keep producing migration warnings afteropenclaw doctor --fixwhen shared SQLite already has the authoritative resolved npm artifact metadata, but broad archival would hide real install metadata drift.src/infra/state-migrations.ts, preserved unresolved conflicts, and updatedsrc/commands/doctor-state-migrations.test.tsfor both the safe archival and true-conflict paths.272eafb9a707e417a1e9c7b26a91fae80cc7aaa0and resolved the conflict by preserving current main's state-schema / exec-approvals migration imports plus this PR's npm-spec predicate.Fixes #90213
Maintainer-ready notes
migrateLegacyInstalledPluginIndextreated all legacy/current install-record conflicts as the same conflict class, so a stale legacy npm record for the same resolved artifact could not reach the existing archive path without also archiving true metadata drift.plugins/installs.json, which makes real migration conflicts harder to notice.return falsepaths are deliberate guardrails for incomplete npm identity evidence: non-npm records, missing legacy spec/version, missing current resolved package/version, version mismatch, missing artifact integrity/shasum, or unparseable/different package specs all stay on the existing conflict-warning path.Merge risk
falseand preserving the legacy file with the existing warning.Real behavior proof
Behavior or issue addressed: Repeated legacy plugin install-index migration warnings when
plugins/installs.jsondisagrees with shared SQLite metadata that already has resolved npm artifact identity, while preserving warnings for unresolved metadata drift.Real environment tested: Local Linux checkout at
272eafb9a707e417a1e9c7b26a91fae80cc7aaa0, running the production legacy state migration entrypoint and shared SQLite installed-plugin index persistence with isolated temporaryOPENCLAW_STATE_DIRandHOMEfixtures.Exact steps or command run after this patch:
Evidence after fix:
{ "head": "272eafb9a707e417a1e9c7b26a91fae80cc7aaa0", "proofScope": "production legacy state migration entrypoint plus shared SQLite installed-plugin index persistence using temporary local OPENCLAW_STATE_DIR fixtures", "safeArtifact": { "firstWarnings": [], "firstChanges": [ "Archived plugin install index legacy source → /tmp/openclaw-90267-safe-artifact-W8zF3j/plugins/installs.json.migrated" ], "sourceExistsAfterFirst": false, "archiveExistsAfterFirst": true, "secondWarnings": [], "secondChanges": [], "canonicalSpecs": { "brave": "brave@latest", "lobster": "lobster@latest" } }, "unresolvedConflict": { "firstWarnings": [ "Left plugin install index in place because shared SQLite state has conflicting plugin install metadata for: demo" ], "firstChanges": [], "sourceExistsAfterFirst": true, "archiveExistsAfterFirst": false, "secondWarnings": [ "Left plugin install index in place because shared SQLite state has conflicting plugin install metadata for: demo" ], "secondChanges": [], "canonicalSpecs": { "demo": "demo@latest" } } }Observed result after fix: SQLite-canonical npm records with exact resolved artifact metadata archive
plugins/installs.jsonon the first migration and the second migration run is quiet; unresolved package/spec drift keeps the legacy source in place and continues surfacing the existing warning.What was not tested: No packaged v2026.6.1 upgrade, PiClaw upgrade, globally installed npm package, real Brave/Lobster plugin activation, external Brave Search API calls, LM Studio, provider/model traffic, or non-Linux environment was exercised.
Review findings addressed
Regression Test Plan
src/commands/doctor-state-migrations.test.ts.plugins/installs.jsonand a follow-up migration run is quiet; unresolved package/spec drift remains warning-visible and unarchived.src/infra/state-migrations.tsandsrc/commands/doctor-state-migrations.test.tschanged.Compatibility and related PRs
openclaw doctor --fix. #90213 first; consolidate only if maintainers prefer one combined migration-policy PR for both [Bug]: After updating to OpenClaw 2026.6.1, legacy state migration warnings keep appearing even after runningopenclaw doctor --fix. #90213 and [Bug]: Upgrade leaves repeated shared SQLite plugin install metadata conflict warnings for codex/discord #90418.Root Cause
migrateLegacyInstalledPluginIndextreated all legacy/current install-record conflicts the same, so safe superseded npm artifact records could not reach the existing archive step without also broadening archival for true conflicts.