Skip to content

Routing gate coverage matrix

Auto-generated by scripts/routing_gate_coverage.py under CPython 3.11 with PYTHONHASHSEED=0 (the arc model is interpreter-specific and operand-level coverage is hash-seed sensitive). Do not edit by hand; run the script to regenerate.

Each row is a branch point (a gate) in a layout/routing/ dispatch handler or post-pass. A gate has two or more arms; the cells list how many corpus fixtures exercise each arm. An arm reached by 0 fixtures is an un-exercised gate arm: either no shipped topology takes that path (author a fixture, or confirm it is defensive/dead).

2266/3202 gates fully exercised (both/all arms hit by some fixture); 936 gates have at least one un-exercised arm.

Modules scoped to routing decision gates; invariants.py (the validate=True checker) and __init__.py are excluded.

The Triage column carries a curated verdict for gaps no fixture can close: defensive (a guard arm a valid topology never violates), candidate-dead (no constructible topology reaches it; left in place pending a separate deletion review), or needs-review (not yet classified). A blank cell means the gap is still open for a fixture. 390 gaps carry a triage verdict.

1/1 gates fully exercised.

All gates have every arm exercised by the corpus.

5/7 gates fully exercised.

Gates with an un-exercised arm:

LineGateUn-exercised arm(s)Triage
51if abs(dx) > COORD_TOLERANCE and abs(dy) > COORD_TOLERANCE:->L52
281if len(centerline) < 2:->L282defensive — Single enforcement point for the bundle-centreline contract: a fanned bundle needs at least one leg, i.e. a >=2-vertex centreline. All three public builders (build_concentric_bundle / build_tapered_bundle / build_offset_bundle) funnel through _fan_bundle, which owns this one guard in place of the four per-builder re-checks the corpus never took (#1438). Every caller builds a >=2-vertex polyline by construction, so the raise arm stays un-exercised.

12/16 gates fully exercised.

Gates with an un-exercised arm:

LineGateUn-exercised arm(s)Triage
78if (->L86
444if route.curve_radii is not None:->L446
475or edge.target not in ctx.graph.ports->L478needs-review — The lane-change step declines a run whose target is not the port the connector is drawn to: a run into a merge ends where the convergence planner re-seats it, so spending a target runway there leaves a zero-length tail. tests/fixtures/hash_seed_determinism/seed_41.mmd reaches the arm (its __junction_33 hands lines into __merge_11 and __merge_15 a lane out, with room to step), but the sweep’s corpus roots do not include tests/fixtures/hash_seed_determinism, so no swept fixture evaluates it.
476or run_direction is None->L478defensive — The lane-change step reads its run direction off the connector’s own two endpoints rather than assuming an axis. segment_direction returns None for a leg that is diagonal or collapsed, which the straight-connector families that reach this helper never hand it: both settle their endpoints on one row or one column before routing, so no fixture can present a diagonal pair here.

207/275 gates fully exercised.

Gates with an un-exercised arm:

LineGateUn-exercised arm(s)Triage
95if not self.incoming_source_id:->L96defensive — A source turnout is planned from a concrete incoming RoutedPath, so its incoming source id is always the non-empty edge source. The empty-id arm rejects directly constructed or corrupted frozen metadata and is covered by constructor tests.
97if self.continuing_target_id == "":->L98defensive — A non-terminal source turnout copies its continuing target id from a concrete RoutedPath edge, while terminal mode uses None. The empty-string state is not produced by a valid graph and is rejected by focused constructor tests.
99if self.incoming_direction not in (Direction.R, Direction.L):->L100defensive — Source-turnout eligibility admits only an incoming horizontal segment and freezes that measured direction. A vertical incoming direction is inconsistent plan metadata; focused constructor tests exercise rejection.
101if self.outgoing_direction not in (Direction.U, Direction.D):->L102defensive — Source-turnout eligibility admits only a vertical arm into a TOP or BOTTOM entry and freezes that measured direction. A horizontal outgoing direction is inconsistent plan metadata; focused constructor tests exercise rejection.
103if not math.isfinite(self.radius) or self.radius <= 0:->L104defensive — SourceTurnout is frozen engine metadata whose radius is derived from the positive layout curve radius plus a non-negative lane projection. A non-finite or non-positive value can only come from direct construction or corrupted plan state; focused constructor tests exercise rejection.
185for edge in graph.edges_from(port_id):->L189
187if not consumer.is_port:->L185
371if top is None or bottom is None:->L372defensive — Defensive in iter_inter_row_gaps (consumed by inter_row_gap_upper_row and _inter_row_gap_band): adjacent rows in the sorted section-row set both contain sections, so row_bottom_edge / row_top_edge resolve; the None skip arm guards a row with no sections that the iteration never yields.
569if s.bbox_h <= 0:->L570defensive — Degenerate-bbox guard in _grid_row_bands: a laid-out section always has bbox_h > 0, so the skip arm only protects against a zero/negative-height section that the layout never produces.
688if n == 0:->L689defensive — Empty-bundle guard: all callers (normalize.py 291/1648, inter_section_handlers.py 783/796/2132) derive bundle_widths from a non-empty bundle line count, so n is always >=1; the empty-list arm is never taken.
690if bundle_index < 0 or bundle_index >= n:->L691defensive — Contract guard raising IndexError on an out-of-range bundle_index. Callers always pass an in-range index (0<=i<n); the raise arm fires only on a caller-contract violation no valid call produces.
1019if abs(pts[k - 1][0] - x0) > COORD_TOLERANCE:->L1020defensive — Interior horizontal segments only occur in 6-point bypass U-shapes whose flanking legs are always vertical (same x on each side); routes with non-vertical flanks are normalize_exempt and filtered out. The prev-flank-non-vertical reject in iter_horizontal_trunks is unreachable. Reclassified candidate-dead -> defensive (#762): corpus instrumentation across 128 fixtures confirms the un-exercised arm is never taken.
1021if abs(pts[k + 2][0] - x1) > COORD_TOLERANCE:->L1022defensive — Mirror of the prev-flank guard: a bypass trunk’s trailing flank is always vertical, so the next-flank-non-vertical reject in iter_horizontal_trunks is unreachable. Reclassified candidate-dead -> defensive (#762): corpus instrumentation across 128 fixtures confirms the un-exercised arm is never taken.
1076if abs(y4 - y3) > COORD_TOLERANCE or abs(x4 - x3) <= COORD_TOLERANCE:->L1077defensive — Trunk-not-horizontal guard in port_peeloff_tail, reached only after the earlier port-lead and riser checks returned early. In an orthogonal route segments alternate H/V, so the segment preceding a vertical riser is always horizontal; instrumenting the corpus the guard is reached but the non-horizontal-trunk arm never fires. Defensive against a degenerate collinear tail the router does not produce.
1239if (->L1246defensive — Cohort shape rejection in _iter_same_destination_cohorts, shared by both same-destination iterators: the members must land on distinct adjacent lanes within one offset step of each other. Each member’s port_y is the lane its peel-off tail rides into the port, i.e. the slot the entry-port allocator dealt that line, and the cohort is already complete over the port’s lines one gate earlier. Swept over the whole corpus, the only LEFT/RIGHT entry port where two lines share a stored lane offset is rail_inter_section.mmd’s two__entry_left_1, where rail mode stores no offsets at all and the long iterator’s own graph.station_is_rail screen drops rails first; no tail-bearing route pair anywhere shares a port arrival Y, and a complete n-line side-entry port occupies one contiguous band at one step pitch so its extent cannot exceed (n-1)*step. The rejection therefore only fires for directly supplied geometry, as the synthetic bundle tests build.
1301while current not in seen:->L1320defensive — Resolved metro graphs are acyclic, so feeder tracing reaches a port or a rejection return before revisiting a connector. Loop exhaustion is the defensive cycle stop.
1310if current not in graph.junctions:->L1311defensive — A destination approach traced toward its feeder traverses only resolver-created junctions before reaching a section port. Encountering an ordinary station in that connector chain indicates malformed resolved edges.
1348or exit_port is None->L1353defensive — _flow_exit_feeding_route_source returns a station id only after graph.ports.get(id) has already produced a port for it, so the id it hands back is always a key of graph.ports and this second lookup cannot miss. The arm protects a caller that supplies its own exit id.
1351or tail.port_lead_sign != 1->L1353defensive — port_lead_sign is +1 when the tail’s final leg enters its port rightward. The operand one place earlier restricts the cohort to LEFT-side entry ports, which sit on their section’s flow-start edge and so are entered rightward, and 121 fixtures reach this operand with +1 every time. A leftward lead into a LEFT entry port would mean the route doubling back over the section it is entering.
1363if cohort.suffix_run < minimum_run - COORD_TOLERANCE:->L1364defensive — Resolver-owned LEFT-entry leads provide at least two curve radii of common landing runway. The short-suffix arm rejects inconsistent or manually supplied routes before they can enter settlement.
1366if overlap <= COORD_TOLERANCE or (->L1369defensive — A plannable short-overlap cohort is emitted only with a positive shared vertical runway. Zero overlap is rejected before settlement; the positive short arm is exercised by same_destination_short_overlap.
1461if reject_collinear_touch:->L1464defensive — The lenient arm’s only caller is invariants._segments_properly_cross, and invariants.py is outside this matrix by design: its branches fire under validate=True, a separate test surface. The strict arm is the routing-side crossing test, reached by the two same-destination fixtures. Both flags are exercised by tests/test_gate_reconciliation_1746.py and the crossing checks in tests/layout_validator.py.
1464elif (d1 > 0) == (d2 > 0) or (d3 > 0) == (d4 > 0):->L1465, ->L1466defensive — The lenient sign test, reached only when reject_collinear_touch is False; see that gate’s verdict. Its one caller is the validator module this matrix excludes, so no sweep fixture evaluates it.
1467if abs(denominator) <= COORD_TOLERANCE:->L1468defensive — Near-parallel guard in _proper_segment_crossing, reached only after both straddle tests (d1d2 < 0 and d3d4 < 0) have passed, which already excludes parallel and collinear pairs. Routing draws every segment on the 0/45/90 lattice, so a straddling pair meets at 45 or 90 degrees and |denominator| = |a||b|sin(theta) >= 0.707|a||b|; both segments are longer than the 2px floor the settlement machinery can express, putting |denominator| above 2.8 against a COORD_TOLERANCE of 1.0. The arm can only fire for directly supplied sub-pixel geometry.
1500if abs(dx) <= COORD_TOLERANCE and abs(dy) <= COORD_TOLERANCE:->L1501needs-review — Degenerate-segment guard in _positive_collinear_overlap: a candidate segment shorter than the coordinate tolerance has no direction to project onto. Reached only from the same-destination conflict scans, which run when at least one member’s proposed tail differs from the point already drawn — same_destination_short_overlap and same_destination_vertical_convergence, the two corpus maps that move a tail. Both hand the helper only full-length legs, so no candidate segment collapses below tolerance. Exercised synthetically by tests/test_same_destination_vertical_bundle.py, which builds the off-slot bundle; needs-review because an in-corpus witness is authorable, not because the arm is unreachable.
1509if hi - lo <= COORD_TOLERANCE:->L1511needs-review — Span test in _positive_collinear_overlap; the un-exercised arm is the positive-overlap one that goes on to compute the overlap endpoints. Reached only from the same-destination conflict scans, so its only witnesses are the two corpus maps that move a tail (same_destination_short_overlap and same_destination_vertical_convergence), and every collinear pair they scan meets in at most a point, leaving the helper to return None each time. The arm wants a proposal whose moved riser runs alongside a collinear neighbour over a real length. Exercised synthetically by tests/test_same_destination_vertical_bundle.py; needs-review because an in-corpus witness is authorable, not because the arm is unreachable.
1537if crossing := _proper_segment_crossing(a0, a1, b0, b1):->L1538needs-review — Self-crossing detection over one proposal’s own non-adjacent segments. Only same_destination_short_overlap and same_destination_vertical_convergence reach the scan at all, and the furthest any of their tails travels onto its slot is 17px — far too little for the re-columned riser to reach the member’s own upstream body. The arm wants a member whose slot column sits far enough from its drawn peel-x, or whose upstream body doubles back close enough to it, that the moved riser crosses an earlier segment of the same route. needs-review because that shape is authorable, not because the arm is unreachable.
1547if overlap := _positive_collinear_overlap(a0, a1, b0, b1):->L1548needs-review — The self-conflict scan’s second predicate: a proposal doubling back onto the column of one of its own earlier vertical segments, so the two overlap with positive length. Same three same-destination maps reach it and none re-uses an own column when its tail shifts 4-17px. Recorded separately from the proper-crossing gate on the statement above because the predicate differs: a collinear overlap is invisible to _proper_segment_crossing, which returns None on any shared endpoint or parallel pair.
1587if overlap := _positive_collinear_overlap(a0, a1, b0, b1):->L1588needs-review — Cross-route collinear overlap between two distinct lines, the arm that records the conflict. Reached only from the same-destination conflict scans, whose witnesses are the two corpus maps that move a tail (same_destination_short_overlap and same_destination_vertical_convergence); across both, no scanned pair of collinear segments from different lines shares a positive-length span, so the helper never returns an overlap — the same missing witness the sibling if hi - lo <= COORD_TOLERANCE: entry records. Exercised synthetically by tests/test_same_destination_vertical_bundle.py; needs-review because an in-corpus witness is authorable, not because the arm is unreachable.
1650if moves and tail_segment_is_held(route, segment_rank, target_x):->L1651needs-review — Ownership refusal in feasible_same_destination_approach_proposals: a member whose tail must move onto its slot is refused when the move is not this pass’s to make. moves is live in the corpus — instrumenting the call site the way the matrix exercises it (compute_layout plus render_svg, PYTHONHASHSEED=0), same_destination_short_overlap carries the assembly tail 13px and 17px off its slot across proposals and the audit tail 4px, and same_destination_vertical_convergence carries the upper tail 4px. The gate is therefore reached with a true left operand and still falls through: for every corpus mover the ownership terms are all false, because the tail segment is this pass’s own to move. The arm wants a moving member whose segment another owner already holds — a planner-owned exit turn outside the replannable set, a convergence- or route-system-owned segment boundary, a fan-route emitter, or a standing route reservation. Exercised synthetically by tests/test_same_destination_vertical_bundle.py::test_new_plan_owned_riser_conflict_refuses_tail_move_atomically, which builds the off-slot bundle against a conflicting owner; needs-review because an in-corpus witness is authorable, not because the arm is unreachable.
1656if moves and _section_intrudes(->L1664needs-review — Refusal when the slot column’s riser would run within EDGE_TO_BUNDLE_CLEARANCE of a section box that is neither the route’s source nor its target section. moves is live here: same_destination_short_overlap moves the assembly tail 13px and 17px across proposals and the audit tail 4px, and same_destination_vertical_convergence moves the upper tail 4px. The refusal is un-exercised because those risers run inside open inter-section corridor, not because no corpus tail moves. The arm wants a cohort whose tighter slot column pushes a riser up against a neighbouring section’s bbox.
1673if old_gap is not None and new_gap is None:->L1674needs-review — Refusal when the drawn peel-x sits in a declared inter-section gap column but the slot column has none, which would strand the riser outside any gap the plan owns. The three cohorts that do move a tail shift it 4-17px and stay inside one gap column, so gap_lo_for_x returns the same non-None value for both x values. The arm wants a move that leaves the gap band, e.g. a cohort whose outermost slot lands past the corridor edge.
1692if new_gap is not None and new_gap != old_gap:->L1693needs-review — Gap-slot re-declaration for a move that lands in a different gap column: the old column’s slot is dropped and a new one appended. Un-exercised for the same measured reason as the old_gap/new_gap refusal above — the moving cohorts shift 4-17px within one column, so new_gap equals old_gap — but this arm is the only coverage of the gap_slots rewrite, not of a refusal. A fixture whose slot column crosses a gap-column boundary closes it.
1758and abs(start[0] - other_start[0]) < required - COORD_TOLERANCE_FINE->L1760needs-review — The same-destination approach proposal is abandoned when a proposed member column would sit closer than the co-travelling lane clearance to another vertical channel. Every shipped corpus proposal clears that distance because the member gap allocator seats each corridor against its neighbours before the proposal is built, so the refusal arm has no fixture; revisit once a corpus map needs a proposal the allocator cannot pre-separate.
1766if proposed_conflicts - baseline_conflicts:->L1767needs-review — Conflict refusal in feasible_same_destination_approach_proposals: the whole bundle is abandoned when moving its tails onto their slots would introduce a crossing or overlap the current geometry does not have. The comparison is live — same_destination_short_overlap and same_destination_vertical_convergence both reach it with tails genuinely off their slots — but neither proposal adds a conflict, so the refusal never fires. Covered synthetically by the atomic-refusal test in tests/test_same_destination_vertical_bundle.py; needs-review pending an in-corpus witness whose slot move introduces a fresh crossing.
1814if any(->L1817defensive — Opposing-entry candidates inherit distinct port lanes from station offsets. A duplicate adjacent lane can only arise from inconsistent precomputed geometry, so the skip is a defensive shape guard.
1818if port_ys[-1] - port_ys[0] > (n - 1) * step + COORD_TOLERANCE:->L1819
1821if max(peel_xs) - min(peel_xs) > (n - 1) * step + COORD_TOLERANCE:->L1822
1825if shared_hi - shared_lo < min_common_approach - COORD_TOLERANCE:->L1826defensive — Inter-row placement reserves at least the two-corner runway used by side-port peel-off handlers, so complete opposing entry tails share at least min_common_approach vertically. A shorter overlap is malformed settled geometry; test_invalid_opposing_candidate_is_rejected[insufficient-common-approach] exercises the guard.
2096if pinned_bases and any(->L2099
2109if k == 0 or k + 2 >= len(points):->L2110
2279if band is not None:->L2284defensive — exempt_dogleg_lanes band clamp: the band-found arm is exercised by dogleg_exempt_distinct (#702), whose distinct-line dogleg pass hands this helper the inter-row gap band the colliding trunk sits in. The band-is-None arm is defensive - the pass only reaches the helper for a trunk fused with an exempt bypass obstacle living in an inter-row gap, so the band always resolves.
2376elif tgt_sec:->L2384defensive — The else (col_key=round(sx)) needs an L-shaped (dx!=0,dy!=0) inter edge whose target resolves to no section. Only exit_port->junction edges lack a target section, and junction positioning makes those axis-aligned (same-X RIGHT exit or same-Y BOTTOM exit), never L-shaped, so the else is unreachable. Reclassified candidate-dead -> defensive (#762): corpus instrumentation across 128 fixtures confirms the un-exercised arm is never taken.
2475if dx > 0:->L2478defensive — Leftward (dx<=0) near-source fallback: the symmetric mirror of the rightward fallback. Reached only when section info is unavailable AND no adjacent column resolves; valid layouts take the rightward fallback, but the leftward mirror is kept for robustness.
2486if st is not None and st.is_port:->L2484defensive — Null/non-port guard: after _resolve_sections both endpoints of an inter-section edge are ports/junctions and graph.stations.get() resolves them, so the False (None or non-port) arm only guards a malformed pre-resolve graph.
2535if sec.bbox_w <= 0:->L2536defensive — Zero-width-section guard: the loop scans all graph.sections, but after compute_layout every placed section has bbox_w>0, so the skip arm only guards an empty/unplaced section that valid layouts don’t produce.
2583if sec.bbox_w <= 0:->L2584defensive — Zero-width-section guard in the squeeze re-centring loop: like its #1 twin, after compute_layout every placed section has bbox_w>0, so the skip arm only guards an empty/unplaced section that valid layouts do not produce.
2617if not src.is_port:->L2615
2633for i in range(len(pts) - 1):->L2634, ->L2650defensive — point_on_polyline is used only by the —animate renderer (render/animate.py); the matrix’s render-path coverage sweep calls render_svg without animation, so none of its branches are reached. Exercised instead by test_animation.py / test_routing.py.
2638if seg_len2 == 0:->L2639, ->L2642defensive — point_on_polyline degenerate-segment branch, reached only via the —animate renderer (render/animate.py); the render-path coverage sweep doesn’t animate. Exercised by test_animation.py / test_routing.py, not the corpus.
2639if abs(point[0] - ax) <= tol and abs(point[1] - ay) <= tol:->L2640, ->L2641defensive — point_on_polyline zero-length-segment hit test, reached only via the —animate renderer; the render-path coverage sweep doesn’t animate. Exercised by test_animation.py / test_routing.py.
2643if t < -0.01 or t > 1.01:->L2644, ->L2645defensive — point_on_polyline parameter-range branch, reached only via the —animate renderer; the render-path coverage sweep doesn’t animate. Exercised by test_animation.py / test_routing.py.
2648if abs(point[0] - proj_x) <= tol and abs(point[1] - proj_y) <= tol:->L2633, ->L2649defensive — point_on_polyline projection hit test, reached only via the —animate renderer; the render-path coverage sweep doesn’t animate. Exercised by test_animation.py / test_routing.py.
2743if all_in_range:->L2747defensive — cross_row bypass guard: the False arm (no sections in the column range -> return clearance) needs an empty [lo,hi] column span, which a valid multi-section pipeline routing cross_row never has; a degenerate-range guard.
2770if endpoints:->L2773defensive — Non-cross_row bypass guard: the endpoints list always includes the source and target sections (both in src_row), so it is never empty; the default-clearance arm only guards a degenerate empty endpoint set.
2783if src_row is not None:->L2795defensive — Header-clamp guard: the False arm (src_row is None) needs an unresolvable source section, but inter-section bypass sources always resolve to a grid row after layout; a guard against an unresolved source that doesn’t occur.
2790if safe_cap >= row_bottom:->L2793defensive — The false arm is a defensive midpoint fallback for an inter-row gap too narrow to clear both an upper-row bypass and the lower section header. Placement reserves the routing band before bypass geometry is computed, so settled corpus layouts provide enough clearance for the safe-cap arm.
2889if section.bbox_w <= 0:->L2890defensive — Degenerate-bbox guard in _h_segment_penetrates_section (the single-section predicate shared by _h_segment_crosses_other_section and _packed_cell_mate_obstructs): sections always have positive width after layout.
2972if station is None:->L2973defensive — None-station guard: every production caller passes a concrete Station (grep-verified); the None arm only guards the typed Station|None parameter.
2978for port in junction_source_ports(graph, station.id):->L2997defensive — Upstream loop-exit in resolve_section: every fan-out junction is emitted with an exit_port->junction edge whose source port carries a section id, so junction_source_ports always yields a sectioned port and the loop returns; the fall-through to the type-contract return None is the never-taken no-upstream fallback.
2980if sec:->L2978defensive — Upstream section-lookup guard: graph.sections.get(section_id) returning None requires a section_id absent from graph.sections, a corrupted state no valid parse produces; null-guard.
2986for e in graph.edges:->L2997defensive — No-preference graph.edges scan loop-exit: a fan-out junction always has a sectioned incident port (its exit/entry ports carry a section_id), so the loop always returns and never exhausts graph.edges; the fall-through to the type-contract return None is the never-taken no-neighbour fallback.
2987if e.source == station.id:->L2988defensive — Junction-as-source arm of the no-preference scan: fan-out junctions are emitted exit_port->junction before junction->entry_port, so graph.edges encounters the junction as a target (elif arm) first and returns; the source arm is a cheap structural guard whose deadness rests on emit order, not a hard type invariant.
2993if other.section_id:->L2986defensive — The prefer_upstream=False scan reads a junction’s incident neighbour on either side, always a sectioned station or port; the section-less (False) arm only guards a junction-to-junction edge valid construction never produces.
2995if sec:->L2986defensive — prefer_upstream=False section-lookup guard: graph.sections.get(section_id) returning None requires a missing section_id (corrupted state); null-guard.
3005if section is None:->L3006defensive — resolve_section_colrow accepts a station whose owning section may not resolve. Production routing passes resolved ports or junctions with an incident sectioned port, so the None return only protects a malformed or incomplete graph.
3048if reserved is None or abs(src_row - tgt_row) != 1:->L3049
3104if dy > 0:->L3109defensive — Multi-row upward-crossing arm: grid rows are assigned topologically and upward inter-section routes take other handlers (a same-row/around-section path), never reaching inter_row_channel_y’s multi-row branch with dy<=0; verified by an upward multi-row fixture that bypasses this code.

83/111 gates fully exercised.

Gates with an un-exercised arm:

LineGateUn-exercised arm(s)Triage
301if not mst:->L302defensive — mjid ranges over junctions, a subset of junction_ids all present in graph.stations; the missing-station continue never fires.
304if tgt_col is None:->L305defensive — A merge junction always resolves to a grid column (it sits adjacent to its entry-port section); the unresolved-column continue never fires.
362if m_col is None:->L363defensive — Reached only for junctions in trunk_source, which by construction resolved a column, so m_col is never None and the skip arm never fires.
374if pred_col is None:->L375defensive — A merge feeder is a junction fed by an exit port, which always resolves a column, so the skip arm never fires.
393if ep and ep.is_entry:->L391defensive — Every outgoing edge of a classified convergence junction targets its sole entry port, so the non-entry arm never fires in the skip-edge pass.
561if port_st is None:->L562defensive — Ports listed in a section’s entry_ports/exit_ports always have a backing station; the missing-station continue never fires.
581if not ctx.station_offsets:->L582defensive — Pairs with _get_offset’s guard: compute_station_offsets is never empty on the render path, so _max_offset_at’s early-return arm guards only the route_edges(station_offsets=None) call path used by tests.
665if port.section_id is None:->L666, ->L667
697for pid in section.entry_ports:->L698, ->L700
698if line_id in graph.station_lines(pid):->L697, ->L699
726if port is not None:->L727, ->L730
731for sid in section.station_ids:->L732, ->L736
733if not station.is_port:->L731, ->L734
764if sec and sec.grid_col >= 0:->L766needs-review — grid-col sentinel: a rail-mode section carries grid_col == -1 (it is placed outside the section grid), so the negative-column arm returning None is load-bearing, not dead. No corpus routing path resolves a rail section’s column, so the arm is un-exercised, but a rail topology can reach it; do not fold into a non-optional accessor.
772if sec and sec.grid_row >= 0:->L773, ->L774needs-review — grid-row sentinel: a rail-mode section carries grid_row == -1 (placed outside the section grid), so the negative-row arm returning None is load-bearing, not dead. No corpus routing path resolves a rail section’s row, so the arm is un-exercised, but a rail topology can reach it; do not fold into a non-optional accessor.
863if sec is None:->L864defensive — _resolve_section_colrow is called for ports/junctions that always resolve to a section; the None-section early-return never fires (mirrors the grid-sentinel guards at L395/L403).
916if src.col is None or tgt.col is None:->L917defensive — _hop_needs_bypass is called only for endpoints whose columns the caller already resolved, so the no-column early-return never fires.
1015if pst is None:->L1016needs-review — pst = graph.stations.get(port.id): a port is always registered as a backing station, so the guard is never taken across the corpus. Kept as a station-id string read (no Edge in hand), the idiom deferred by the #1438 single-endpoint migration for a future station-id accessor; the sibling section lookup here was migrated to graph.section_for_port.
1175if not jst:->L1176defensive — jid ranges over junction_ids, all present in graph.stations; the missing-station continue never fires.
1178if src_col is None:->L1179defensive — A fan-out junction always resolves to a grid column; the unresolved-column continue never fires.
1217if not (tgt.is_port or edge.target in junction_ids):->L1218
1220if tgt_col is None:->L1221defensive — A junction’s port/junction target always resolves to a grid column; the unresolved-column continue never fires.
1341if edge.line_id in line_pos:->L1340defensive — line_pos is built from the line IDs of the very all_outgoing list this loop iterates, so the membership test is always true: the reject/loop-back arm (L684) is an unreachable tautology and the enter-body static arc (L686) is a phantom of the real 685->687. Vestigial tautological guard. The deliberate gap is pinned by test_genuine_dead_arm_not_masked_as_covered (arc normalization must not merge the never-taken branch onto the live one). Reclassified defensive (#762).
1370if not (tgt.is_port or edge.target in graph.junction_ids):->L1371
1414if jst is None:->L1415
1417if src_row is None or col is None:->L1418defensive — In _compute_fan_corridors, a fanning junction always resolves to a section column and row; the unresolved continue guards a malformed graph the render path never produces.
1472if tgt_col is None:->L1473needs-review — Defensive: _fan_bypass_band skips a fan edge whose target has no resolvable grid column; every corpus fan target resolves a column, so the skip arm is unexercised.
1478if _is_row_level_bottom_row_climb(->L1487needs-review — _fan_bypass_band skips a fan’s bypass branch that is a bottommost-row climb to a higher-row entry port over a clear row-level corridor: emission keeps that branch at the source’s own Y, so pulling the shared bypass band down for it would desync the derived exit-turn plan. tests/fixtures/topologies/twoline_fanout_up.mmd reaches the skip arm, but the sweep’s corpus roots do not include tests/fixtures/topologies, so no swept fixture evaluates it.

212/382 gates fully exercised.

Gates with an un-exercised arm:

LineGateUn-exercised arm(s)Triage
202if edge_rank is None:->L203
284if owned:->L278
300if route is None:->L301
321if route is None:->L322
335if family is None:->L336
344if not runs:->L345
366if axis.axis is not DemandAxis.X:->L367
383if route.exit_lane_transition_plan_id is not None:->L384
416if not candidates:->L417
435if vertical and abs(endpoint[0] - target[0]) <= COORD_TOLERANCE:->L438
439if elbow != endpoint and elbow != target:->L440, ->L441
445if route.offset_regime is OffsetRegime.DEFERRED:->L446
459for rank, (start, end) in enumerate(zip(route.points, route.points[1:])):->L477
462runway <= COORD_TOLERANCE->L465
471if abs(prior[0] - start[0]) + abs(prior[1] - start[1]) > COORD_TOLERANCE:->L476
473if direction_axis(incoming) is not direction_axis(approach):->L476
526if exit_turn_geometry != _exit_turn_geometry(route):->L527
538if approach is None:->L539
591if direction in {Direction.R, Direction.L}:->L595
620if len(route.points) < 2:->L621
630if axis is DemandAxis.X:->L636
631if abs(start[1] - end[1]) > COORD_TOLERANCE:->L632
636if abs(start[0] - end[0]) > COORD_TOLERANCE:->L637, ->L638
640if extent_end - extent_start > COORD_TOLERANCE:->L619
726if primary_landing is None or trunk_axis.axis is not DemandAxis.X:->L727
755if axis is DemandAxis.X:->L757
805if any(edge not in edge_order for edge in edges):->L806
841if not incoming_edges or not outgoing_edges:->L842
847if group.line_id not in line_order:->L848
864if trunk_edge_key is None:->L865
913if route is not None:->L917
917if route is None:->L918
934if any(->L938
952if (->L957
957for edge_key in incoming_edges:->L958, ->L961
1015if _shared_terminal_landing_drops_exit_turn(->L1020needs-review — The shared-terminal convergence declines ownership when seating its carrier would strand the carrier’s own exit turn (issue #1949). tests/fixtures/topologies/convergence_shared_terminal_exit_turn.mmd takes the decline arm, but the gate sweep globs tests/fixtures/ non-recursively, so the fixture under its topologies/ subdirectory is not evaluated here; the render-diff and the dedicated regression tests own it instead.
1116if (->L1128
1160if continuation.covered_by_member_id is not None:->L1161
1269if topology is None:->L1270
1357if plan.trunk_axis is None:->L1358defensive — _turn_crosses_shared_run’s no-trunk-axis skip, a gate the restored conflict conditions added whose ordinal collided with a pre-existing baseline key, so the ratchet acknowledged it without a verdict. Its sole caller is _system_conflict’s trunk-pair scan, whose trunks tuple is built only from plans with a trunk axis, so the plan handed over always has one.
1388if _points_coincide(*segment):->L1389
1413if (->L1421needs-review — _opposing_landing_approaches’ SHARED_APPROACH_CHANNEL condition: two feeders of one line whose approach runs stand on one coordinate travelling against each other. The loop reaches this pair test on 17 fixtures, so the shape of the scan is exercised. Neutralising _settle_opposing_landing_channels makes it fire on merge_bottom_row_bypass and merge_feeder_shared_channel_gap, at separation 0 with 150px of overlap, so that pass alone is what keeps it silent; the two opening passes account for none of it. Reachable. Reaching it is now a feasibility refusal rather than a change of emitter — see #1712.
1456or abs(start[1] - end[1]) > COORD_TOLERANCE->L1463
1459if direction_axis(incoming) is not landing.approach_axis:->L1463
1568if opening_follows_flank:->L1569
1630if landing.opening_turn_segment is None:->L1631
1633if landing.approach_axis is DemandAxis.X:->L1637
1635if runway < curve_radius - COORD_TOLERANCE:->L1636
1666landing.approach_axis is DemandAxis.X->L1670needs-review — _reseat_landing_cross moves a stated opening turn only on an X approach, because the opening turn names a column and _landing_cross_segment reads a perpendicular approach’s crossing row off the runway whatever opening turn the landing carries. The false arm is the perpendicular class the widened _settle_opposing_landing_channels scope newly admits; corpus-wide every counter-running same-line pair that conflicts approaches on X. Reachable.
1667and landing.opening_turn_segment is not None->L1670defensive — The second operand of the same condition. A landing that states an opening turn coordinate states its segment with it, so on an X approach the operand is true wherever the first is; it narrows the Optional _reseat_landing_opening requires.
1672if runway < curve_radius - COORD_TOLERANCE:->L1673, ->L1674needs-review — _reseat_landing_cross refusing a seat that costs the approach corner its radius, on the runway-stated branch. Un-exercised because that branch is itself un-exercised; see if landing.opening_turn_segment is not None:::#1. Reachable.
1686for rank, landing in enumerate(landings):->L1687, ->L1694
1687if landing.member_id not in member_ids:->L1688, ->L1689
1690if reseated is None:->L1691, ->L1692
1727if opening_segment is not None:->L1736
1945if any(->L1950needs-review — _packed_lane’s decline arm: packing a run onto the pitch of its nearest bundle neighbour would seat it inside a second neighbour’s pitch. Reachable — 3-lane bundles exist in the corpus (_packed_lane sees len(neighbours)==2 on examples/guide/03b_fan_in_merge.mmd) — but no fixture makes the candidate breach the far lane. Wants a fixture.
2007if axis is None or axis.axis is not DemandAxis.X:->L2008
2045if plan.edge in owned_edges:->L2046defensive — _member_corridor_runs skips a frozen member plan whose edge a convergence already owns, but the two sets are disjoint by construction: build_member_geometry_execution never freezes a plan for an edge in _convergence_member_edges (member_geometry.py:1010), and resolved_member_edges is derived from the same scaffold predicate. 3830 frozen member plans across 348 fixtures, zero hits.
2054or abs(before[0] - start[0]) > COORD_TOLERANCE->L2057needs-review — Rejects an interior horizontal whose leading flank is not vertical. Reachable: _member_corridor_runs walks raw plan.points with no normalize filter, and the corpus already freezes an H-D-H member polyline (examples/topologies/rail_boundary_bundle_fan.mmd), so one extra leg makes a horizontal run diagonal-flanked. Not the same contract as the look-alike defensive pair in common.py::iter_horizontal_trunks, which is fed only normalize-filtered bypass U-shapes. Wants a fixture.
2055or abs(after[0] - end[0]) > COORD_TOLERANCE->L2057needs-review — Mirror of the leading-flank reject: an interior horizontal whose trailing flank is not vertical. Same H-D-H evidence and the same reason it is not covered by the common.py precedent. Wants a fixture.
2097if run is None:->L2098defensive — _pack_cotravelling_corridor_runs skips a plan with no X-axis trunk run. _trunk_corridor_run returns None only when trunk_axis is absent or is DemandAxis.Y; every plan reaching here is owns_geometry, and owns_geometry => trunk_axis is not None is asserted at four call sites. One root cause with the module’s other DemandAxis.X scope guards: no corpus topology produces a vertical convergence trunk (346 calls, all X).
2156if run is None:->L2157
2189if axis is None:->L2190
2231if axis is None or axis.axis is not DemandAxis.X:->L2232
2241if primary is None:->L2242
2254or landing.opening_turn_segment is None->L2256
2267if reseated is not None:->L2250
2318obstacle_segment is None->L2323defensive — A resident is read back from settled on every comparison, and laning moves its cross run rather than removing it, so the segment is drawable whenever it is read. The operand guards the Optional that read returns.
2319or landing_segment is None->L2323
2334if reseated is None:->L2335
2340landing.member_id == plan.primary_trunk_member_id->L2363defensive — The first conjunct of the widened flank-carry condition. Its false arm is the ordinary feeder landing, which every fixture re-seating a landing takes; the coverage tool reports the operand separately from the conjunction above it.
2341and plan.trunk_axis is not None->L2363defensive — _settle_opposing_landing_channels carries the trunk flank only when the landing it re-seated is the plan’s primary trunk member. A plan naming a primary trunk member always states the trunk axis that member travels, so the false arm is unreachable through this conjunction; it narrows the Optional for the flank move below.
2342and plan.trunk_axis.axis is landing.approach_axis->L2363needs-review — The flank follows a re-seated landing only where flank and landing are measured on one axis. Every primary-trunk landing the corpus re-seats approaches on its own trunk’s axis, so the false arm wants a fixture whose trunk travels one axis while its primary trunk member’s landing approaches on the other — a perpendicular approach into a convergence, which is the class the widened scope newly admits. Reachable.
2372if (->L2305defensive — A landing enters ordered only because _landing_cross_segment admitted it, and laning moves that run rather than removing it, so the read that names the landing as a resident always finds a segment. The gate guards the Optional that read returns.
2387if axis is None:->L2388
2411if coordinate is not None:->L2416
2453if endpoint is None:->L2454
2476if plan.trunk_axis is None:->L2477defensive — Pre-existing gap, re-keyed from #1 by the restored _turn_crosses_shared_run guard that now takes that ordinal (unchanged [0,11] split). _lane_trunk_flanks’ skip for a plan with no trunk axis. Every plan reaching it is PLANNED — the two _settle_convergence_geometry call sites filter on owns_geometry and the third caller passes freshly built planned plans — and validate_convergence_plans asserts trunk_axis is not None for exactly those, so a plan that took this skip would abort on that assertion rather than render. _build_planned_convergence can construct such a plan, so the guard is defensive in practice rather than unconstructible.
2502if coordinate is not None:->L2508needs-review — Pre-existing gap, re-keyed from #2 by the newly inserted packing gates (unchanged [0,2] split). _nearest_lane’s fall-through when no flank candidate clears the runway: it runs 9 times, always against a single obstacle, and in 5 of those one of the two candidates is already rejected by the curve-radius runway test, so a shorter flank runway rejects both. Reachable; wants a fixture.
2562for seat, obstacle in obstacles:->L-2547, ->L2563needs-review — The give-way loop in _lane_trunk_flanks, entered only when no lane one clearance from the residents leaves the arriving flank a full turn radius to its endpoint. No corpus fixture crowds two same-line counter-running flanks that tightly, so the loop body is un-entered. Reachable, and exercised by test_a_flank_with_no_lane_of_its_own_is_given_way_to_by_the_resident and by test_a_resident_gives_way_to_a_lane_clear_of_the_flanks_around_it.
2564if axis is None:->L2565, ->L2566
2576if lane is None:->L2577, ->L2578needs-review — A resident asked to give way that has no reachable lane of its own either. Un-entered because the give-way path itself is un-entered on the corpus. Reachable; a fixture is a channel with no seat for either run, which is the population #1712 exists to give room to.
2597if flank_rank != 1:->L2599
2608if fork is None:->L2609, ->L2617
2685if forked:->L2686
2686if abs(flank_coordinate - landing_coordinate) <= COORD_TOLERANCE:->L2687, ->L2688
2690if abs(endpoint - flank_coordinate) <= clearance:->L2691
2714if forked:->L2715, ->L2716needs-review — _landing_gives_way_to_flank joins the landing to the flank’s column when the two are one stroke off a shared fork, and steps it one clearance off otherwise. Neither arm is reached because _flank_settled_column never declines on the corpus: all 32 crowded landing/flank pairs seat with 9px to spare. Reachable; a fixture needs an inter-column gap below MERGE_GAP_MIN carrying a chained convergence.
2789if endpoint is None:->L2790defensive — _flank_lane needs the endpoint its flank turns onto to price the runway. ConvergenceTrunkAxis states source and target endpoint coordinates together or not at all, and every construction site in this module passes both, so the arm guards the Optional rather than a shape the planner builds.
2800if coordinate is None:->L2801
2813if reseated is not None:->L2814, ->L2817
2878if not (->L2881
2897if axis is None or axis.axis is not DemandAxis.X:->L2898defensive — Pre-existing gap, re-keyed from #2 by the newly inserted packing gates (unchanged [0,18] split). The axis is None half cannot fire: callers filter on plan.owns_geometry and owns_geometry => trunk_axis is not None is asserted at 4 sites. The DemandAxis.Y half is unsettled — a vertical trunk axis is constructible in code (_direct_axis_points / _shared_terminal_axis yield Y for a vertical approach) but no corpus topology produces one; if a TB convergence trunk is shown constructible this reclassifies reachable-but-benign (the guard returns the right empty answer).
2955if primary_edge is not None and plan.primary_trunk_member_id is not None:->L2940
3162if not carries_coupled_primary and any(->L3168needs-review — Reached by the corpus at 897747b0 and no longer: the branch’s later commits (908637eb..04209e3d) changed which paths fire, so this arm lost its last covering fixture rather than becoming unreachable. Left un-exercised deliberately — the render corpus is frozen for a measurement against main, so no fixture was authored.
3174if endpoint is None or abs(endpoint - column) <= curve_radius:->L3175
3192if (endpoint - candidate) * toward_endpoint <= curve_radius:->L3193
3247if axis is None:->L3248defensive — A resident flank in _give_way_to was seated from a plan whose trunk axis was read to build it, so the plan still states one. The guard narrows the Optional before the flank move.
3391if plan.trunk_axis is None or plan.trunk_axis.axis is not DemandAxis.X:->L3392
3473for candidate_coordinate in direct_candidates:->L3499needs-review — Reached by the corpus at 897747b0 and no longer: the branch’s later commits (908637eb..04209e3d) changed which paths fire, so this arm lost its last covering fixture rather than becoming unreachable. Left un-exercised deliberately — the render corpus is frozen for a measurement against main, so no fixture was authored.
3484if not moved_channels or any(->L3489needs-review — Reached by the corpus at 897747b0 and no longer: the branch’s later commits (908637eb..04209e3d) changed which paths fire, so this arm lost its last covering fixture rather than becoming unreachable. Left un-exercised deliberately — the render corpus is frozen for a measurement against main, so no fixture was authored.
3490if any(->L3494needs-review — Reached by the corpus at 897747b0 and no longer: the branch’s later commits (908637eb..04209e3d) changed which paths fire, so this arm lost its last covering fixture rather than becoming unreachable. Left un-exercised deliberately — the render corpus is frozen for a measurement against main, so no fixture was authored.
3495if not landing_feasible(candidate_coordinate):->L3496
3499if coordinate is None:->L3500needs-review — Reached by the corpus at 897747b0 and no longer: the branch’s later commits (908637eb..04209e3d) changed which paths fire, so this arm lost its last covering fixture rather than becoming unreachable. Left un-exercised deliberately — the render corpus is frozen for a measurement against main, so no fixture was authored.
3505if (->L3509
3528if not obstacles:->L3530defensive — The ordinal moved when the endpoint check left this condition; the arm is the ordinary no-crowding case _lane_trunk_flanks takes on most plans.
3536for coordinate in candidates:->L3515, ->L3537
3537if not _inside_usable_gap(gap_edges, coordinate):->L3538, ->L3539
3545if moved_plan is None:->L3546, ->L3547
3556if moved_channel is None or any(->L3560, ->L3561
3565if (->L3569, ->L3570candidate-dead — Pre-existing gap, re-keyed from #8 by the gates the restored conflict conditions inserted earlier in the file (same never-executed line, same [0,0] split). Dead sub-block of _settle_opposing_gap_flanks’ landing-opening move: its enclosing if not obstacles: never takes the has-obstacles arm, so no non-flank plan gap channel is ever crowded by a resident one and nothing below line 3072 runs. What would settle it is a fixture whose settled convergence gap channel crowds a resident member channel of a different line in the same column gap.
3582if first.system_id != second.system_id:->L3583
3584if first.claimant_member_ids & second.claimant_member_ids:->L3585needs-review — _channels_share_source_carrier’s shared-claimant shortcut. Its sole caller is _validate_final_convergence_feasibility, which pairs a convergence plan channel against a frozen member channel; the intersection is non-empty only when the plan’s channel names the very member it is compared with, which no corpus fixture produces. Reachable in principle, wants a fixture.
3591if first.member_geometry_owned == second.member_geometry_owned:->L3592needs-review — _channels_share_source_carrier’s equal-ownership rejection. Its sole caller always pairs a convergence-owned channel with a member-owned one, so the two flags always differ and the rejection arm is unreachable from that caller. Reachable only if a second caller compares two channels of one owner.
3765if _direction(*landing_segment) not in (Direction.U, Direction.D):->L3766
3770if endpoint is None or _shared_source_bundle_stroke(->L3778
3783if shortfall <= SAME_COORD_TOLERANCE:->L3785
3798if gap is None:->L3799, ->L3800
3820if not negative or not positive:->L3821, ->L3822
3848if current is None or requirement.required > current.required:->L3757, ->L3849
3896if first_plan.trunk_axis.axis is DemandAxis.X:->L3900needs-review — The Y-axis half of the opening-arm delta measurement. Six fixtures reach it and all take the X half, for the one root cause shared with this module’s other DemandAxis.X scope guards: no corpus topology produces a vertical convergence trunk. Not a guard — both halves are correct code for their axis — so it is reachable exactly when a vertical trunk axis is. What would settle it is a TB convergence whose _direct_axis_points / _shared_terminal_axis yields DemandAxis.Y.
3903if first_delta * second_delta < 0:->L3906needs-review — OPPOSING_OPENING_CHANNEL: two arms of one line that turn on one shared column and then open to opposite sides of their source. Six fixtures reach the test with a genuine shared-opening pair, and in every one the two trunks open the same way, which the code below reads as one stroke branching to several destinations. Neutralising _settle_opposing_landing_channels makes it fire on merge_bottom_row_bypass and merge_feeder_shared_channel_gap; neutralising _settle_shared_opening_pivots and _settle_shared_source_openings does not, and the pivot pass cannot suppress it in any case because its group key partitions by the travel direction of flank 1. Reachable; reaching it is a feasibility refusal rather than a change of emitter — see #1712.
3920if opposing_approaches is not None:->L3921needs-review — The refusal arm for the SHARED_APPROACH_CHANNEL conflict _opposing_landing_approaches reports. Un-exercised for exactly the reason that helper’s own pair test is (convergences.py::if (::#4): the helper is called on 18 fixtures and returns None on every one. Reachable; closing it and closing #4 are the same fixture.
3965if same_line and first_direction is not second_direction:->L3970needs-review — SHARED_TRUNK_CHANNEL for a same-line pair whose outward and return legs crowd one channel and which _settle_shared_trunk_channels could seat no lane for: both runs boxed in by the obstacles either side of them, since the arriving flank now gives way to a resident and the resident gives way back. Read in the travel frame the laning pass decides in, so it no longer fires on a rank-1/rank-3 pair that pass deliberately fused. Neutralising that pass makes it fire 5 times on merge_around_below_leftmost, all central-run pairs at separation 0 and 6px. Reachable; reaching it is a feasibility refusal rather than a change of emitter — see #1712.
3971if (->L3998
4018if conflict is not None:->L4019
4027if requirements:->L4028, ->L4030
4055if shared_carrier and separation > COORD_TOLERANCE:->L4056
4062if (->L4073defensive — Pre-existing gap, re-keyed from #11 by the gates the restored conflict conditions inserted earlier in the file (unchanged [0,18] split). validate_convergence_plans’ re-check that a landing’s join point sits on its plan’s own trunk axis and on the trunk route’s polyline. The join point is derived from the trunk axis when the plan is built and consume_convergence_route connects the emitted endpoint to it, so taking the raise arm means the planner contradicted its own axis: an engine bug and a hard abort, not a shippable topology.
4080if _gap_channels_crowd(->L4087
4103if not plan.owns_geometry:->L4104
4167if not plan.owns_geometry:->L4168
4190owner_edge not in edge_ranks->L4194
4229if not plan.owns_geometry:->L4230
4248if ownership.edge in by_edge:->L4249
4373for item in system_plans:->L4374, ->L4384
4642if not horizontal and not vertical:->L4643
4666if interval[1] - interval[0] > COORD_TOLERANCE:->L4651
4669for interval_start, interval_end in sorted(intervals):->L4677
4672if interval_start > covered_until + COORD_TOLERANCE:->L4673
4675if covered_until >= extent_end - COORD_TOLERANCE:->L4669
4699if axis.axis is DemandAxis.X:->L4722
4819if not candidates:->L4820
4927if not 0 <= flank_rank < len(route.points) - 1:->L4928
4946if actual is None:->L4947
4953direction is not landing.approach_direction->L4957
4954or handedness is not landing.corner_handedness->L4957
4955or runway < landing.minimum_runway - COORD_TOLERANCE->L4957
4974opening is None->L4978
4975or abs(opening.x - landing.opening_turn_coordinate) > COORD_TOLERANCE->L4978
4976or emitted_segment != landing.opening_turn_segment->L4978
4987if query is None:->L4988
4993if not plan.owns_geometry:->L4994
5003if (->L5017defensive — Pre-existing gap, re-keyed from #12 by the gates the restored conflict conditions inserted earlier in the file (unchanged [0,18] split). The raise for a covered continuation absent from the carrier member that is recorded as covering it. _reconcile_continuation_ownership only names a carrier whose route already spans the continuation’s endpoints, so the raise arm reports an engine bug and aborts the render; no valid topology reaches it.
5021if plan.primary_trunk_member_id == membership.member_id:->L5026
5044if opening is None:->L5045
5045if not clearance_pending:->L5046, ->L5052
5069if ctx.validate_final_route_frames and not clearance_pending:->L5071
5086if not clearance_pending and any(->L5090needs-review — The endpoint-agreement refusal is deferred only while a provisional convergence plan carries a published boundary-clearance requirement. Production rendering settles that grant and immediately observes a strict plan with clearance publication disabled, so the same guard is active before anything can render. No committed corpus fixture reaches the provisional shortfall; the controlled regression lowers the placement floor to exercise both arms.
5091if ctx.validate_final_route_frames and not clearance_pending:->L-4985
5105if not plan.owns_geometry:->L5106
5107if plan.system_id in execution.query.clearance_requirement_system_ids:->L5108
5116if trunk_route is None or not _route_covers_trunk(trunk_route, plan.trunk_axis):->L5117
5126if route is None:->L5127
5132if (->L5137candidate-dead — Pre-existing gap, re-keyed from #13 by the gates the restored conflict conditions inserted earlier in the file (unchanged [0,0] split). Never executed rather than half-taken: its enclosing if continuation.covered_by_member_id is not None: never takes the None arm on any of the 18 fixtures that validate a planned convergence, so an uncovered outgoing continuation does not exist in this corpus. What would settle it is a topology whose continuation no endpoint owner’s route spans, which _reconcile_continuation_ownership would then leave uncovered.
5144if any(->L5148
5168if (->L5177
5183if (->L5194
5210if route is None or membership is None:->L5211
5216if any(->L5220

24/33 gates fully exercised.

Gates with an un-exercised arm:

LineGateUn-exercised arm(s)Triage
192for handler in (_route_tb_section, _route_entry_runway, _route_intra_section):->L197
234if scaffold is None:->L241
256if rail_execution is not None:->L260
460if result is not None:->L-410defensive — Append-guard after the priority-ordered handler chain. The final handler _route_intra_section is total: its three early returns and its _route_diagonal fallback (annotated -> RoutedPath, single return statement) always yield a RoutedPath, so result is never None and every edge appends. The None arm is unreachable.
462if system_execution is not None:->L464
482if system.system_id != expected.system_id:->L485
503if system_execution is not None and next_system_rank != len(->L506
631if system_execution is not None:->L639
663if validate_final_route_frames:->L665

9/11 gates fully exercised.

Gates with an un-exercised arm:

LineGateUn-exercised arm(s)Triage
77if corner_idx < 0 or corner_idx >= n_corners:->L78defensive — Bounds check for resolve_curve_radius_at. Production callers use indices from range(n_corners) or recorded corner buckets, so an invalid index requires a caller-contract violation and is covered as an error case by the corner unit tests.
573if vertical is Direction.D:->L575, ->L580

183/288 gates fully exercised.

Gates with an un-exercised arm:

LineGateUn-exercised arm(s)Triage
496if not replacements:->L497
725if key not in ctx.station_offsets and port_key not in ctx.station_offsets:->L726
738if len({coordinate for _line, _offset, coordinate in values}) != len(values):->L739
811if source_run_direction not in {Direction.R, Direction.L}:->L812
901if source_run_direction not in run_axis:->L902
906if abs(delta) <= COORD_TOLERANCE:->L907
910if horizontal:->L913
914if actual_run is not source_run_direction:->L915
944if route is None:->L945
947if len(points) < 3:->L948
952if run_direction is None or turn_direction is None:->L953
979if off_column_decline is not None and source_run_direction not in {->L983
984if family_id is RouteFamilyId.MERGE_ENTRY_STRAIGHT:->L985
1079if entry_geometry.seam.turn_direction is None:->L1080
1165if abs(turn_delta) <= COORD_TOLERANCE:->L1166
1193if abs(turn_delta) <= COORD_TOLERANCE:->L1194defensive — _plain_l_shape_turn_requirement’s flat-hop guard, which both its callers exclude: _standard_l_shape_turn_requirement returns its own missing-source-turn for a flat delta before delegating, and the cell-mate gap drop only classifies when the target section sits one grid row below the source (_bypass_route_kind requires tgt_row == src_row + 1), which puts the two ports on different rows. The duplicated guard therefore never fires.
1322if kind is _BypassRoute.LEFT_ENTRY_FAMILY:->L1323
1326if kind is _BypassRoute.RIGHT_ENTRY_CROSS_ROW:->L1327
1328if kind is _BypassRoute.L_SHAPE:->L1329
1335if kind is _BypassRoute.LEFT_EXIT_AROUND_BELOW:->L1336
1481if direction_axis(transition.run_direction) is DemandAxis.X:->L1485
1536if len(candidates) != 1:->L1537
1543if direction_axis(run_direction) is DemandAxis.Y:->L1544
1571if transition is None:->L1572
1608target_crossing is None->L1611
1609or abs(source_crossing - target_crossing) > COORD_TOLERANCE->L1611
1633target_crossing is None->L1636
1634or abs(geometry.cross_lo - target_crossing) > COORD_TOLERANCE->L1636
1706if direction_axis(run_direction) is DemandAxis.Y:->L1707
1732if transition is None:->L1734
1765if len(entry_group_ids) != 1:->L1766
1772if family_id is None:->L1773
1801requirement.run_direction is not None->L1814
1802and requirement.turn_direction is not None->L1814
1803and requirement.launch_coordinate is not None->L1814
1804and requirement.minimum_runway is not None->L1814
1823and requirement.turn_direction is not None->L1830
1835and family_id is not RouteFamilyId.MERGE_ENTRY->L1838
1863if any(len(runs) > 1 for runs in straight_runs_by_lane.values()):->L1864defensive — The opposed-source-run recogniser: a lane whose turn-less members disagree on the direction they leave the shared source. Every member of one exit group leaves through one exit port, whose side fixes the outward ray, and a collinear target on the other side of that port is a backward hop the engine rejects before routing. The arm names a classification that contradicts itself and declines the plan; no exit group produces it.
2015if any(->L2026
2040if membership is not None and membership.axis is not None:->L2041
2118if not _lane_arms_read_as_one_stroke(->L2121defensive — The reject protects a planner seed set where an unpinned cohort lands within one curve radius of a same-rank axis already claimed by a pinned cohort. Production topology planning pins or separates those cohorts before this check. test_free_lane_arm_overlapping_a_pinned_corner_uses_legacy constructs the incomplete seed set directly and covers the fallback reason.
2235if reason is not None:->L2236
2338if not outbound_edges or missing_connectors:->L2339
2440if final_classification.legacy_reason is not None:->L2441
2442elif tuple(seed.family_id for seed in final_classification.seeds) != tuple(->L2445
2707if incumbent.id == plan.id:->L2709
2733if prior is None:->L2734
2777if owners and plan.id not in owners:->L2778
2778for owner in owners:->L2779, ->L2780
2793and plan.id in conflicting_plan_ids->L2795
2811and axis.fixed_anchor_offset is not None->L2800
2812and abs(proposed - axis.fixed_anchor_offset) > COORD_TOLERANCE->L2814
3002if abs(first_offset - second_offset) > COORD_TOLERANCE:->L3004
3004for owner in (first_owner, second_owner):->L3001, ->L3005
3005if owner is not None:->L3004, ->L3006
3012if not additions:->L3014
3076if assignment.planned_family_id is RouteFamilyId.BOTTOM_EXIT_JUNCTION:->L3077
3111if route is None:->L3112
3117if assignment.planned_family_id is not RouteFamilyId.TB_BOTTOM_EXIT:->L3118
3132if route is None:->L3133, ->L3139
3147if geometry.bundle_offsets is None:->L3148
3240if scaffold is None:->L3241
3248if scaffold is None:->L3249defensive — The second None check protects the manual or incomplete graph fallback after rebuilding a missing retained scaffold. Parsed render-path graphs publish one canonical scaffold during fan planning, so the fixture corpus never reaches a rebuild that can return None. Direct planner tests retain the fallback for graph construction without topology.
3287if overridden_dispositions:->L3288
3289for plan_id in overridden_dispositions:->L3290, ->L3301
3345if transition_key in transition_by_edge:->L3346
3369if len(points) >= 3:->L3376
3372segment_direction(before, start) is run_direction->L3376
3373and segment_direction(start, end) is turn_direction->L3376
3417assignment is None->L3422
3418or membership.axis is None->L3422
3419or assignment.run_direction is None->L3422
3420or assignment.turn_direction is None->L3422
3479if ctx.exit_turns is None:->L3480
3490if family_id is not assignment.planned_family_id:->L3491
3503if (->L3512
3521run is None->L3526
3522or turn is None->L3526
3523or assignment.launch_coordinate is None->L3526
3524or assignment.minimum_runway is None->L3526
3530if segment_rank is None:->L3531
3551if planned_corner_offsets is None:->L3552
3618if source_turn_changed and settled is None:->L3619
3646if rank is None:->L3647
3713if current.keys() != snapshot.geometry.keys():->L3714
3728if current[key] != state:->L3729
3759or exit_turn_plan.system_id in skip_system_ids->L3761
3765station_id not in graph.stations->L3768
3766or lane.line_id not in graph.station_lines(station_id)->L3768
3774if (station_id, lane.line_id) not in station_offsets or (->L3781
3789if len(transition_routes) != 1:->L3790
3827route.exit_lane_transition_plan_id != str(exit_turn_plan.id)->L3832
3828or route.offset_regime is not OffsetRegime.BAKED->L3832
3829or route.points != expected_route.points->L3832
3830or route.curve_radii != expected_route.curve_radii->L3832
3848if not _fixed_axis_matches_plan(->L3853
3859if any(->L3868
3876if len(member_routes) != 1:->L3877
3884if route.exit_turn_family_id != assignment.planned_family_id.value:->L3885
3892if route.exit_turn_axis_id is not None:->L3893
3901if (->L3915
3923route.exit_turn_axis_id != str(assignment.axis_id)->L3926
3924or route.exit_turn_segment_rank is None->L3926
3937if (->L3959

203/344 gates fully exercised.

Gates with an un-exercised arm:

LineGateUn-exercised arm(s)Triage
429if section is None:->L430
668and f.src_row is not None->L695defensive — LEFT-entry inter-row L-shape guard. Every LEFT-entry inter-section edge reaching this condition has a resolved source grid row (f.src_col/f.tgt_col are asserted non-None just above and the row resolves alongside), so the f.src_row is None short-circuit out of the L-shape branch is never taken.
669and f.tgt_row is not None->L695defensive — Companion guard to f.src_row in the same LEFT-entry inter-row L-shape condition: the target grid row is likewise always resolved here, so the f.tgt_row is None short-circuit out of the branch is never taken.
748if src_sec is None:->L749
752if edges is None:->L753
776if section and section.bbox_w > 0:->L778
784if section and section.bbox_w > 0:->L786
810if _v_segment_crosses_other_section(graph, corner_x, src.y, ey, exclude):->L811defensive — Drop-in viability test in _right_entry_drop_in_is_clear (#889). The cross-row RIGHT-entry rule fires only when the earlier bypass / plough rules ceded the edge, i.e. no section sits between source and port, so the outward-side descent runs clear; the not-clear arm covers only an exotic descent blocked by a wide same-column sibling no corpus fixture builds. Defensive.
916if min(drop_xs) < _section_right_edge(graph, tgt) - COORD_TOLERANCE:->L917
919if _v_segment_crosses_other_section(graph, dx, src.y, tgt.y, exclude):->L920
960if route is not None:->L962
1161if route is not None:->L1175
1306if _corridor_is_viable(ctx, src, tgt):->L1307needs-review — Reachable only via a defective render (inter-row corridor grazes the source section); see #722.
1327if kind is _LeftEntryRoute.CORRIDOR:->L1328
1354if target_port is None:->L1355
1373if sibling_port is None or not sibling_port.is_entry:->L1374
1436if sibling_route is None or len(sibling_route.points) < 6:->L1437
1448if (->L1453
1594if abs(ep.y - f.sy) < ctx.curve_radius:->L1595defensive — Merge entry-port Y tracks the source/junction Y, so a sub-curve_radius exit->entry gap never arises (the same-Y rule already handles dy<tol); corpus instrumentation across the fixtures (#762) confirms the arm is never taken. Defensive.
1597if ep_port and ep_port.side in (PortSide.TOP, PortSide.BOTTOM):->L1598
1599if ep_port and ep_port.side == PortSide.LEFT:->L1605defensive — Contract guard in _route_inter_section: a merge entry port always resolves to a Port on the LEFT side here, so the non-LEFT/None arm (fall through to _route_l_shape at L344) is never taken (0/128). The earlier ‘multiline phantom’ note was inaccurate — this is a recorded gate whose arm is never taken. Defensive guard. Reclassified defensive (#762).
1602if _corridor_is_viable(ctx, src, ep):->L1604needs-review — Reachable only via a defective render (route skirts/crosses section boundary); see #724.
1626if tgt_sec is None:->L1627, ->L1628defensive — Defensive guard in _fan_shares_inter_row_channel: the edge is a fan branch into an entry port, which always resolves to a section, so the None arm is unreachable in practice.
1628if port.side is PortSide.TOP:->L1629, ->L1634
2063if len(_INTER_SECTION_RULE_BY_FAMILY) != len(_INDEXED_INTER_SECTION_RULES):->L2064, ->L2067
2069if _INTER_SECTION_RULES is _INDEXED_INTER_SECTION_RULES:->L2071
2094if not is_inter:->L2095
2105if family_id is not RouteFamilyId.STANDARD_L_SHAPE:->L2106
2119route is None->L2120
2120and membership is not None->L2121, ->L2130
2121and membership.assignment is not None->L2122, ->L2130
2122and membership.plan.disposition is ExitTurnDisposition.PLANNED->L2124, ->L2130
2130if route is not None:->L2135
2274if planned_transition is not None:->L2275
2495if query is None:->L2496defensive — Production routing runs after layout publishes FanPlanExecution. The None arm preserves the ordinary dispatcher for direct or incomplete routing contexts.
2520if ctx.station_offsets:->L2522defensive — _run_pass_c_guards always populates ctx.station_offsets before route_edges, and RAILS mode returns earlier; the empty-offsets arm never fires. Reclassified candidate-dead -> defensive (#762): corpus instrumentation across 128 fixtures confirms the un-exercised arm is never taken.
2627if query is None:->L2628
2631if binding is None:->L2632
2636plan.disposition is not FanPlanDisposition.PLANNED->L2642
2637or emission.emitter is not FanRouteEmitter.BOTTOM_EXIT_RIGHT_LANDINGS->L2642
2638or plan.fork_station_id != edge.source->L2642defensive — FanPlan membership validation requires every emission source to equal fork_station_id. This operand catches a frozen-plan/source mismatch before materialisation.
2639or target_port is None->L2642defensive — The planner creates this emitter only for a resolved landing port. A missing target port therefore indicates graph or plan drift after publication.
2640or target_port.side is not PortSide.RIGHT->L2642defensive — BOTTOM_EXIT_RIGHT_LANDINGS is selected only when every target is a RIGHT entry. The non-RIGHT arm is a defensive check that the frozen target still satisfies that contract.
2651if port is None or port.side is not PortSide.RIGHT or section is None:->L2652defensive — The planned emitter is created only from existing RIGHT landing ports with owning sections. This guard rejects stale or corrupted port references during materialisation.
2655if section not in landing_sections:->L2646defensive — The planner admits this emitter only when branches land in distinct sections, so the duplicate-section arm cannot occur for a valid frozen emission. It remains a materialisation-time drift check.
2657if len(landing_sections) != len(plan.branches):->L2658defensive — The planner emits this route family only when every branch lands in one distinct RIGHT-entry section. A count mismatch can arise only if the frozen emission and plan have drifted apart.
2660if plan.entry_runway is None:->L2661defensive — Every PLANNED FanPlan is validated with both runways before publication. The None arm is a runtime drift check for an incomplete plan object.
2664if not source_lines or edge.line_id not in source_lines:->L2665defensive — The planned emitter requires a non-empty offset_line_order whose line set exactly matches its emissions. The missing-line arm protects routing from a malformed frozen plan.
2691if route is None:->L2692
2727if tgt_port is None or tgt_port.side != PortSide.LEFT:->L2728
2730if ep_col is None or ep_row is None:->L2731
2733if corner_x is None:->L2734
2856if _would_route_around_section_below(other, ctx):->L2857defensive — Competing-sibling detection in _has_around_section_sibling, routed through the dispatch table (#813). A non-bypass sibling feeding the same merge junction sits in an adjacent column or a gap with no same-row intervening section, so it dispatches to an L-shape, not the around-below loop; corpus instrumentation across the fixtures confirms the arm is never taken. Defensive.
2991if trunk_shape.around_below:->L2992
3000if flank_xs:->L2979
3091if src_row is None or tgt_row is None or src_col is None or tgt_col is None:->L3092defensive — _is_row_level_bottom_row_climb’s null guard; neither swept caller can pass a None coordinate. _bypass_geometry asserts src_col/tgt_col non-None and only calls it under cross_row, and cross_row is True only when both rows are set: merge_trunk_force_cross_row returns False unless src_row is not None and tgt_row == src_row, and the other disjunct requires both rows non-None. _fan_bypass_band passes non-None src_col/src_row and a checked tgt_col, and any placed target entry-port section resolves a non-negative grid_row. No fixture in the render corpus reaches the None arm.
3245and corridor.bypass_band_y >= base_y - COORD_TOLERANCE->L3255needs-review — Safety fallback: the shared bypass band is the deepest sibling’s bypass_bottom_y, so a branch’s own base_y never exceeds it; the arm that would decline a shallower shared band (guarding a predicate mismatch) is unexercised in the corpus.
3367if trunk_v_up_pull_away:->L3376needs-review — Reachable only via a defective render (merge-junction tangle); see #721.
3406this_xmin - gap_left >= SECTION_ROUTE_CLEARANCE->L3407, ->L3425
3407and gap_right - around_xmax >= SECTION_ROUTE_CLEARANCE->L3409, ->L3425
3456if src_sec is not None and src_sec.bbox_w > 0:->L3506defensive — A bypass source section always resolves and has bbox_w>0 (the parser never emits an empty section); the None/zero-width arm never fires.
3638if facts.src_col is None or facts.tgt_col is None:->L3639
3643if shape.around_below:->L3644
3648or _bypass_route_kind(facts) is not _BypassRoute.U_BYPASS->L3650
3739if ctx.exit_turns is None:->L3740
3743membership is None->L3746
3748if abs(start[0] - end[0]) > COORD_TOLERANCE:->L3749
3812membership is None->L3815
3820if abs(start[0] - end[0]) > COORD_TOLERANCE:->L3821defensive — _seat_bypass_descent reads the segment at BYPASS_DESCENT_RANK, which the U-bypass builder emits as the descent between the two gap corners and is vertical by construction. The non-vertical bail guards a route whose point order does not match the shape the caller just built.
3859if route is not None:->L3861
3887if route is None:->L3888defensive — Defensive in _declare_trunk: _route_inter_section only reaches the declaration after a matched rule (or the L-shape fall-through) produced a route, so the None guard never fires on the corpus; it mirrors _declare_channel’s same guard for a handler that returns None.
3915if route is None:->L3916defensive — _declare_channel deliberately accepts RoutedPath | None so declining builders can be ignored. Production callers currently pass concrete routes; the None no-op remains a defensive helper contract.
3962if route is None:->L3963defensive — _declare_placed_channels accepts RoutedPath | None to match _declare_trunk and _declare_channel, but all three call sites have already established the route (an assert on the left-entry corridor, a RuntimeError when a planned fan emitter omits a member, and a locally built U-bypass), so the None no-op is a helper contract nothing exercises.
3976if (lo, matched_row, direction) in declared:->L3978needs-review — The un-exercised arm is the fresh declaration, not the dedupe skip: declared is seeded from the slots the handler’s targeted _declare_channel calls already made, and on the corpus every gap-landing leg of a frozen frame is one of those, so the sweep only ever skips. The declaration fires where two targeted declarations collapse onto one gap and direction, leaving a third leg holding a gap nothing named — the case the left-entry corridor and U-bypass call sites are commented for.
4183while cur is not None and cur not in seen:->L4199
4189if port.side == PortSide.LEFT:->L4191
4192if cur in graph.junctions:->L4198
4279if (->L4285
4464if geometry is None:->L4465
4563if abs(tgt.x - src.x) <= ctx.curve_radius:->L4564
4576if _h_segment_crosses_other_section(graph, src.x, final_x, src.y, exclude):->L4577defensive — Traverse-first clearance test in _top_entry_side_fan_traverse_clears (#1349). The below-side fan branch only reaches this gate when its junction also feeds an aligned straight drop; the corpus fan sits a clear row above its target, so the source-Y traverse never crosses another section and the fall-back-to-staircase arm is not exercised. Defensive.
4704if abs(tgt.x - src.x) > COORD_TOLERANCE or src.id not in ctx.graph.junctions:->L4705
4739if feeder is not None:->L4744
4898if direction is None:->L4899
4926if len(points) < 3:->L4927
4978if not section_ids:->L4979
5058if mid_y is None:->L5075
5090channel_y is None->L5120
5092and src_sec is not None->L5120defensive — Inter-row exit mid-Y clearance bump (the n>1 multi-line branch). When more than one line shares the exit the source section always resolves, so the src_sec is None short-circuit past the clearance bump is never taken.
5093and tgt_sec is not None->L5120defensive — Companion to src_sec in the same n>1 mid-Y clearance branch: the target section always resolves there, so the tgt_sec is None short-circuit past the bump is never taken.
5122if exit_side is not None:->L5124
5124elif abs(dx) > ctx.curve_radius:->L5125, ->L5127
5128if src.id in ctx.graph.junctions:->L5129, ->L5141needs-review — Reachable only via a defective render (LR->TB TOP-entry routing); see #720.
5129for je in ctx.graph.edges_to(src.id):->L5130, ->L5141
5131if js.is_port:->L5129, ->L5132
5132if abs(js.x - src.x) <= COORD_TOLERANCE:->L5133, ->L5135
5147if exit_side is not None and not straight_drop:->L5157
5195if not straight_drop:->L5199needs-review — A top-entry fan branch fed straight from directly above the junction (straight_drop) keeps its lead-in column at the source X rather than the shared fan pivot; the corpus’s fan branches all carry horizontal travel, so the straight-drop arm is unexercised.
5197if lead is Direction.R:->L5199needs-review — A top-entry fan branch leading LEFT out of the junction skips the _v1_corner_x right-edge clearance bump; the corpus’s fan branches all lead right, so the left-lead arm is unexercised.
5224if straight_drop:->L5225
5301if ctx.exit_turns is None:->L5302needs-review — _perp_entry_turn_is_planned answers False for the pre-plan context the exit-turn planner probes emitters with; ctx.exit_turns is bound only for emission. That context does reach these emitters — the same guard in _seat_bypass_descent takes its None arm on packed_cell_right_exit_left_entry_wrap — but no corpus probe reaches the TOP/BOTTOM-entry L-shape records this predicate feeds.
5386if src_sec is None or tgt_sec is None or src_sec.grid_row >= tgt_sec.grid_row:->L5389
5556if src_section and src_section.bbox_w > 0:->L5557
5577if tgt_sec is None:->L5578
5648if src_col is None:->L5649
5892if src_sec is not None:->L5923defensive — Defensive guard in the fanned entry-wrap source-clearance lift: a fan-out junction always resolves to its source section, so the None arm is unreachable in practice.
5929if tgt_col is not None:->L5934defensive — tgt_col from _resolve_section_col on a valid LEFT entry port is always non-None (sections get grid_col>=0 after auto-layout).
5931if shared_vx is not None:->L5934defensive — _fan_left_entry_descent_x returns None only when col_left<=0; col_left_edge for the target’s own column is always >0.
6057if entry_side is PortSide.LEFT:->L6060
6125if entry_port is None:->L6126defensive — _route_around_section_below is always called with a non-None entry_port (both dispatch sites pass a checked station).
6136if trunk_src is None or trunk_src == edge.source:->L6138needs-review — Reachable only via a defective render (merge-junction tangle); see #721.
6189if col_left <= 0.0:->L6190defensive — col_left_edge’s 0.0 default only fires for a column with no sections; the target’s own column always holds its section.
6226if entry_port is None:->L6227defensive — Every caller of _corridor_is_viable passes a non-None entry_port.
6233if src_row is None or ep_row is None or src_col is None or ep_col is None:->L6234defensive — _resolve_section_colrow returns (None,None) only for a station with no section; valid entry ports always have a section with non-negative grid coords.
6320if fan is not None and corridor is not None and corridor.band_y is not None:->L6324needs-review — Corridor-feeder shared inter-row band gate: the corpus’s corridor feeders belong to fans whose corridor carries a band_y, so the short-circuit past it (no corridor or bypass-only) is unexercised; it falls to the elif fan-is-not-None global-band branch.
6324elif fan is not None:->L6328, ->L6333needs-review — Corridor-feeder fallback for a fan whose junction earned no corridor (its in-column gap below does not fit the bundle); the corpus’s fans all earn a corridor, so this global-band branch is unexercised.
6333elif gap_bottom > gap_top:->L6334, ->L6338needs-review — Reachable only via a defective render (inter-row corridor on a <78px gap); see #722.
6343if fan is None and gap_bottom > gap_top:->L6344needs-review — Reachable only via a defective render (inter-row corridor on a <78px gap); see #722.
6357if fan is not None and ep_col is not None:->L6359needs-review — Reachable only via a defective render (inter-row corridor on a <78px gap); see #722.
6359if vx is None:->L6360needs-review — Reachable only via a defective render (inter-row corridor on a <78px gap); see #722.
6461if ep_section and ep_section.bbox_w > 0:->L6464defensive — entry_port.section_id is always set and the section has bbox_w>0 after layout; the else arm never fires.
6758for claim in ctx.convergences.prior_channel_claims_for_edge(edge):->L6759
6759if claim.line_id != edge.line_id or claim.owner_source == edge.source:->L6760, ->L6761
6761if not (corner_x - COORD_TOLERANCE <= claim.x <= gap_right + COORD_TOLERANCE):->L6762, ->L6763
6763if min(hi, claim.y_hi) - max(lo, claim.y_lo) > COORD_TOLERANCE:->L6758, ->L6764
6837if _leadout_self_meets_sibling_descent(ctx, edge, corner_x, f.sy, hy, gap_right):->L6838
6969if gap_bottom <= gap_top:->L6970defensive — The row-gap enforcer keeps stacked rows separated, so the inter-row band above a target row (row_bottom_edge(tgt_row-1) up to row_top_edge(tgt_row)) has positive height whenever a RIGHT entry is fed from a higher row; the degenerate-band arm guards an abutting-rows layout placement never produces.
6973if not _inter_row_band_fits(gap_top, gap_bottom):->L6974defensive — Band-fit test in _right_entry_gap_above_is_clear (#889), reached only when the cross-row RIGHT-entry drop-in is not clear (the exotic blocked-descent case above). The corpus always takes the drop-in, so neither arm of the gap-above fallback is exercised. Defensive.
7128if gap_bottom <= gap_top:->L7129
7130if not _inter_row_band_fits(gap_top, gap_bottom):->L7131
7141if f.v_segment_crosses_other_section(vx, gy, tgt.y):->L7142
7236if source is None or source.bbox_w <= 0:->L7237
7249if cellmate_left is None or other.bbox_x < cellmate_left:->L7243
7289if band0_bottom <= band0_top or not _inter_row_band_fits(band0_top, band0_bottom):->L7290
7291if band1_bottom <= band1_top or not _inter_row_band_fits(band1_top, band1_bottom):->L7292
7293if band1_top <= band0_bottom + COORD_TOLERANCE:->L7294
7309if f.v_segment_crosses_other_section(corner_x, band0_y, band1_y, exclude):->L7310
7366if geom is None:->L7367
7369if f.v_segment_crosses_other_section(geom.lead_x, src.y, geom.band0_y):->L7370
7371if f.h_segment_crosses_other_section(geom.lead_x, geom.corner_x, geom.band0_y):->L7372
7373if f.h_segment_crosses_other_section(geom.corner_x, geom.vx, geom.band1_y):->L7374

53/80 gates fully exercised.

Gates with an un-exercised arm:

LineGateUn-exercised arm(s)Triage
84if not section:->L85defensive — _route_entry_runway only runs on an entry-port -> internal-station edge; the target of such an edge always carries a section_id that resolves, so the guard’s return-None arm protects against a malformed graph rather than a topology.
91if section.direction == "RL" and port.side != PortSide.RIGHT:->L92
93if section.direction not in ("LR", "RL"):->L94defensive — No TB/BT entry reaches _route_entry_runway: TB LEFT/RIGHT entries are consumed by _route_tb_lr_entry and TB/BT TOP/BOTTOM entries by _route_perp_entry (both earlier in the dispatch chain), and a BT section is never produced (the direction directive accepts only LR/RL/TB; 0/391 corpus sections are BT). Reclassified candidate-dead -> defensive (#762): corpus instrumentation across 128 fixtures confirms the un-exercised arm is never taken.
139if abs(nearest_src - sx) < src_min + ctx.diagonal_run:->L140defensive — Entry-runway ‘too tight’ return cannot fire: |nearest_src - entry_port_x| is floored at SECTION_X_PADDING (50px, the entry port sits at section.bbox_x = min(internal_station_x) - SECTION_X_PADDING), while src_min + diagonal_run = CURVE_RADIUS(10) + MIN_STRAIGHT_PORT(5) + DIAGONAL_RUN(30) = 45px. Since 50 >= 45 the guard is always False.
150elif sy_blocked:->L151defensive — Entry-runway trunk-row non-consumer bypass (#1293). Both-rows-blocked fall-through: a non-consumer sits on BOTH the entry row and the target trunk row, leaving no clear runway row. No corpus fixture has a doubly-blocked flow-side entry; defensive.
162if abs(diag_start_x - sx) <= abs(last_blocker - sx):->L163defensive — Entry-runway trunk-row non-consumer bypass (#1293). Descent-clips-blocker fall-through: the join-biased diagonal cannot start past the furthest target-row non-consumer (a blocker within diagonal_run+tgt_min of the target). Corpus blockers sit far enough forward; defensive.
191for k in range(len(points) - 1):->L192, ->L197defensive — Trunk-row entry bow (#1315). Exercised by tests/fixtures/regressions/entry_trunk_row_bow.mmd, which is kept out of the validate=True corpus and the gate-coverage corpus (it exercises the always-on render path only), so no clean corpus fixture takes this arm. The render-path invariant test test_entry_trunk_row_bow_clears_non_consumer covers the drawn detour.
194for bbox in footprints:->L191, ->L195defensive — Trunk-row entry bow (#1315). Exercised by tests/fixtures/regressions/entry_trunk_row_bow.mmd, which is kept out of the validate=True corpus and the gate-coverage corpus (it exercises the always-on render path only), so no clean corpus fixture takes this arm. The render-path invariant test test_entry_trunk_row_bow_clears_non_consumer covers the drawn detour.
195if segment_intersects_bbox(x1, y1, x2, y2, bbox):->L194, ->L196defensive — Trunk-row entry bow (#1315). Exercised by tests/fixtures/regressions/entry_trunk_row_bow.mmd, which is kept out of the validate=True corpus and the gate-coverage corpus (it exercises the always-on render path only), so no clean corpus fixture takes this arm. The render-path invariant test test_entry_trunk_row_bow_clears_non_consumer covers the drawn detour.
226if not st or st.is_port:->L227
232and line not in graph.station_lines(sid)->L234defensive — Trunk-row entry bow (#1315). Exercised by tests/fixtures/regressions/entry_trunk_row_bow.mmd, which is kept out of the validate=True corpus and the gate-coverage corpus (it exercises the always-on render path only), so no clean corpus fixture takes this arm. The render-path invariant test test_entry_trunk_row_bow_clears_non_consumer covers the drawn detour.
235if not blockers:->L238defensive — Trunk-row entry bow (#1315). Exercised by tests/fixtures/regressions/entry_trunk_row_bow.mmd, which is kept out of the validate=True corpus and the gate-coverage corpus (it exercises the always-on render path only), so no clean corpus fixture takes this arm. The render-path invariant test test_entry_trunk_row_bow_clears_non_consumer covers the drawn detour.
246if lead_end - sx < min_straight or tx - tail_start < min_straight:->L247, ->L248defensive — Trunk-row entry bow (#1315). No-room return: the flat lead-in before the rise, or the flat tail after the drop, is shorter than a port’s minimum straight. A corpus blocker sits far enough from both the port and the target to leave room, so the fall-through to a plain straight run is defensive.
248if over_end - over_start < 2 * ctx.curve_radius:->L249, ->L251defensive — Trunk-row entry bow (#1315). No-room return: the flat run over the blocker(s) is shorter than two corner radii, so the bump’s corners would overlap. The blocker-span-plus-clearance always exceeds 2*CURVE_RADIUS for corpus fixtures; defensive.
251for sign in _bow_side_order(section_stations, blockers, sy, over_start, over_end):->L252, ->L263defensive — Trunk-row entry bow (#1315). Loop-exhausted fall-through (both sides fail the clearance check): every corpus bow clears on its first (roomier) side, so the exit past the loop that returns a plain straight run is defensive.
261if _bow_clears_markers(points, section_stations):->L251, ->L262defensive — Trunk-row entry bow (#1315). Retry arm (the roomier side’s bow rakes a marker, so the other side is tried): _bow_side_order puts the side with the farthest off-trunk marker first, and the fixed bump height clears it, so no corpus fixture falls to the second side; defensive.
281for st in section_stations:->L282, ->L295defensive — Trunk-row entry bow (#1315). Exercised by tests/fixtures/regressions/entry_trunk_row_bow.mmd, which is kept out of the validate=True corpus and the gate-coverage corpus (it exercises the always-on render path only), so no clean corpus fixture takes this arm. The render-path invariant test test_entry_trunk_row_bow_clears_non_consumer covers the drawn detour.
282if st.id in blocker_ids:->L283, ->L284defensive — Trunk-row entry bow (#1315). Exercised by tests/fixtures/regressions/entry_trunk_row_bow.mmd, which is kept out of the validate=True corpus and the gate-coverage corpus (it exercises the always-on render path only), so no clean corpus fixture takes this arm. The render-path invariant test test_entry_trunk_row_bow_clears_non_consumer covers the drawn detour.
284if not (->L289, ->L290defensive — Trunk-row entry bow (#1315). Exercised by tests/fixtures/regressions/entry_trunk_row_bow.mmd, which is kept out of the validate=True corpus and the gate-coverage corpus (it exercises the always-on render path only), so no clean corpus fixture takes this arm. The render-path invariant test test_entry_trunk_row_bow_clears_non_consumer covers the drawn detour.
291if dy < -COORD_TOLERANCE_FINE:->L292, ->L293defensive — Trunk-row entry bow (#1315). Exercised by tests/fixtures/regressions/entry_trunk_row_bow.mmd, which is kept out of the validate=True corpus and the gate-coverage corpus (it exercises the always-on render path only), so no clean corpus fixture takes this arm. The render-path invariant test test_entry_trunk_row_bow_clears_non_consumer covers the drawn detour.
293elif dy > COORD_TOLERANCE_FINE:->L281, ->L294
311if not (tgt.x - src.x <= 0 and abs(dy) > CROSS_ROW_THRESHOLD and not same_section):->L313defensive — _route_fold_edge: the not-same_section precondition is never satisfied at the intra-section handlers, so the fold (False) arm is never taken: cross-section edges are consumed by _route_inter_section upstream (0/391 corpus fixtures reach this branch with differing sections), and a sectionless flat graph’s serpentine fold is routed before this handler too (verified: a flat fold over the threshold does not reach the arm). The cross-row fold branch is shadowed. Reclassified candidate-dead -> defensive (#762): corpus instrumentation across 128 fixtures confirms the un-exercised arm is never taken.
478if abs(tgt.x - src.x) >= COORD_TOLERANCE:->L480defensive — _route_near_zero_gap_straight: a same-section, non-TB intra edge with |tgt.x - src.x| < COORD_TOLERANCE (1px) and non-zero dy is not constructible, so the straight-return (False) arm is never taken: layering assigns increasing X along edges so the minimum |dx| at _route_intra_section across the corpus is 50px (port spacing / off-track output lead). TB same-track edges that could reach |dx|=0 are intercepted by _route_tb_internal before this handler. Reclassified candidate-dead -> defensive (#762): corpus instrumentation across 128 fixtures confirms the un-exercised arm is never taken.
549if not (same_sec or is_exit_port):->L550defensive — _is_side_branch_ascent reaches this classification (44/391 corpus fixtures) but no fixture takes the reject arm: a target sitting within offset_step*2 of the source section’s trunk Y is always a same-section internal station or that section’s exit port. The arm needs a target at the source’s trunk Y that belongs to a different section or is a non-exit port, which the trunk-alignment geometry does not produce. Reclassified candidate-dead -> defensive (#762): corpus instrumentation across 128 fixtures confirms the un-exercised arm is never taken.
584if not preds or not succs:->L585defensive — A bypass V exists to carry lines from one station to another, so by the time _bypass_v_is_one_way_step runs (only for a bypass endpoint of a routed edge) the V always has at least one predecessor and one successor edge. The empty-list return-False arm guards a malformed graph rather than a topology, so it stays un-exercised.
660if sibling is None:->L661defensive — Lookup guard on ctx.fork_targets ids, which are collected from graph edges and therefore always resolve in graph.stations; a missing sibling is only possible for a hand-built context whose fork map names stations the graph does not carry.
705if tgt.is_terminus and edge.target in ctx.join_stations:->L706

122/184 gates fully exercised.

Gates with an un-exercised arm:

LineGateUn-exercised arm(s)Triage
256if run_direction is None or turn_direction is None:->L257
258if (run_direction in {Direction.R, Direction.L}) == (->L261
395if not section_ids:->L396
511if ctx.exit_turns is None or not pending_plan_ids:->L512
677if source is None or source is route:->L679
706if route is None:->L707
742if edge is None or family_id is None:->L743
977if route.exit_lane_transition_plan_id is not None:->L978
979if route.fan_plan_id is not None or route.fan_route_emitter is not None:->L980
981if convergence_owns_segment_boundary(route, segment_rank):->L982
1041if bounds.band is not None and not bounds.band.lo <= candidate <= bounds.band.hi:->L1042needs-review — _candidate_clears_runway’s band rejection, unreachable while if band is not None:::#1 never populates a band on this path. Reachable.
1181if abs(channel.x - target) <= COORD_TOLERANCE:->L1183needs-review — _align_same_line_channels’ re-seat arm. Its one fixture (genomeassembly_organellar) still reaches the gate but now finds the channel already on its carrier’s claim coordinate, so the reseat is skipped. Bisecting the range shows 0f58d60c — ranking member channels over a gap’s whole population — is what makes the claim and the channel coincide on arrival, not the bundle-pitch packing. Reachable; the frozen render corpus means no fixture was authored.
1206if coordinate is not None:->L1161, ->L1207
1278if overlap <= MIN_CORRIDOR_Y_OVERLAP:->L1279
1372if item.candidate.route.line_id in claim.line_ids and (->L1375needs-review — feasible()‘s same-line-carrier clause, which forbids a candidate delta that would split a carrier the bundle already shares with a claim. No fixture reaches the feasibility search with a same-line source-compatible claim in range: _align_same_line_channels seats such a member on its claim before the bundle allocation runs. Reachable, wants a fixture.
1375if abs(coordinate - claim.coordinate) > COORD_TOLERANCE:->L1376, ->L1377needs-review — The rejection inside feasible()‘s same-line-carrier clause. Unreached for the same reason as its enclosing gate if item.candidate.route.line_id in claim.line_ids and (:::#1. Reachable.
1517if radii is not None:->L1522
1518if 0 <= rank - 1 < len(radii):->L1520
1520if rank < len(radii):->L1522
1566elif abs(start[0] - end[0]) <= COORD_TOLERANCE:->L1556
1634if movable_run:->L1635
1653if boundary < 1:->L1654defensive — The short-overlap target sits below at least one grid row, so its upper row boundary is positive. A row-zero target has no upper boundary to enlarge and is defensively declined.
1660if not negative:->L1661defensive — A positive target boundary always has at least one section in the row above in a valid packed grid. The empty-negative-side arm protects sparse or externally mutated section grids.
1728if not route.is_inter_section or len(route.points) < 2:->L1729defensive — Source turnouts are defined only for drawable inter-section members. Intra-section and degenerate paths cannot cross a hidden section fork and are intentionally ignored.
1773if horizontal_siblings and not continuing:->L1774defensive — A same-line horizontal sibling at a hidden fork must continue in the incoming direction. The opposite-tangent arm is rejected and covered by the focused lifecycle-safety test.
1848if any(not _points_coincide(centre, centres[0]) for centre in centres[1:]):->L1849defensive — Concentric radii are derived from the same peer projection, which algebraically gives one centre. The mismatch arm guards future candidate families that violate that construction.
1851if any(->L1857defensive — A continuing source trunk is accepted only when its first runway can hold the largest concentric turnout. Resolver spacing guarantees this; the short-runway rejection is covered by focused turnout tests.
1858if any(->L1863defensive — Incoming and vertical source runways must each hold their assigned turnout radius. Production eligibility satisfies this; focused tests exercise rejection of a shortened incoming member.
1925if len(system_ids) != 1:->L1926defensive — A complete same-destination bundle is resolved through one canonical route system. Mixed-system entries cannot be settled atomically and are defensively skipped.
1932if ctx.exit_turns is not None:->L1948defensive — Production planning installs exit-turn execution before member settlement. The null arm supports isolated helper construction and cannot own replannable turns.
1935if membership is None or membership.axis is None:->L1937needs-review — Routes without exit-turn membership or an owned axis are supported cohort members: they remain geometrically movable while declining exit-turn replanning. The corpus does not yet carry that ownership mix. Reachable; wants a minimal fixture.
1939assignment is not None->L1933, ->L1940defensive — Operand arm of the replannable-membership contract: production exit-turn memberships carry assignments; missing assignments are malformed plan state exercised by contract tests.
1940and membership.axis.claimant_member_ids == (membership.member_id,)->L1933, ->L1941defensive — Only a singly claimed axis may be replanned independently during same-destination settlement. Shared-axis plans are excluded to preserve their other claimants.
1941and membership.member_id in cohort_member_ids->L1933, ->L1942defensive — Membership is queried from an edge already resolved into the cohort, so its member id belongs to that cohort. The guard rejects an inconsistent scaffold/query pair.
1942and assignment.run_direction in {Direction.R, Direction.L}->L1933, ->L1943defensive — A replannable same-destination peel-off is sourced from a horizontal trunk assignment. Non-horizontal run directions belong to other exit-turn families and are defensively excluded.
1943and assignment.turn_direction in {Direction.U, Direction.D}->L1933, ->L1944defensive — The settlement cohort has a vertical destination riser, so its owned exit turn is perpendicular. A horizontal turn direction is incompatible plan metadata and is defensively excluded.
1944and route.exit_turn_segment_rank == len(route.points) - 3->L1933, ->L1946defensive — A plannable destination peel-off owns the penultimate turn. Other segment ranks identify a different turn family and cannot be rewritten by this settlement.
1959if proposals is None:->L1960needs-review — A valid short same-destination cohort can be blocked by another route or reserved channel, causing proposal feasibility to reject the cohort atomically. The current corpus has no blocker-shaped witness. Reachable; wants a minimal fixture whose unchanged render is visually reviewed.
1981if membership is None or membership.assignment is None:->L1983needs-review — A route without exit-turn membership is supported: it can participate in a feasible same-destination cohort while declining the optional settled-turn ownership refresh. A membership with no assignment is malformed, but the collapsed gate also covers the valid no-membership case. Reachable; wants a minimal fixture.
1987if allow_clearance_requirements or shortfall > COORD_TOLERANCE:->L1988defensive — The apply pass runs only after the measured shortfall has been granted and removed. Seeing an outstanding shortfall while requirements are disabled would mean boundary settlement failed to move the target.
1995membership is not None->L1996needs-review — Routes without exit-turn membership are a supported outcome of optional ownership refresh: proposal geometry is accepted without publishing settled-turn metadata. The render corpus currently exercises only owned members here. Reachable; wants a minimal fixture.
1996and membership.assignment is not None->L1997, ->L2002defensive — A recorded exit-turn membership used for settlement carries its frozen assignment by construction. Missing assignment metadata is an incomplete ownership record, covered by member-plan contract tests.
1997and route.points[rank][0] != proposal.points[rank][0]->L1999, ->L2002needs-review — Equal-X proposals are a supported no-rewrite outcome: the route accepts its proposal geometry without refreshing settled-turn metadata. Focused unit tests exercise it, but the render corpus has no authored topology for this valid arm. Reachable; wants a minimal fixture.
2054if context is not None:->L2056defensive — _convergence_context_route returns None only when ctx.edge_by_key has no entry for the key, and edge_by_key is built from every graph.edge while the key comes from scaffold.edge_order, which is derived from the same edges. Same never-taken lookup as the sibling if edge is None guard on the non-convergence path (0 of 141 fixtures).
2057if key in ctx.skip_edges:->L2058candidate-dead — Subsumed by the convergence-edge check two lines above. Instrumenting all 348 fixtures: ctx.skip_edges holds exactly one merge-junction->entry-port hop, it is always present in scaffold.edge_order, and it is always also a convergence member edge, so the loop continues at the convergence arm and never tests skip_edges (0 of 141 fixtures). Proposed simplification: drop the two lines. Not applied here — deletion is a deliberate separate pass, and a skip hop that is not convergence-owned is not ruled out by contract.
2060if edge is None:->L2061
2064if family_id is None:->L2065
2087if system_id not in failures:->L2091
2308if resolved not in execution._semantic_corner_templates:->L2309defensive — Every emitted route is resolved from the same member execution that owns its semantic template. Missing lookup is an observer/emission mismatch guarded by member-plan tests.
2314if edge is None or family_id is None:->L2315defensive — Semantic-corner templates are applied only to emitted routes registered in both the edge and family indexes. Missing either index entry is an incomplete observer contract.
2399or route.curve_radii is None->L2403defensive — Every materialized exit-turn plan reaching corner-cohort settlement carries its frozen radius tuple. A missing tuple denotes incomplete direct or corrupted plan state; the guard prevents the optional metadata from being indexed.
2401or route.curve_radii[rank] >= curve_radius - COORD_TOLERANCE_FINE->L2404needs-review — _restore_clear_planned_landing_radii only has work for a member whose landing corner was sized below the standard curve radius. Instrumenting the pass across the whole corpus: 2294 multi-line exit-turn members reach this operand and every one already carries the full radius at its exit_turn_segment_rank (a further 5880 short-circuit on the rank/radii operands ahead of it), so the operand always short-circuits to continue. The arm wants a settled multi-line exit-turn plan in which a clearance-limited concentric sizing shrank one member’s landing corner. Per the triage doc’s correction-pass rule this is a missing witness, not a guard a valid graph cannot violate.
2406if (->L2410, ->L2411needs-review — Runway re-check inside _restore_clear_planned_landing_radii: the restore is declined when resolve_curve_radius_at says the member’s points cannot carry the full radius after all. Both arms are un-exercised because control never reaches the statement — the radius operand two lines above always short-circuits, as its own entry records with the 2294-member measurement. Either arm needs the same missing shape: a shrunken landing corner on a settled multi-line exit turn.
2456if tuple(route.route_system_owned_segment_ranks) != plan.owned_segment_ranks:->L2457
2462if actual != (channel.start, channel.end):->L2463
2479if radius_index >= len(radii):->L2480defensive — Every radius flanking a frozen plan-owned channel must survive emission. Production materialises the plan’s complete radius tuple; test_member_geometry_validator_attributes_missing_flanking_radius exercises the attributed failure.
2486if offsets is None or bases is None or offset is None or base is None:->L2487
2491if radius_index + 2 >= len(route.points):->L2492defensive — A frozen member corner with a published radius must retain all three defining points. Production plans emit complete paths; test_member_geometry_validator_attributes_missing_corner_points exercises the attributed failure for malformed emitted geometry.
2507if abs(actual_radius - expected_radius) > COORD_TOLERANCE_FINE:->L2508defensive — Final member-plan validation aborts when a plan-owned channel corner disagrees with its recorded concentric inputs. Valid production geometry derives that radius from the same inputs; both failure flanks are exercised by test_member_geometry_validator_rejects_changed_flanking_radius.
2522if radius_index >= len(radii):->L2523defensive — Post-emission assertion in validate_member_geometry_emission: an owned corner index present in plan.curve_radii is missing from the emitted route’s list. fresh_member_route copies plan.curve_radii element for element, or leaves both None, and no later pass shortens a route’s radius list, so the two lists have equal length whenever the plan has radii at all. The raise is a construction-bug guard rather than a topology outcome.
2527if abs(radii[radius_index] - planned_radius) > COORD_TOLERANCE_FINE:->L2528defensive — The same validator’s radius-value flank: an owned corner, one of whose adjacent segment ranks is in plan.owned_segment_ranks, whose emitted radius differs from the planned one. Route-system-owned segment boundaries are exactly what the normalize and settlement passes are barred from re-sizing (route_system_owns_segment_boundary gates every one of them), so an owned corner reaches emission carrying the radius planning gave it. The raise fires only if a pass mutates owned geometry.
2548if actual_offset != expected_offset or actual_base != expected_base:->L2549defensive — The same validator’s concentric-inputs flank: the offset/base pair recorded for an owned corner’s two segment ranks must still match the plan’s. fresh_member_route copies both maps wholesale and only record_concentric_corner rewrites them, which the same ownership bar keeps off owned boundaries. Distinct from the radius-value raise above in that a pass could in principle re-record the inputs and still land on the planned radius; both are construction-bug guards.

410/543 gates fully exercised.

Gates with an un-exercised arm:

LineGateUn-exercised arm(s)Triage
227if mid - half < gap_left - COORD_TOLERANCE:->L228
229if mid + half > gap_right + COORD_TOLERANCE:->L230
409if abs(overlap) > COORD_TOLERANCE:->L410defensive — The symmetric-divergence recognizer rejects opposite vertical legs whose spans overlap instead of meeting at one endpoint. Corpus candidates reaching this helper are same-source branch openings and therefore meet at the shared turn Y; the overlapping arm is a defensive rejection for malformed or independently routed channels.
415if channel.idx == 0:->L416defensive — A declared gap channel participating in a same-source divergence follows the branch’s horizontal opening and therefore cannot be the route’s first segment. The zero-index arm defensively rejects a vertical-first route shape.
420if abs(turn[1] - start[1]) > COORD_TOLERANCE or abs(dx) <= COORD_TOLERANCE:->L421defensive — The opening segment before a declared same-source divergence channel is a non-degenerate horizontal run by construction. The non-horizontal or zero-length arm defensively rejects a route shape that cannot provide a shared trunk endpoint.
426if a_trunk is None or b_trunk is None:->L427defensive — A symmetric divergence is considered only for declared gap channels produced by a same-source branch opening. Those channels follow a horizontal opening run, so both opening trunks resolve; the missing-trunk arm defensively rejects a different route shape.
472if any(abs(base - bases[0]) > COORD_TOLERANCE for base in bases[1:]):->L473
501if not chans:->L502
531if clearance <= 0:->L532
547if any(->L552
749if gap_right <= gap_left:->L750
791if ctx.exit_turns is None:->L792
809if route.curve_radii is None or membership is None:->L810defensive — A validation-eligible settled exit-turn route is emitted from its member plan with explicit radii and membership in the same exit-turn execution. Missing either reports incomplete engine ownership; both arms are exercised by test_gap_plan_radius_validator_rejects_incomplete_ownership.
814if planned_offsets is None:->L815
820if allocated_offsets is None or allocated_bases is None:->L821defensive — A validation-eligible settled exit turn must publish both offset and base tuples before emission. Missing either is an engine-contract violation exercised by test_gap_plan_radius_validator_rejects_incomplete_ownership.
837dx is None->L842
838or base_radius is None->L842
839or not 0 <= radius_index < len(route.curve_radii)->L842
840or radius_index + 2 >= len(route.points)->L842
850if (->L854defensive — The settled exit-turn radius mismatch raises only after construction or a later pass changes a recorded planned corner without updating its concentric inputs. Valid production derives both values together; test_gap_plan_validator_rejects_a_changed_corner_radius exercises both failure flanks.
885if gap_right <= gap_left:->L886
1004if not fits(ceiling):->L1005
1005if not fits(floor):->L1006, ->L1007
1008for _ in range(iterations):->L1009, ->L1011
1129if (->L1139
1155if reference is None:->L1156
1220go is not None->L1226
1221and gt is not None->L1226
1258if len(pts) < 2:->L1259
1274if abs(y2 - y1) > COORD_TOLERANCE or abs(x2 - x1) <= COORD_TOLERANCE:->L1275
1351if slot is None or trunk is None or trunk[0] != k:->L1352needs-review — _reconcile_moved_trunk_slot’s precondition guard: the re-banded leg is not the route’s first interior horizontal run, or the route declared no trunk slot. The docstring states this as a real filter (‘only the trunk the slot describes can retarget it’), and _bundle_divergent_distinct_traverses hands it every distinct-line traverse leg, so a non-trunk leg or a slotless route reaches it; all 3 corpus fixtures happen to pass. Reachable; wants a fixture.
1362if any(abs(channel.x - ref_x) > COORD_TOLERANCE for channel in planned[1:]):->L1363
1363if ctx.validate_final_route_frames:->L1364, ->L1365
1409if channel is None:->L1410
1482if planned and max(planned) - min(planned) > COORD_TOLERANCE:->L1483
1488if ref is not None:->L1489
1555for group in _merge_feeder_groups(routes, ctx):->L1556
1559if movable_channels:->L1555, ->L1560
1597if not downs or not ups:->L1599
1600for descent in downs:->L-1566, ->L1601
1602if col in moved:->L1603, ->L1604
1605for up in ups:->L1606, ->L1615
1606if up.route.line_id != descent.route.line_id:->L1607, ->L1608defensive — _clear_merge_trunk_opposite_arm skips an up-arm carrying a different line from the down-trunk, since only a same-line opposite arm folds the line back over itself. The corpus’s one fork sends a single line both ways, so the different-line skip arm stays un-exercised. Defensive against a fork whose opposite arms carry distinct lines.
1608if abs(up.x - descent.x) > radius:->L1609, ->L1610
1611if overlap <= COORD_TOLERANCE:->L1612, ->L1613defensive — _clear_merge_trunk_opposite_arm skips an opposite arm within a curve radius of the down-trunk but not overlapping it in Y, since without a shared Y span there is no fold-back to clear. The corpus’s qualifying fork overlaps in Y, so the no-overlap skip arm stays un-exercised. Defensive against a near-column opposite arm that clears the trunk vertically.
1615if target_x is None:->L1616, ->L1617
1618for ch in downs:->L1600, ->L1619
1619if abs(ch.x - descent.x) <= COORD_TOLERANCE:->L1618, ->L1620defensive — _clear_merge_trunk_opposite_arm moves every down-leg sharing the folding descent’s column and skips those on other columns. The corpus’s one folding descent carries all its down-legs on a single shared column, so the other-column skip arm stays un-exercised. Defensive against a fork with down-legs spread over several columns.
1639if k == desc.idx + 1:->L1638defensive — In _fanout_traverse_leg: the corpus fan-out routes carry the traverse as their only interior horizontal trunk, so the loop matches on the first trunk and the non-match arm is never taken. Defensive.
1788if lower > upper + COORD_TOLERANCE_FINE:->L1789
1799if anchored and abs(target - reference) > COORD_TOLERANCE_FINE:->L1800defensive — In _coincide_same_line_fanout_traverses: a fan-owned traverse is snapped onto its convergence-plan-owned sibling’s band, but the movable member’s own reserved claim band may forbid that Y. The corpus fan-owned traverses carry no claim band that conflicts with the anchor, so the target always lands on the reference and the skip arm is never taken. Defensive against a movable member whose reservation excludes the anchor’s band.
1807if any(->L1817
1837abs(p0[1] - p1[1]) > COORD_TOLERANCE->L1841
1838or abs(p1[0] - p2[0]) > COORD_TOLERANCE->L1841
1839or abs(p2[1] - p3[1]) > COORD_TOLERANCE->L1841
1858if source_col is None:->L1859
1874if route_system_owns_segment_boundary(route, opening.idx):->L1875
1889if not sibling_xs:->L1890
1892if new_x <= max(sibling_xs) + ctx.curve_radius + COORD_TOLERANCE:->L1893
1895if _section_intrudes(->L1902
1939if len(turns) != 1:->L1940defensive — In _bundle_divergent_distinct_traverses: every fan in the corpus turns its traverses the same way, so the mixed-direction skip is never taken. Defensive.
1965if any(->L1969
2034for _ in range(len(buckets) + 1):->L2119defensive — Bounded fixpoint repair for coincident corner radii. The budget is one sweep per bucket plus one, and the pass asserts it always leaves through the early break, so exhausting the range is unreachable by construction. 347 fixtures enter the body; multi-bucket propagation is exercised directly by test_unify_refreshes_a_shared_route_after_changing_one_corner.
2083if not reference_fits(lower):->L2084defensive — The lower bound is constructed from each member’s minimum resolvable concentric radius, so at least that bound fits valid route geometry. Failure denotes contradictory synthetic corner inputs.
2211if not is_side_entry_port(ctx.graph, port_id):->L2212needs-review — A peel-off tail whose merge-resolved terminal port is not a LEFT/RIGHT entry is skipped in _align_merge_fed_confluence_to_band. Every corpus peel-off tail resolves to a side entry port, so the reject arm has no fixture; it needs a tail whose merge chain ends at a top/bottom or exit port.
2236if trunk_ys[-1] - trunk_ys[0] <= COORD_TOLERANCE:->L2237needs-review — Equal-depth guard on a merge-fed confluence: every corpus confluence rides its shared band at distinct depths, so the same-Y reject arm has no fixture.
2238if not trunk_depths_contiguous(trunk_ys, n, step):->L2239needs-review — Non-contiguous-depth guard on a merge-fed confluence: corpus confluences seat their bands one offset step apart, so the gapped-depth reject arm has no fixture.
2262if len(deltas) != 1:->L2263needs-review — Anchor-disagreement guard: every corpus merge-fed confluence carries a single plan-owned anchor, so the arm where two anchors imply different rigid ladder offsets has no fixture.
2280if _descent_crosses_section(ctx.graph, ch, slot.peel_x):->L2281needs-review — Feasibility guard: re-seating the free descent outboard of the anchors clears every section in the corpus, so the section-intrusion reject arm has no fixture.
2285if blocked or settled:->L2286needs-review — A merge-fed confluence is re-seated only when a free leg is off its band-earned slot and unblocked. The move arm (rather than this skip) is reachable and is reached by test_merge_confluence_band_order_1835’s inlined riboseq annotation/riboseq bundle into orf_calling, where _restack_channel fires and resolves the crossing. That map is excluded from the corpus fixture roots because it trips an unrelated symmetric-diamond centreline abort under validate=True (#1836), so no corpus fixture exercises this arm yet; committing that map as a real topology fixture is blocked on #1836.
2362if opposing_bundle is not None and {->L2365defensive — iter_opposing_entry_confluences requires the complete direct-port line set, while by_port can only add a member through convergence-junction aliasing. Resolved convergence junctions replace the direct approach rather than coexist with a complete direct-port bundle, so unequal ownership sets require an inconsistent route/context pair. test_opposing_group_with_an_extra_mapped_approach_uses_generic_ownership exercises the defensive fallback.
2372if any(->L2381
2499if tail is None:->L2500
2503if n < 2:->L2504
2509if len(signs) != 1:->L2510
2514if trunk_ys[-1] - trunk_ys[0] <= COORD_TOLERANCE:->L2515
2524if tail_overlap(tail_by_line) < 2 * curve_radius - COORD_TOLERANCE:->L2525
2527if x_follows_trunk_direction(vertical_sign, trunk_sign) == (->L2531
2555if any(->L2560
2599if has_planned_channel and any(->L2604
2689if abs(delta) <= COORD_TOLERANCE:->L2690defensive — _snap_merge_feeder_group skips a merge feeder whose opening descent already sits on the trunk’s shared column (no shift needed). The corpus’s merge feeders all reach the trunk from a distinct column, so the already-coincident skip arm stays un-exercised. Defensive and idempotent across the routing replays a render performs.
2816if rp.curve_radii is None:->L2817defensive — curve_radii is always a concrete list for inter-section routes (every inter-section handler sets it); the None arm in _reseat_concentric_flanking is a belt-and-suspenders guard.
3028if route.curve_radii is None:->L3029defensive — Fan-opening channels are selected from a real horizontal-to-vertical turn, and production turn builders attach radius metadata to that shape. The None arm protects a synthetic or incomplete RoutedPath.
3135if port is not None and port.is_entry:->L3137
3205if (->L3212candidate-dead — Fan-descent re-seating declines when any member’s channel boundary is route-system-owned and the group is not already on adjacent tracks. Reaching this gate with an owned channel means the gate above it let the group through on settle_frozen_arcs and tight, since a route-system boundary is one of the ways _planner_owns_channel answers true, so tight is already true here and this arm’s not tight cannot hold. Instrumented across the whole corpus under four option settings: 122,516 evaluations of the gate, zero fires, and still zero when the condition is widened to _planner_owns_channel itself. No construction reaches the arm.
3225if any(->L3230
3375if not verticals:->L3376defensive — Shape guard in _land_feeder_on_run: a merge branch feeder is built as a descent into a tail, so it always has a vertical leg. Reachable in principle only if a feeder’s source Y coincides with the trunk channel level, collapsing the descent below COORD_TOLERANCE (#1597).
3380if k + 2 != len(pts) - 1 or y_hi - y_lo < radius:->L3381defensive — Shape guard in _land_feeder_on_run. _route_merge_branch emits exactly four waypoints, while an alternate attached-source construction or a malformed hand-built route can add points; the second half rejects a descent too short to re-form its corner. Neither shape occurs in the corpus (#1597).
3391if rp.curve_radii is not None:->L3393defensive — Truncating the tail in _land_feeder_on_run keeps curve_radii aligned with the shortened waypoint list when metadata is present. Hand-built routes may omit that metadata, so the field cannot be treated as always present (#1597).
3494if discretionary and not _restack_fits_corridor_claims(->L3497needs-review — A discretionary all-exempt trunk reorder is abandoned when no stack top seats the reordered corridors inside the bands their reservations claim. Every shipped corpus channel is reorderable within its claims because _peer_widths charges each boundary for the nested stack drawn in it, so the claim is already sized for the arrangement the plan produces and the refusal arm has no fixture. Reachable in principle: a plan that splits one corridor’s trunks further apart than its own claim is wide asks for a seating no stack top provides. Revisit once a corpus map produces one.
3697elif far_y < t.y - COORD_TOLERANCE:->L3691defensive — Degenerate-leg guard in _trunk_slot_features: a trunk’s flanking legs are genuine vertical legs (far_y differs from the trunk y), so neither the below nor the above classification is skipped; the fall-through arm needs a zero-height leg the layout never produces.
3727if feats is None:->L3728defensive — Unused default-arg branch: all three callers of _band_order_crossings pass feats explicitly, so the feats-is-None compute-it arm is never taken.
3962if len(trunks) < 2:->L3963, ->L3964defensive — Early-return in _suboptimal_trunk_bands, called only from the guard* validator (phases/guards.py) and a unit test, never on the production render path. The coverage sweep renders with validate=False, so neither arm registers. Defensive (exercised via the validate=True guard / test surface; cf. #728 validate-only precedent).
3966for grp in groups:->L3967, ->L3970defensive — _suboptimal_trunk_bands diagnostic loop: validate-only, not reached by the render-path coverage sweep (see the len(trunks)<2 note).
3967if len({id(t.route) for t in grp}) < 2:->L3968, ->L3969defensive — Single-route-group skip in _suboptimal_trunk_bands, validate-only: called from the guard* validator and a unit test, not the production render path the validate=False sweep exercises. Defensive.
4124if band is not None:->L4130defensive — Same-line dogleg: the band-found arm is exercised by dogleg_exempt_sameline; the band-is-None arm is defensive (both colliding trunks route through _center_inter_row_channel, so the trunk Y always resolves to a gap band).
4145if down_ok and up_ok and (cross_down is None) != (cross_up is None):->L4147defensive — Same-line dogleg side selection. The crossing-decided true arm (->1297, pick the side whose riser does not pierce the exempt run) is exercised by dogleg_exempt_sameline. The false fall-through (->1298) needs either an out-of-band side or a crossing-equal tie, neither reachable by a clean topology: the reachable dogleg regime rigidly fixes the inter-row band so down_room/up_room stay >= min_sep=6 (observed 14/26 across the corpus and every constructed variant; perturbing the grid loses the regime), and the only realizable tie is both-cross (a crossing-free tie needs degenerate zero-length exempt risers) which co-occurs with section-crossing / dogleg-crosses-exempt guard failures and is never a shippable render.
4147elif down_ok and (not up_ok or prefer_down):->L4148, ->L4149defensive — Same-line dogleg tie / out-of-band fallback, reached only after the L1296 if is false, which a clean topology never produces (see that gate): the true arm (->1299, lean down on a tie) needs a crossing-free tie that requires degenerate risers, and the false arm (->1300) needs down_ok False, which the regime’s fixed inter-row band (down_room >= min_sep) never yields.
4149elif up_ok:->L4150, ->L4152defensive — Same-line dogleg move-up / give-up fallback, reached only when both L1296 and L1298 are false. The true arm (->1301, move up because the lower gap is too tight) needs down_ok False and the else arm (->1303, leave fused) needs both rooms below min_sep; the reachable regime’s inter-row band is auto-widened so both rooms stay >= min_sep=6 (observed 14/26), so neither is reached by a valid topology.
4190if below_ok and above_ok and (cross_below is None) != (cross_above is None):->L4192defensive — Distinct-line dogleg side selection. The crossing-decided true arm is exercised by dogleg_exempt_distinct. The false fall-through needs a crossing-equal tie among trunks the pass moves (those closer than their corridor separation); the corpus has none - a crossing-free tie needs degenerate zero-length exempt risers, and the one forced both-cross transit (riboseq_inter_row_corridor) sits at exactly the separation, so the pass leaves it in place rather than reaching this selection.
4192elif below_ok and (not above_ok or prefer_below):->L4193, ->L4194defensive — Distinct-line dogleg tie fallback, reached only after L1341 is false (a tie), which a clean topology never produces (see that gate). The true arm (->1344, lean below) would fire on such a tie; the false arm (->1345) is unreachable because below_ok always holds and prefer_below is always true (t.y == hit.y in this regime).
4194elif above_ok:->L4195, ->L4197defensive — Distinct-line dogleg move-up/skip branch: unreachable because the below branch is always taken (t.y == hit.y, below_ok true); covers both the move-up and the gap-too-tight continue.
4213and span[0] < crossed[1]->L4205
4214and crossed[0] < span[1]->L4216
4338if i in relocated:->L4339defensive — Re-entry skip in the co-travelling separation worklist. A track is re-queued only while it is still un-relocated, so the second copy of a track queued twice before its first pop is the only way to reach the skip; across the corpus every re-queued track is popped before it moves, so the taken arm never fires. Defensive against a crowded stack whose neighbours re-queue one track twice, where taking it twice would break the one-move-per-track bound.
4357if (->L4367needs-review — A secondary lane declines to move when it faces no pinned obstacle but the obstacle it would step around already holds a fixed segment, so stepping cannot separate them. Every corpus crowding either pins its obstacle or leaves the obstacle’s segments free, so the skip has no fixture; it needs a topology where a non-primary lane meets a fixed-segment obstacle.
4411if any(->L4414
4494if cleared is None:->L4495defensive — The residual-cluster fallback gives up on a fused cluster when neither the up nor the down stack of its movable lanes clears every section, claim band and other lane. The corpus’s one residual cluster (riboseq_inter_row_corridor) is stranded against a pinned trunk with room on its open side, so a stack clears and the give-up arm stays un-exercised. Defensive against a cluster boxed on both sides, which has no non-fused seating to reach.
4523if i in relocated:->L4524defensive — Re-entry skip in _tighten_overwide_movable_lanes’ worklist. A lane is re-queued when a tightened neighbour may let it draw in too, but the corpus’s one tightening move is a single lane with no over-wide neighbour to re-queue, so nothing is ever popped after relocating. Defensive against a bundle where one tighten frees a second, mirroring the same guard in the separation loop.
4539if not _lane_move_is_grounded(lane, target, ctx):->L4540defensive — In _tighten_overwide_movable_lanes: the tighter slot is abandoned when it enters a section or overruns a claim band. The corpus’s one tightening move (riboseq_inter_row_corridor’s rnaseq) is grounded, so the not-grounded abandon arm is never taken. Defensive against a bundle whose inner slot is blocked by a section or reservation.
4542if any(moved.fuses_with(other, step) for other in lanes if other is not lane):->L4543defensive — In _tighten_overwide_movable_lanes: the tighter slot one step from a lane’s nearest co-traveller is abandoned when it would fuse with another lane. The corpus’s one tightening move (riboseq_inter_row_corridor’s rnaseq) draws clear, so the would-fuse abandon arm is never taken. Defensive against a slot boxed in by a third lane.
4585if sg[0].sign_x != t.sign_x:->L4586defensive — Both callers of _coincident_trunk_slots pre-filter input to a single traversal direction (band = [t for t in grp if t.sign_x == sign]), so within the function sg[0].sign_x != t.sign_x is always False; the opposing-direction continue is unreachable. Reclassified candidate-dead -> defensive (#762): corpus instrumentation across 128 fixtures confirms the un-exercised arm is never taken.
4616if rp.curve_radii is None:->L4617defensive — curve_radii is always set for inter-section routes; the None arm in _restack_htrunk is a defensive guard.
4628if 0 <= k - 1 < len(rp.curve_radii):->L4630defensive — Bounds guard in _restack_htrunk: trunk index k >= 1 so k-1 >= 0 is always in range; the skip arm is defensive.
4630if k < len(rp.curve_radii) and k + 2 < len(pts):->L-4595defensive — Bounds guard in _restack_htrunk: for a real interior trunk k and k+2 are in range; the skip arm is defensive.
4689if down is None or len(up.points) < 2:->L4690needs-review — Un-exercised on origin/main too; 897747b0 covered it on 13 fixtures and HEAD is back to main’s [0,138] split, so this is a return to main’s behaviour rather than a new gap. Reachable by construction (main’s baseline lists it as an open gap already). No fixture authored — the render corpus is frozen for a measurement against main.
4735if len(targets) != 1:->L4736
4745if col is None:->L4746defensive — Defensive guard in _convergence_line_order: a peel-off riser channel always resolves to a source-section column, so the unresolved-column early return is never taken on the corpus.
4786if not 0 <= far < len(pts):->L4787
4789if abs(dx) > COORD_TOLERANCE:->L4783
4791if not votes:->L4792
4895if ca != cb:->L4897
4897if rep_x[a] != rep_x[b]:->L4898, ->L4899defensive — The routing system assigns distinct x offsets to every line sharing a column gap, so two distinct lines in one gap-bundle corridor never share a representative x; the equal-rep_x tiebreak fall-through in _distinct_line_order is unreachable (exhaustive corpus scan confirms). Reclassified candidate-dead -> defensive (#762): corpus instrumentation across 128 fixtures confirms the un-exercised arm is never taken.
4927if rp.curve_radii is None:->L4928defensive — curve_radii is always set for inter-section routes; the None arm in _restack_channel is a defensive guard.
4930if not 0 <= radius_idx < len(rp.curve_radii):->L4931
4954if abs(ly - pts[1][1]) < COORD_TOLERANCE:->L-4904defensive — A re-stacked gap channel at points-index 1 always has a horizontal lead-in (L-shape and bypass routes open with a horizontal segment); routes opening non-horizontally are normalize_exempt and skipped by the materialization. The non-horizontal-lead return in _restack_channel is unreachable. Reclassified candidate-dead -> defensive (#762): corpus instrumentation across 128 fixtures confirms the un-exercised arm is never taken.
4992if anchor_section_id is not None and anchor_side is not None:->L4994defensive — _gap_channel_base falls back to the column gap when passed a null anchor. All six call sites (in _route_bypass) pass the bypass source/target section id, which is None only when that endpoint has no resolvable section (src_sec_id/tgt_sec_id in _route_bypass); the corpus has no bypass with a sectionless endpoint, so the null-anchor arm is never taken. Defensive guard for a sectionless bypass endpoint.
5047elif right_ok:->L5050candidate-dead — The give-up arm in _clear_channel_x_in_band (neither the left nor the right cleared position lies within the caller’s bound window). Both bounds are only ever supplied together by the cross-row bypass legs in _bypass_geometry (inter_section_handlers.py, the gap1/gap2 calls guarded by if cross_row:); every other caller passes at most one bound, so left_ok/right_ok defaults to True on the unset side and this arm cannot be reached from them. For an interior column pair those two bounds come from column_gap_edges reading the neighbouring sections’ own edges, and _enforce_min_column_gaps/_enforce_min_row_gaps actively widen that same gap whenever a wider bundle needs to cross it, so a blocker large enough to defeat both directions would also have widened the bound that bounds it. The one place the bound is not backed by that widening is the map’s own outermost edge, where column_gap_edges degenerates to a single point (no neighbouring column to widen against) — exactly the riboseq_inter_row_corridor case that used to reach this arm before #1789. off_grid_gap_bundle_midpoint now seats the channel at that same degenerate edge, read from the routed bundle’s own row, so it can no longer land inside the section whose row defines the degenerate bound. It would still fail if a different row of the same off-grid column reached further toward the map edge than the routed row and the scan’s Y-band reached into that other row, but the only two call sites that ever supply dual bounds build a Y-band confined to the routed leg’s own row plus the immediate inter-row gap (verified against riboseq_inter_row_corridor’s own geometry, whose exercising band never reached the neighbouring row), so no swept fixture presents that shape. Two hand-built topologies replicating the off-grid-column, different-row-is-wider shape failed to reach _bypass_geometry’s cross-row dual-bound legs at all — the U-bypass dispatch conditions that select this code path did not fire for either. What would close it is a U-bypass route between two off-grid-column rows where the non-routed sibling row reaches further toward the map edge than the routed row over the exact band the descent scans.
5468if not blockers:->L5469
5671if route.curve_radii is None:->L5672
5685if not members:->L5686
5730if (->L5738
5744if reference is None:->L5745

509/612 gates fully exercised.

Gates with an un-exercised arm:

LineGateUn-exercised arm(s)Triage
155if edge.target in inbound:->L157defensive — inbound is pre-built as {sid: set() for sid in graph.stations}, so every station id in the graph is a key. All edge endpoints are guaranteed to be in graph.stations after parsing (regular nodes via register_station, ports via add_port->add_station, junctions via add_station), so edge.target is always found in inbound and the False branch (54->56) is never taken.
157if edge.source in outbound:->L154defensive — outbound is pre-built from graph.stations keys identically to inbound. All edge sources are registered stations by construction (regular nodes, ports, junctions), so edge.source is always found in outbound and the False branch (56->53) is never taken.
459if ordered != expected:->L460defensive — The raise arm of _assert_sections_anchored_on_trunk, a backstop on the postcondition of _reindex_section_local: an independent section (no flat-frame neighbour) always lands on the contiguous top-anchored levels 0,step,…,(m-1)*step by construction, so the mismatch arm never fires across the corpus. It guards against a future change that stops re-anchoring such a section.
507while cur is not None and cur not in seen:->L516
564if neighbour is None:->L565
585if slot is None:->L586
767if reverse:->L768needs-review — Reachable only on a reconvergence section that is also a serpentine fold, where the fold corner crosses lines mid-curve and the return-row bundle sits one offset too low (#705). Exercise with a clean fixture once #705 is fixed.
798if section is None:->L799
822if not all(lid in feeder_off for lid in continuing):->L823
830if lid in new_off:->L829
852if section is not None:->L850
854if len(set(feeder_row.values())) < 2:->L855
874if entry_port is None:->L875
917if seam is None:->L918
939if not all(lid in feeder_off for lid in primary_lines):->L940
988if new_order is None:->L991
1100if swap_line is None:->L1101defensive — The desired peel order is a permutation of the offsets already assigned to the complete fan-out exit bundle, so each displaced line’s target offset is held by another line. A missing swap partner requires an incomplete or duplicate offset map; recompacted_fanout_exit exercises the successful swap body.
1140if cur in seen:->L1141needs-review — In the exit-only-line reorder / same-Y offset propagation; reachable only via a multi-line LR/RL section with a perpendicular (TOP/BOTTOM) exit port, which the engine lays out as a station-as-elbow + collinear overlay PhaseInvariantError (#706). Exercise with a clean fixture once #706 is fixed.
1150if not src.is_port and src.section_id == sec_id:->L1143
1236if not target_id:->L1237defensive — An exit-only line at station sid is identified by being present in station_lines(sid) but absent from ctx.inbound[sid]. station_lines() returns lines appearing in any edge whose source or target is sid. For a line to be exit-only at sid, it must appear in at least one outbound edge from sid; otherwise it would not appear in station_lines(sid) at all. If an outbound edge exists, outbound_target[(sid, lid)] is always set, so target_id is never None when execution reaches L422. Reclassified candidate-dead -> defensive (#762): corpus instrumentation across 128 fixtures confirms the un-exercised arm is never taken.
1239if not target_st:->L1240defensive — After parse and layout, every edge target ID in a MetroGraph maps to a station in graph.stations. The guard protects against a structurally malformed graph where an edge references a nonexistent station ID, which cannot occur with valid .mmd input processed through the parser and _resolve_sections().
1257if swap_lid is None:->L1258defensive — In _reorder_one_exit_line, swap_lid is None only if the loop over lines exhausts without a match, but desired_off (min or max of all_offs) is always held by another line, so the early-return guard never fires (0/128). Defensive. Reclassified defensive (#762).
1314if abs(nbr_cur - new_off) < _OFFSET_EQ_TOLERANCE:->L1315needs-review — In the exit-only-line reorder / same-Y offset propagation; reachable only via a multi-line LR/RL section with a perpendicular (TOP/BOTTOM) exit port, which the engine lays out as a station-as-elbow + collinear overlay PhaseInvariantError (#706). Exercise with a clean fixture once #706 is fixed.
1336if max_steps <= 0:->L1337defensive — max_steps = len(graph.stations) * len(graph.lines). Each BFS iteration dequeues one (station, line) pair and marks it visited; visited pairs are skipped on re-encounter. The number of distinct (station, line) pairs is bounded by |stations| * |lines|, so the BFS can perform at most that many productive steps before the queue empties. The while queue and max_steps > 0 condition therefore always exits via the queue-empty branch; max_steps reaches zero only if more productive steps occur than unique pairs, which is impossible in a finite graph.
1364if lid not in seen:->L1361defensive — The iterator at L554 is sorted(set(sec_entry_lines), ...). The outer set() deduplicates the list before iteration, so each lid appears exactly once and seen never contains it when processed. The false arm (lid already in seen) is logically unreachable — the dedup happens at set construction, making the seen guard dead code. Reclassified candidate-dead -> defensive (#762): corpus instrumentation across 128 fixtures confirms the un-exercised arm is never taken.
1491for _ in range(len(graph.stations) + 1):->L1508
1495if edge is None:->L1496
1498if nxt in seen:->L1499
1582if not src_st.is_port:->L1580
1586if internal_offs:->L1574defensive — Exit ports are only created when inter-section edges exist: resolve.py _create_port_stations iterates topology.exit_groups, which parser/route_topology.py builds from its exit_members map, populated one entry per resolved inter-section edge. Every TB LEFT/RIGHT exit port therefore has at least one edge from an internal station, so internal_offs is never empty when the loop is entered. The false arm is a defensive guard against an impossible empty-feeder state.
1616if not src_st.is_port:->L1614
1747if anchor_feeders:->L1750
1765if port_off is not None:->L1763defensive — _compute_base_offsets runs before junction propagation and creates an offset for every station-line pair. A divergence exit port and its junction carry the same connector lines, so this lookup always succeeds; the missing-offset arm protects an incomplete synthetic context.
1850if not ctx.bundle_re_slots_whole[(junction_id, exit_port_id)]:->L1851
1863if len(drops) == len(lines):->L1847
1960if port_st is None:->L1961
2035if not src.is_port:->L2036
2192if not src.is_port:->L2193
2219if paired_off is not None:->L2217defensive — _compute_base_offsets sets ctx.offsets[(sid, lid)] for every station-line pair before _propagate_lr_rl_exit_to_entry runs. Exit ports are stations. The for-loop at L791 iterates graph.station_lines(port_id) which equals graph.station_lines(exit_port_id) (enforced by the exit_lines != entry_lines guard at L788). For each lid, ctx.offsets.get((exit_port_id, lid)) is therefore never None. The loop-back arc (793,791) for the paired_off-is-None case is structurally unreachable.
2225if not tgt_st.is_port:->L2223
2277if set(inherited) != set(graph.station_lines(port_id)):->L2278defensive — _inherit_level_convergence_entry_offsets skips a convergence entry port when the lines it inherits from its immediate feeders do not cover every line the port carries. A convergence entry’s lines are, by construction, exactly the union of its inbound edges’ lines, and each inbound edge supplies that line’s feeder offset, so the inherited set always equals the port’s line set and the mismatch arm is never taken. Defensive against a port line with no inbound edge (a malformed graph).
2284if _bundle_reslot_collides(ctx, port_id, port_obj.section_id, inherited):->L2285needs-review — The level-convergence inherit is refused when carrying the feeders’ order along the bundle would seat a bundle line on the slot a section-local line already holds. No fixture in the sweep corpus (examples plus the top-level tests/fixtures) presents that collision; tests/fixtures/hash_seed_determinism/seed_77.mmd does, but the sweep does not descend into the nested seed directories, so closing the arm needs a corpus topology of its own.
2316if entry.side not in (PortSide.LEFT, PortSide.RIGHT):->L2317defensive — In _align_flat_tb_exit_to_entry: scopes the flat-seam exit/entry reconciliation to horizontal (LEFT/RIGHT) entry ports, whose per-line offsets are Y like the TB exit’s. A TOP/BOTTOM entry stores X-offsets, so copying across would be a category error. No corpus fixture routes a TB LEFT/RIGHT exit directly into a TOP/BOTTOM entry at the same Y, so the skip arm is never taken; defensive against that cross-axis seam.
2324if len(shared) < 2:->L2325defensive — In _align_flat_tb_exit_to_entry: scopes the flat-seam reconciliation to multi-line bundles, where a constant per-line offset delta means the lines share an order and only the bundle anchoring differs (the auto-folded serpentine case in #1198). A single shared line carries no bundle order to preserve and is left to the single-line corridor passes; no corpus fixture reaches the pass with fewer than two shared lines, so the skip arm is never taken.
2413if edge.line_id not in lines:->L2414
2470for edge in graph.edges_from(port_id):->L2479
2474if tgt.is_port:->L2475
2479if target_id is None:->L2480
2564if not sec_stations:->L2565defensive — The parser calls _remove_empty_sections() (resolve.py:26) which deletes any section whose station_ids list is empty before port creation. Ports are only added to station_ids during _create_port_stations() (resolve.py:527), which runs AFTER _remove_empty_sections(). Therefore every section in graph.sections at layout time has at least one non-port station; sec_stations is never empty.
2609if station.section_id is not None:->L2601
2618if port.section_id is None:->L2619
2631if section is None:->L2632
2780if tgt_port.side not in (PortSide.LEFT, PortSide.RIGHT):->L2781
2782if tgt_port.section_id in ctx.tb_sections:->L2783
2787if not _stores_reflected(ctx, tgt_port.section_id) and reversed_seam:->L2788
2790if off is not None:->L2776
2810if not any(->L2813defensive — The L920 check returns None when offsets are EXACTLY equal to expected (exact float ==). The L926 check returns None when differences are less than _OFFSET_EQ_TOLERANCE (0.001). Since all offsets are integer multiples of OFFSET_STEP (3.0px), any non-zero difference is exactly 3.0 or more, which is >> 0.001. So L920 catches exact matches and L926 can never catch a case L920 missed; the near-equal window (0,0.001) is unreachable with 3.0px discrete steps.
2828if len(seed_lines) < 2:->L2829
2834if not fixed_here or not movable:->L2835
2853for lid in above:->L2854
2857if not any(->L2860
2949if not changed_lids:->L2950
2968if pending is None:->L2969
3097if max_steps <= 0:->L3098defensive — max_steps = n_sec_stations * len(graph.lines). The BFS visits each (station_id, line_id) pair at most once (the visited set at L1017 prevents revisits). The total distinct pairs is bounded by n_sec_stations * len(graph.lines) = max_steps. Since max_steps decrements by 1 per loop iteration and the loop exits when the queue is empty (naturally after at most max_steps unique visits), the condition max_steps <= 0 is never True; the while-loop guard already prevents the body from executing when the queue is empty.
3111if sec_a is None and id_a in graph.ports:->L3112defensive — The true arm requires sec_a is None AND id_a in graph.ports simultaneously. Junction stations (section_id=None) are added only via graph.add_junction() which calls graph.add_station() but NOT graph.add_port(). graph.add_port() (model.py:483) requires a Port object with a non-None section_id (Port.section_id is typed str, not Optional[str], per model.py:218). Therefore no station with section_id=None can ever be in graph.ports; the conjunction sec_a is None AND id_a in graph.ports is unsatisfiable. Reclassified candidate-dead -> defensive (#762): corpus instrumentation across 128 fixtures confirms the un-exercised arm is never taken.
3113if sec_b is None and id_b in graph.ports:->L3114defensive — Same argument as L1084: id_b in graph.ports requires the station to have been registered via graph.add_port(), which always supplies a non-None section_id for the created station. A station with section_id=None (sec_b is None) is a junction created by add_junction(), which never calls add_port(). The precondition sec_b is None AND id_b in graph.ports is therefore unsatisfiable. Reclassified candidate-dead -> defensive (#762): corpus instrumentation across 128 fixtures confirms the un-exercised arm is never taken.
3176if (tgt_id, lid) not in ctx.offsets:->L3177defensive — The True branch (missing entry-port offset -> ok=False) is unreachable because phase 7 (_compute_entry_port_offsets) runs before this function (phase 7a) and assigns an offset for every (entry_port_id, line_id) pair in the graph. By the time _align_junction_to_entry_port runs, ctx.offsets is populated for all entry ports, so the guard never fires. Reclassified candidate-dead -> defensive (#762): corpus instrumentation across 128 fixtures confirms the un-exercised arm is never taken.
3196if src_port and not src_port.is_entry:->L3203defensive — Reaches the realignment body of _align_junction_to_entry_port only via a TB-reversed two-line bundle fanning into a junction (the #704 boundary fix is in, so this body is now provably reachable). The junction_entry_reversed_fold fixture now ships that topology; with the bundle order carried concentrically through the reversal corners the junction offsets already match their entry ports, so the realignment body short-circuits before its offset-writing arms and they stay un-exercised corpus-wide. Defensive. Its else arm (->1203) is additionally defensive: the sole feeder of a >=2-line fan-out junction is its exit port, a non-entry port.
3199elif feeding_exit != edge.source:->L3200defensive — This arm (single_exit=False due to multiple distinct exit ports feeding one junction) requires one junction to receive edges from two different exit ports. But _rewrite_edges_with_junctions in resolve.py creates exactly one junction per exit port fan-out, wired exclusively from that exit port’s edges. A junction always has a single upstream exit port; the elif is structurally unreachable. Reclassified candidate-dead -> defensive (#762): corpus instrumentation across 128 fixtures confirms the un-exercised arm is never taken.
3208if single_exit and feeding_exit is not None:->L3147defensive — Reaches the realignment body of _align_junction_to_entry_port only via a TB-reversed two-line bundle fanning into a junction (the #704 boundary fix is in, so this body is now provably reachable). The junction_entry_reversed_fold fixture now ships that topology; with the bundle order carried concentrically through the reversal corners the junction offsets already match their entry ports, so the realignment body short-circuits before its offset-writing arms and they stay un-exercised corpus-wide. Defensive. Its False arm (->1147) is additionally defensive: a >=2-line junction reaching this body is always a single-exit-port-fed fan-out junction (merge junctions carry one line and are skipped by len(j_lines)<2).
3210if exit_lines == set(j_lines):->L3147defensive — Reaches the realignment body of _align_junction_to_entry_port only via a TB-reversed two-line bundle fanning into a junction (the #704 boundary fix is in, so this body is now provably reachable). The junction_entry_reversed_fold fixture now ships that topology; with the bundle order carried concentrically through the reversal corners the junction offsets already match their entry ports, so the realignment body short-circuits before its offset-writing arms and they stay un-exercised corpus-wide. Defensive. Its lines-differ arm (->1147) is additionally defensive: a fan-out junction carries exactly its single exit port’s fanned lines, so exit_lines == j_lines always.
3212if abs(exit_st.y - j_st.y) <= _SAME_Y_TOLERANCE:->L3147defensive — Reaches the realignment body of _align_junction_to_entry_port only via a TB-reversed two-line bundle fanning into a junction (the #704 boundary fix is in, so this body is now provably reachable). The junction_entry_reversed_fold fixture now ships that topology; with the bundle order carried concentrically through the reversal corners the junction offsets already match their entry ports, so the realignment body short-circuits before its offset-writing arms and they stay un-exercised corpus-wide. Defensive. Its Y-differs arm (->1147) is additionally defensive: only a BOTTOM-exit junction is offset in Y from its exit, but such a junction sits below the consumer row and never meets the body’s all-entries-within-tolerance precondition.
3454if pred is None:->L3455
3550if target_col is None:->L3551defensive — A registered LEFT entry port always has an owning section with a grid column after placement. The missing-target-column return protects a malformed or partially laid-out graph.
3558if source_col is None:->L3559defensive — _convergence_feeders receives resolved sources feeding a registered LEFT entry port. Each source is a sectioned port or a junction resolvable through one, so the missing-column arm protects an incomplete graph.
3867for _ in range(max_iterations):->L3916defensive — _reconcile_horizontal_offsets iterates at most 10 times and breaks early when no change occurs. The arc L1338->(-1310) represents loop exhaustion without early-break (all 10 iterations consumed). On any valid parsed graph, the reconciliation converges in at most a handful of iterations because each iteration resolves at least one edge conflict or reaches a fixed point. The 10-iteration ceiling is a backstop against hypothetical oscillating graphs; normal topologies stabilize in 1-3 passes.
4065if _offsets_exchanged(->L4062needs-review — Whether the propagated swap really exchanged the pair’s slots at this exit port. Both arms are un-exercised because the guard above always continues today. the exit_lane_settlement_without_crossings variant described on the if was_arriving is None or was_holder is None entry reaches this gate and takes its True arm. The False arm needs an exit port the swap left alone: a section with a second exit port carrying the pair, or a port where the two lines already held equal offsets, neither of which that variant produces.
4095if arriving is None or holding is None:->L4096needs-review — _exchange_pair_at’s own guard, reached only from the continuation walk. the exit_lane_settlement_without_crossings variant described on the if was_arriving is None or was_holder is None entry takes the False arm, both slots present. The True arm needs a station whose line set contains both lines, which the caller has already checked, while ctx.offsets lacks a key for one of them. Base offsets are computed for every station and line the graph carries, so the only candidate is a junction the propagation passes skip, and I could not confirm one exists. Left unsettled rather than called defensive.
4140if target is None:->L4141defensive — Contract guard in the continuation walk: an edge whose target is absent from graph.stations. Measured over the whole corpus, zero edges have either endpoint missing from graph.stations, because the post-parse rewrites materialise every port and junction as a station. The gate’s other arm is un-exercised only because the walk is never entered, and the exit_lane_settlement_without_crossings variant described on the if was_arriving is None or was_holder is None entry takes it; the None arm itself no valid graph can reach.
4144elif target.section_id in seen_sections:->L4145needs-review — Skips a section the walk already took whole. the exit_lane_settlement_without_crossings variant described on the if was_arriving is None or was_holder is None entry takes the else arm (a fresh section) but not the skip: there the pair’s two lines run into two different downstream sections. The skip arm wants a walk with two pair edges landing in one section, for instance both lines of the pair continuing into the same downstream box, or one box reached from two frontier stations.
4155if _exchange_pair_at(ctx, station_id, first, second):->L4149needs-review — Extends the frontier only where the exchange actually applied. the exit_lane_settlement_without_crossings variant described on the if was_arriving is None or was_holder is None entry takes the True arm. The False arm needs _exchange_pair_at to decline, i.e. a station that carries both lines, since the check above passed, yet has no stored offset for one of them. Whether ctx.offsets can be that sparse at such a station is the same open question the if arriving is None or holding is None entry records; I could not settle it either way.
4167if ctx.topology is None:->L4168
4191if key not in ctx.offsets:->L4192
4227if len(hubs) != 1:->L4228defensive — Guard in _is_flat_handover_hub admitting a linear entry frame whose cohort terminates at a hub. Refuses unless exactly one carrier originates the local bundle; a section with two independent origination points hands its trunk over in two places, not one. The one corpus section that reaches the relaxed path (continuation_lane_step’s Results hub) has a single hub, so the multi-hub refusal stays un-exercised. Defensive.
4242if abs(consumer_perp - hub_perp) > COORD_TOLERANCE_FINE:->L4243defensive — Guard in _is_flat_handover_hub: the hub’s originating lines must run flat, so a consumer off the hub’s trunk row (a peel-off, drawing a real turn) is refused. The corpus’s one relaxed section hands over on a level row, so the off-row refusal stays un-exercised. Defensive.
4299if len(set(lanes.values())) != len(lanes):->L4300
4301if _carrier_offset_gap(graph, station_id, lanes, offset_step) is not None:->L4302
4375len(levels) != len(continuing)->L4378
4400if any(line_id not in ctx.line_priority for line_id in present):->L4401defensive — ctx.line_priority is keyed on the declared line set (_build_offset_ctx enumerates graph.lines), while present collects the line ids carried by the section’s stations, which come from edge annotations. The two sets differ only for an edge naming a line no %%metro line: directive declares, and the parser rejects that map, so no parsed source can take the bail. The guard is kept because compute_layout is a public entry point that accepts a MetroGraph built in code: without it the priority_order sort two statements below raises KeyError on exactly this condition.
4456if line_id not in assignments:->L4457
4461and abs(owned - assignments[line_id]) > _OFFSET_EQ_TOLERANCE->L4463
4470if not _frame_carriers_are_conflict_free(->L4473
4495for _iteration in range(len(ctx.graph.sections) + 1):->L4520
4506if line_id not in assignments:->L4507
4513if set(frames).difference(next_frames):->L4514defensive — This fixed-point transaction rollback handles an entry frame accepted in one iteration whose owner disappears in a later iteration. Valid settled graphs converge monotonically; only deliberately transient planner state reaches this arm. test_linear_entry_frame_settlement_restores_offsets_if_owner_disappears exercises the rollback through controlled planner output.
4554if any(->L4558defensive — This post-acceptance marker-cache guard rejects a continuing cohort whose inherited offsets are not one contiguous step sequence. _linear_entry_frame only accepts and materializes contiguous inherited levels, so authored topology cannot reach this reject arm. It protects corrupted or hand-built state.
4560if local_offset is None or not (->L4566defensive — This post-acceptance marker-cache guard requires the sole local line to occupy exactly the adjacent lane above or below the continuing cohort. The accepted frame allocator always creates one such adjacent assignment. The missing or nonadjacent arm protects corrupted or incomplete offset maps.
4585if abs(actual - expected) > _OFFSET_EQ_TOLERANCE:->L4586
4596if gap is not None:->L4597
4651if actual is None or abs(actual - assignment.offset) > _OFFSET_EQ_TOLERANCE:->L4652
4854if dag is not None:->L4862
4858if succ not in affected:->L4857
4867if not offs:->L4868

3/4 gates fully exercised.

Gates with an un-exercised arm:

LineGateUn-exercised arm(s)Triage
56if axis is DemandAxis.Y:->L58

11/14 gates fully exercised.

Gates with an un-exercised arm:

LineGateUn-exercised arm(s)Triage
122if not feeders:->L123defensive — No-feeder guard in _perp_entry_crossing_x: the helper is called only from _route_perp_entry when a multi-line bundle shares the port with a per-line stagger, and a TOP/BOTTOM entry port in that case is always reached by a bundled inter-section feeder (dy!=0, so compute_bundle_info indexes it). The empty-feeders return-None arm is a contract guard, never taken across the corpus.
165if entry_port is None or not entry_port.is_entry:->L166defensive — _aligned_horizontal_drop_entry only fires for a TOP/BOTTOM exit on a horizontal-flow section (the rest of _perp_riser_lateral’s callers are caught earlier). The return-None arm is taken when such an exit feeds a junction or several targets rather than one entry port; corpus instrumentation across every examples/ fixture finds no horizontal-flow perp exit feeding a non-single-entry, so the arm is never taken and the riser falls back to the perp reflection.
172if needs_perp_approach_fan(graph, entry_port.id):->L173defensive — _aligned_horizontal_drop_entry exempts a distinct-line approach fan, whose intra drop fans onto per-line channels (_perp_approach_fan_x) rather than the entry’s single per-line offset. Reaching it needs a horizontal-flow perp exit dropping straight into a single approach-fan entry; corpus instrumentation finds none, so the arm is never taken and the riser keeps the perp reflection.

5/12 gates fully exercised.

Gates with an un-exercised arm:

LineGateUn-exercised arm(s)Triage
93if plan.curve_radii is None or ctx.exit_turns is None:->L94
98if membership is None:->L99
101if corner_offsets is None:->L102
213if scaffold is None:->L214
315if station_offsets is not None:->L318
360if not pending_plan_ids and member_geometry.settled_exit_turns:->L361defensive — Boundary settlement is adopted only after every pending exit-turn plan has resolved. A settled cohort with pending owners would mix planning generations and is defensively withheld.
383if station_offsets is not None:->L384, ->L386defensive — Production observed routing supplies a mutable station-offset map before replaying settled turns. The null arm supports the offsetless observation probe and requires no cache refresh.

96/112 gates fully exercised.

Gates with an un-exercised arm:

LineGateUn-exercised arm(s)Triage
211if abs(dx_diag) <= COORD_TOLERANCE_FINE:->L212defensive — Defensive guard: a near-vertical baked diagonal (dx_diag ~ 0) already separates near-fully along the baked X axis, so it needs no Y spread and the divide-by-dx_diag is skipped. No corpus fixture bakes a near-vertical diagonal, so the guard arm is never taken.
443if not is_fork_join and (->L452defensive — Enters the multi_diag block, which needs a non-fork-join station (<=1 distinct predecessor and successor) carrying both a 4-point diagonal and a 2-point flat incoming route. Raw route shape is a pure function of endpoint coordinates, so all lines on one edge share one shape: n_unique_in and n_unique_flat_in can never both be >=1 for a single-predecessor station, and n_unique_in/out are <=1 when not fork-join. multi_diag is unsatisfiable (0 of 6173 corpus calls). Reclassified candidate-dead -> defensive (#762): corpus instrumentation across 128 fixtures confirms the un-exercised arm is never taken.
493if multi_diag:->L494defensive — multi_diag branch of _flat_connects_to_internal_chain; multi_diag is structurally unsatisfiable (see the _classify_centering_routes gate at the same line text), so the function is only ever called with multi_diag False. Reclassified candidate-dead -> defensive (#762): corpus instrumentation across 128 fixtures confirms the un-exercised arm is never taken.
494if any(_is_chain_predecessor(graph, ctx, r.edge.source) for r in flat_in):->L495, ->L496defensive — Inside the multi_diag block of _flat_connects_to_internal_chain, which is never entered because multi_diag is structurally unsatisfiable. Both arms unreachable. Reclassified candidate-dead -> defensive (#762): corpus instrumentation across 128 fixtures confirms the un-exercised arm is never taken.
496if any(_is_internal_station(graph, r.edge.target) for r in flat_out):->L497, ->L498defensive — Inside the multi_diag block of _flat_connects_to_internal_chain, never entered because multi_diag is structurally unsatisfiable. Both arms unreachable. Reclassified candidate-dead -> defensive (#762): corpus instrumentation across 128 fixtures confirms the un-exercised arm is never taken.
537if abs(v) < COORD_TOLERANCE_FINE:->L538
646if multi_diag:->L647defensive — multi_diag branch selecting the flat-segment X extent in _centering_candidate; multi_diag is structurally unsatisfiable (see the _classify_centering_routes gate). Reclassified candidate-dead -> defensive (#762): corpus instrumentation across 128 fixtures confirms the un-exercised arm is never taken.
659if not multi_diag:->L666defensive — The skip-this-block arm fires only when multi_diag is True, which is structurally unsatisfiable (see the _classify_centering_routes gate). Reclassified candidate-dead -> defensive (#762): corpus instrumentation across 128 fixtures confirms the un-exercised arm is never taken.
669if abs(in_flat) < 1 or abs(out_flat) < 1:->L670
777if abs(other.y - station.y) > 1:->L767defensive — The loop-back arm (skip appending a column companion) fires only when another non-port station in the same section shares the moving station’s x (within 1px) and its y (within 1px) - two near-coincident distinct stations, forbidden by the no-overlap invariant.
820if ox is None:->L821defensive — Null guard in _align_uncentered_siblings. The loop iterates visible non-port stations and original_x is built from every non-port station, so ox is always present; the guard never fires.
847if max(moved_xs) - min(moved_xs) <= 1.0:->L848defensive — Early-exit for the agree case: all movers land within 1px of each other. Unreachable for natural pipelines because the engine always seats one fan branch on the hub’s trunk row, vetoing companion consensus for the whole column, so moved is empty and the outer guard fires first.
853if majority_count <= len(moved) / 2:->L854defensive — The no-clear-majority arm. Movers in a column either converge to one consensus x or sit off it only via hub/exit-port collinearity at a fixed >=20px quantum; the consensus cluster is always the strict majority, so majority_count is never <= half (0 of corpus, no probe topology reproduces a split). Reclassified candidate-dead -> defensive (#762): corpus instrumentation across 128 fixtures confirms the un-exercised arm is never taken.
860if not outliers:->L861defensive — The no-outliers arm in the movers-disagree branch. Disagreement only arises from hub/exit-port collinearity at a >=20px quantum, never sub-pixel, so whenever spread exceeds 1px at least one mover rounds >1px from the majority x. outliers is never empty here. Reclassified candidate-dead -> defensive (#762): corpus instrumentation across 128 fixtures confirms the un-exercised arm is never taken.
869if abs(rp.points[0][0] - old_x) < STATION_MOVE_TOLERANCE:->L868defensive — Per-route anchor guard: only an outgoing route whose start sits at the dragged station’s old x is re-pointed to the new x. The skip arm protects against re-pointing a route not anchored at the station (e.g. an L-shape or bypass leg not snapped by _apply_station_moves); dragged stations in the corpus only carry position-anchored routes, so it never fires.
872if abs(rp.points[-1][0] - old_x) < STATION_MOVE_TOLERANCE:->L871defensive — Per-route anchor guard: only an incoming route whose end sits at the dragged station’s old x is re-pointed to the new x. The skip arm protects against re-pointing a route not anchored at the station; dragged stations in the corpus only carry position-anchored routes, so it never fires.

17/23 gates fully exercised.

Gates with an un-exercised arm:

LineGateUn-exercised arm(s)Triage
56if st is None:->L57defensive — _line_rail_y is only ever called with a real station id (on_rail.id, edge.source/target, or a sibling edge endpoint), all of which exist in graph.stations - the route loop pre-filters None endpoints at the src/tgt guard. The None arm is a contract guard no render-path call reaches.
64if line_id in section_rails:->L67defensive — The whole-graph rail connector routes port-to-port edges through _line_rail_y, exercising the in-rails arm. The fall-through (a port carrying a line absent from its own section’s rail map) cannot occur: a port carries only lines its section’s stations carry, all present in per_line_y. Defensive fallback.
75if line_id in served and len(st.rail_used_ys) == len(served):->L77defensive — Reached only for a non-port spanning station, whose rail_used_ys is station_lines_ordered filtered to the section’s per_line_y - itself built from the same _section_lines_in_order. So a served line is always in per_line_y (lengths match) and _line_rail_y is only called with a line the touching edge carries (always served). The fall-through return st.y is a defensive fallback no render-path call reaches.
131if sib_rails:->L136defensive — _off_track_drop_order is only called for an off-track elbow edge that exists in graph.edges, so the feeder<->consumer set it scans always contains at least that edge; the empty-sib_rails arm (skip the mirror-corner reversal) is a contract guard no render-path call reaches.
259if exit_port.side is not PortSide.RIGHT or entry_port.side is not PortSide.LEFT:->L260defensive — Whole-graph rail mode stacks sections vertically and resolve.py always sides an inter-section edge as a RIGHT exit feeding a LEFT entry, so the early-return arm (an unmodelled side pairing) is a structural fallback no rail topology reaches.
358if conn is not None:->L354defensive — Skips the straight-rail fallback when _route_inter_section_connector handled a port-to-port bundle. The connector returns a route for every whole-graph rail inter-section edge (always a RIGHT exit feeding a LEFT entry), so the None arm (fall through to straight-rail routing) is a structural fallback no rail topology reaches.

14/22 gates fully exercised.

Gates with an un-exercised arm:

LineGateUn-exercised arm(s)Triage
62if self.hi < self.lo - COORD_TOLERANCE:->L63defensive — The invariant the router relies on: a band handed to _center_inter_row_channel or centre_inter_column_channel always holds a channel, so the narrow-gap fallback cannot be reached for a claimed corridor. build_reserved_corridors filters an empty intersection out before constructing a band, so the raise guards direct construction only.
64if self.allocation is not None and not math.isfinite(self.allocation):->L65defensive — Published allocations originate from finite observed route coordinates plus finite reservation translations. A non-finite value can only reach ReservedBand through malformed direct construction; the guard keeps invalid coordinates out of planner seating.
186if band is None or band.hi < band.lo - COORD_TOLERANCE:->L187
203if boundary is None:->L204defensive — Optional-boundary convenience for callers carrying an unresolved grid index (_left_exit_wrap_over_top_y takes tgt_row: int | None). Such a caller returns before it needs a band — with no target row there is no gap above it to measure, so the wrap is rejected first — leaving this arm a type-level accommodation no topology reaches.
308if lower > upper + COORD_TOLERANCE:->L309
411if realised is None:->L412defensive — realise_reservation returns None only for a canvas-side corridor measured without canvas bounds; this loop has already narrowed to row-gap or column-gap claims, which always measure. The arm satisfies the optional return type rather than a reachable state.
544if band is None:->L545defensive — Every record for one edge and segment rank observes the same physical route segment. Disjoint clearance intervals for that key therefore require a fabricated or inconsistent reservation ledger; the raise protects the published claim view from contradictory corridor bounds.
548if allocation_range[1] - allocation_range[0] > COORD_TOLERANCE:->L549defensive — Repeated observations of one route-segment claim project the same declared gap coordinate through the same member translation. A wider allocation range therefore requires a fabricated or inconsistent reservation ledger; the raise protects the published claim view from contradictory exact allocations.

42/52 gates fully exercised.

Gates with an un-exercised arm:

LineGateUn-exercised arm(s)Triage
200if not src.is_port:->L201
220if receiver not in reversed_secs:->L219defensive — BFS dedup guard in _detect_tb_bottom_top_entries: the False arm fires when a TB section is queued as a vertical receiver via two different positive_fan paths. The detection only registers a receiver when a BOTTOM exit PORT directly feeds a TOP entry port (edge.source is the exit port). A TB section reached by two upstream sections is fed through a fork/merge junction, so the edges into its TOP entry originate at the junction, not a port — the detection skips them and the receiver is never queued twice. A diamond renders (examples/topologies/tb_bottom_exit_fork_diamond.mmd) but does not drive this arm. The guard is correct and necessary to prevent double-queueing and ensure BFS termination should a direct double-feed ever arise.
257if jid in seen:->L258defensive — Cycle guard in _entry_ports_through_junctions’ junction walk. The True arm fires only if a junction is reached twice while walking out from one exit-port-fed junction (a junction reachable by two paths). Resolved peel-off fans are trees, so no junction is revisited and the arm is unreached; the guard keeps the walk terminating should chained junctions ever form a cycle.
265if port and port.is_entry:->L260defensive — _entry_ports_through_junctions collects the entry ports a peel-off junction fan lands on. Each junction out-edge targets either another junction (consumed by the prior edge.target in junction_ids continue) or an entry port; no junction fans directly to a station or exit port across the corpus. The non-entry arm is therefore a structural-contract guard never reached.
314if entry and entry.section_id and entry.section_id != src.section_id:->L310defensive — _build_section_adjacency records a section successor reached through a peel-off junction. entry_id comes from _entry_ports_through_junctions, which returns only registered entry-port stations, so graph.stations.get(entry_id) is always present and carries a section_id. The only un-exercised arm is entry.section_id == src.section_id — a junction fanning back into its own source section — which a resolved peel-off fan never produces. Defensive structural-contract guard.
340if not section:->L341defensive — _propagate_reversal_along_rows iterates sec_id values drawn from reversed_secs, which only ever holds real section ids added from graph.sections. graph.sections.get(sec_id) is never None; the continue is a defensive null guard.
351if not succ:->L352defensive — succ_id comes from sec_successors, built only from real tgt.section_id values, so graph.sections.get(succ_id) is never None and the continue (->187) is a defensive null guard. The fall-through static arm (->188) is phantom: control falls into the following multi-line if (, whose first operand line carries the real arc L186->189.
355or (sec_id, succ_id) in horizontal_succ_pairs->L347
411if not s2.is_port:->L412
418elif src.is_port:->L405defensive — Edge feeding a LEFT/RIGHT entry port whose source is not a junction; src is then always an exit port (is_port=True), because resolved chains feed entry ports only from exit ports or junctions. The elif is always true, so the implicit fall-through to the loop (->223) is a structural-contract guard no valid topology reaches.

6/6 gates fully exercised.

All gates have every arm exercised by the corpus.

23/50 gates fully exercised.

Gates with an un-exercised arm:

LineGateUn-exercised arm(s)Triage
68if compatible != bool(self.compatibility_reasons):->L69
70if not isinstance(self.geometry_owner, RouteSystemGeometryOwner):->L71
303if geometry_failure is not None:->L304defensive — _system_decider’s first precedence step. A member holding no geometry decision at all settles the system before any later owner is consulted, and every corpus system has one, so the true arm is un-taken. Reachable through any member whose canonical family declines to build a complete template.
341if prior != ownership.covered_by_member_id:->L342
361if declined and require_member_geometry:->L362
454if system.disposition is not RouteSystemDisposition.PLANNED:->L455
468if owners != 1:->L469
477if len(by_edge) != sum(len(system.members) for system in frozen):->L478
505for covered_edge_key, carrier_edge_key in covered_routes:->L506
508if covered_member is None or carrier_member is None:->L509, ->L510
513if prior != carrier_member.member_id:->L505, ->L514
522route.route_system_id is not None->L525
523or route.emission_member_id is not None->L525
529if member is None:->L530
540route.route_system_id != str(system.system_id)->L546
541or route.emission_member_id != str(member.member_id)->L546
542or route.route_system_disposition != system.disposition.value->L546
543or route.route_plan_ids != system.plan_ids->L546
544or route.route_reservation_ids != member.reservation_ids->L546
558if count:->L559
564if covering_binding is None:->L565
570if covering_system.system_id != system.system_id:->L571
576if emitted.get(covering_member_id, 0) != 1:->L577
582if count != 1:->L583
600if system is None:->L601
609if member is None or member.system_id != system.id:->L610
617if route.route_reservation_ids != expected:->L618

16/20 gates fully exercised.

Gates with an un-exercised arm:

LineGateUn-exercised arm(s)Triage
156if diag_end < diag_start:->L157defensive — Degenerate-collapse clamp for an ascending diagonal: fires only when the run is shorter than 2*MIN_STRAIGHT_EDGE (20px). Every caller feeds grid-placed station coordinates whose run-axis separation is at least one grid pitch (Y_SPACING=40 / X_SPACING=60); _route_entry_runway additionally pre-guards with room < src_min + diagonal_run. The 20px collapse threshold is never reached.
162if diag_end > diag_start:->L163defensive — Descending-run mirror of the ascending collapse clamp (#1 of if diag_end < diag_start:): fires only when |run| < 2*MIN_STRAIGHT_EDGE (20px), but connected diagonal endpoints are always >= one grid pitch (40/60px) apart on the run axis. Unreachable degenerate-geometry guard.
372if tgt_sec is not None and tgt_sec.direction not in ("TB", "BT"):->L376defensive — Perp-entry drop crossing-X override: the edge’s target is always a sectioned station, so tgt_sec resolves and the tgt_sec is None short-circuit to the plain drop is never taken; the direction in (TB, BT) arm (a drop continuing into a vertical-flow trunk) and the horizontal-target arm are both exercised.
374if crossing_x is not None:->L376defensive — Pair of context.py::if not indices: - the helper returns None only when no bundled feeder reaches the port, but a horizontal-flow section taking a perpendicular entry is always fed by a bundled inter-section edge, so crossing_x resolves. The crossing_x-is-None fall-through is a defensive guard, never taken across the corpus.