Skip to content

Add SparkFun Qwiic Shim repro for over-distance GND trace - #983

Open
rushabhcodes wants to merge 2 commits into
tscircuit:mainfrom
rushabhcodes:repro-multi-pin-ground-max-distance
Open

Add SparkFun Qwiic Shim repro for over-distance GND trace#983
rushabhcodes wants to merge 2 commits into
tscircuit:mainfrom
rushabhcodes:repro-multi-pin-ground-max-distance

Conversation

@rushabhcodes

@rushabhcodes rushabhcodes commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a minimal visual reproduction extracted from SparkFun Qwiic Shim for Raspberry Pi.

The fixture keeps only the three components needed to reproduce the issue: regulator U2 and capacitors C1 and C3. It preserves their board schematic coordinates and their shared GND net.

View the SVG snapshot

Bug

LongDistancePairSolver emits a physical trace from C3.2 to U2.GND with a Manhattan distance of 3.8 schematic units, despite maxMspPairDistance being 2.4. The distant C3 endpoint should use a GND net label instead.

The distance fallback is currently applied only when the matching named net contains exactly two pins:

connection.pinIds.length === 2

GND contains three pins here (U2.GND, C1.2, and C3.2), so that guard is skipped and the over-distance pair is accepted.

The test checks the exact offending pin pair and distance as well as preserving the visual snapshot.

Scope

Reproduction and snapshot only; no solver behavior is changed.

Validation

  • bun test tests/repros/repro-multi-pin-ground-max-distance.test.ts
  • bun run format:check
  • bun run build

Copilot AI lite review requested due to automatic review settings August 29, 2026 19:49
@vercel

vercel Bot commented Aug 29, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
schematic-trace-solver Ready Ready Preview Aug 29, 2026 8:29pm

Request Review

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@seveibar seveibar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we're not merging anything that isn't related to real targets for a real board

@rushabhcodes

Copy link
Copy Markdown
Contributor Author

this is from a board i am working on
image

@rushabhcodes rushabhcodes changed the title Add repro for multi-pin GND traces ignoring maxMspPairDistance Add SparkFun Qwiic Shim repro for over-distance GND trace Aug 29, 2026

@rushabhcodes rushabhcodes left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

found this bug across sparkfun boards repo

Image

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.

3 participants