Skip to content

Commit f059551

Browse files
committed
fix(workflows): give separate remedies when a step cannot dispatch
The command and prompt step errors cover both a missing CLI and an integration that does not support CLI dispatch, but the command step only suggested installing the CLI or checking `specify integration list`, which does not help for SHAI. Suggest installing the CLI when it is missing, and switching the step's integration when the integration cannot dispatch. Refs #2416 Assisted-by: Claude Code (model: claude-opus-5-5, autonomous)
1 parent b5512b0 commit f059551

3 files changed

Lines changed: 10 additions & 2 deletions

File tree

‎src/specify_cli/workflows/step/command/__init__.py‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,10 @@ def execute(self, config: dict[str, Any], context: StepContext) -> StepResult:
191191
f"Cannot dispatch command {command!r}: "
192192
f"integration {integration!r} CLI not found or not installed, "
193193
f"or the integration does not support CLI dispatch. "
194-
f"Install the CLI tool or check 'specify integration list'."
194+
f"If the CLI is missing, install it or check "
195+
f"'specify integration list'; if the integration does not "
196+
f"support CLI dispatch, set the step's 'integration' to one "
197+
f"that does."
195198
),
196199
)
197200

‎src/specify_cli/workflows/step/prompt/__init__.py‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,10 @@ def execute(self, config: dict[str, Any], context: StepContext) -> StepResult:
138138
f"Cannot dispatch prompt: "
139139
f"integration {integration!r} "
140140
f"CLI not found or not installed, "
141-
f"or the integration does not support CLI dispatch."
141+
f"or the integration does not support CLI dispatch. "
142+
f"If the CLI is missing, install it; if the integration "
143+
f"does not support CLI dispatch, set the step's "
144+
f"'integration' to one that does."
142145
),
143146
)
144147

‎tests/integrations/test_integration_shai.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ def test_command_step_fails_instead_of_running_shai(self, tmp_path):
4545
assert result.status == StepStatus.FAILED
4646
assert result.output["dispatched"] is False
4747
assert "does not support CLI dispatch" in result.error
48+
assert "set the step's 'integration'" in result.error
4849
run.assert_not_called()
4950

5051
def test_prompt_step_fails_instead_of_running_shai(self, tmp_path):
@@ -54,4 +55,5 @@ def test_prompt_step_fails_instead_of_running_shai(self, tmp_path):
5455
assert result.status == StepStatus.FAILED
5556
assert result.output["dispatched"] is False
5657
assert "does not support CLI dispatch" in result.error
58+
assert "set the step's 'integration'" in result.error
5759
run.assert_not_called()

0 commit comments

Comments
 (0)