Conversation
…ipped agents
Add static path analysis to the validator that enumerates all execution
paths from entry_point to $end and checks whether output template
references are guaranteed to have run. Emits warnings (not errors) for
references to agents/groups that may be skipped due to conditional
routing, with an example path and a {% if ... is defined %} suggestion.
Also fixes a pre-existing gap where for-each group names were missing
from the validator's all_names set and _validate_output_references,
causing false errors when referencing for-each groups in routes or
output templates.
Closes #6
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix max_depth using max(max_iterations, node_count) so linear workflows longer than max_iterations are still fully analyzed - Fix _validate_parallel_groups to include for-each names in route target validation (latent bug exposed by review) - Promote MAX_PATHS to module-level _MAX_ENUMERATED_PATHS constant with documented best-effort semantics in docstring - Update stale comments and docstrings to reflect for-each group support throughout the validator - Add cross-reference comment linking the two output ref regex patterns and explaining their intentional scope difference - Document _name_on_path for-each inline agent limitation Co-Authored-By: Claude Opus 4.6 <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.
Summary
entry_pointto$endand emits warnings (not errors) when output templates reference agents/groups that may not run on every pathCloses #6
Test plan
make lintpassesmake typecheckpassesuv run pytest tests/test_config/test_validator.py -v— all 27 tests pass (10 new)uv run pytest— full suite passes (1744 passed)$end🤖 Generated with Claude Code