Skip to content

Fix ERC and parity cache invalidation on .kicad_pro changes - #98

Open
avnisinghal001 wants to merge 1 commit into
CopperPilot:mainfrom
avnisinghal001:fix/validate-cache-kicad-pro
Open

avnisinghal001 wants to merge 1 commit into
CopperPilot:mainfrom
avnisinghal001:fix/validate-cache-kicad-pro

Conversation

@avnisinghal001

Copy link
Copy Markdown

Summary

Fixes #97.

sch.erc and pcb.parity were reusing cached results even after rule severities or exclusions were changed in .kicad_pro.

Both checks depend on project settings that KiCad reads, but pro was missing from their cache inputs. This caused a false PASS for ERC and a stale FAIL for parity.

Changes

  • Added pro to the inputs of sch.erc and pcb.parity in default.yaml.
  • Added a regression test to verify cache invalidation when only .kicad_pro changes.
  • Updated the default validation graph in docs/validate.md.

Checks that don't depend on project settings remain unaffected.

Before and after

Tested using the bundled ESP32 example with KiCad 10.0.8, after changing pin_to_pin and power_pin_not_driven to error without modifying the schematic.

Before After
PASS (cached), 0 ERC entries FAIL, 6 ERC entries

The updated result matches kicad-cli sch erc.

Test plan

  • make lint — all checks passed
  • make test — 1153 passed, 5 deselected
  • Added regression test for ERC and parity cache invalidation

Checklist

  • Tests added or updated
  • Documentation updated
  • No new server, model-picker, computer-use, MCP, sandbox, or LangSmith surface

This branch has not been deployed

No deployments
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.

[Bug]: validate reuses cached sch.erc and pcb.parity results after ERC/DRC severities change in .kicad_pro

1 participant