Skip to content

[severe] Non-consumer section breeze-through ships silently: make it a Tier-A always-on invariant (passes plain render AND --strict) #1227

Description

@pinin4fjords

Summary

A line breezing straight through the interior of a section it does not connect to - ploughing across that section's station markers - renders silently on a plain nf-metro render and passes --strict. This is a visibly-broken map (a line drawn over every station of a section it never touches) shipped with exit 0. Non-consumer section breeze-through must be a Tier-A, always-on, engine-blocking invariant; right now it's effectively Tier-B / validate-only.

Evidence

Render the rnadnavar packed-cell layout (see the companion routing issue for the .mmd; rna runs from consensus to reporting straight through the realign section at the station-row Y):

nf-metro render map.mmd ...                 # exit 0, no warning - breeze-through shipped
nf-metro render map.mmd ... --strict        # exit 0 - --strict escalates Tier-A only
nf-metro render map.mmd ... --validate       # Error: 11 defects:
  - line 'rna' crosses the marker of non-consumer station 'maf2bed'
  - line 'rna' crosses the marker of non-consumer station 'extract_reads'
  - ... (every station in realign)

The pass-through detector behind the #484 guard finds it directly:

routes_through_unrelated_sections(g)
# -> [(rna route '__junction_12->reporting__entry_right_11', 'realign')]

Why nothing always-on fires

  • _guard_no_route_through_section (Badly rendered auto-layout graph #484) - the guard that detects exactly this (a route through a section it doesn't connect to) - is registered Tier-B (guards.py, GuardSpec(_guard_no_route_through_section, "B", ...)). Tier-B isn't enforced on the default render path and isn't escalated by --strict; it only surfaces under --validate.
  • _guard_inter_section_route_clears_own_section_interior is Tier-A and always-on, but by design checks only a route's own source/target boxes. A foreign section the line merely passes through is out of its scope.
  • Net: foreign-section breeze-through has no always-on guard. The only thing that catches it (the Badly rendered auto-layout graph #484 detector, and the render-geometry "crosses non-consumer station marker" check) is gated behind --validate.

Ask

Promote non-consumer section breeze-through to a Tier-A render invariant so the engine refuses to draw it (warn always, error under --strict), the same as other visibly-broken geometry. A line crossing a non-consumer section's stations is at least as severe as the own-section backtrack that _guard_inter_section_route_clears_own_section_interior already blocks at Tier-A.

Candidates: reclassify _guard_no_route_through_section (#484) to Tier-A, and/or fold the render-geometry "line crosses non-consumer station marker" check into the always-on render assertion rather than --validate-only.

Notes

  • Surfaced on Add pipeline metro map nf-core/rnadnavar#83; the routing cause (packed multi-section cell reintroducing the breeze-through) is filed separately as the companion issue.
  • Had this been Tier-A, the packed-cell routing regression would have aborted loudly instead of silently shipping a broken map - which is the whole point of making it Tier-A.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority:highTackle first: high triage-arm leverage and/or severe (crash/station-as-elbow)routingEdge routing (layout/routing/)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions