Golden KiCad benchmark fixture format¶
ZapTrace benchmark fixtures can include golden KiCad projects. The format is hash-based and deterministic, so CI can compare generated or updated project files without requiring KiCad to be installed.
Manifest schema¶
GoldenKiCadProjectFixture records:
Each file entry records:
Supported file kinds:
API¶
from zaptrace.benchmark.kicad_fixtures import build_golden_kicad_fixture, compare_golden_kicad_fixture
fixture = build_golden_kicad_fixture(
"benchmarks/esp32_usb_sensor/golden",
fixture_id="esp32-usb-sensor-golden-v1",
family_id="esp32_usb_sensor",
)
result = compare_golden_kicad_fixture(fixture, "benchmarks/esp32_usb_sensor/golden")
Comparison workflow¶
The default policy is:
The comparison result reports:
CI should fail when passed=false. Unexpected KiCad files fail by default, because they usually indicate untracked generated output or fixture drift. Tests can set allow_unexpected=True when validating only a subset.
Example fixture¶
A minimal committed test fixture lives at:
It includes:
Non-claims¶
Golden hash comparison is regression evidence only. It does not replace KiCad ERC/DRC, schematic/PCB parity checks, manufacturing export checks, or human review.