Repository navigation
Adopt SDK v0.24.0 and make the plugin rename failure-safe - #861
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
1 issue found across 7 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="internal/commands/wizard_agents_test.go">
<violation number="1" location="internal/commands/wizard_agents_test.go:86">
P3: `stubClaudeMigration(t, "")` does not mean "no scope fails": `[ "$5" = "" ]` is true whenever the fifth positional is empty or absent, so any `plugin install` invocation with fewer than five args is forced to exit 1. Today `preinstallRenamedClaudePlugin` always installs with `--scope`, so this is latent, but the condition contradicts the helper's no-failure contract and will silently fail a future unscoped install. Guard the scope comparison with a non-empty check.</violation>
</file>
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
| logFile := filepath.Join(dir, "calls.log") | ||
| script := "#!/bin/sh\n" + | ||
| "echo \"$*\" >> \"" + logFile + "\"\n" + | ||
| "if [ \"$1 $2\" = \"plugin install\" ] && [ \"$5\" = \"" + failedInstallScope + "\" ]; then exit 1; fi\n" + |
Contributor
There was a problem hiding this comment.
P3: stubClaudeMigration(t, "") does not mean "no scope fails": [ "$5" = "" ] is true whenever the fifth positional is empty or absent, so any plugin install invocation with fewer than five args is forced to exit 1. Today preinstallRenamedClaudePlugin always installs with --scope, so this is latent, but the condition contradicts the helper's no-failure contract and will silently fail a future unscoped install. Guard the scope comparison with a non-empty check.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At internal/commands/wizard_agents_test.go, line 86:
<comment>`stubClaudeMigration(t, "")` does not mean "no scope fails": `[ "$5" = "" ]` is true whenever the fifth positional is empty or absent, so any `plugin install` invocation with fewer than five args is forced to exit 1. Today `preinstallRenamedClaudePlugin` always installs with `--scope`, so this is latent, but the condition contradicts the helper's no-failure contract and will silently fail a future unscoped install. Guard the scope comparison with a non-empty check.</comment>
<file context>
@@ -77,6 +77,54 @@ func readClaudeCalls(t *testing.T, claudePath string) string {
+ logFile := filepath.Join(dir, "calls.log")
+ script := "#!/bin/sh\n" +
+ "echo \"$*\" >> \"" + logFile + "\"\n" +
+ "if [ \"$1 $2\" = \"plugin install\" ] && [ \"$5\" = \"" + failedInstallScope + "\" ]; then exit 1; fi\n" +
+ "exit 0\n"
+ path := filepath.Join(dir, "claude")
</file context>
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
v0.24.0basecamp-cli@37signalsat each Claude scope before removing the workingbasecamp@37signalscopyVerification
GOWORK=off bin/cigithub.com/basecamp/basecamp-sdk/go v0.24.0Summary by cubic
Adopts the released SDK v0.24.0 and makes the Claude plugin rename failure-safe.
v0.24.0and refreshes SDK and MCP provenance plus the Nix vendor hash.basecamp-cli@37signalsat each Claude scope before removing the workingbasecamp@37signalscopy, leaving the old copy in place when the replacement installation fails.Written for commit ca17ae8. Summary will update on new commits.