Skip to content

feat(PCB rule fidelity): verify source constraints alongside compatibility DRC - #2634

Draft
Tristan-Stoltz-ERC wants to merge 26 commits into
research/pcb-route-benchmark-evaluator-v0-1from
research/pcb-rule-fidelity-contract-v0-1
Draft

Tristan-Stoltz-ERC wants to merge 26 commits into
research/pcb-route-benchmark-evaluator-v0-1from
research/pcb-rule-fidelity-contract-v0-1

Conversation

@Tristan-Stoltz-ERC

Copy link
Copy Markdown
Contributor

Summary

Adds a source-rule-fidelity contract to the PCB routing benchmark evaluator, stacked on #2482 and addressing issue #2626.

The key distinction is two-dimensional: a route can pass an explicitly pinned compatibility DRC while still not preserving the source design's constraints. The module now separately records compatibility-policy pass and strict-source-policy pass.

  • Pins exact source board, output board, source .kicad_pro profile, both policy bytes and DRC input board digests.
  • Requires the declared source value to resolve through a JSON pointer into the actual source rule-profile bytes; fabricated caller-supplied values do not count as preserved.
  • Distinguishes source-preserved, version-migrated-equivalent, explicitly-waived, inferred, relaxed and unavailable rules. Non-preserved classifications never silently earn strict-source pass.
  • Loads evidence only beneath a canonical root; rejects unsafe paths, root escape, aliases, empty/unreferenced evidence and digest mismatch.
  • Validates structured strict-policy derivation, migration and waiver records against the plan's exact board/profile/policy/rule identities.
  • Requires compatibility and strict-source DRC input digests to match the exact output-board bytes, and rejects weakened policies that do not block errors, warnings, unconnected items and schematic-parity violations.
  • Adds synthetic negative controls for changed source values, missing JSON pointers, mismatched DRC input digests, evidence tampering, policy weakening and compatibility-pass/strict-source-fail outcomes.

Claim boundary

The review records are byte-bound, but this evaluator does not authenticate reviewer identity or prove that a migration-equivalence judgement is correct. Human/independent review remains mandatory for real rule migrations and waivers. Test evidence is synthetic and must not be reused as real design evidence.

This change has not yet earned an exact-head CI pass. The isolated Rust workflow must format, compile and execute the new tests before the implementation can be described as validated. No real PCBWorld board rules have been evaluated by this PR, and no SOTA result or physical qualification is claimed.

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