-
Notifications
You must be signed in to change notification settings - Fork 270
fix: gate .claude/commands/ deployment behind integrate_claude flag #443
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
ce76c09
c2ebf46
281f98b
a7fa08d
7dc71c5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -971,19 +971,20 @@ def _log_integration(msg): | |
| deployed.append(tp.relative_to(project_root).as_posix()) | ||
|
|
||
| # --- commands (.claude) --- | ||
| command_result = command_integrator.integrate_package_commands( | ||
| package_info, project_root, | ||
| force=force, managed_files=managed_files, | ||
| diagnostics=diagnostics, | ||
| ) | ||
| if command_result.files_integrated > 0: | ||
| result["commands"] += command_result.files_integrated | ||
| _log_integration(f" └─ {command_result.files_integrated} commands integrated -> .claude/commands/") | ||
| if command_result.files_updated > 0: | ||
| _log_integration(f" └─ {command_result.files_updated} commands updated") | ||
| result["links_resolved"] += command_result.links_resolved | ||
| for tp in command_result.target_paths: | ||
| deployed.append(tp.relative_to(project_root).as_posix()) | ||
| if integrate_claude: | ||
| command_result = command_integrator.integrate_package_commands( | ||
| package_info, project_root, | ||
| force=force, managed_files=managed_files, | ||
| diagnostics=diagnostics, | ||
| ) | ||
| if command_result.files_integrated > 0: | ||
| result["commands"] += command_result.files_integrated | ||
| _log_integration(f" └─ {command_result.files_integrated} commands integrated -> .claude/commands/") | ||
| if command_result.files_updated > 0: | ||
| _log_integration(f" └─ {command_result.files_updated} commands updated") | ||
|
Comment on lines
+982
to
+984
|
||
| result["links_resolved"] += command_result.links_resolved | ||
| for tp in command_result.target_paths: | ||
| deployed.append(tp.relative_to(project_root).as_posix()) | ||
|
|
||
| # --- OpenCode commands (.opencode) --- | ||
| opencode_command_result = command_integrator.integrate_package_commands_opencode( | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add/adjust a unit test to cover this regression: when the detected/configured target yields integrate_claude=False (e.g., target=vscode/copilot), apm install should not call integrate_package_commands and should not create/deploy anything under .claude/commands/. This will prevent future accidental reintroduction of unconditional Claude command integration.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done — added
TestIntegratePackagePrimitivesTargetGatingintest_command_integrator.pywith two tests: one verifyingintegrate_package_commandsis not called whenintegrate_claude=False(target=copilot/vscode), and one verifying it is called whenintegrate_claude=True.