fix(integrations): recompute invoke_separator from retained parsed_options#3664
Open
jawwad-ali wants to merge 1 commit into
Open
fix(integrations): recompute invoke_separator from retained parsed_options#3664jawwad-ali wants to merge 1 commit into
jawwad-ali wants to merge 1 commit into
Conversation
…tions
with_integration_setting recomputed invoke_separator from the raw
parsed_options argument. When only script_type changes (parsed_options and
raw_options both None), the previously-stored parsed_options are retained on
the setting, but the separator was derived from the None argument — dropping
an options-dependent separator (e.g. Copilot --skills -> "-") back to the
default ".", desynchronizing invoke_separator from the stored options.
Derive the separator from current.get("parsed_options") — the options
actually stored after the update — so it stays consistent in every branch.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.8 (1M context) <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.
What
with_integration_setting(integration_runtime.py) recomputedinvoke_separatorfrom the rawparsed_optionsargument:When a caller updates only
script_type(parsed_options=None,raw_options=None), the previously-storedparsed_optionsare retained on the setting (the code only pops them whenraw_options is not None). But the separator was still derived from theNoneargument — so an options-dependent separator (e.g. Copilot in--skillsmode →"-") silently reverted to the default".", desynchronizinginvoke_separatorfrom theparsed_optionsactually stored.Fix
Derive the separator from
current.get("parsed_options")— the options actually stored on the setting after the update — so it stays consistent across all branches (new options provided, options cleared viaraw_options, or onlyscript_typechanged).Tests
tests/integrations/test_integration_state.py::test_with_integration_setting_recomputes_separator_from_retained_options— stores Copilot{"skills": True}(separator"-"), then updates onlyscript_type; assertsparsed_optionsis retained andinvoke_separatorstays"-". Fails before the fix (recomputed to"."); passes after.ruffclean.AI-assisted: authored with Claude Code. Verified via Copilot's options-dependent
effective_invoke_separatorand confirmed fail-before/pass-after.