Skip to content

fix(schematic): respect intentional unconnected pins - #267

Open
nordic-style wants to merge 1 commit into
mixelpixx:mainfrom
nordic-style:codex/fix/component-connection-pin-types
Open

fix(schematic): respect intentional unconnected pins#267
nordic-style wants to merge 1 commit into
mixelpixx:mainfrom
nordic-style:codex/fix/component-connection-pin-types

Conversation

@nordic-style

@nordic-style nordic-style commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Summary

Stop validate_component_connections from reporting intentionally unconnected symbol pins and pins belonging to other units, and make the existing ignore_power_pins option effective.

Refs #182

Approach

  • Preserve each library pin's KiCad electrical type while parsing embedded symbols.
  • Exempt pins typed no_connect as well as ordinary pins carrying a schematic no-connect marker.
  • Honor ignore_power_pins for power_in and power_out pins.
  • Use the existing unit-aware pin extractor so a placed unit does not inherit another unit's pins.
  • Add pin_type to each reported finding and clarify the public tool description.

This is the validator-specific part of #182. #272 covers the remaining analysis/export/review paths and #273 covers reference-based component mutations.

Compatibility and safety

The request schema is unchanged. Findings gain an additive pin_type field. Results intentionally stop containing library-declared NC pins, ignored power pins, and pins from unplaced units.

This validator is read-only and does not alter the schematic.

Validation

  • cargo fmt --all -- --check: pass
  • cargo clippy -p konnect-core -p konnect-sexp --locked --all-targets -- -D warnings: pass
  • cargo test -p konnect-sexp --locked: 134 unit tests, 8 property tests, and 6/7 doc tests pass (1 ignored)
  • cargo test -p konnect-core --locked --lib midwire_pin_tests: 3 pass, covering declared NC, power filtering, selected units, and mid-wire junction behavior
  • Workspace core tests reach 544 passing tests; the same three local update_symbols_from_library_* failures reproduce on origin/main because the installed KiCad Device:R library shadows the fixture
  • Real schematic comparison: the released validator reported 185 findings, predominantly pins named NC; the patched validator reported 0 on the same saved input

Review checklist

  • The diff is focused and contains no generated output, personal data, or unrelated cleanup.
  • New names follow docs/NAMING_CONVENTIONS.md; public renames include compatibility handling.
  • New behavior and failure paths have regression coverage.
  • File mutations are atomic and preserve unrelated content. (Read-only.)
  • IPC mutations verify the requested board and do not leave partial batches. (No IPC mutation.)
  • Tool counts are unchanged.

The component validator reported pins declared no-connect, ignored its public power-pin option, and projected every unit's pins through each placed unit. Preserve KiCad electrical types, honor the filter, exempt explicit and intrinsic no-connect pins, and resolve only the selected unit.

Refs mixelpixx#182
@nordic-style
nordic-style force-pushed the codex/fix/component-connection-pin-types branch from 1e4c5e7 to 2de4473 Compare August 18, 2026 00:33
@mixelpixx

Copy link
Copy Markdown
Owner

This and #280 add the identical ignore_power_pins filter to validate_component_connections — same lines, two different issue framings. See the series note on #285: please keep one. My preference is this one (#182 framing, smaller diff), with #280 reduced to whatever non-duplicate remainder it has after rebasing on #272.

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.

2 participants