Skip to content

Detect traced source ports without matching PCB ports - #230

Draft
seveibar wants to merge 1 commit into
mainfrom
fix/detect-missing-pcb-ports
Draft

Detect traced source ports without matching PCB ports#230
seveibar wants to merge 1 commit into
mainfrom
fix/detect-missing-pcb-ports

Conversation

@seveibar

Copy link
Copy Markdown
Contributor

Summary

  • add a routing check for source ports used by traces that have no matching pcb_port
  • include named-net traces, which the existing missing-PCB-trace check intentionally skips
  • skip untraced ports and source components that are not placed on the PCB
  • export the check and run it as part of runAllRoutingChecks

Why

An asynchronously loaded footprint can emit pads while failing to match those pads to source ports. In that state the source trace still exists, but existing routing checks can silently skip it when it has only one direct source port plus a named net. This allowed connected pushbuttons to render as electrically disconnected on the PCB without a check failure.

The new check fails closed at the missing endpoint: if a source port is used by a trace and its source component has a pcb_component, that source port must have a corresponding pcb_port.

Test plan

  • bun test (186 passing)
  • bunx tsc --noEmit
  • bun run build
  • regression coverage for direct traces, named nets, matched ports, untraced ports, and unplaced components

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant