fix(VIOL-0034): cascade-skip instead of crashing when all version branches filtered#763
Merged
Merged
Conversation
Adds the ALL_VERSIONS_FILTERED reason and the AllVersionsFilteredError class (data only) and pins the target behavior: resolve_correlated_input must raise AllVersionsFilteredError when every version source is empty, and the executor must cascade-skip (SKIPPED) instead of letting it propagate. The all-empty and executor tests fail today; the detection + catch land next.
…nches filtered resolve_correlated_input now distinguishes all-sources-empty (every version branch produced no output — e.g. all guard-filtered) from a genuine correlation failure. The former raises AllVersionsFilteredError, which the executor catches at both action-run sites and resolves as a SKIPPED action (reason= all_versions_filtered, node-level disposition) so the pipeline exits 0. A genuine correlation failure (some source had output) still raises ConfigurationError.
Owner
Author
Code reviewFound 1 issue:
agent-actions/agent_actions/workflow/executor.py Lines 573 to 581 in bc39aa0 🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
The cascade-skip handler wrote the node-level skip disposition with an inline, unguarded set_disposition call. set_disposition re-raises on a storage error, so a DB/disk hiccup while recording the skip would propagate out of the very path added to prevent a crash. Route the write through _write_skipped_disposition, which already wraps set_disposition in best-effort try/except with a warning (matching the failed-disposition sibling), extended with an optional detail argument truncated like reason. Removes the duplicated write. Tests: a raising backend on the skip path (sync and async run sites) still resolves SKIPPED without propagating; the node-level record id and reason handed to set_disposition are pinned.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
version_consumption: mergeaction whose every version branch was guard-filtered crashed the pipeline withConfigurationError: Version correlation failed(exit 1). All-branches-filtered is a legitimate low-density input shape, not a misconfiguration. Root cause:resolve_correlated_input(workflow/managers/output.py) raised unconditionally whenever correlation returned nothing, and the executor called it uncaught (_execute_action_run,executor.py:1145, outside the try/except).resolve_correlated_inputnow distinguishes all-sources-empty (every version source has no target files) → raises the typedAllVersionsFilteredError— from a genuine correlation failure (some source had output) → still raisesConfigurationError.AllVersionsFilteredErrorat both action-run sites (sync + async) and resolves the action as SKIPPED (reason=all_versions_filtered, node-level disposition), mirroring the existing_handle_all_guard_filtered"produced nothing → SKIPPED" pattern — so the pipeline exits 0. Downstream consumers then cascade-skip via the normal mechanism.Verification
tests/unit/workflow/managers/test_resolve_correlated_input_all_filtered.py, RED→GREEN:AllVersionsFilteredErrorConfigurationError(genuine failure preserved)_execute_action_runcascade-skips (SKIPPED, no raise) instead of propagating — pins the actual crash path, not just the isolated raisetest_version_correlation_failure_raises_errorcomment corrected: its mock storage reports outputs, so it exercises the genuine-errorConfigurationErrorpath; still green.tests/unit/workflow/+tests/core/graph/→ 826 passed.ruff check/formatclean;uv run mypy agent_actions→ no issues (447 files).