fix: filter integration scripts by script_type#19
Draft
kailanjian wants to merge 1 commit into
Draft
Conversation
…up() methods install_scripts() accepted a script_type filter but callers in MarkdownIntegration, TomlIntegration, SkillsIntegration, and ForgeIntegration all called it without passing the type, so both .sh and .ps1 files were always copied regardless of the --script flag. Pass script_type through in each setup() method. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Description
install_scripts()accepted ascript_typeparameter to filter which script variant to copy (.shor.ps1), but every caller inMarkdownIntegration,TomlIntegration,SkillsIntegration, andForgeIntegrationinvoked it without passing the type. The result:--script shhad no effect on the physical file copy — bothupdate-context.shandupdate-context.ps1were always installed regardless of the flag.The
.ps1file landed on disk but was never referenced (the generated skills andintegration.jsoncorrectly used theshvariant), making it inert dead weight on Mac/Linux.The
--scriptflag already correctly switched three other things:bash/vspowershell/)integration.jsonrecordsThis PR closes the gap for the fourth: which files are physically copied by
install_scripts().Changes:
integrations/base.py— addscript_type: str | None = Noneparam + filter logic toinstall_scripts(); passscript_typethrough inMarkdownIntegration,TomlIntegration, andSkillsIntegrationsetup()methodsintegrations/forge/__init__.py— same one-line fix inForgeIntegration.setup()(overridessetup()directly, so wasn't covered by the base class change)Testing
uv sync && uv run pytestspecify-af init --here --ai claude --script sh --forceno longer generatesupdate-context.ps1AI Disclosure
Claude Code (claude-sonnet-4-6) identified the root cause, implemented the fix, and updated tests.