feat(#7008): accept .claude-plugin/plugin.json in lock URL stripping - #7030
Open
fullsend-ai-coder[bot] wants to merge 1 commit into
Open
feat(#7008): accept .claude-plugin/plugin.json in lock URL stripping#7030fullsend-ai-coder[bot] wants to merge 1 commit into
fullsend-ai-coder[bot] wants to merge 1 commit into
Conversation
lockTreeDirName strips known marker files (SKILL.md, plugin.json) from raw content URLs to derive the plugin directory name. When the URL path ends in .claude-plugin/plugin.json (the Claude Code plugin spec location), stripping only plugin.json left ".claude-plugin" as the directory name instead of the actual plugin root. Add a check for the .claude-plugin intermediate directory and strip two path segments so the caller gets the correct plugin root name. The other two touch points the issue identified (compose.go fetch gate and bootstrap_scan.go injection scan) are already handled: pluginformat.DetectTree checks both marker locations, and scanPluginTree walks the entire directory tree. Note: pre-commit hooks could not run (sandbox network restriction blocked remote hook repos). gofmt and go vet passed via direct execution. Closes #7008
|
🤖 Finished Review · ✅ Success · Started 9:46 PM UTC · Completed 10:02 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $3.41 |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
Risk Assessment: moderate (2/5) DetailsSmall, focused feature PR (2 files, 29 lines) by bot author with no protected paths or security-sensitive files; Tier 2 git history shows high multi-author contention and fix/revert frequency on these actively worked files, elevating the score above the Tier 1 baseline. |
ReviewFindingsLow
|
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
Update
lockTreeDirNameininternal/cli/lock.goto correctly handle the.claude-plugin/plugin.jsonmarker path when deriving plugin directory names from raw content URLs. Previously, a URL ending in.claude-plugin/plugin.jsonwould incorrectly return.claude-pluginas the directory name instead of the actual plugin root.Related Issue
Closes #7008
Changes
lockTreeDirName: whenplugin.jsonis found inside a.claude-plugin/directory, strip both path segments to get the plugin root.claude-plugin/plugin.jsonand rejection when it appears at the repo rootThe other two touch points mentioned in the issue are already handled:
compose.gofetch gate:pluginformat.DetectTreealready checks bothplugin.jsonand.claude-plugin/plugin.jsonbootstrap_scan.goinjection scan:scanPluginTreewalks the entire directory tree, so all files (including.claude-plugin/plugin.json) are already scannedTesting
gofmtandgo vetpassTestLockTreeDirNamepasses (9/9 cases including 2 new)lockTreeDirNamehas 100% function coverageTestResolveFromLock_*,TestLockCommand_*)Closes #7008
Post-script verification
agent/7008-claude-plugin-locktreedirname)403540d77c8c32f89ec7e813bf68c7ff016f582e..HEAD)