Skip to content

feat: preserve physical pad identifiers in PCB pad schemas - #993

Open
rushabhcodes wants to merge 1 commit into
mainfrom
fix/physical-pad-identifiers
Open

rushabhcodes wants to merge 1 commit into
mainfrom
fix/physical-pad-identifiers

Conversation

@rushabhcodes

@rushabhcodes rushabhcodes commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Add optional string pad_number to every pcb_smtpad and pcb_plated_hole Zod variant and matching TypeScript interface. This field represents the authoritative physical pad identifier when supplied, independently of electrical port aliases or numeric source-pin ordinals.

Preserve the string verbatim, including A1, B2, MP1, leading zeros, punctuation, case, and an explicitly empty identifier. Repeated labels remain valid. Numeric values are rejected instead of coerced. Existing records without this field remain compatible.

This is a standalone PR targeting main. Only the two pad schema files change. The repro-specific tests have been removed, and repro PR #991 is closed. No README changes.

Integration

Importers can retain the raw physical pad label in this field, and exporters can prefer it without guessing from arbitrary port aliases. Downstream consumers should use the PR package preview for validation, then a published circuit-json release before release.

Validation

  • bun test: 543 pass, 0 fail across 202 files.
  • bunx tsc --noEmit
  • bun run lint:zod
  • bun run check-snake-case
  • bun run build
  • Biome formatting and git diff --check pass.

Validated against main commit a612096.

Comment thread tests/pcb-pad-number.test.ts Resolved
@rushabhcodes
rushabhcodes added this pull request to stack #994 November 10, 2026 14:07
@rushabhcodes
rushabhcodes force-pushed the fix/physical-pad-identifiers branch 2 times, most recently from 4262bb2 to 08eb11b Compare November 10, 2026 14:47
@rushabhcodes
rushabhcodes removed this pull request from stack #994 November 10, 2026 14:54
@rushabhcodes
rushabhcodes changed the base branch from test/physical-pad-identifiers to main November 10, 2026 14:55
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