fix: enforce plugins/<site> registration in root webcmd-plugin.json - #232
Open
ayushsingh82 wants to merge 1 commit into
Open
fix: enforce plugins/<site> registration in root webcmd-plugin.json#232ayushsingh82 wants to merge 1 commit into
ayushsingh82 wants to merge 1 commit into
Conversation
Promoting a CLI to a repo plugin has an easy-to-skip step: after webcmd plugin create scaffolds plugins/<site>/, the author must also register <site> in the root webcmd-plugin.json plugins map. Nothing in webcmd plugin create, webcmd plugin install file://..., or webcmd validate <site> errors or warns when that registration is skipped — the plugin works locally either way, so three separate adapter builds (manchester, warwick, mdxdubai) all missed it silently. Add scripts/check-plugin-root-registration.mjs, which fails when a plugins/<site> directory has no matching root-manifest entry (or vice versa). Also add a verification step to the adapter-template.md promotion sequence so an agent following the skill catches the gap immediately instead of relying on CI. Not wired into .github/workflows/ci.yml in this commit (my fork's token lacks the `workflow` scope needed to push workflow-file changes) — see PR description for the one-line CI step a maintainer can add. Fixes agentrhq#222
Author
|
@ngaurav Fixed — this PR adds |
Contributor
🟢 No documentation gap found — medium confidenceThe automated review found no documentation gap in the supplied changes. This review is advisory and does not block merging. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
webcmd plugin createscaffoldsplugins/<site>/, the author must also register<site>in the rootwebcmd-plugin.jsonpluginsmap. Nothing inwebcmd plugin create,webcmd plugin install file://..., orwebcmd validate <site>errors or warns when that registration is skipped — the plugin works locally either way. Per the issue, three separate adapter builds (manchester, warwick, mdxdubai) all missed it silently.scripts/check-plugin-root-registration.mjs: fails when aplugins/<site>directory has no matching root-manifest entry, and also catches the reverse (a root-manifest entry with no matching directory). Mirrors the style/location of the existingscripts/check-plugin-command-parity.mjs.check:plugin-root-registrationtopackage.json.adapter-template.mdpromotion sequence so an agent following the skill catches the gap immediately, not just at CI time.Fixes #222
Not included: CI wiring
I'd normally add this as a step in
.github/workflows/ci.ymlright next to the existing "Check plugin command parity" step, but my fork's token doesn't have theworkflowscope GitHub requires to push workflow-file changes. A maintainer can add:right after the
check:plugin-paritystep in thebuildjob (.github/workflows/ci.yml) — happy to open a follow-up once I sort out the token scope, whichever is easier for you.Test plan
plugins/<site>dir exists without a root-manifest entry (simulated with a throwaway fixture dir, removed after)npm run typecheckcleannpm test— 385 test files / 4623 passed, 1 skipped (unchanged baseline)