Skip to content

fix(integrations): recompute invoke_separator from retained parsed_options#3664

Open
jawwad-ali wants to merge 1 commit into
github:mainfrom
jawwad-ali:fix/integration-runtime-invoke-separator-retained
Open

fix(integrations): recompute invoke_separator from retained parsed_options#3664
jawwad-ali wants to merge 1 commit into
github:mainfrom
jawwad-ali:fix/integration-runtime-invoke-separator-retained

Conversation

@jawwad-ali

Copy link
Copy Markdown
Contributor

What

with_integration_setting (integration_runtime.py) recomputed invoke_separator from the raw parsed_options argument:

current["invoke_separator"] = integration.effective_invoke_separator(parsed_options, project_root)

When a caller updates only script_type (parsed_options=None, raw_options=None), the previously-stored parsed_options are retained on the setting (the code only pops them when raw_options is not None). But the separator was still derived from the None argument — so an options-dependent separator (e.g. Copilot in --skills mode → "-") silently reverted to the default ".", desynchronizing invoke_separator from the parsed_options actually 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 via raw_options, or only script_type changed).

Tests

tests/integrations/test_integration_state.py::test_with_integration_setting_recomputes_separator_from_retained_options — stores Copilot {"skills": True} (separator "-"), then updates only script_type; asserts parsed_options is retained and invoke_separator stays "-". Fails before the fix (recomputed to "."); passes after. ruff clean.


AI-assisted: authored with Claude Code. Verified via Copilot's options-dependent effective_invoke_separator and confirmed fail-before/pass-after.

…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>
@jawwad-ali
jawwad-ali requested a review from mnriem as a code owner July 22, 2026 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant