Add plugin compatibility checks to forge doctor (Claude & Codex)#39
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d3f3e3bbb6
ℹ️ 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".
| const rel = commandScriptFromPluginRoot(command); | ||
| if (!rel) continue; |
There was a problem hiding this comment.
Warn on unparsed plugin hook commands
When a hook command does not exactly contain the quoted ${CLAUDE_PLUGIN_ROOT} marker—for example an older bash $FORGE_HOME/guards/foo.sh hook or a valid unquoted ${CLAUDE_PLUGIN_ROOT}/global/guards/foo.sh—this branch silently skips validation, but the later success path still says every command is local/executable. In that stale-manifest case forge doctor reports OK instead of surfacing the missing/non-self-contained hook, which is the compatibility failure this check is meant to catch.
Useful? React with 👍 / 👎.
Motivation
Description
commandScriptFromPluginRootandcheckPluginCompatibilityinsrc/doctor.jswhich read.claude-plugin/plugin.jsonand the referenced hooks manifest, extract hook commands, and verify referenced guard scripts exist and are executable.skillsandmcpServerspaths and ensure the Codex plugin manifest looks installable beside other plugins.checkPluginCompatibility(results)fromdoctor().test/doctor.test.jsthat asserts the new doctor checks run and report the expected OK notes for Claude and Codex plugin manifests.Testing
npm test(all tests passed).node --test test/doctor.test.js(passed) and confirmeddoctor()prints the new compatibility results vianode src/cli.js doctor.npx biome format/npx biome checkon the modified files and fixed format/lint findings for the new code; note that a fullnpm run checkinitially surfaced unrelated repo-wide Biome diagnostics unrelated to this change but the scoped checks for the modified files passed.Codex Task