fix(plugins): prefer higher-precedence manifests for duplicate plugin ids#41626
Conversation
Greptile SummaryThis PR fixes a pre-existing bug where distinct-path plugins sharing the same id would both be inserted into the manifest registry; it now retains only the highest-precedence record and always emits exactly one warning per collision. The refactor also eagerly builds the
Confidence Score: 4/5
Last reviewed commit: 4707aa7 |
61907ab to
9daecf9
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9daecf9ccb
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
9daecf9 to
7222355
Compare
… ids - keep higher-precedence manifests when duplicate plugin ids are discovered - report overridden duplicate manifest source - align loader tests with current duplicate-precedence behavior
0a6bcdb to
1fe83b8
Compare
|
Landed in 3d19f01 after rebasing and resolving the duplicate-manifest behavior against current main. Validation:
Rebased PR head before merge: Tortes@1fe83b8 Thanks @Tortes. |
Summary
Context
PLUGIN_ORIGIN_RANKalready defines precedence across discovery origins, but duplicate manifest handling did not fully respect that precedence.Before this change:
After this change:
Related issue
openclaw doctor --fixbehavior, so it should be treated as a partial/adjacent fix rather than a full close-out of the issue.Implementation details
realpathwhen neededTesting
Notes
This stays intentionally narrow to manifest-registry duplicate resolution so it does not change plugin discovery order or broader registry loading behavior.