Plugins: dedupe manifest registry rows and suppress benign bundled shadow warnings#58796
Plugins: dedupe manifest registry rows and suppress benign bundled shadow warnings#58796PowerMai wants to merge 2 commits intoopenclaw:mainfrom
Conversation
Greptile SummaryThis PR fixes two related issues in the plugin manifest registry: (1) duplicate Key changes:
Confidence Score: 5/5Safe to merge — logic is correct, tests directly verify both the deduplication fix and the suppression behaviour, and no P0/P1 issues were found. The structural fix (always No files require special attention. Reviews (1): Last reviewed commit: "Plugins: dedupe manifest registry rows a..." | Re-trigger Greptile |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1ad047b8d3
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| }); | ||
| seenIds.set(manifest.id, { candidate, recordIndex: existing.recordIndex }); | ||
| } | ||
| continue; |
There was a problem hiding this comment.
Keep duplicate manifest roots available to loader
Avoid unconditionally continue-ing after duplicate-id resolution here, because loadOpenClawPlugins relies on manifestRegistry.plugins keyed by rootDir (src/plugins/loader.ts builds manifestByRoot and skips any candidate without a manifest record). With the losing duplicate root removed from records, that candidate is dropped entirely instead of being emitted as a disabled "overridden by ..." plugin row, which regresses duplicate-precedence visibility and status behavior for bundled/global or bundled/workspace collisions.
Useful? React with 👍 / 👎.
|
This pull request has been automatically marked as stale due to inactivity. |
|
Codex review: found issues before merge. Summary Reproducibility: yes. The reviewed regressions have source-level reproduction paths in current tests: loader provenance coverage expects allowlisted plugins to stay quiet, and manifest-registry code shows installed-plugin ledger state is part of duplicate precedence. Next step before merge Security Review findings
Review detailsBest possible solution: Keep the PR open for maintainer review, then either rebase it as a narrow recordsByRootDir/loader-visibility change or align the warning suppression policy explicitly with #72409 while preserving allowlist and installed-ledger semantics. Do we have a high-confidence way to reproduce the issue? Yes. The reviewed regressions have source-level reproduction paths in current tests: loader provenance coverage expects allowlisted plugins to stay quiet, and manifest-registry code shows installed-plugin ledger state is part of duplicate precedence. Is this the best way to solve the issue? No. The recordsByRootDir seam is plausible, but the PR also removes shipped allowlist warning suppression and does not preserve current installed-ledger duplicate semantics; a narrower rebased patch is safer. Full review comments:
Overall correctness: patch is incorrect What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 9bedcff904dd. |
Summary
idbut resolve to different on-disk roots, keep oneplugins[]row by applyingresolveDuplicatePrecedenceRankin place and skipping an extra append for the losing candidate (fixes duplicate registry rows).Test plan
pnpm test -- src/plugins/manifest-registry.test.tspnpm check