fix(plugins): refresh stale source plugin registry (#96046)#96080
fix(plugins): refresh stale source plugin registry (#96046)#96080tangtaizong666 wants to merge 4 commits into
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 21, 2026, 1:31 AM ET / 05:31 UTC. Summary PR surface: Source +49, Tests +43. Total +92 across 2 files. Reproducibility: no. live reproduction was run in this read-only review, but the current-main path is source-reproducible: a nonempty persisted index selects index-only manifest metadata, while a configured global manifest absent from that index is not otherwise recovered. Review metrics: none identified. 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 findings
Review detailsBest possible solution: Keep the persisted fast path, but when configured IDs are absent from it, use the existing narrow discovery/manifest parsing path to compare actual global manifest IDs; cover an arbitrary clone-directory name and show a redacted real Gateway startup after the fix. Do we have a high-confidence way to reproduce the issue? No live reproduction was run in this read-only review, but the current-main path is source-reproducible: a nonempty persisted index selects index-only manifest metadata, while a configured global manifest absent from that index is not otherwise recovered. Is this the best way to solve the issue? No. The branch is a narrow and useful direction, but it checks a clone directory named after the configured ID instead of the manifest’s declared ID, so it does not cover the general discovery contract. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: unclear because the file could not be read completely. Codex review notes: model internal, reasoning high; reviewed against d9ac878ea3ca. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +49, Tests +43. Total +92 across 2 files. View PR surface stats
Acceptance criteria:
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
Review history (1 earlier review cycle)
|
…lugin-index-96046 # Conflicts: # src/plugins/plugin-registry-snapshot.test.ts
…lugin-index-96046
|
This pull request has been automatically marked as stale due to inactivity. |
What Problem This Solves
Fixes #96046.
When a persisted plugin registry already exists, Gateway validation can reuse it without noticing that a configured plugin has since been added under the auto-discovered global extensions root (
$OPENCLAW_STATE_DIR/extensions). That leavesplugins.slots.memoryvalidating against staleknownIdsand reportingplugin not foundeven though plugin discovery can find the same plugin.Why This Change Was Made
This change treats the persisted registry as stale only when all of these are true:
plugins.entries,plugins.allow, orplugins.slotsopenclaw.plugin.jsonexists under the global extensions rootIn that case, registry loading falls back to derived discovery, so Gateway validation sees the same newly added source-root plugin that plugin discovery can see.
Real behavior proof
state/extensions/memory-demo/openclaw.plugin.json, andloadPluginRegistrySnapshotWithMetadatareturnssource: derivedwithmemory-demopresent as a global plugin.openclaw gatewaystartup using a real third-party memory plugin; the regression covers the exact persisted-registry decision point used by Gateway config validation.Regression Test Plan
recovers configured global source plugins missing from a stale persisted registryinsrc/plugins/plugin-registry-snapshot.test.ts.Risk
The fallback is intentionally narrow. It does not rescan on every persisted registry load; it only invalidates when the config already references a missing plugin and the expected global source-root manifest exists.