fix(integrations): make build_exec_args declarative#2424
Open
markuswondrak wants to merge 1 commit intogithub:mainfrom
Open
fix(integrations): make build_exec_args declarative#2424markuswondrak wants to merge 1 commit intogithub:mainfrom
markuswondrak wants to merge 1 commit intogithub:mainfrom
Conversation
Centralize non-interactive CLI dispatch argument construction on IntegrationBase and let integrations declare prompt, model, and JSON variations with exec_* attributes.\n\nThis fixes the inherited dispatch defaults called out in github#2416 and keeps special cases like Codex, Devin, and Goose explicit without per-integration boilerplate.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Refactors integration CLI dispatch to centralize the default build_exec_args() behavior in IntegrationBase, making common CLI variations configurable via declarative exec_* attributes (per #2416).
Changes:
- Add declarative
exec_*attributes onIntegrationBaseand implement the defaultbuild_exec_args()using them. - Remove duplicated
build_exec_args()overrides from shared integration base classes; configure special cases via attributes (Codex/Devin/Goose). - Extend workflow tests to cover the new declarative behaviors and special cases.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/test_workflows.py | Adds tests validating new declarative CLI arg construction and special-case integrations. |
| src/specify_cli/integrations/base.py | Introduces declarative dispatch attributes and centralizes build_exec_args() in IntegrationBase; removes redundant overrides. |
| src/specify_cli/integrations/codex/init.py | Switches Codex to declarative subcommand dispatch + --json output flag. |
| src/specify_cli/integrations/devin/init.py | Declares Devin’s lack of JSON output args via exec_json_args = (). |
| src/specify_cli/integrations/goose/init.py | Explicitly opts Goose out of CLI dispatch via exec_mode = "none". |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+151
to
+165
| if not self.config or not self.config.get("requires_cli"): | ||
| return None | ||
| if self.exec_mode == "none": | ||
| return None | ||
|
|
||
| args = [self.key] | ||
|
|
||
| if self.exec_mode == "subcommand" and self.exec_subcommand: | ||
| args.append(self.exec_subcommand) | ||
|
|
||
| if self.exec_mode == "flag": | ||
| args.extend([self.exec_prompt_flag, prompt]) | ||
| elif self.exec_mode == "subcommand": | ||
| args.append(prompt) | ||
|
|
mnriem
requested changes
May 1, 2026
Collaborator
mnriem
left a comment
There was a problem hiding this comment.
Please address Copilot feedback. If not applicable, please explain why
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
Fixes #2416.
This moves the default
build_exec_args()implementation toIntegrationBaseand makes the common CLI dispatch variations declarative viaexec_*attributes.It removes repeated per-integration boilerplate while keeping the special cases from the issue explicit:
CodexIntegrationuses theexecsubcommand and--jsonDevinIntegrationomits JSON output argsGooseIntegrationopts out of CLI dispatch entirelyTesting
uv run specify --helpuv sync && uv run pytestAdditional validation:
uvx ruff check src/uv run pytest tests/test_workflows.py -quv sync --extra testanduv run pytest, but the full suite hung in this environment when an unrelated spawnedgemini -p /speckit.planprocess did not returnAI Disclosure
This PR was written primarily with GitHub Copilot CLI assistance. I reviewed the diff, ran the checks above, and prepared the final commit and PR contents manually.