Repository navigation
Update the stale cycle-detection comment on topological_sort - #74079
Merged
pierrejeambrun merged 1 commit intoOct 2, 2026
Conversation
…ogical_sort DAG.check_cycle was the only guard this comment named, but a Lang-SDK Dag never runs it: it has no Python DAG object to call it on. The Dag processor now rejects a cyclic Lang-SDK Dag of its own accord, through DagSerialization.validate_serialized_dag, so the comment should name both guards rather than the one that does not cover every author.
pierrejeambrun
merged commit Oct 2, 2026
ea57472
into
jason/lang-sdk-e2e/03-native-dag-parse
2 checks passed
pierrejeambrun
deleted the
pierrejeambrun/lang-sdk-e2e/cycle-comment-fix
branch
October 2, 2026 09:59
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.
Stack: #74034, #74040, #74041, #74042, #74035, this PR
Why
SerializedTaskGroup.topological_sort's docstring saysDAG.check_cycleis what keeps a cyclic Dag from ever reaching it. That was true, but only for a Python-authored Dag — a Lang-SDK Dag has no PythonDAGobject to callcheck_cycleon, so the comment overstated the actual guarantee for the other authoring path.#74035 closes that gap: the Dag processor now runs
DagSerialization.validate_serialized_dagon every Dag a Lang-SDK runtime returns, rejecting one with a cycle as an import error before it is ever stored (both this andDAG.check_cycleare backed by the shareddetect_cyclefrom #74034). The comment should name both guards.What
One docstring update, no behavior change.
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Opus 4.7) following the guidelines