fix(layout): gate off-track bump on the feeding run's actual flow span - #1581
Merged
Conversation
_bump_off_track_clear_of_trunks treated any trunk station downstream of an off-track icon in flow as contesting its row, without checking whether the run feeding that station actually reaches back across the icon's column. A trunk station's own in-section predecessor can itself sit downstream of the icon, in which case the run never spans the icon's column and cannot cross it. Add _feeding_run_spans_flow_coord to check the feeding run's flow span before counting a trunk station's line band as contesting, and remove the now-resolved paired_input_fan_branch_tree entry from _KNOWN_END_OF_LAYOUT_GAPS. Fixes #1566
Contributor
|
Render preview is ready for review: This preview shows only the renders that changed compared to |
pinin4fjords
added a commit
that referenced
this pull request
Jul 28, 2026
…-gate fix(layout): gate off-track bump on the feeding run's actual flow span
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
_bump_off_track_clear_of_trunks(off-track slot allocation) treated any non-terminus trunk station downstream of an off-track icon in flow as contesting its row, without checking whether the run feeding that station actually reaches back across the icon's column._feeding_run_spans_flow_coord, which checks each candidate trunk station's actual feeding predecessor(s) before counting its line band as contesting.topologies/paired_input_fan_branch_treeentry from_KNOWN_END_OF_LAYOUT_GAPS(the compensation-pass replay test now stays a clean no-op for this fixture).Visual effect
Across the full render corpus (313 fixtures, byte-for-byte MD5 comparison against
main), onlypaired_input_fan_branch_treechanges. The false-positive contest had been pushing an off-track icon and its downstream fork sibling out an extra row early in layout; although a later reanchor stage corrected their final relative position, the earlier over-bump had already forced a whole-graph title-band clearance shift that stuck. With the fix, that unnecessary shift is gone and the canvas is ~40px shorter (structure and relative placement are unchanged — verified by rendering both versions).Fixes #1566
Test plan
pytest tests/test_layout_invariants.py tests/test_compensation_passes_idempotent.py tests/test_routing_gate_coverage.py tests/test_guard_registry_golden.pypasses (20943 passed, only pre-existing xfails)ruff check/ruff format --checkclean;mypycleanmain: only the named fixture changesGenerated with Claude Code