Repository navigation
fix(library): separate generated power pins - #520
Merged
Merged
Conversation
neusse
force-pushed
the
neusse/fix-power-pin-layout
branch
3 times, most recently
from
September 11, 2026 00:57
069efe7 to
05a5381
Compare
neusse
force-pushed
the
neusse/fix-power-pin-layout
branch
from
September 11, 2026 01:40
05a5381 to
a7d0c83
Compare
9 tasks done
1 of 9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
create_symbolpassed raw multi-unitpower_pinsinto the automatic rectangular builder. Pins with no supplied angle therefore landed at the same coordinate, so a generated VCC/GND power unit could short its own supply rails while the tool reported success.This focused fix applies the existing
layout_power_unit()helper when none of the power pins supplies an angle. Any explicit arrangement remains caller-controlled. After layout, duplicate resolved connection points are rejected with a structuredpower_pinserror before the library is written. The response also derivespower_pin_countfrom pins actually generated rather than echoing ignored request data.Closes #458
Acceptance accounting
Red/green and adversarial evidence
Before the fix:
After the first fix, adversarial review exposed that unconditional layout reversed explicitly arranged pins. A second review exposed that duplicate raw angles are not sufficient evidence of a collision and that 0/360 degrees are equivalent. The final implementation preserves every arrangement containing an explicit angle, and validates the resolved connection points instead. A final spec pass showed that omitted-angle same-number stacks also have to share a layout slot. The final implementation now preserves that ordinary case as well, and the regression asserts the two resolved anchors remain identical.
Complete local gate on this head:
Environment-dependent checks requiring a live KiCad GUI remain intentionally ignored by the repository test suite. This change exercises the real public handler and parses the generated
.kicad_sym; KiCad CLI has no standalone symbol-library validation command.Branch, compatibility, and risk
upstream/mainat5afdcbec76b3a8e55f87da778411ee09a98ae45b.