fix(workflows): command/prompt steps fail cleanly on a non-string integration#3626
Open
jawwad-ali wants to merge 1 commit into
Open
fix(workflows): command/prompt steps fail cleanly on a non-string integration#3626jawwad-ali wants to merge 1 commit into
jawwad-ali wants to merge 1 commit into
Conversation
…egration
_try_dispatch guarded only 'if not integration_key', then called
get_integration(integration_key). A non-string integration (a list/dict, or an
expression like integration: "{{ steps.pick.output.agents }}" that resolves to a
list) reached the registry dict lookup and raised 'TypeError: unhashable type:
list', aborting the entire workflow run. Widen the guard to also require a str,
so a non-string integration is treated as not-dispatchable and execute() falls
through to its existing FAILED StepResult (unconfigured integration=None still
returns None as before). Applied to both command and prompt steps.
Tests: a list integration now yields a FAILED result (fail before: TypeError).
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
Both the
commandandpromptsteps dispatch via_try_dispatch, which guarded only the falsy case before the registry lookup:A non-string
integration— a list/dict, or an expression likeintegration: "{{ steps.pick.output.agents }}"that resolves to a list — passes the falsy guard and hitsget_integration's dict lookup, raisingTypeError: unhashable type: 'list'and aborting the entire workflow run.Fix
Widen the guard to also require a
str:Noneroutes execution to the already-present FAILEDStepResult("Cannot dispatch … integration … not found"), so the step fails cleanly instead of crashing the run. Unconfiguredintegration=Nonestill returnsNoneas before. Applied to bothcommandandpromptsteps.Test
test_execute_non_string_integration_fails_cleanly(command + prompt): a list integration yields aFAILEDresult — fails before (TypeError: unhashable type: 'list'), passes after.🤖 Written with the assistance of Claude Code (AI). Bug self-found; fix/tests verified locally (fail-before / pass-after), ruff clean.