diff --git a/.gitattributes b/.gitattributes index d553447..7f0ab84 100644 --- a/.gitattributes +++ b/.gitattributes @@ -11,7 +11,17 @@ templates/jlcpcb-2layer-1oz/jlcpcb-2layer-1oz.kicad_pro -text templates/jlcpcb-2layer-1oz/jlcpcb-2layer-1oz.kicad_dru -text # The media manifest identifies exact captured output bytes, including JSON. -docs/media/** -text +docs/media/** -text whitespace=cr-at-eol +docs/evaluation/** -text whitespace=cr-at-eol # The self-contained example carries byte-bound CAD/library/source receipts. examples/gpio-indicator/** -text +# These captured Rover inputs are already LF in Git. Keep their checkout bytes +# stable on Windows without rewriting existing CAD or archived source content. +projects/rover-pdb/buck-motor.kicad_sch text eol=lf +projects/rover-pdb/libs/Coilank_APS1365DW.3dshapes/APS1365DW-envelope.step text eol=lf +projects/rover-pdb/libs/Coilank_APS1365DW.3dshapes/build_model.py text eol=lf +projects/rover-pdb/libs/Coilank_APS1365DW.3dshapes/README.md text eol=lf +projects/rover-pdb/project.yaml text eol=lf +projects/rover-pdb/rover-pdb.kicad_dru text eol=lf +projects/rover-pdb/rover-pdb.kicad_pro text eol=lf diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 0683ce1..9156be9 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -35,6 +35,7 @@ jobs: uv run --locked pytest -q -m "not slow and not network" tests/test_package_smoke.py tests/test_toolchain.py tests/test_doctor.py tests/test_cli_encoding.py tests/test_demo.py tests/test_demo_change.py tests/test_project.py + tests/test_evaluate.py tests/test_media_evidence.py tests/test_media_publication.py tests/test_check_readme.py tests/test_state.py tests/test_status_cli.py tests/test_update_guard.py tests/test_transaction.py tests/test_cleanup.py tests/test_release.py tests/test_stock.py tests/test_sch_io_multiline.py @@ -47,3 +48,7 @@ jobs: run: uv run --locked python tools/check_package.py - name: Landing-page links and captured media identities run: uv run --locked python tools/check_readme.py + - name: Disposable fault evaluation without native tools + run: uv run --locked python tools/evaluate.py + - name: Media encoding failure and source-change recovery + run: uv run --locked --group media pytest -q tests/test_media_renderers.py diff --git a/README.md b/README.md index 7d0f976..25ed4f3 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ **AI-assisted PCB engineering. Native KiCad. Evidence you can inspect.** +[![Software and package checks](https://github.com/devkyber/PCB/actions/workflows/checks.yml/badge.svg)](https://github.com/devkyber/PCB/actions/workflows/checks.yml) + ![PCB Copilot beside a native 3D render of the Rover power distribution board](docs/media/hero.png) Prepare scoped changes to real KiCad projects, check the candidate, inspect the @@ -45,27 +47,27 @@ Saved KiCad + source evidence ## Try it on a real board -Use **Python 3.11+**, [uv](https://docs.astral.sh/uv/getting-started/installation/) -and **KiCad 10**. Native review also needs a Python runtime that can import -KiCad's `pcbnew`; [setup and troubleshooting](docs/QUICKSTART.md) explain discovery. +Get a first result with **Git**, **Python 3.11+** and +[uv](https://docs.astral.sh/uv/getting-started/installation/). ```sh git clone https://github.com/devkyber/PCB.git cd PCB uv sync -uv run pcb-copilot doctor -uv run pcb-copilot status projects/rover-pdb uv run python tools/demo.py ``` -The quick demo copies declared Rover inputs to a new temporary directory, runs +The quick demo copies the small GPIO indicator to a new temporary directory, runs status and archive verification, and exercises the actual missing-preview guard. It prints the path to a Markdown report, machine-readable transcript and exact command logs. The source board stays untouched. **It does not run native ERC/DRC.** -Add `--full` to run the registered native review checks on that disposable copy: +To inspect Rover instead, add `--project projects/rover-pdb`. +For native review, install **KiCad 10** and a Python runtime that can import +KiCad's `pcbnew`; [setup and troubleshooting](docs/QUICKSTART.md) explain discovery. ```sh +uv run pcb-copilot doctor uv run python tools/demo.py --full ``` @@ -96,6 +98,27 @@ every page, then use the printed resume command to apply that exact candidate to the disposable copy. This author inspection is separate from owner fabrication sign-off. [Recorded proof](docs/media/change-proof.md) shows a completed run. +## Test the rejection behavior + +[![Recorded Windows software evaluation: three valid controls passed and six invalid requests were rejected](docs/evaluation/2026-10-29/evaluation.png)](docs/EVALUATION.md#recorded-windows-run) + +Run a declared set of valid controls and deliberately broken inputs against +disposable copies of the example: + +```sh +uv run python tools/evaluate.py +# With KiCad installed, also test a real preview followed by a changed candidate: +uv run python tools/evaluate.py --native +``` + +The harness tests archive corruption, altered footprint geometry, model bytes, +part identity and preview binding. Each case records its actual interface, +diagnostic, exit code and source-preservation hashes. Native cases are explicitly +skipped in quick mode. See [the procedure and scope](docs/EVALUATION.md). +The [recorded Windows run](docs/evaluation/2026-10-29/report.md) observed all nine +declared expectations in 14.72 seconds; raw logs and exact input hashes are +published beside it. This small fault set does not measure general detection accuracy. + ## Inspect the native design ![Fresh native KiCad exports: a Rover schematic sheet and the PCB top copper and silkscreen](docs/media/native-cad.png) @@ -150,6 +173,7 @@ supplier assembly checks, sign-off and interrupted-operation recovery. | [Design rules](docs/DESIGN_RULES.md) | Schematic readability, physical layout and review conventions | | [Limitations](docs/LIMITATIONS.md) | What checks establish and what needs engineering judgment | | [Roadmap](docs/ROADMAP.md) | Next capabilities and the evidence needed to claim them | +| [Fault evaluation](docs/EVALUATION.md) | Reproduce controls and injected faults; inspect the measured scope | | [Media sources](docs/media/README.md) | Reproduce the images and video; inspect captured results | The shared CLI lives in `src/pcb_copilot`. The retained KiCad adapter lives in diff --git a/docs/EVALUATION.md b/docs/EVALUATION.md new file mode 100644 index 0000000..163316c --- /dev/null +++ b/docs/EVALUATION.md @@ -0,0 +1,103 @@ +# Reproduce the fault evaluation + +Run this small software regression exercise before making claims about the +pipeline's rejection behavior. It uses the current +[GPIO indicator](../examples/gpio-indicator/README.md) as read-only source and +copies only the shared pipeline's declared inputs into new external workspaces. +The example remains an unbuilt educational DRAFT. + +From the repository root, with Python 3.11+ and the dependencies installed: + +```sh +uv sync +uv run python tools/evaluate.py +``` + +The quick mode needs no KiCad executable and should finish quickly on a normal +development machine. Measured durations belong to individual runs; the harness +does not establish performance superiority or a guaranteed runtime. + +To exercise a real native preview before invalidating its candidate: + +```sh +uv run pcb-copilot doctor +uv run python tools/evaluate.py --native +``` + +Native mode requires the supported KiCad 10 toolchain. It may take longer. +If native mode is not requested, its two cases are explicitly skipped. If it is +requested but cannot run, that is an execution error, not a passed case. + +Both commands print the retained external directory containing `report.md`, +`evaluation.json`, raw process logs and disposable snapshots. Use +`--output NEW_EXTERNAL_DIRECTORY` to select a new directory outside the checkout. +An existing directory is rejected; the harness does not overwrite owner files. + +## Recorded Windows run + +The [2026-10-29 run](evaluation/2026-10-29/report.md) observed all **9 enabled +expectations** in **14.72 seconds**, using Python 3.13.14 and KiCad 10.0.6 on +Windows. Two archive/footprint controls and one native-preview control passed; +six deliberately invalid requests were rejected with their expected diagnostics. +All 42 declared source input entries and the evaluated implementation stayed +unchanged. This is one run of the declared cases below, not a general accuracy +or speed claim. + +The published [machine-readable record](evaluation/2026-10-29/evaluation.json) +includes exact commands, source/implementation hashes, injected-fault details, +process timings and environment. Its adjacent `logs/` retain the raw output +bytes. Disposable CAD copies and generated preview trees remain external; rerun +the command to obtain a complete local packet for inspection. + +## Declared cases + +| Case | Interface actually exercised | Expected observation | +| --- | --- | --- | +| Evidence control | `pcb-copilot research --verify` | Current archive bytes verify; exit 0 | +| Footprint control | `pcb_copilot.layout.footprints.resolve_footprint` | All physical example references resolve with real declared geometry | +| Missing preview | `pcb-copilot update-schematic --candidate … --apply` | Specific matching-preview guard rejects; exit 2 | +| Corrupted evidence | `pcb-copilot research --verify` | `archive.hash_mismatch`; exit 1 | +| Altered footprint pad size | `resolve_footprint` | Exact upstream-copy comparison rejects even after refreshing the local receipt hash | +| Corrupted local model bytes | `resolve_footprint` | Pinned model hash rejects | +| Changed native MPN | `resolve_footprint` | Selected native part and receipt identity disagree | +| Native preview control, optional | `pcb-copilot update-schematic --candidate …` | A genuine successful unapplied native preview and binding are returned | +| Candidate changed after preview, optional | Same public command with `--apply` | Matching-preview guard rejects the changed candidate; exit 2 | + +Each independent quick case starts from a fresh exact snapshot. The native +preview and subsequent invalidation case deliberately share one disposable +workspace. The candidate change adds one trailing newline after the actual +preview: it demonstrates byte-bound authorization, not a circuit mistake. +No preview authorization or human sign-off record is fabricated. + +The direct API cases are explicitly labeled `validator-api`. They establish +those validators' responses; they do not imply that full CLI review, native ERC, +DRC, visual inspection or release ran. A failed positive control cannot count +as a successful evaluation. A fault passes its expectation only when both its +actual exit code and the specific expected diagnostic match. + +## Read the results + +`evaluation.json` records each expected outcome, actual process exit code, +diagnostic requirement, exact executed arguments, raw-log paths, elapsed time, +fault target, environment and before/after input hashes. It also fingerprints +the evaluated Python implementation. Source inputs and implementation are +checked again at the end; a changed source or implementation invalidates the run. +The checker must preserve each snapshot's inputs after the deliberate injection. + +Harness exits are: + +| Exit | Meaning | +| --- | --- | +| 0 | All enabled expectations were observed; skipped cases remain skipped | +| 1 | At least one observed response differed from its declared expectation | +| 2 | A process, dependency, snapshot, parsing or preservation error prevented a trustworthy run | + +These cases form a small manually selected fault set, not a measured detection +rate over possible PCB failures. A correct rejection is useful software evidence. +It does not prove electrical correctness, physical fit, readability, thermal or RF +behavior, manufacturability, or suitability for an application. The harness +creates no fabrication release and completes no human decisions. See +[Limitations](LIMITATIONS.md) and the [review workflow](WORKFLOW.md#4-review-and-record-human-decisions). + +Run-specific results describe their recorded hashes and environment. Rerun after +inputs or implementation change; do not attach new hashes to an old report. diff --git a/docs/QUICKSTART.md b/docs/QUICKSTART.md index a5dd89f..f4b5932 100644 --- a/docs/QUICKSTART.md +++ b/docs/QUICKSTART.md @@ -4,22 +4,61 @@ Start with the small four-channel GPIO indicator, then try a checked schematic change in a disposable copy. The example is an unbuilt educational `DRAFT`; the demo records no owner approval or fabrication release. -## Install the tools +## Get a first result without KiCad -You need Git, Python 3.11+, [uv](https://docs.astral.sh/uv/getting-started/installation/) -and [KiCad 10](https://www.kicad.org/download/) with its standard libraries. -KiCad must provide both `kicad-cli` and a Python interpreter that can import -`pcbnew`. `uv sync` installs this repository's Python dependencies; it does not -install KiCad or its Python bindings. - -The commands below can be entered individually in PowerShell or a POSIX shell. -The current development environment is Windows with KiCad 10. Linux and macOS -tool discovery exists, but an end-to-end platform test matrix is still pending. +For the quick demo, you need Git, Python 3.11+ and +[uv](https://docs.astral.sh/uv/getting-started/installation/). KiCad is optional +for this first step. Run these commands individually in PowerShell or a POSIX +shell: ```sh git clone https://github.com/devkyber/PCB.git cd PCB uv sync +uv run python tools/demo.py +``` + +The default is the small [GPIO indicator](../examples/gpio-indicator/README.md). +The demo copies its declared inputs to a new external temporary directory, runs +status and archive verification, and exercises a real rejection of an apply +request without a successful preview. **Quick mode does not run native ERC/DRC +or apply a change.** The source design stays untouched. + +Open the printed `report.md` path. Its directory contains: + +- `report.md`: what each result means and which checks were run. +- `transcript.json`: actual process exit codes, timings and input/CAD hashes. +- `logs/`: each command's exact stdout and stderr. +- `workspace/gpio-indicator/`: the disposable input copy. + +| Demo exit code | Meaning | +| --- | --- | +| `0` | Quick steps completed and archived evidence verified. In full mode, no registered blocker was reported. | +| `1` | Archive verification or the optional full review reported blockers. Read the findings; this is separate from a runtime failure. | +| `2` | The demo could not complete, its output was inconsistent, or saved inputs changed during the run. Inspect its exact logs. | + +Choose a new destination with `--output NEW_EXTERNAL_DIRECTORY`, or omit it to +get a new system temporary directory. The destination must not already exist +and must be outside the checkout. For example, use +`--output C:/work/pcb-copilot-demo` on Windows or +`--output /tmp/pcb-copilot-demo` on Linux/macOS. + +Neither mode creates human sign-off or a fabrication package. The recorded +Rover walkthrough in the repository's media is a historical Rover run; the +current default demo selects GPIO and reports its actual project name. + +## Enable native CAD checks + +Install [KiCad 10](https://www.kicad.org/download/) with its standard libraries +for native review and checked changes. The pipeline needs both `kicad-cli` and +a Python interpreter that can import KiCad's `pcbnew` bindings. `uv sync` +installs this repository's Python dependencies; it does not install KiCad or +its Python bindings. + +The current development environment is Windows with KiCad 10. Linux and macOS +tool discovery exists, but an end-to-end platform test matrix is still pending. + +```sh uv run pcb-copilot doctor ``` @@ -123,54 +162,39 @@ Use `--output NEW_EXTERNAL_DIRECTORY` to choose a new destination outside the checkout. The [recorded proof](media/change-proof.md) publishes the actual preview/rejection/apply results and hashes from one completed run. -## Inspect Rover and the first-use demo +## Select another project -Rover is the retained owner board. Its [project README](../projects/rover-pdb/README.md) -describes the current CAD and unresolved engineering decisions. Read-only use is: +Use `--project` to choose a declared project under `examples/` or `projects/`. +Selection is relative to this checkout. Test fixtures and paths outside the +checkout are rejected; fixtures never become projects through this demo. + +Rover remains available explicitly. Its +[project README](../projects/rover-pdb/README.md) describes the retained owner CAD +and unresolved engineering decisions: ```sh +uv run python tools/demo.py --project projects/rover-pdb +uv run python tools/demo.py --project projects/rover-pdb --full uv run pcb-copilot status projects/rover-pdb uv run pcb-copilot research projects/rover-pdb --verify -uv run pcb-copilot review projects/rover-pdb ``` -Rover's captured full review blocks on missing datasheet evidence for NT1–NT3 -and P1–P4, plus 0/7 current human decisions. Read every current finding rather -than treating the expected sign-off block as the only possible failure. - -The separate first-use demo copies Rover's declared inputs outside the checkout. -Its quick mode runs status, evidence verification and a real rejection of an -apply request without a successful preview. It needs the Python dependencies -but can run without KiCad. Choose a destination that does not already exist. -For example, on Windows: +With the native toolchain ready, full review of the default GPIO example is: -```powershell -uv run python tools/demo.py --output C:/work/pcb-copilot-demo +```sh +uv run python tools/demo.py --full ``` -On Linux or macOS, an equivalent destination is `/tmp/pcb-copilot-demo`. -Omit `--output` to create a new system temporary directory automatically. -Run from the repository root, then open the printed `report.md` path. - -The output contains: - -- `report.md`: results and their interpretation. -- `transcript.json`: actual exit codes, timings and input/CAD hashes. -- `logs/`: stdout and stderr from each command. -- `workspace/rover-pdb/`: the disposable input copy. - -With KiCad available, add `--full` to run all registered review checks, including -native ERC and DRC: - -```powershell -uv run python tools/demo.py --full --output C:/work/pcb-copilot-demo-full -``` +Full mode adds the registered review checks, including native ERC and DRC, on +the disposable copy. Expect exit **1** for GPIO's missing assembly contracts +and unsigned human decisions. Rover's captured full review blocks on missing +datasheet evidence for NT1–NT3 and P1–P4, plus 0/7 current human decisions. Read +every current finding rather than treating an expected sign-off block as the +only possible failure. -Quick mode normally exits **0** when its steps complete and evidence verifies. -Full mode preserves the review's actual blockers: expect exit **1** for the -included board's evidence and sign-off findings. Exit **2** means the demo could not complete or an -input-preservation check failed. Inspect the report and logs in each case. -Neither mode creates human sign-off or a fabrication package. +Each report uses the selected project's actual name and links to +`workspace//`. Run `uv run python tools/demo.py --help` for +project/output options and exit semantics. ## Make your first scoped change diff --git a/docs/ROADMAP.md b/docs/ROADMAP.md index 0e558f5..46149ad 100644 --- a/docs/ROADMAP.md +++ b/docs/ROADMAP.md @@ -11,9 +11,11 @@ condition to decide when to advance. ## 1. Make first use reproducible -Keep the [quickstart](QUICKSTART.md), environment diagnostics and temporary-copy -demo runnable from a fresh clone. The first result should show the actual -schematic/board, machine findings and unsigned human decisions together. +Implemented: the [quickstart](QUICKSTART.md) defaults to the small GPIO board. +Its Python-only demo and explicit Rover selection were reproduced from a fresh +public-source archive with Python 3.11 on Windows. Native GPIO review separately +reported its current assembly and sign-off blockers. Software CI exercises the +demo on Windows and Linux; native qualification on those hosts is a separate step. Next work: @@ -52,8 +54,12 @@ Extend checks from a concrete failure case rather than adding broad claims. For each new check, state the source, supported geometry or circuit pattern, known exceptions and what remains for a reviewer to decide. -Build a focused evaluation set of valid candidates and injected faults. Report -detected faults, missed faults, false positives, runtime and the environment. +Implemented: a [reproducible fault evaluation](EVALUATION.md) exercises valid +evidence/footprint controls, corrupted inputs, identity checks and optional real +native preview invalidation. It records diagnostics, exit codes, runtime, +environment and source/implementation hashes. This hand-selected set is an +initial regression exercise; broader held-out designs are still needed to +measure missed faults and false positives over a defined population. Separately measure engineer time for a defined task with and without the pipeline. Archive the procedure and inputs before claiming a speedup. diff --git a/docs/evaluation/2026-10-29/evaluation.json b/docs/evaluation/2026-10-29/evaluation.json new file mode 100644 index 0000000..c0134a3 --- /dev/null +++ b/docs/evaluation/2026-10-29/evaluation.json @@ -0,0 +1,1817 @@ +{ + "schema_version": 1, + "started_utc": "2026-10-28T18:38:25.705763+00:00", + "mode": "native", + "source_project": "examples/gpio-indicator", + "environment": { + "python": "3.13.14 (tags/v3.13.14:fd17997, Jun 10 2026, 13:03:48) [MSC v.1944 64 bit (AMD64)]", + "platform": "Windows-11-10.0.26200-SP0", + "pcb_copilot_version": "0.1.0" + }, + "source_inputs_before": { + "DESIGN_BASIS.md": "77119e5d1ab6ea43a385a17adec1874ffc9b6c20e35eb44d783278710b9f239f", + "DEVIATIONS.md": "324f110ce0816864290f2b28a6ecdbe8006457f305852762837590ae0eb99563", + "evidence/files/61300511121_61300511121_b91171c2b942.pdf": "b91171c2b94275ccb3824762a4b77dcd0cd9031e8a818e869a6c9f18c053ad8b", + "evidence/files/MFR-25FBF52-1K1_YAGEO-MFR_DATASHEET_b460acdb4764.pdf": "b460acdb476469774e0785a8ef85aec79e2d95fe41beaa79c5a414e4e95e3fe0", + "evidence/files/WP710A10ID_WP710A10ID_42d464fbfd8d.pdf": "42d464fbfd8d3ddef65fa6f9226d298547cdb25d5369aff0c47e5f896595c4bd", + "evidence/index.yaml": "cece06b86df6f692fbfe52ceabf858e7996eb0721db00232d79f54c1c3c82149", + "fp-lib-table": "65851d1c9080d2cf944dcf740f2b9ad66fd62e6550f0feb7635f9dab55e1c329", + "gpio-indicator.kicad_dru": "fd6ec6cfd46f091c61ee7fa09ab3e1c5e29cb9b187e5045bcf055666f0239643", + "gpio-indicator.kicad_pcb": "aa4811a06c27b7d529da161f004cf5e5c1d192e04515ebd6aa9e8716a8536c71", + "gpio-indicator.kicad_pro": "b53a9bec0882a7dbd622aba8401f6616c067972c9d85dbffc407c407f9365fe2", + "gpio-indicator.kicad_sch": "bcf4b33bda22faff9d68be7498e96e7a83a40dc403b5fe2f4ffd79bf2f265ab4", + "jlcpcb-assembly.yaml": null, + "layout-intent.yaml": null, + "libs/Demo.kicad_sym": "c5e68806f7af78dceae8bff16e23446288e7247b32aa1a31d64f58da7e70a403", + "libs/Demo.pretty/LED_D3.0mm.kicad_mod": "9928bcc8ef35ea406d56af1480e43c606d8d646ba247b3d453d80386cd0f5b10", + "libs/Demo.pretty/MountingHole_3.2mm_M3.kicad_mod": "3853c52bba27d3e3e3e18db44a20dfb296eb9e6cd16ebf26fe4a96a2ee8add3b", + "libs/Demo.pretty/PinHeader_1x05_P2.54mm_Vertical.kicad_mod": "8e494ecb4bbaff9fecbe2b16962684513fae788c9b9c9902172781d64b01c2e3", + "libs/Demo.pretty/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.kicad_mod": "bf616ce7d49ae02d5c87d01dd19957ebf3aa66007809680c450de8561f4681a1", + "libs/LICENSE-kicad-footprints.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE-kicad-packages3D.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE-kicad-symbols.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE_PROVENANCE.json": "8fb14cbd87bbb53c2e381fa614336026b1ef1a6b69d252e40b5de8dafa7f9c66", + "libs/models/LED_D3.0mm.step": "e83c2186ad887c36d869f44e28c7b80646ea10cb388697b4380f5a2777268371", + "libs/models/PinHeader_1x05_P2.54mm_Vertical.step": "f03b716e453f6d4f2a111a227c671d96f92708e72a5a663cd4889296d021f4c3", + "libs/models/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.step": "85bdadc9190739c38429da06b1d9c76ccf33aef9a0794a2e7a9dd5b58d9d05fe", + "libs/PROVENANCE.json": "30cb553d1c3ac24055e98ae9dc41e45d3eaa876cad6a8894dee4959aef2f6314", + "libs/README.md": "c09361039bd440ad0aa9038cf81a652abfbbe1e2803ca0dbd3471ce576a2e2d0", + "libs/upstream/LED_D3.0mm.kicad_mod": "d45c606dbf639522eaeae8c6bd2569747ee454daff87ab2db66bdad3200676d0", + "libs/upstream/models/LED_D3.0mm.step": "e83c2186ad887c36d869f44e28c7b80646ea10cb388697b4380f5a2777268371", + "libs/upstream/models/PinHeader_1x05_P2.54mm_Vertical.step": "f03b716e453f6d4f2a111a227c671d96f92708e72a5a663cd4889296d021f4c3", + "libs/upstream/models/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.step": "85bdadc9190739c38429da06b1d9c76ccf33aef9a0794a2e7a9dd5b58d9d05fe", + "libs/upstream/MountingHole_3.2mm_M3.kicad_mod": "3853c52bba27d3e3e3e18db44a20dfb296eb9e6cd16ebf26fe4a96a2ee8add3b", + "libs/upstream/PinHeader_1x05_P2.54mm_Vertical.kicad_mod": "a9beaa5e3bf9f73f4667fd503d8ddc47f81aec7999b51211890c919363099acf", + "libs/upstream/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.kicad_mod": "1ba096b69c79e588cc54946fb6648699e5b301f67f8df0e0e0be43dcab326436", + "netmap.json": "8049b76e10dfec2faea46331a99f75b34a22956aa7c81a685046c1389f1f64cd", + "project.yaml": "aa7e36a756e811ac38745c30d60499eec18049f8ae8e1affcac57b4613a51f14", + "REFERENCE_REVIEW.md": "7ddb00764a476d5b8e30e9ad125b103b815c7352dbdec4906016349a96b04d00", + "REQUIREMENTS.md": "5752f874ffded6f7ad28952d14a08c1764db07e818f156fb1a99399c4a3c7efa", + "review-profile.yaml": "c6b7725c0945ace7546a27fb0ef93c313a09af05e6ae974c0ca8e75ecd9a0af2", + "review-signoff.yaml": null, + "schematic-intent.yaml": null, + "sym-lib-table": "accdd625891ba71beb5e534de13e680099f47f98dff64ca95182060d2072213c" + }, + "implementation_before": { + "packages/kicad-claude-mcp/src/kicad_claude/__init__.py": "5b28f96fbb8ebb7b8423327a55695d83887c40b7da2c1d5cf42d3c80fc1a80e6", + "packages/kicad-claude-mcp/src/kicad_claude/adapters/__init__.py": "7eb70257593da06f682a3ddda54a9d260d4fc514f645237f5ca74b08f8da61a6", + "packages/kicad-claude-mcp/src/kicad_claude/adapters/dsn_keepouts.py": "3389f5afe23111f017d3b9a7269a8219422045a28b4aa4c8251a8e41b0885ab0", + "packages/kicad-claude-mcp/src/kicad_claude/adapters/freerouting.py": "0cee29adf149fdd06ed65b606e085f58a37ae782b8b346e60c821dd48c9be67a", + "packages/kicad-claude-mcp/src/kicad_claude/adapters/kicad_cli.py": "c9da34c1a44a69ed39befb80e2a47171283d66904d69b48faf045b96a4491e54", + "packages/kicad-claude-mcp/src/kicad_claude/adapters/kicad_python.py": "a0266e0a698c473b7eef5a5c43215c6e29e7f29df4ae961bf863f2d29a234820", + "packages/kicad-claude-mcp/src/kicad_claude/adapters/project_settings.py": "3e6fb974e1420b2f98c63f1e923cf1a6e9cd67616c1dc45cbba75aa44302f6e7", + "packages/kicad-claude-mcp/src/kicad_claude/adapters/route_pipeline.py": "6e4e395c9cd5637dc872172c67cd17f52877124fc92a53b6124b050403e748f2", + "packages/kicad-claude-mcp/src/kicad_claude/adapters/sch_editor.py": "7961edfc06853340150b54c59b8a531979e7480552a58b7f7853966e5d44fd55", + "packages/kicad-claude-mcp/src/kicad_claude/adapters/sch_io.py": "e18745d87a80727e134c2da60cdd6c23b7c2cdd671a7020a99bd8c0c4b602756", + "packages/kicad-claude-mcp/src/kicad_claude/templates/__init__.py": "7eb70257593da06f682a3ddda54a9d260d4fc514f645237f5ca74b08f8da61a6", + "packages/kicad-claude-mcp/src/kicad_claude/templates/blank.py": "40c53dd4fa1c653768be45b274e8df3f9fd16a9b87146c0eb04f8b9c50bb601d", + "packages/kicad-claude-mcp/src/kicad_claude/utils/__init__.py": "7eb70257593da06f682a3ddda54a9d260d4fc514f645237f5ca74b08f8da61a6", + "packages/kicad-claude-mcp/src/kicad_claude/utils/geometry.py": "df698d34494a2a0b4d3479d9481cc6bca3be11f3c165012c0b62431e15044b53", + "packages/kicad-claude-mcp/src/kicad_claude/utils/kicad_paths.py": "afd67274d7333368ff5ee6fbe0c27f812373bcc602d9b39de079f3d0b7855c51", + "src/pcb_copilot/__init__.py": "abc926d65ee286bbec3ec36efcee3080866c0de4c980515817c7fbd745d154b5", + "src/pcb_copilot/accept.py": "af815a9e26285a249c49038bcbe18e6de2965613b8fa6b189227d136399985be", + "src/pcb_copilot/assembly.py": "e94f6c7eca098e4021040550bbe323807f47af402a49849abd6db5920dd488c6", + "src/pcb_copilot/cleanup.py": "0b55310f83b64106443496f70b0f7eac7b6cabd5ea95276994aa9c409a47eb76", + "src/pcb_copilot/cli.py": "c065d836779cea4f2baf8a453ac08f10bfc09ec7ac3358748a1128dbaa7307bf", + "src/pcb_copilot/copper_features.py": "c25aca11c4a5ff687a859febe16351bcf8b815a3a9ffbcb47006d706b769da3e", + "src/pcb_copilot/deviations.py": "3420252cefd82aaa3ae7726619b555346336e468b6eb215be5da87ef758eae11", + "src/pcb_copilot/doctor.py": "48e58656f2b262ae3123a5024dec0db4c85ae65f5b04ede849b27e6cb5963433", + "src/pcb_copilot/drafts.py": "a57f81cd11cae45af23db548a6c657e8ed1d99e90943925fa67bc72c392b9af3", + "src/pcb_copilot/evidence/__init__.py": "68456f40918d99fa6b89fcfb8dbc1f794444578c54a965d9b321d33f54f13b4d", + "src/pcb_copilot/evidence/archive.py": "c9694f9ba712b422c2a962eef80f63489410ff93a59d6c2febeec41ea1dc2e73", + "src/pcb_copilot/evidence/checks.py": "dec2cc2d9e1a302c500ca8387c5d49b4cd11347dd14bc8f0db99e225aa5874a2", + "src/pcb_copilot/evidence/commands.py": "f6bdc59e66ca4a683e57931896aff86a2fe4eaac0becd84403de97f403213ca9", + "src/pcb_copilot/evidence/extract.py": "0741d82391e7abee40a006402a05c36f67146d9530147ecb074a0c86a9a1fb3d", + "src/pcb_copilot/evidence/facts.py": "f755f082fb5a8cbb0da78b3073d526e86ecc3e122b747036c09a15204dd962e6", + "src/pcb_copilot/evidence/index.py": "1030eb94b3f399aa51a41e89ef7ccc840572d415f4a408d6154f95f3a32013e1", + "src/pcb_copilot/evidence/inventory.py": "36128f77a832158d5a71bb82f6feccbe88b04b52434949cd8a10bd608857fa82", + "src/pcb_copilot/evidence/models.py": "2560530d617a68885c5e1dada3c843f6f4a8d1f7cfb3fae2a2cdbe023c59da50", + "src/pcb_copilot/evidence/references.py": "2c658388613d42c38643909324f263e41e4a783327d3d355ea50f716883726f3", + "src/pcb_copilot/evidence/schematic_inventory.py": "954041ea4de8f2855556908d25101cc3cc15f70557257a473a5cbe8e681c1d0b", + "src/pcb_copilot/jlcpcb.py": "185e2b63319244e96757f1062dd3394f1c199ec71742009f0dd48e559b57f256", + "src/pcb_copilot/layout/__init__.py": "17478a6ca71f1dba38b8328a185fb8f651e36dc020b17f1aebdcf6420a875c80", + "src/pcb_copilot/layout/commands.py": "efe3a506a4c7bb20e6ab14abd35617b8fd294df7a74ed16c515d54876ac2aaf5", + "src/pcb_copilot/layout/constraints.py": "30c51d9605c5c796cd7b70f4abadd0862442a9abe2bc47e32fccd6b2a5c9ef64", + "src/pcb_copilot/layout/fix_via_annular_native.py": "a27ae49e936c36398a5ee7ab644fd2e2cc942cf5355e22ab89f5e996fe702afa", + "src/pcb_copilot/layout/footprint_provenance.py": "2f2df72f7ff8a2b325bfc07ba758f8f7c1f7468d473199f998f79392d64efe2c", + "src/pcb_copilot/layout/footprints.py": "97dbdb50deb4440fdcc6e5faf85578788fdfa67a681c691e9a5576cb9d4188cc", + "src/pcb_copilot/layout/geometry.py": "06491818f3912a537f1422b73de39de3cc2155260d156cd950942692e667ba8a", + "src/pcb_copilot/layout/io.py": "6095fb532a1f2138f175edeb54711979b60b3743c2b4788fe68c46083458afc4", + "src/pcb_copilot/layout/lib_ids.py": "f07b9d9c70befccf3b442ec16d8151d594c7f14b530b16f65c59b5ffacd8a0d5", + "src/pcb_copilot/layout/models.py": "00b34b237f3f9c43ba0046e3e64cd586bab3fdc1b4e7f4507d860d92b9c49c0b", + "src/pcb_copilot/layout/official_footprint_provenance.py": "619d2531260d6d5ad61007c09840b757660d519e1fdd46695033176939628380", + "src/pcb_copilot/layout/place.py": "406a87da19300c1b0eb078a3162a21aa49736b8f7fdfccaaff7658e04853789a", + "src/pcb_copilot/layout/preview.py": "a93eba4fc8e44a904cadbd56b10db0d2ab49c7379e78bbc8b8728c599b70a650", + "src/pcb_copilot/layout/render.py": "d51299ac6141bb5126c73370524c9bdff97a9e1b7e0d36feba0c8bb44b73a99b", + "src/pcb_copilot/layout/research.py": "cec67659a6fbd40306bdf0cc8b6dbd9a0f08e7183c9c51cc918acc47ba5aa574", + "src/pcb_copilot/layout/route.py": "ae2ecbbed5e17ebd1d6c15d13adbfbf4cf1f9539566295eff9163316d33ef061", + "src/pcb_copilot/layout/schematic_links.py": "6c224ffc1234748323f10cdfcb583ca431ddefa9aaee5db0682999ec516ab344", + "src/pcb_copilot/layout/stitch_vias_native.py": "86661724b42809b259c944a4f66183e7732a25901abe02dd60c3e9174ac30e60", + "src/pcb_copilot/layout/update.py": "c73ceb0a2feb63a10b5c40a517ba3d7dfc8ce97d86298f5df2fcc98fcdcd556f", + "src/pcb_copilot/manufacturing.py": "ea322af968c83b64be04c3acdbcd86804e88956c1bfc53aae5fbe8346c41cb8b", + "src/pcb_copilot/models.py": "abd6542840110e8f6a553c8300042f3b117aa873fe36ebb742932ccde04a0888", + "src/pcb_copilot/parts.py": "785fb40565a35fcf92f2e908dba29bac92b0598b7340560605e77a083de8f294", + "src/pcb_copilot/parts_converter.py": "905a1d3670e8b9ff4b6f92f1cdc228c158b1c7c5688016dacc6219f7297b58ba", + "src/pcb_copilot/preview_publication.py": "3741a31e3f58f21ccc5291c7d462a13c720728da4a8b5222e52b4a63a20766ea", + "src/pcb_copilot/project.py": "95c84651521b8a95d4f67e0a1c786e4e50a6256b12cb1c2222bb5211c70e26ad", + "src/pcb_copilot/release.py": "9a8a6a9a657097916e79c1f667ec7acea2df08d77208f02595cdf97a1b9970ef", + "src/pcb_copilot/review/__init__.py": "1f874626fe24ed43882f78d77c6a6c265850522bcd1b530cbecfa0a21bf004bb", + "src/pcb_copilot/review/checks.py": "ae2e9354b1bcc35c861609d6f1688898641ea030e3fbded14d347e5c7b0f8c9f", + "src/pcb_copilot/review/commands.py": "e4b194b9dd99dda20addf0893e36e39523166e82a2260b327aa4f11c29f29e2c", + "src/pcb_copilot/review/design_rules_native.py": "26e95ca0321ed50e870536d64ece0351c3e9dfc8a12b4100c526f6886e78100f", + "src/pcb_copilot/review/fingerprint.py": "78b00b916403f9000c36129b83392ef96f0f46616c35a3eca4d278baacbdcc77", + "src/pcb_copilot/review/models.py": "e7eb68fd5ffa26d48afd362aa5d205ca74092d59ec5d8e9d950e25f68788b412", + "src/pcb_copilot/review/placement.py": "232776b27695e30a0119e54faca0d4590eceb2c9fa76179b585180fd1bf4d8b6", + "src/pcb_copilot/review/registry.py": "308456033f2ca6f14fdd5e9ef97edb2b840438af9946fc97af8bd1c4956c7526", + "src/pcb_copilot/review/routing_settings.py": "1efdd4d28fabf803747959e815e0cc809da14309d1d4dfa376491271000d614d", + "src/pcb_copilot/review/routing_topology.py": "a41e17028da6ae50c6c1cc03f84574af4cba76d3e06d9740a248bed02d470259", + "src/pcb_copilot/review/schematic_quality.py": "c4dc2a0686ea7ab4d15f1bf593bab2978fc58ba6c60c4eed45ec8c278e35de6e", + "src/pcb_copilot/review/signoff.py": "5115abe286a976ebfda39ac95445936cf507ead383cbabdecb152a4228da81ef", + "src/pcb_copilot/review/views.py": "b38c71f8dedded461903c279a1bd5ff93ddc6c56aac77128fa098f018a24a103", + "src/pcb_copilot/schematic/__init__.py": "9a853ada9a7ab2af1acbbd888d898028f28a2577be832902bad6c369a5d80383", + "src/pcb_copilot/schematic/commands.py": "90a88446242afd3db6935c46f2dce940deed00c21a9198407169b0f3d8033a8c", + "src/pcb_copilot/schematic/fields.py": "abd6bf39f4aeb8a630dc19a3eea2cb1cd4919d233adfc2adc950ea18efe97b0f", + "src/pcb_copilot/schematic/geometry.py": "377e7797a5f7ea8ff25a8960aa53a3d928c8dcbacb7ca2222ee0d77c95b47ec5", + "src/pcb_copilot/schematic/hierarchy.py": "5528f826c34771cb870784e3e3415e79e454352464a951a80619988725d89f8b", + "src/pcb_copilot/schematic/io.py": "cef634448c32831d98dd6c607fcf608366cc3b9187b2376c5c0d3c7c249e1ebb", + "src/pcb_copilot/schematic/models.py": "bce58d906d419bb2f60750282af209ccf2ab8b9359e7a15b57bbcd56594c114b", + "src/pcb_copilot/schematic/native_candidate.py": "9de35fd89e331e8bdd5d1f0fc724fb3fc5b1c42d1642978b7f85895e5c5eb5bd", + "src/pcb_copilot/schematic/netlist.py": "a243d76ac438b7e88a43ab3b6a34182bd9181d0af6bc4105d2d3e234f4a68b49", + "src/pcb_copilot/schematic/netmap.py": "5aebb1541912ef87a08ed088799bc228c83d7537eeffa6516ee1e6a6d5ab12c2", + "src/pcb_copilot/schematic/parity.py": "7b4bd58f7f217c26e615bf5d05275682fcb90cbc3c9f754e7cb301e3cd07f1fc", + "src/pcb_copilot/schematic/pcb_net_inventory.py": "e3299d2525a159ca9d58dc0d261a00453ff4a5aa3260a639828f30a5707d8c89", + "src/pcb_copilot/schematic/power.py": "0397ced9886999f1afccce119a16a4a3f541b0797c571d5f49b4f1e2d5f8bcb5", + "src/pcb_copilot/schematic/preview.py": "348ee4d0d8bf091822dc4413fc0299e700c59fbfddb7c9b3be15110d44d57c6e", + "src/pcb_copilot/schematic/quality.py": "d2fa4fcbd8133ba78125b0ba8e48ddd0709d2d502bfb45c54eeaa0b7387124ad", + "src/pcb_copilot/schematic/render.py": "fa746aaa5b0801525c686069899256bb96967fb8df2f22bec873becd39a16e64", + "src/pcb_copilot/schematic/update.py": "98284012a1d044d5ccbb5ef6104f188d14dd696520750c7c364e5e24ff402f67", + "src/pcb_copilot/schematic/wiring.py": "0e3f94a9f030546eec7e30976f100eea6dba4639cec61b1696f7cd6b5625ca3a", + "src/pcb_copilot/state.py": "9f482e69b357d0c5fa4734351ca840e2415d5090bb9c0eb5ea54e1a182f9bcbd", + "src/pcb_copilot/status.py": "36c9b50254abc470e31368c3f74b73d1d4c7668fd496231cf6a835a61e559258", + "src/pcb_copilot/stock.py": "4750bfc03f4d1f4bcd3b29c811df53c86c55c69680b32513316d50ac718fd72f", + "src/pcb_copilot/toolchain.py": "6cc1892895fe3822da9ac9809e42651bc7b03e9b5a40f5de512ccb9f21b54f71", + "src/pcb_copilot/transaction.py": "89b517943dcca9921223ba086812a308e68e2d0a8cfd46ab0f82e6b40b8a6eaf", + "src/pcb_copilot/update_guard.py": "5db6fba62677f47da7dbc1ab45575e04fecd0e8cfbae6d372f2c7f8129888dd3", + "tools/evaluate.py": "1c2ce0ea4bbe02d96e3405335e93844ecc1f60fc88b7d02c07391e8c7abced38" + }, + "cases": [ + { + "name": "control-evidence", + "workspace": "workspaces/control-evidence/gpio-indicator", + "injection": null, + "expected": { + "exit_code": 0, + "diagnostic_contains": "evidence record(s) verified" + }, + "actual": { + "interface": "cli", + "arguments": [ + "research", + "workspaces/control-evidence/gpio-indicator", + "--verify" + ], + "executed_argv": [ + "C:\\Users\\tae06\\CODE\\PCB\\.venv\\Scripts\\python.exe", + "-c", + "from pcb_copilot.cli import entrypoint; entrypoint()", + "research", + "workspaces/control-evidence/gpio-indicator", + "--verify" + ], + "exit_code": 0, + "duration_seconds": 0.301, + "stdout": "logs/control-evidence.stdout.txt", + "stderr": "logs/control-evidence.stderr.txt", + "error": null + }, + "outcome": "met_expectation", + "inputs_before": { + "DESIGN_BASIS.md": "77119e5d1ab6ea43a385a17adec1874ffc9b6c20e35eb44d783278710b9f239f", + "DEVIATIONS.md": "324f110ce0816864290f2b28a6ecdbe8006457f305852762837590ae0eb99563", + "evidence/files/61300511121_61300511121_b91171c2b942.pdf": "b91171c2b94275ccb3824762a4b77dcd0cd9031e8a818e869a6c9f18c053ad8b", + "evidence/files/MFR-25FBF52-1K1_YAGEO-MFR_DATASHEET_b460acdb4764.pdf": "b460acdb476469774e0785a8ef85aec79e2d95fe41beaa79c5a414e4e95e3fe0", + "evidence/files/WP710A10ID_WP710A10ID_42d464fbfd8d.pdf": "42d464fbfd8d3ddef65fa6f9226d298547cdb25d5369aff0c47e5f896595c4bd", + "evidence/index.yaml": "cece06b86df6f692fbfe52ceabf858e7996eb0721db00232d79f54c1c3c82149", + "fp-lib-table": "65851d1c9080d2cf944dcf740f2b9ad66fd62e6550f0feb7635f9dab55e1c329", + "gpio-indicator.kicad_dru": "fd6ec6cfd46f091c61ee7fa09ab3e1c5e29cb9b187e5045bcf055666f0239643", + "gpio-indicator.kicad_pcb": "aa4811a06c27b7d529da161f004cf5e5c1d192e04515ebd6aa9e8716a8536c71", + "gpio-indicator.kicad_pro": "b53a9bec0882a7dbd622aba8401f6616c067972c9d85dbffc407c407f9365fe2", + "gpio-indicator.kicad_sch": "bcf4b33bda22faff9d68be7498e96e7a83a40dc403b5fe2f4ffd79bf2f265ab4", + "jlcpcb-assembly.yaml": null, + "layout-intent.yaml": null, + "libs/Demo.kicad_sym": "c5e68806f7af78dceae8bff16e23446288e7247b32aa1a31d64f58da7e70a403", + "libs/Demo.pretty/LED_D3.0mm.kicad_mod": "9928bcc8ef35ea406d56af1480e43c606d8d646ba247b3d453d80386cd0f5b10", + "libs/Demo.pretty/MountingHole_3.2mm_M3.kicad_mod": "3853c52bba27d3e3e3e18db44a20dfb296eb9e6cd16ebf26fe4a96a2ee8add3b", + "libs/Demo.pretty/PinHeader_1x05_P2.54mm_Vertical.kicad_mod": "8e494ecb4bbaff9fecbe2b16962684513fae788c9b9c9902172781d64b01c2e3", + "libs/Demo.pretty/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.kicad_mod": "bf616ce7d49ae02d5c87d01dd19957ebf3aa66007809680c450de8561f4681a1", + "libs/LICENSE-kicad-footprints.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE-kicad-packages3D.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE-kicad-symbols.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE_PROVENANCE.json": "8fb14cbd87bbb53c2e381fa614336026b1ef1a6b69d252e40b5de8dafa7f9c66", + "libs/models/LED_D3.0mm.step": "e83c2186ad887c36d869f44e28c7b80646ea10cb388697b4380f5a2777268371", + "libs/models/PinHeader_1x05_P2.54mm_Vertical.step": "f03b716e453f6d4f2a111a227c671d96f92708e72a5a663cd4889296d021f4c3", + "libs/models/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.step": "85bdadc9190739c38429da06b1d9c76ccf33aef9a0794a2e7a9dd5b58d9d05fe", + "libs/PROVENANCE.json": "30cb553d1c3ac24055e98ae9dc41e45d3eaa876cad6a8894dee4959aef2f6314", + "libs/README.md": "c09361039bd440ad0aa9038cf81a652abfbbe1e2803ca0dbd3471ce576a2e2d0", + "libs/upstream/LED_D3.0mm.kicad_mod": "d45c606dbf639522eaeae8c6bd2569747ee454daff87ab2db66bdad3200676d0", + "libs/upstream/models/LED_D3.0mm.step": "e83c2186ad887c36d869f44e28c7b80646ea10cb388697b4380f5a2777268371", + "libs/upstream/models/PinHeader_1x05_P2.54mm_Vertical.step": "f03b716e453f6d4f2a111a227c671d96f92708e72a5a663cd4889296d021f4c3", + "libs/upstream/models/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.step": "85bdadc9190739c38429da06b1d9c76ccf33aef9a0794a2e7a9dd5b58d9d05fe", + "libs/upstream/MountingHole_3.2mm_M3.kicad_mod": "3853c52bba27d3e3e3e18db44a20dfb296eb9e6cd16ebf26fe4a96a2ee8add3b", + "libs/upstream/PinHeader_1x05_P2.54mm_Vertical.kicad_mod": "a9beaa5e3bf9f73f4667fd503d8ddc47f81aec7999b51211890c919363099acf", + "libs/upstream/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.kicad_mod": "1ba096b69c79e588cc54946fb6648699e5b301f67f8df0e0e0be43dcab326436", + "netmap.json": "8049b76e10dfec2faea46331a99f75b34a22956aa7c81a685046c1389f1f64cd", + "project.yaml": "aa7e36a756e811ac38745c30d60499eec18049f8ae8e1affcac57b4613a51f14", + "REFERENCE_REVIEW.md": "7ddb00764a476d5b8e30e9ad125b103b815c7352dbdec4906016349a96b04d00", + "REQUIREMENTS.md": "5752f874ffded6f7ad28952d14a08c1764db07e818f156fb1a99399c4a3c7efa", + "review-profile.yaml": "c6b7725c0945ace7546a27fb0ef93c313a09af05e6ae974c0ca8e75ecd9a0af2", + "review-signoff.yaml": null, + "schematic-intent.yaml": null, + "sym-lib-table": "accdd625891ba71beb5e534de13e680099f47f98dff64ca95182060d2072213c" + }, + "inputs_after_injection": { + "DESIGN_BASIS.md": "77119e5d1ab6ea43a385a17adec1874ffc9b6c20e35eb44d783278710b9f239f", + "DEVIATIONS.md": "324f110ce0816864290f2b28a6ecdbe8006457f305852762837590ae0eb99563", + "evidence/files/61300511121_61300511121_b91171c2b942.pdf": "b91171c2b94275ccb3824762a4b77dcd0cd9031e8a818e869a6c9f18c053ad8b", + "evidence/files/MFR-25FBF52-1K1_YAGEO-MFR_DATASHEET_b460acdb4764.pdf": "b460acdb476469774e0785a8ef85aec79e2d95fe41beaa79c5a414e4e95e3fe0", + "evidence/files/WP710A10ID_WP710A10ID_42d464fbfd8d.pdf": "42d464fbfd8d3ddef65fa6f9226d298547cdb25d5369aff0c47e5f896595c4bd", + "evidence/index.yaml": "cece06b86df6f692fbfe52ceabf858e7996eb0721db00232d79f54c1c3c82149", + "fp-lib-table": "65851d1c9080d2cf944dcf740f2b9ad66fd62e6550f0feb7635f9dab55e1c329", + "gpio-indicator.kicad_dru": "fd6ec6cfd46f091c61ee7fa09ab3e1c5e29cb9b187e5045bcf055666f0239643", + "gpio-indicator.kicad_pcb": "aa4811a06c27b7d529da161f004cf5e5c1d192e04515ebd6aa9e8716a8536c71", + "gpio-indicator.kicad_pro": "b53a9bec0882a7dbd622aba8401f6616c067972c9d85dbffc407c407f9365fe2", + "gpio-indicator.kicad_sch": "bcf4b33bda22faff9d68be7498e96e7a83a40dc403b5fe2f4ffd79bf2f265ab4", + "jlcpcb-assembly.yaml": null, + "layout-intent.yaml": null, + "libs/Demo.kicad_sym": "c5e68806f7af78dceae8bff16e23446288e7247b32aa1a31d64f58da7e70a403", + "libs/Demo.pretty/LED_D3.0mm.kicad_mod": "9928bcc8ef35ea406d56af1480e43c606d8d646ba247b3d453d80386cd0f5b10", + "libs/Demo.pretty/MountingHole_3.2mm_M3.kicad_mod": "3853c52bba27d3e3e3e18db44a20dfb296eb9e6cd16ebf26fe4a96a2ee8add3b", + "libs/Demo.pretty/PinHeader_1x05_P2.54mm_Vertical.kicad_mod": "8e494ecb4bbaff9fecbe2b16962684513fae788c9b9c9902172781d64b01c2e3", + "libs/Demo.pretty/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.kicad_mod": "bf616ce7d49ae02d5c87d01dd19957ebf3aa66007809680c450de8561f4681a1", + "libs/LICENSE-kicad-footprints.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE-kicad-packages3D.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE-kicad-symbols.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE_PROVENANCE.json": "8fb14cbd87bbb53c2e381fa614336026b1ef1a6b69d252e40b5de8dafa7f9c66", + "libs/models/LED_D3.0mm.step": "e83c2186ad887c36d869f44e28c7b80646ea10cb388697b4380f5a2777268371", + "libs/models/PinHeader_1x05_P2.54mm_Vertical.step": "f03b716e453f6d4f2a111a227c671d96f92708e72a5a663cd4889296d021f4c3", + "libs/models/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.step": "85bdadc9190739c38429da06b1d9c76ccf33aef9a0794a2e7a9dd5b58d9d05fe", + "libs/PROVENANCE.json": "30cb553d1c3ac24055e98ae9dc41e45d3eaa876cad6a8894dee4959aef2f6314", + "libs/README.md": "c09361039bd440ad0aa9038cf81a652abfbbe1e2803ca0dbd3471ce576a2e2d0", + "libs/upstream/LED_D3.0mm.kicad_mod": "d45c606dbf639522eaeae8c6bd2569747ee454daff87ab2db66bdad3200676d0", + "libs/upstream/models/LED_D3.0mm.step": "e83c2186ad887c36d869f44e28c7b80646ea10cb388697b4380f5a2777268371", + "libs/upstream/models/PinHeader_1x05_P2.54mm_Vertical.step": "f03b716e453f6d4f2a111a227c671d96f92708e72a5a663cd4889296d021f4c3", + "libs/upstream/models/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.step": "85bdadc9190739c38429da06b1d9c76ccf33aef9a0794a2e7a9dd5b58d9d05fe", + "libs/upstream/MountingHole_3.2mm_M3.kicad_mod": "3853c52bba27d3e3e3e18db44a20dfb296eb9e6cd16ebf26fe4a96a2ee8add3b", + "libs/upstream/PinHeader_1x05_P2.54mm_Vertical.kicad_mod": "a9beaa5e3bf9f73f4667fd503d8ddc47f81aec7999b51211890c919363099acf", + "libs/upstream/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.kicad_mod": "1ba096b69c79e588cc54946fb6648699e5b301f67f8df0e0e0be43dcab326436", + "netmap.json": "8049b76e10dfec2faea46331a99f75b34a22956aa7c81a685046c1389f1f64cd", + "project.yaml": "aa7e36a756e811ac38745c30d60499eec18049f8ae8e1affcac57b4613a51f14", + "REFERENCE_REVIEW.md": "7ddb00764a476d5b8e30e9ad125b103b815c7352dbdec4906016349a96b04d00", + "REQUIREMENTS.md": "5752f874ffded6f7ad28952d14a08c1764db07e818f156fb1a99399c4a3c7efa", + "review-profile.yaml": "c6b7725c0945ace7546a27fb0ef93c313a09af05e6ae974c0ca8e75ecd9a0af2", + "review-signoff.yaml": null, + "schematic-intent.yaml": null, + "sym-lib-table": "accdd625891ba71beb5e534de13e680099f47f98dff64ca95182060d2072213c" + }, + "inputs_after_checks": { + "DESIGN_BASIS.md": "77119e5d1ab6ea43a385a17adec1874ffc9b6c20e35eb44d783278710b9f239f", + "DEVIATIONS.md": "324f110ce0816864290f2b28a6ecdbe8006457f305852762837590ae0eb99563", + "evidence/files/61300511121_61300511121_b91171c2b942.pdf": "b91171c2b94275ccb3824762a4b77dcd0cd9031e8a818e869a6c9f18c053ad8b", + "evidence/files/MFR-25FBF52-1K1_YAGEO-MFR_DATASHEET_b460acdb4764.pdf": "b460acdb476469774e0785a8ef85aec79e2d95fe41beaa79c5a414e4e95e3fe0", + "evidence/files/WP710A10ID_WP710A10ID_42d464fbfd8d.pdf": "42d464fbfd8d3ddef65fa6f9226d298547cdb25d5369aff0c47e5f896595c4bd", + "evidence/index.yaml": "cece06b86df6f692fbfe52ceabf858e7996eb0721db00232d79f54c1c3c82149", + "fp-lib-table": "65851d1c9080d2cf944dcf740f2b9ad66fd62e6550f0feb7635f9dab55e1c329", + "gpio-indicator.kicad_dru": "fd6ec6cfd46f091c61ee7fa09ab3e1c5e29cb9b187e5045bcf055666f0239643", + "gpio-indicator.kicad_pcb": "aa4811a06c27b7d529da161f004cf5e5c1d192e04515ebd6aa9e8716a8536c71", + "gpio-indicator.kicad_pro": "b53a9bec0882a7dbd622aba8401f6616c067972c9d85dbffc407c407f9365fe2", + "gpio-indicator.kicad_sch": "bcf4b33bda22faff9d68be7498e96e7a83a40dc403b5fe2f4ffd79bf2f265ab4", + "jlcpcb-assembly.yaml": null, + "layout-intent.yaml": null, + "libs/Demo.kicad_sym": "c5e68806f7af78dceae8bff16e23446288e7247b32aa1a31d64f58da7e70a403", + "libs/Demo.pretty/LED_D3.0mm.kicad_mod": "9928bcc8ef35ea406d56af1480e43c606d8d646ba247b3d453d80386cd0f5b10", + "libs/Demo.pretty/MountingHole_3.2mm_M3.kicad_mod": "3853c52bba27d3e3e3e18db44a20dfb296eb9e6cd16ebf26fe4a96a2ee8add3b", + "libs/Demo.pretty/PinHeader_1x05_P2.54mm_Vertical.kicad_mod": "8e494ecb4bbaff9fecbe2b16962684513fae788c9b9c9902172781d64b01c2e3", + "libs/Demo.pretty/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.kicad_mod": "bf616ce7d49ae02d5c87d01dd19957ebf3aa66007809680c450de8561f4681a1", + "libs/LICENSE-kicad-footprints.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE-kicad-packages3D.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE-kicad-symbols.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE_PROVENANCE.json": "8fb14cbd87bbb53c2e381fa614336026b1ef1a6b69d252e40b5de8dafa7f9c66", + "libs/models/LED_D3.0mm.step": "e83c2186ad887c36d869f44e28c7b80646ea10cb388697b4380f5a2777268371", + "libs/models/PinHeader_1x05_P2.54mm_Vertical.step": "f03b716e453f6d4f2a111a227c671d96f92708e72a5a663cd4889296d021f4c3", + "libs/models/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.step": "85bdadc9190739c38429da06b1d9c76ccf33aef9a0794a2e7a9dd5b58d9d05fe", + "libs/PROVENANCE.json": "30cb553d1c3ac24055e98ae9dc41e45d3eaa876cad6a8894dee4959aef2f6314", + "libs/README.md": "c09361039bd440ad0aa9038cf81a652abfbbe1e2803ca0dbd3471ce576a2e2d0", + "libs/upstream/LED_D3.0mm.kicad_mod": "d45c606dbf639522eaeae8c6bd2569747ee454daff87ab2db66bdad3200676d0", + "libs/upstream/models/LED_D3.0mm.step": "e83c2186ad887c36d869f44e28c7b80646ea10cb388697b4380f5a2777268371", + "libs/upstream/models/PinHeader_1x05_P2.54mm_Vertical.step": "f03b716e453f6d4f2a111a227c671d96f92708e72a5a663cd4889296d021f4c3", + "libs/upstream/models/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.step": "85bdadc9190739c38429da06b1d9c76ccf33aef9a0794a2e7a9dd5b58d9d05fe", + "libs/upstream/MountingHole_3.2mm_M3.kicad_mod": "3853c52bba27d3e3e3e18db44a20dfb296eb9e6cd16ebf26fe4a96a2ee8add3b", + "libs/upstream/PinHeader_1x05_P2.54mm_Vertical.kicad_mod": "a9beaa5e3bf9f73f4667fd503d8ddc47f81aec7999b51211890c919363099acf", + "libs/upstream/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.kicad_mod": "1ba096b69c79e588cc54946fb6648699e5b301f67f8df0e0e0be43dcab326436", + "netmap.json": "8049b76e10dfec2faea46331a99f75b34a22956aa7c81a685046c1389f1f64cd", + "project.yaml": "aa7e36a756e811ac38745c30d60499eec18049f8ae8e1affcac57b4613a51f14", + "REFERENCE_REVIEW.md": "7ddb00764a476d5b8e30e9ad125b103b815c7352dbdec4906016349a96b04d00", + "REQUIREMENTS.md": "5752f874ffded6f7ad28952d14a08c1764db07e818f156fb1a99399c4a3c7efa", + "review-profile.yaml": "c6b7725c0945ace7546a27fb0ef93c313a09af05e6ae974c0ca8e75ecd9a0af2", + "review-signoff.yaml": null, + "schematic-intent.yaml": null, + "sym-lib-table": "accdd625891ba71beb5e534de13e680099f47f98dff64ca95182060d2072213c" + }, + "checks_preserved_inputs": true + }, + { + "name": "control-footprints", + "workspace": "workspaces/control-footprints/gpio-indicator", + "injection": null, + "expected": { + "exit_code": 0, + "diagnostic_contains": "\"accepted\": true" + }, + "actual": { + "interface": "validator-api", + "arguments": [ + "workspaces/control-footprints/gpio-indicator", + "[[\"J1\", \"Demo:PinHeader_1x05_P2.54mm_Vertical\"], [\"R1\", \"Demo:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal\"], [\"D1\", \"Demo:LED_D3.0mm\"], [\"R2\", \"Demo:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal\"], [\"D2\", \"Demo:LED_D3.0mm\"], [\"R3\", \"Demo:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal\"], [\"D3\", \"Demo:LED_D3.0mm\"], [\"R4\", \"Demo:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal\"], [\"D4\", \"Demo:LED_D3.0mm\"], [\"H1\", \"Demo:MountingHole_3.2mm_M3\"], [\"H2\", \"Demo:MountingHole_3.2mm_M3\"]]" + ], + "executed_argv": [ + "C:\\Users\\tae06\\CODE\\PCB\\.venv\\Scripts\\python.exe", + "-c", + "import json, sys\nfrom pathlib import Path\nfrom pcb_copilot.project import load_project\nfrom pcb_copilot.layout.footprints import resolve_footprint\nproject = load_project(Path(sys.argv[1]))\ntry:\n results = [resolve_footprint(project, ref, lib_id) for ref, lib_id in json.loads(sys.argv[2])]\nexcept ValueError as error:\n print(json.dumps({'accepted': False, 'exception': type(error).__name__, 'message': str(error)}))\n sys.exit(1)\nprint(json.dumps({'accepted': True, 'footprints': len(results), 'fidelities': [r.fidelity for r in results]}))\n", + "workspaces/control-footprints/gpio-indicator", + "[[\"J1\", \"Demo:PinHeader_1x05_P2.54mm_Vertical\"], [\"R1\", \"Demo:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal\"], [\"D1\", \"Demo:LED_D3.0mm\"], [\"R2\", \"Demo:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal\"], [\"D2\", \"Demo:LED_D3.0mm\"], [\"R3\", \"Demo:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal\"], [\"D3\", \"Demo:LED_D3.0mm\"], [\"R4\", \"Demo:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal\"], [\"D4\", \"Demo:LED_D3.0mm\"], [\"H1\", \"Demo:MountingHole_3.2mm_M3\"], [\"H2\", \"Demo:MountingHole_3.2mm_M3\"]]" + ], + "exit_code": 0, + "duration_seconds": 0.643, + "stdout": "logs/control-footprints.stdout.txt", + "stderr": "logs/control-footprints.stderr.txt", + "error": null + }, + "outcome": "met_expectation", + "inputs_before": { + "DESIGN_BASIS.md": "77119e5d1ab6ea43a385a17adec1874ffc9b6c20e35eb44d783278710b9f239f", + "DEVIATIONS.md": "324f110ce0816864290f2b28a6ecdbe8006457f305852762837590ae0eb99563", + "evidence/files/61300511121_61300511121_b91171c2b942.pdf": "b91171c2b94275ccb3824762a4b77dcd0cd9031e8a818e869a6c9f18c053ad8b", + "evidence/files/MFR-25FBF52-1K1_YAGEO-MFR_DATASHEET_b460acdb4764.pdf": "b460acdb476469774e0785a8ef85aec79e2d95fe41beaa79c5a414e4e95e3fe0", + "evidence/files/WP710A10ID_WP710A10ID_42d464fbfd8d.pdf": "42d464fbfd8d3ddef65fa6f9226d298547cdb25d5369aff0c47e5f896595c4bd", + "evidence/index.yaml": "cece06b86df6f692fbfe52ceabf858e7996eb0721db00232d79f54c1c3c82149", + "fp-lib-table": "65851d1c9080d2cf944dcf740f2b9ad66fd62e6550f0feb7635f9dab55e1c329", + "gpio-indicator.kicad_dru": "fd6ec6cfd46f091c61ee7fa09ab3e1c5e29cb9b187e5045bcf055666f0239643", + "gpio-indicator.kicad_pcb": "aa4811a06c27b7d529da161f004cf5e5c1d192e04515ebd6aa9e8716a8536c71", + "gpio-indicator.kicad_pro": "b53a9bec0882a7dbd622aba8401f6616c067972c9d85dbffc407c407f9365fe2", + "gpio-indicator.kicad_sch": "bcf4b33bda22faff9d68be7498e96e7a83a40dc403b5fe2f4ffd79bf2f265ab4", + "jlcpcb-assembly.yaml": null, + "layout-intent.yaml": null, + "libs/Demo.kicad_sym": "c5e68806f7af78dceae8bff16e23446288e7247b32aa1a31d64f58da7e70a403", + "libs/Demo.pretty/LED_D3.0mm.kicad_mod": "9928bcc8ef35ea406d56af1480e43c606d8d646ba247b3d453d80386cd0f5b10", + "libs/Demo.pretty/MountingHole_3.2mm_M3.kicad_mod": "3853c52bba27d3e3e3e18db44a20dfb296eb9e6cd16ebf26fe4a96a2ee8add3b", + "libs/Demo.pretty/PinHeader_1x05_P2.54mm_Vertical.kicad_mod": "8e494ecb4bbaff9fecbe2b16962684513fae788c9b9c9902172781d64b01c2e3", + "libs/Demo.pretty/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.kicad_mod": "bf616ce7d49ae02d5c87d01dd19957ebf3aa66007809680c450de8561f4681a1", + "libs/LICENSE-kicad-footprints.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE-kicad-packages3D.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE-kicad-symbols.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE_PROVENANCE.json": "8fb14cbd87bbb53c2e381fa614336026b1ef1a6b69d252e40b5de8dafa7f9c66", + "libs/models/LED_D3.0mm.step": "e83c2186ad887c36d869f44e28c7b80646ea10cb388697b4380f5a2777268371", + "libs/models/PinHeader_1x05_P2.54mm_Vertical.step": "f03b716e453f6d4f2a111a227c671d96f92708e72a5a663cd4889296d021f4c3", + "libs/models/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.step": "85bdadc9190739c38429da06b1d9c76ccf33aef9a0794a2e7a9dd5b58d9d05fe", + "libs/PROVENANCE.json": "30cb553d1c3ac24055e98ae9dc41e45d3eaa876cad6a8894dee4959aef2f6314", + "libs/README.md": "c09361039bd440ad0aa9038cf81a652abfbbe1e2803ca0dbd3471ce576a2e2d0", + "libs/upstream/LED_D3.0mm.kicad_mod": "d45c606dbf639522eaeae8c6bd2569747ee454daff87ab2db66bdad3200676d0", + "libs/upstream/models/LED_D3.0mm.step": "e83c2186ad887c36d869f44e28c7b80646ea10cb388697b4380f5a2777268371", + "libs/upstream/models/PinHeader_1x05_P2.54mm_Vertical.step": "f03b716e453f6d4f2a111a227c671d96f92708e72a5a663cd4889296d021f4c3", + "libs/upstream/models/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.step": "85bdadc9190739c38429da06b1d9c76ccf33aef9a0794a2e7a9dd5b58d9d05fe", + "libs/upstream/MountingHole_3.2mm_M3.kicad_mod": "3853c52bba27d3e3e3e18db44a20dfb296eb9e6cd16ebf26fe4a96a2ee8add3b", + "libs/upstream/PinHeader_1x05_P2.54mm_Vertical.kicad_mod": "a9beaa5e3bf9f73f4667fd503d8ddc47f81aec7999b51211890c919363099acf", + "libs/upstream/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.kicad_mod": "1ba096b69c79e588cc54946fb6648699e5b301f67f8df0e0e0be43dcab326436", + "netmap.json": "8049b76e10dfec2faea46331a99f75b34a22956aa7c81a685046c1389f1f64cd", + "project.yaml": "aa7e36a756e811ac38745c30d60499eec18049f8ae8e1affcac57b4613a51f14", + "REFERENCE_REVIEW.md": "7ddb00764a476d5b8e30e9ad125b103b815c7352dbdec4906016349a96b04d00", + "REQUIREMENTS.md": "5752f874ffded6f7ad28952d14a08c1764db07e818f156fb1a99399c4a3c7efa", + "review-profile.yaml": "c6b7725c0945ace7546a27fb0ef93c313a09af05e6ae974c0ca8e75ecd9a0af2", + "review-signoff.yaml": null, + "schematic-intent.yaml": null, + "sym-lib-table": "accdd625891ba71beb5e534de13e680099f47f98dff64ca95182060d2072213c" + }, + "inputs_after_injection": { + "DESIGN_BASIS.md": "77119e5d1ab6ea43a385a17adec1874ffc9b6c20e35eb44d783278710b9f239f", + "DEVIATIONS.md": "324f110ce0816864290f2b28a6ecdbe8006457f305852762837590ae0eb99563", + "evidence/files/61300511121_61300511121_b91171c2b942.pdf": "b91171c2b94275ccb3824762a4b77dcd0cd9031e8a818e869a6c9f18c053ad8b", + "evidence/files/MFR-25FBF52-1K1_YAGEO-MFR_DATASHEET_b460acdb4764.pdf": "b460acdb476469774e0785a8ef85aec79e2d95fe41beaa79c5a414e4e95e3fe0", + "evidence/files/WP710A10ID_WP710A10ID_42d464fbfd8d.pdf": "42d464fbfd8d3ddef65fa6f9226d298547cdb25d5369aff0c47e5f896595c4bd", + "evidence/index.yaml": "cece06b86df6f692fbfe52ceabf858e7996eb0721db00232d79f54c1c3c82149", + "fp-lib-table": "65851d1c9080d2cf944dcf740f2b9ad66fd62e6550f0feb7635f9dab55e1c329", + "gpio-indicator.kicad_dru": "fd6ec6cfd46f091c61ee7fa09ab3e1c5e29cb9b187e5045bcf055666f0239643", + "gpio-indicator.kicad_pcb": "aa4811a06c27b7d529da161f004cf5e5c1d192e04515ebd6aa9e8716a8536c71", + "gpio-indicator.kicad_pro": "b53a9bec0882a7dbd622aba8401f6616c067972c9d85dbffc407c407f9365fe2", + "gpio-indicator.kicad_sch": "bcf4b33bda22faff9d68be7498e96e7a83a40dc403b5fe2f4ffd79bf2f265ab4", + "jlcpcb-assembly.yaml": null, + "layout-intent.yaml": null, + "libs/Demo.kicad_sym": "c5e68806f7af78dceae8bff16e23446288e7247b32aa1a31d64f58da7e70a403", + "libs/Demo.pretty/LED_D3.0mm.kicad_mod": "9928bcc8ef35ea406d56af1480e43c606d8d646ba247b3d453d80386cd0f5b10", + "libs/Demo.pretty/MountingHole_3.2mm_M3.kicad_mod": "3853c52bba27d3e3e3e18db44a20dfb296eb9e6cd16ebf26fe4a96a2ee8add3b", + "libs/Demo.pretty/PinHeader_1x05_P2.54mm_Vertical.kicad_mod": "8e494ecb4bbaff9fecbe2b16962684513fae788c9b9c9902172781d64b01c2e3", + "libs/Demo.pretty/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.kicad_mod": "bf616ce7d49ae02d5c87d01dd19957ebf3aa66007809680c450de8561f4681a1", + "libs/LICENSE-kicad-footprints.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE-kicad-packages3D.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE-kicad-symbols.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE_PROVENANCE.json": "8fb14cbd87bbb53c2e381fa614336026b1ef1a6b69d252e40b5de8dafa7f9c66", + "libs/models/LED_D3.0mm.step": "e83c2186ad887c36d869f44e28c7b80646ea10cb388697b4380f5a2777268371", + "libs/models/PinHeader_1x05_P2.54mm_Vertical.step": "f03b716e453f6d4f2a111a227c671d96f92708e72a5a663cd4889296d021f4c3", + "libs/models/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.step": "85bdadc9190739c38429da06b1d9c76ccf33aef9a0794a2e7a9dd5b58d9d05fe", + "libs/PROVENANCE.json": "30cb553d1c3ac24055e98ae9dc41e45d3eaa876cad6a8894dee4959aef2f6314", + "libs/README.md": "c09361039bd440ad0aa9038cf81a652abfbbe1e2803ca0dbd3471ce576a2e2d0", + "libs/upstream/LED_D3.0mm.kicad_mod": "d45c606dbf639522eaeae8c6bd2569747ee454daff87ab2db66bdad3200676d0", + "libs/upstream/models/LED_D3.0mm.step": "e83c2186ad887c36d869f44e28c7b80646ea10cb388697b4380f5a2777268371", + "libs/upstream/models/PinHeader_1x05_P2.54mm_Vertical.step": "f03b716e453f6d4f2a111a227c671d96f92708e72a5a663cd4889296d021f4c3", + "libs/upstream/models/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.step": "85bdadc9190739c38429da06b1d9c76ccf33aef9a0794a2e7a9dd5b58d9d05fe", + "libs/upstream/MountingHole_3.2mm_M3.kicad_mod": "3853c52bba27d3e3e3e18db44a20dfb296eb9e6cd16ebf26fe4a96a2ee8add3b", + "libs/upstream/PinHeader_1x05_P2.54mm_Vertical.kicad_mod": "a9beaa5e3bf9f73f4667fd503d8ddc47f81aec7999b51211890c919363099acf", + "libs/upstream/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.kicad_mod": "1ba096b69c79e588cc54946fb6648699e5b301f67f8df0e0e0be43dcab326436", + "netmap.json": "8049b76e10dfec2faea46331a99f75b34a22956aa7c81a685046c1389f1f64cd", + "project.yaml": "aa7e36a756e811ac38745c30d60499eec18049f8ae8e1affcac57b4613a51f14", + "REFERENCE_REVIEW.md": "7ddb00764a476d5b8e30e9ad125b103b815c7352dbdec4906016349a96b04d00", + "REQUIREMENTS.md": "5752f874ffded6f7ad28952d14a08c1764db07e818f156fb1a99399c4a3c7efa", + "review-profile.yaml": "c6b7725c0945ace7546a27fb0ef93c313a09af05e6ae974c0ca8e75ecd9a0af2", + "review-signoff.yaml": null, + "schematic-intent.yaml": null, + "sym-lib-table": "accdd625891ba71beb5e534de13e680099f47f98dff64ca95182060d2072213c" + }, + "inputs_after_checks": { + "DESIGN_BASIS.md": "77119e5d1ab6ea43a385a17adec1874ffc9b6c20e35eb44d783278710b9f239f", + "DEVIATIONS.md": "324f110ce0816864290f2b28a6ecdbe8006457f305852762837590ae0eb99563", + "evidence/files/61300511121_61300511121_b91171c2b942.pdf": "b91171c2b94275ccb3824762a4b77dcd0cd9031e8a818e869a6c9f18c053ad8b", + "evidence/files/MFR-25FBF52-1K1_YAGEO-MFR_DATASHEET_b460acdb4764.pdf": "b460acdb476469774e0785a8ef85aec79e2d95fe41beaa79c5a414e4e95e3fe0", + "evidence/files/WP710A10ID_WP710A10ID_42d464fbfd8d.pdf": "42d464fbfd8d3ddef65fa6f9226d298547cdb25d5369aff0c47e5f896595c4bd", + "evidence/index.yaml": "cece06b86df6f692fbfe52ceabf858e7996eb0721db00232d79f54c1c3c82149", + "fp-lib-table": "65851d1c9080d2cf944dcf740f2b9ad66fd62e6550f0feb7635f9dab55e1c329", + "gpio-indicator.kicad_dru": "fd6ec6cfd46f091c61ee7fa09ab3e1c5e29cb9b187e5045bcf055666f0239643", + "gpio-indicator.kicad_pcb": "aa4811a06c27b7d529da161f004cf5e5c1d192e04515ebd6aa9e8716a8536c71", + "gpio-indicator.kicad_pro": "b53a9bec0882a7dbd622aba8401f6616c067972c9d85dbffc407c407f9365fe2", + "gpio-indicator.kicad_sch": "bcf4b33bda22faff9d68be7498e96e7a83a40dc403b5fe2f4ffd79bf2f265ab4", + "jlcpcb-assembly.yaml": null, + "layout-intent.yaml": null, + "libs/Demo.kicad_sym": "c5e68806f7af78dceae8bff16e23446288e7247b32aa1a31d64f58da7e70a403", + "libs/Demo.pretty/LED_D3.0mm.kicad_mod": "9928bcc8ef35ea406d56af1480e43c606d8d646ba247b3d453d80386cd0f5b10", + "libs/Demo.pretty/MountingHole_3.2mm_M3.kicad_mod": "3853c52bba27d3e3e3e18db44a20dfb296eb9e6cd16ebf26fe4a96a2ee8add3b", + "libs/Demo.pretty/PinHeader_1x05_P2.54mm_Vertical.kicad_mod": "8e494ecb4bbaff9fecbe2b16962684513fae788c9b9c9902172781d64b01c2e3", + "libs/Demo.pretty/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.kicad_mod": "bf616ce7d49ae02d5c87d01dd19957ebf3aa66007809680c450de8561f4681a1", + "libs/LICENSE-kicad-footprints.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE-kicad-packages3D.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE-kicad-symbols.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE_PROVENANCE.json": "8fb14cbd87bbb53c2e381fa614336026b1ef1a6b69d252e40b5de8dafa7f9c66", + "libs/models/LED_D3.0mm.step": "e83c2186ad887c36d869f44e28c7b80646ea10cb388697b4380f5a2777268371", + "libs/models/PinHeader_1x05_P2.54mm_Vertical.step": "f03b716e453f6d4f2a111a227c671d96f92708e72a5a663cd4889296d021f4c3", + "libs/models/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.step": "85bdadc9190739c38429da06b1d9c76ccf33aef9a0794a2e7a9dd5b58d9d05fe", + "libs/PROVENANCE.json": "30cb553d1c3ac24055e98ae9dc41e45d3eaa876cad6a8894dee4959aef2f6314", + "libs/README.md": "c09361039bd440ad0aa9038cf81a652abfbbe1e2803ca0dbd3471ce576a2e2d0", + "libs/upstream/LED_D3.0mm.kicad_mod": "d45c606dbf639522eaeae8c6bd2569747ee454daff87ab2db66bdad3200676d0", + "libs/upstream/models/LED_D3.0mm.step": "e83c2186ad887c36d869f44e28c7b80646ea10cb388697b4380f5a2777268371", + "libs/upstream/models/PinHeader_1x05_P2.54mm_Vertical.step": "f03b716e453f6d4f2a111a227c671d96f92708e72a5a663cd4889296d021f4c3", + "libs/upstream/models/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.step": "85bdadc9190739c38429da06b1d9c76ccf33aef9a0794a2e7a9dd5b58d9d05fe", + "libs/upstream/MountingHole_3.2mm_M3.kicad_mod": "3853c52bba27d3e3e3e18db44a20dfb296eb9e6cd16ebf26fe4a96a2ee8add3b", + "libs/upstream/PinHeader_1x05_P2.54mm_Vertical.kicad_mod": "a9beaa5e3bf9f73f4667fd503d8ddc47f81aec7999b51211890c919363099acf", + "libs/upstream/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.kicad_mod": "1ba096b69c79e588cc54946fb6648699e5b301f67f8df0e0e0be43dcab326436", + "netmap.json": "8049b76e10dfec2faea46331a99f75b34a22956aa7c81a685046c1389f1f64cd", + "project.yaml": "aa7e36a756e811ac38745c30d60499eec18049f8ae8e1affcac57b4613a51f14", + "REFERENCE_REVIEW.md": "7ddb00764a476d5b8e30e9ad125b103b815c7352dbdec4906016349a96b04d00", + "REQUIREMENTS.md": "5752f874ffded6f7ad28952d14a08c1764db07e818f156fb1a99399c4a3c7efa", + "review-profile.yaml": "c6b7725c0945ace7546a27fb0ef93c313a09af05e6ae974c0ca8e75ecd9a0af2", + "review-signoff.yaml": null, + "schematic-intent.yaml": null, + "sym-lib-table": "accdd625891ba71beb5e534de13e680099f47f98dff64ca95182060d2072213c" + }, + "checks_preserved_inputs": true + }, + { + "name": "missing-preview", + "workspace": "workspaces/missing-preview/gpio-indicator", + "injection": null, + "expected": { + "exit_code": 2, + "diagnostic_contains": "No successful matching unconsumed preview" + }, + "actual": { + "interface": "cli", + "arguments": [ + "update-schematic", + "workspaces/missing-preview/gpio-indicator", + "--candidate", + "workspaces/missing-preview/gpio-indicator/gpio-indicator.kicad_sch", + "--apply" + ], + "executed_argv": [ + "C:\\Users\\tae06\\CODE\\PCB\\.venv\\Scripts\\python.exe", + "-c", + "from pcb_copilot.cli import entrypoint; entrypoint()", + "update-schematic", + "workspaces/missing-preview/gpio-indicator", + "--candidate", + "workspaces/missing-preview/gpio-indicator/gpio-indicator.kicad_sch", + "--apply" + ], + "exit_code": 2, + "duration_seconds": 0.344, + "stdout": "logs/missing-preview.stdout.txt", + "stderr": "logs/missing-preview.stderr.txt", + "error": null + }, + "outcome": "met_expectation", + "inputs_before": { + "DESIGN_BASIS.md": "77119e5d1ab6ea43a385a17adec1874ffc9b6c20e35eb44d783278710b9f239f", + "DEVIATIONS.md": "324f110ce0816864290f2b28a6ecdbe8006457f305852762837590ae0eb99563", + "evidence/files/61300511121_61300511121_b91171c2b942.pdf": "b91171c2b94275ccb3824762a4b77dcd0cd9031e8a818e869a6c9f18c053ad8b", + "evidence/files/MFR-25FBF52-1K1_YAGEO-MFR_DATASHEET_b460acdb4764.pdf": "b460acdb476469774e0785a8ef85aec79e2d95fe41beaa79c5a414e4e95e3fe0", + "evidence/files/WP710A10ID_WP710A10ID_42d464fbfd8d.pdf": "42d464fbfd8d3ddef65fa6f9226d298547cdb25d5369aff0c47e5f896595c4bd", + "evidence/index.yaml": "cece06b86df6f692fbfe52ceabf858e7996eb0721db00232d79f54c1c3c82149", + "fp-lib-table": "65851d1c9080d2cf944dcf740f2b9ad66fd62e6550f0feb7635f9dab55e1c329", + "gpio-indicator.kicad_dru": "fd6ec6cfd46f091c61ee7fa09ab3e1c5e29cb9b187e5045bcf055666f0239643", + "gpio-indicator.kicad_pcb": "aa4811a06c27b7d529da161f004cf5e5c1d192e04515ebd6aa9e8716a8536c71", + "gpio-indicator.kicad_pro": "b53a9bec0882a7dbd622aba8401f6616c067972c9d85dbffc407c407f9365fe2", + "gpio-indicator.kicad_sch": "bcf4b33bda22faff9d68be7498e96e7a83a40dc403b5fe2f4ffd79bf2f265ab4", + "jlcpcb-assembly.yaml": null, + "layout-intent.yaml": null, + "libs/Demo.kicad_sym": "c5e68806f7af78dceae8bff16e23446288e7247b32aa1a31d64f58da7e70a403", + "libs/Demo.pretty/LED_D3.0mm.kicad_mod": "9928bcc8ef35ea406d56af1480e43c606d8d646ba247b3d453d80386cd0f5b10", + "libs/Demo.pretty/MountingHole_3.2mm_M3.kicad_mod": "3853c52bba27d3e3e3e18db44a20dfb296eb9e6cd16ebf26fe4a96a2ee8add3b", + "libs/Demo.pretty/PinHeader_1x05_P2.54mm_Vertical.kicad_mod": "8e494ecb4bbaff9fecbe2b16962684513fae788c9b9c9902172781d64b01c2e3", + "libs/Demo.pretty/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.kicad_mod": "bf616ce7d49ae02d5c87d01dd19957ebf3aa66007809680c450de8561f4681a1", + "libs/LICENSE-kicad-footprints.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE-kicad-packages3D.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE-kicad-symbols.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE_PROVENANCE.json": "8fb14cbd87bbb53c2e381fa614336026b1ef1a6b69d252e40b5de8dafa7f9c66", + "libs/models/LED_D3.0mm.step": "e83c2186ad887c36d869f44e28c7b80646ea10cb388697b4380f5a2777268371", + "libs/models/PinHeader_1x05_P2.54mm_Vertical.step": "f03b716e453f6d4f2a111a227c671d96f92708e72a5a663cd4889296d021f4c3", + "libs/models/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.step": "85bdadc9190739c38429da06b1d9c76ccf33aef9a0794a2e7a9dd5b58d9d05fe", + "libs/PROVENANCE.json": "30cb553d1c3ac24055e98ae9dc41e45d3eaa876cad6a8894dee4959aef2f6314", + "libs/README.md": "c09361039bd440ad0aa9038cf81a652abfbbe1e2803ca0dbd3471ce576a2e2d0", + "libs/upstream/LED_D3.0mm.kicad_mod": "d45c606dbf639522eaeae8c6bd2569747ee454daff87ab2db66bdad3200676d0", + "libs/upstream/models/LED_D3.0mm.step": "e83c2186ad887c36d869f44e28c7b80646ea10cb388697b4380f5a2777268371", + "libs/upstream/models/PinHeader_1x05_P2.54mm_Vertical.step": "f03b716e453f6d4f2a111a227c671d96f92708e72a5a663cd4889296d021f4c3", + "libs/upstream/models/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.step": "85bdadc9190739c38429da06b1d9c76ccf33aef9a0794a2e7a9dd5b58d9d05fe", + "libs/upstream/MountingHole_3.2mm_M3.kicad_mod": "3853c52bba27d3e3e3e18db44a20dfb296eb9e6cd16ebf26fe4a96a2ee8add3b", + "libs/upstream/PinHeader_1x05_P2.54mm_Vertical.kicad_mod": "a9beaa5e3bf9f73f4667fd503d8ddc47f81aec7999b51211890c919363099acf", + "libs/upstream/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.kicad_mod": "1ba096b69c79e588cc54946fb6648699e5b301f67f8df0e0e0be43dcab326436", + "netmap.json": "8049b76e10dfec2faea46331a99f75b34a22956aa7c81a685046c1389f1f64cd", + "project.yaml": "aa7e36a756e811ac38745c30d60499eec18049f8ae8e1affcac57b4613a51f14", + "REFERENCE_REVIEW.md": "7ddb00764a476d5b8e30e9ad125b103b815c7352dbdec4906016349a96b04d00", + "REQUIREMENTS.md": "5752f874ffded6f7ad28952d14a08c1764db07e818f156fb1a99399c4a3c7efa", + "review-profile.yaml": "c6b7725c0945ace7546a27fb0ef93c313a09af05e6ae974c0ca8e75ecd9a0af2", + "review-signoff.yaml": null, + "schematic-intent.yaml": null, + "sym-lib-table": "accdd625891ba71beb5e534de13e680099f47f98dff64ca95182060d2072213c" + }, + "inputs_after_injection": { + "DESIGN_BASIS.md": "77119e5d1ab6ea43a385a17adec1874ffc9b6c20e35eb44d783278710b9f239f", + "DEVIATIONS.md": "324f110ce0816864290f2b28a6ecdbe8006457f305852762837590ae0eb99563", + "evidence/files/61300511121_61300511121_b91171c2b942.pdf": "b91171c2b94275ccb3824762a4b77dcd0cd9031e8a818e869a6c9f18c053ad8b", + "evidence/files/MFR-25FBF52-1K1_YAGEO-MFR_DATASHEET_b460acdb4764.pdf": "b460acdb476469774e0785a8ef85aec79e2d95fe41beaa79c5a414e4e95e3fe0", + "evidence/files/WP710A10ID_WP710A10ID_42d464fbfd8d.pdf": "42d464fbfd8d3ddef65fa6f9226d298547cdb25d5369aff0c47e5f896595c4bd", + "evidence/index.yaml": "cece06b86df6f692fbfe52ceabf858e7996eb0721db00232d79f54c1c3c82149", + "fp-lib-table": "65851d1c9080d2cf944dcf740f2b9ad66fd62e6550f0feb7635f9dab55e1c329", + "gpio-indicator.kicad_dru": "fd6ec6cfd46f091c61ee7fa09ab3e1c5e29cb9b187e5045bcf055666f0239643", + "gpio-indicator.kicad_pcb": "aa4811a06c27b7d529da161f004cf5e5c1d192e04515ebd6aa9e8716a8536c71", + "gpio-indicator.kicad_pro": "b53a9bec0882a7dbd622aba8401f6616c067972c9d85dbffc407c407f9365fe2", + "gpio-indicator.kicad_sch": "bcf4b33bda22faff9d68be7498e96e7a83a40dc403b5fe2f4ffd79bf2f265ab4", + "jlcpcb-assembly.yaml": null, + "layout-intent.yaml": null, + "libs/Demo.kicad_sym": "c5e68806f7af78dceae8bff16e23446288e7247b32aa1a31d64f58da7e70a403", + "libs/Demo.pretty/LED_D3.0mm.kicad_mod": "9928bcc8ef35ea406d56af1480e43c606d8d646ba247b3d453d80386cd0f5b10", + "libs/Demo.pretty/MountingHole_3.2mm_M3.kicad_mod": "3853c52bba27d3e3e3e18db44a20dfb296eb9e6cd16ebf26fe4a96a2ee8add3b", + "libs/Demo.pretty/PinHeader_1x05_P2.54mm_Vertical.kicad_mod": "8e494ecb4bbaff9fecbe2b16962684513fae788c9b9c9902172781d64b01c2e3", + "libs/Demo.pretty/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.kicad_mod": "bf616ce7d49ae02d5c87d01dd19957ebf3aa66007809680c450de8561f4681a1", + "libs/LICENSE-kicad-footprints.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE-kicad-packages3D.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE-kicad-symbols.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE_PROVENANCE.json": "8fb14cbd87bbb53c2e381fa614336026b1ef1a6b69d252e40b5de8dafa7f9c66", + "libs/models/LED_D3.0mm.step": "e83c2186ad887c36d869f44e28c7b80646ea10cb388697b4380f5a2777268371", + "libs/models/PinHeader_1x05_P2.54mm_Vertical.step": "f03b716e453f6d4f2a111a227c671d96f92708e72a5a663cd4889296d021f4c3", + "libs/models/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.step": "85bdadc9190739c38429da06b1d9c76ccf33aef9a0794a2e7a9dd5b58d9d05fe", + "libs/PROVENANCE.json": "30cb553d1c3ac24055e98ae9dc41e45d3eaa876cad6a8894dee4959aef2f6314", + "libs/README.md": "c09361039bd440ad0aa9038cf81a652abfbbe1e2803ca0dbd3471ce576a2e2d0", + "libs/upstream/LED_D3.0mm.kicad_mod": "d45c606dbf639522eaeae8c6bd2569747ee454daff87ab2db66bdad3200676d0", + "libs/upstream/models/LED_D3.0mm.step": "e83c2186ad887c36d869f44e28c7b80646ea10cb388697b4380f5a2777268371", + "libs/upstream/models/PinHeader_1x05_P2.54mm_Vertical.step": "f03b716e453f6d4f2a111a227c671d96f92708e72a5a663cd4889296d021f4c3", + "libs/upstream/models/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.step": "85bdadc9190739c38429da06b1d9c76ccf33aef9a0794a2e7a9dd5b58d9d05fe", + "libs/upstream/MountingHole_3.2mm_M3.kicad_mod": "3853c52bba27d3e3e3e18db44a20dfb296eb9e6cd16ebf26fe4a96a2ee8add3b", + "libs/upstream/PinHeader_1x05_P2.54mm_Vertical.kicad_mod": "a9beaa5e3bf9f73f4667fd503d8ddc47f81aec7999b51211890c919363099acf", + "libs/upstream/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.kicad_mod": "1ba096b69c79e588cc54946fb6648699e5b301f67f8df0e0e0be43dcab326436", + "netmap.json": "8049b76e10dfec2faea46331a99f75b34a22956aa7c81a685046c1389f1f64cd", + "project.yaml": "aa7e36a756e811ac38745c30d60499eec18049f8ae8e1affcac57b4613a51f14", + "REFERENCE_REVIEW.md": "7ddb00764a476d5b8e30e9ad125b103b815c7352dbdec4906016349a96b04d00", + "REQUIREMENTS.md": "5752f874ffded6f7ad28952d14a08c1764db07e818f156fb1a99399c4a3c7efa", + "review-profile.yaml": "c6b7725c0945ace7546a27fb0ef93c313a09af05e6ae974c0ca8e75ecd9a0af2", + "review-signoff.yaml": null, + "schematic-intent.yaml": null, + "sym-lib-table": "accdd625891ba71beb5e534de13e680099f47f98dff64ca95182060d2072213c" + }, + "inputs_after_checks": { + "DESIGN_BASIS.md": "77119e5d1ab6ea43a385a17adec1874ffc9b6c20e35eb44d783278710b9f239f", + "DEVIATIONS.md": "324f110ce0816864290f2b28a6ecdbe8006457f305852762837590ae0eb99563", + "evidence/files/61300511121_61300511121_b91171c2b942.pdf": "b91171c2b94275ccb3824762a4b77dcd0cd9031e8a818e869a6c9f18c053ad8b", + "evidence/files/MFR-25FBF52-1K1_YAGEO-MFR_DATASHEET_b460acdb4764.pdf": "b460acdb476469774e0785a8ef85aec79e2d95fe41beaa79c5a414e4e95e3fe0", + "evidence/files/WP710A10ID_WP710A10ID_42d464fbfd8d.pdf": "42d464fbfd8d3ddef65fa6f9226d298547cdb25d5369aff0c47e5f896595c4bd", + "evidence/index.yaml": "cece06b86df6f692fbfe52ceabf858e7996eb0721db00232d79f54c1c3c82149", + "fp-lib-table": "65851d1c9080d2cf944dcf740f2b9ad66fd62e6550f0feb7635f9dab55e1c329", + "gpio-indicator.kicad_dru": "fd6ec6cfd46f091c61ee7fa09ab3e1c5e29cb9b187e5045bcf055666f0239643", + "gpio-indicator.kicad_pcb": "aa4811a06c27b7d529da161f004cf5e5c1d192e04515ebd6aa9e8716a8536c71", + "gpio-indicator.kicad_pro": "b53a9bec0882a7dbd622aba8401f6616c067972c9d85dbffc407c407f9365fe2", + "gpio-indicator.kicad_sch": "bcf4b33bda22faff9d68be7498e96e7a83a40dc403b5fe2f4ffd79bf2f265ab4", + "jlcpcb-assembly.yaml": null, + "layout-intent.yaml": null, + "libs/Demo.kicad_sym": "c5e68806f7af78dceae8bff16e23446288e7247b32aa1a31d64f58da7e70a403", + "libs/Demo.pretty/LED_D3.0mm.kicad_mod": "9928bcc8ef35ea406d56af1480e43c606d8d646ba247b3d453d80386cd0f5b10", + "libs/Demo.pretty/MountingHole_3.2mm_M3.kicad_mod": "3853c52bba27d3e3e3e18db44a20dfb296eb9e6cd16ebf26fe4a96a2ee8add3b", + "libs/Demo.pretty/PinHeader_1x05_P2.54mm_Vertical.kicad_mod": "8e494ecb4bbaff9fecbe2b16962684513fae788c9b9c9902172781d64b01c2e3", + "libs/Demo.pretty/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.kicad_mod": "bf616ce7d49ae02d5c87d01dd19957ebf3aa66007809680c450de8561f4681a1", + "libs/LICENSE-kicad-footprints.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE-kicad-packages3D.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE-kicad-symbols.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE_PROVENANCE.json": "8fb14cbd87bbb53c2e381fa614336026b1ef1a6b69d252e40b5de8dafa7f9c66", + "libs/models/LED_D3.0mm.step": "e83c2186ad887c36d869f44e28c7b80646ea10cb388697b4380f5a2777268371", + "libs/models/PinHeader_1x05_P2.54mm_Vertical.step": "f03b716e453f6d4f2a111a227c671d96f92708e72a5a663cd4889296d021f4c3", + "libs/models/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.step": "85bdadc9190739c38429da06b1d9c76ccf33aef9a0794a2e7a9dd5b58d9d05fe", + "libs/PROVENANCE.json": "30cb553d1c3ac24055e98ae9dc41e45d3eaa876cad6a8894dee4959aef2f6314", + "libs/README.md": "c09361039bd440ad0aa9038cf81a652abfbbe1e2803ca0dbd3471ce576a2e2d0", + "libs/upstream/LED_D3.0mm.kicad_mod": "d45c606dbf639522eaeae8c6bd2569747ee454daff87ab2db66bdad3200676d0", + "libs/upstream/models/LED_D3.0mm.step": "e83c2186ad887c36d869f44e28c7b80646ea10cb388697b4380f5a2777268371", + "libs/upstream/models/PinHeader_1x05_P2.54mm_Vertical.step": "f03b716e453f6d4f2a111a227c671d96f92708e72a5a663cd4889296d021f4c3", + "libs/upstream/models/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.step": "85bdadc9190739c38429da06b1d9c76ccf33aef9a0794a2e7a9dd5b58d9d05fe", + "libs/upstream/MountingHole_3.2mm_M3.kicad_mod": "3853c52bba27d3e3e3e18db44a20dfb296eb9e6cd16ebf26fe4a96a2ee8add3b", + "libs/upstream/PinHeader_1x05_P2.54mm_Vertical.kicad_mod": "a9beaa5e3bf9f73f4667fd503d8ddc47f81aec7999b51211890c919363099acf", + "libs/upstream/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.kicad_mod": "1ba096b69c79e588cc54946fb6648699e5b301f67f8df0e0e0be43dcab326436", + "netmap.json": "8049b76e10dfec2faea46331a99f75b34a22956aa7c81a685046c1389f1f64cd", + "project.yaml": "aa7e36a756e811ac38745c30d60499eec18049f8ae8e1affcac57b4613a51f14", + "REFERENCE_REVIEW.md": "7ddb00764a476d5b8e30e9ad125b103b815c7352dbdec4906016349a96b04d00", + "REQUIREMENTS.md": "5752f874ffded6f7ad28952d14a08c1764db07e818f156fb1a99399c4a3c7efa", + "review-profile.yaml": "c6b7725c0945ace7546a27fb0ef93c313a09af05e6ae974c0ca8e75ecd9a0af2", + "review-signoff.yaml": null, + "schematic-intent.yaml": null, + "sym-lib-table": "accdd625891ba71beb5e534de13e680099f47f98dff64ca95182060d2072213c" + }, + "checks_preserved_inputs": true + }, + { + "name": "evidence-corruption", + "workspace": "workspaces/evidence-corruption/gpio-indicator", + "injection": { + "kind": "evidence-corruption", + "target": "evidence/files/WP710A10ID_WP710A10ID_42d464fbfd8d.pdf", + "selected_reference": "R1", + "selected_footprint": "Demo:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal" + }, + "expected": { + "exit_code": 1, + "diagnostic_contains": "archive.hash_mismatch" + }, + "actual": { + "interface": "cli", + "arguments": [ + "research", + "workspaces/evidence-corruption/gpio-indicator", + "--verify" + ], + "executed_argv": [ + "C:\\Users\\tae06\\CODE\\PCB\\.venv\\Scripts\\python.exe", + "-c", + "from pcb_copilot.cli import entrypoint; entrypoint()", + "research", + "workspaces/evidence-corruption/gpio-indicator", + "--verify" + ], + "exit_code": 1, + "duration_seconds": 0.261, + "stdout": "logs/evidence-corruption.stdout.txt", + "stderr": "logs/evidence-corruption.stderr.txt", + "error": null + }, + "outcome": "met_expectation", + "inputs_before": { + "DESIGN_BASIS.md": "77119e5d1ab6ea43a385a17adec1874ffc9b6c20e35eb44d783278710b9f239f", + "DEVIATIONS.md": "324f110ce0816864290f2b28a6ecdbe8006457f305852762837590ae0eb99563", + "evidence/files/61300511121_61300511121_b91171c2b942.pdf": "b91171c2b94275ccb3824762a4b77dcd0cd9031e8a818e869a6c9f18c053ad8b", + "evidence/files/MFR-25FBF52-1K1_YAGEO-MFR_DATASHEET_b460acdb4764.pdf": "b460acdb476469774e0785a8ef85aec79e2d95fe41beaa79c5a414e4e95e3fe0", + "evidence/files/WP710A10ID_WP710A10ID_42d464fbfd8d.pdf": "42d464fbfd8d3ddef65fa6f9226d298547cdb25d5369aff0c47e5f896595c4bd", + "evidence/index.yaml": "cece06b86df6f692fbfe52ceabf858e7996eb0721db00232d79f54c1c3c82149", + "fp-lib-table": "65851d1c9080d2cf944dcf740f2b9ad66fd62e6550f0feb7635f9dab55e1c329", + "gpio-indicator.kicad_dru": "fd6ec6cfd46f091c61ee7fa09ab3e1c5e29cb9b187e5045bcf055666f0239643", + "gpio-indicator.kicad_pcb": "aa4811a06c27b7d529da161f004cf5e5c1d192e04515ebd6aa9e8716a8536c71", + "gpio-indicator.kicad_pro": "b53a9bec0882a7dbd622aba8401f6616c067972c9d85dbffc407c407f9365fe2", + "gpio-indicator.kicad_sch": "bcf4b33bda22faff9d68be7498e96e7a83a40dc403b5fe2f4ffd79bf2f265ab4", + "jlcpcb-assembly.yaml": null, + "layout-intent.yaml": null, + "libs/Demo.kicad_sym": "c5e68806f7af78dceae8bff16e23446288e7247b32aa1a31d64f58da7e70a403", + "libs/Demo.pretty/LED_D3.0mm.kicad_mod": "9928bcc8ef35ea406d56af1480e43c606d8d646ba247b3d453d80386cd0f5b10", + "libs/Demo.pretty/MountingHole_3.2mm_M3.kicad_mod": "3853c52bba27d3e3e3e18db44a20dfb296eb9e6cd16ebf26fe4a96a2ee8add3b", + "libs/Demo.pretty/PinHeader_1x05_P2.54mm_Vertical.kicad_mod": "8e494ecb4bbaff9fecbe2b16962684513fae788c9b9c9902172781d64b01c2e3", + "libs/Demo.pretty/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.kicad_mod": "bf616ce7d49ae02d5c87d01dd19957ebf3aa66007809680c450de8561f4681a1", + "libs/LICENSE-kicad-footprints.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE-kicad-packages3D.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE-kicad-symbols.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE_PROVENANCE.json": "8fb14cbd87bbb53c2e381fa614336026b1ef1a6b69d252e40b5de8dafa7f9c66", + "libs/models/LED_D3.0mm.step": "e83c2186ad887c36d869f44e28c7b80646ea10cb388697b4380f5a2777268371", + "libs/models/PinHeader_1x05_P2.54mm_Vertical.step": "f03b716e453f6d4f2a111a227c671d96f92708e72a5a663cd4889296d021f4c3", + "libs/models/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.step": "85bdadc9190739c38429da06b1d9c76ccf33aef9a0794a2e7a9dd5b58d9d05fe", + "libs/PROVENANCE.json": "30cb553d1c3ac24055e98ae9dc41e45d3eaa876cad6a8894dee4959aef2f6314", + "libs/README.md": "c09361039bd440ad0aa9038cf81a652abfbbe1e2803ca0dbd3471ce576a2e2d0", + "libs/upstream/LED_D3.0mm.kicad_mod": "d45c606dbf639522eaeae8c6bd2569747ee454daff87ab2db66bdad3200676d0", + "libs/upstream/models/LED_D3.0mm.step": "e83c2186ad887c36d869f44e28c7b80646ea10cb388697b4380f5a2777268371", + "libs/upstream/models/PinHeader_1x05_P2.54mm_Vertical.step": "f03b716e453f6d4f2a111a227c671d96f92708e72a5a663cd4889296d021f4c3", + "libs/upstream/models/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.step": "85bdadc9190739c38429da06b1d9c76ccf33aef9a0794a2e7a9dd5b58d9d05fe", + "libs/upstream/MountingHole_3.2mm_M3.kicad_mod": "3853c52bba27d3e3e3e18db44a20dfb296eb9e6cd16ebf26fe4a96a2ee8add3b", + "libs/upstream/PinHeader_1x05_P2.54mm_Vertical.kicad_mod": "a9beaa5e3bf9f73f4667fd503d8ddc47f81aec7999b51211890c919363099acf", + "libs/upstream/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.kicad_mod": "1ba096b69c79e588cc54946fb6648699e5b301f67f8df0e0e0be43dcab326436", + "netmap.json": "8049b76e10dfec2faea46331a99f75b34a22956aa7c81a685046c1389f1f64cd", + "project.yaml": "aa7e36a756e811ac38745c30d60499eec18049f8ae8e1affcac57b4613a51f14", + "REFERENCE_REVIEW.md": "7ddb00764a476d5b8e30e9ad125b103b815c7352dbdec4906016349a96b04d00", + "REQUIREMENTS.md": "5752f874ffded6f7ad28952d14a08c1764db07e818f156fb1a99399c4a3c7efa", + "review-profile.yaml": "c6b7725c0945ace7546a27fb0ef93c313a09af05e6ae974c0ca8e75ecd9a0af2", + "review-signoff.yaml": null, + "schematic-intent.yaml": null, + "sym-lib-table": "accdd625891ba71beb5e534de13e680099f47f98dff64ca95182060d2072213c" + }, + "inputs_after_injection": { + "DESIGN_BASIS.md": "77119e5d1ab6ea43a385a17adec1874ffc9b6c20e35eb44d783278710b9f239f", + "DEVIATIONS.md": "324f110ce0816864290f2b28a6ecdbe8006457f305852762837590ae0eb99563", + "evidence/files/61300511121_61300511121_b91171c2b942.pdf": "b91171c2b94275ccb3824762a4b77dcd0cd9031e8a818e869a6c9f18c053ad8b", + "evidence/files/MFR-25FBF52-1K1_YAGEO-MFR_DATASHEET_b460acdb4764.pdf": "b460acdb476469774e0785a8ef85aec79e2d95fe41beaa79c5a414e4e95e3fe0", + "evidence/files/WP710A10ID_WP710A10ID_42d464fbfd8d.pdf": "72723b3c5da3b26c1eb2cdec02bb8dbb351f7d1238ac80257497f7940607934d", + "evidence/index.yaml": "cece06b86df6f692fbfe52ceabf858e7996eb0721db00232d79f54c1c3c82149", + "fp-lib-table": "65851d1c9080d2cf944dcf740f2b9ad66fd62e6550f0feb7635f9dab55e1c329", + "gpio-indicator.kicad_dru": "fd6ec6cfd46f091c61ee7fa09ab3e1c5e29cb9b187e5045bcf055666f0239643", + "gpio-indicator.kicad_pcb": "aa4811a06c27b7d529da161f004cf5e5c1d192e04515ebd6aa9e8716a8536c71", + "gpio-indicator.kicad_pro": "b53a9bec0882a7dbd622aba8401f6616c067972c9d85dbffc407c407f9365fe2", + "gpio-indicator.kicad_sch": "bcf4b33bda22faff9d68be7498e96e7a83a40dc403b5fe2f4ffd79bf2f265ab4", + "jlcpcb-assembly.yaml": null, + "layout-intent.yaml": null, + "libs/Demo.kicad_sym": "c5e68806f7af78dceae8bff16e23446288e7247b32aa1a31d64f58da7e70a403", + "libs/Demo.pretty/LED_D3.0mm.kicad_mod": "9928bcc8ef35ea406d56af1480e43c606d8d646ba247b3d453d80386cd0f5b10", + "libs/Demo.pretty/MountingHole_3.2mm_M3.kicad_mod": "3853c52bba27d3e3e3e18db44a20dfb296eb9e6cd16ebf26fe4a96a2ee8add3b", + "libs/Demo.pretty/PinHeader_1x05_P2.54mm_Vertical.kicad_mod": "8e494ecb4bbaff9fecbe2b16962684513fae788c9b9c9902172781d64b01c2e3", + "libs/Demo.pretty/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.kicad_mod": "bf616ce7d49ae02d5c87d01dd19957ebf3aa66007809680c450de8561f4681a1", + "libs/LICENSE-kicad-footprints.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE-kicad-packages3D.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE-kicad-symbols.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE_PROVENANCE.json": "8fb14cbd87bbb53c2e381fa614336026b1ef1a6b69d252e40b5de8dafa7f9c66", + "libs/models/LED_D3.0mm.step": "e83c2186ad887c36d869f44e28c7b80646ea10cb388697b4380f5a2777268371", + "libs/models/PinHeader_1x05_P2.54mm_Vertical.step": "f03b716e453f6d4f2a111a227c671d96f92708e72a5a663cd4889296d021f4c3", + "libs/models/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.step": "85bdadc9190739c38429da06b1d9c76ccf33aef9a0794a2e7a9dd5b58d9d05fe", + "libs/PROVENANCE.json": "30cb553d1c3ac24055e98ae9dc41e45d3eaa876cad6a8894dee4959aef2f6314", + "libs/README.md": "c09361039bd440ad0aa9038cf81a652abfbbe1e2803ca0dbd3471ce576a2e2d0", + "libs/upstream/LED_D3.0mm.kicad_mod": "d45c606dbf639522eaeae8c6bd2569747ee454daff87ab2db66bdad3200676d0", + "libs/upstream/models/LED_D3.0mm.step": "e83c2186ad887c36d869f44e28c7b80646ea10cb388697b4380f5a2777268371", + "libs/upstream/models/PinHeader_1x05_P2.54mm_Vertical.step": "f03b716e453f6d4f2a111a227c671d96f92708e72a5a663cd4889296d021f4c3", + "libs/upstream/models/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.step": "85bdadc9190739c38429da06b1d9c76ccf33aef9a0794a2e7a9dd5b58d9d05fe", + "libs/upstream/MountingHole_3.2mm_M3.kicad_mod": "3853c52bba27d3e3e3e18db44a20dfb296eb9e6cd16ebf26fe4a96a2ee8add3b", + "libs/upstream/PinHeader_1x05_P2.54mm_Vertical.kicad_mod": "a9beaa5e3bf9f73f4667fd503d8ddc47f81aec7999b51211890c919363099acf", + "libs/upstream/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.kicad_mod": "1ba096b69c79e588cc54946fb6648699e5b301f67f8df0e0e0be43dcab326436", + "netmap.json": "8049b76e10dfec2faea46331a99f75b34a22956aa7c81a685046c1389f1f64cd", + "project.yaml": "aa7e36a756e811ac38745c30d60499eec18049f8ae8e1affcac57b4613a51f14", + "REFERENCE_REVIEW.md": "7ddb00764a476d5b8e30e9ad125b103b815c7352dbdec4906016349a96b04d00", + "REQUIREMENTS.md": "5752f874ffded6f7ad28952d14a08c1764db07e818f156fb1a99399c4a3c7efa", + "review-profile.yaml": "c6b7725c0945ace7546a27fb0ef93c313a09af05e6ae974c0ca8e75ecd9a0af2", + "review-signoff.yaml": null, + "schematic-intent.yaml": null, + "sym-lib-table": "accdd625891ba71beb5e534de13e680099f47f98dff64ca95182060d2072213c" + }, + "inputs_after_checks": { + "DESIGN_BASIS.md": "77119e5d1ab6ea43a385a17adec1874ffc9b6c20e35eb44d783278710b9f239f", + "DEVIATIONS.md": "324f110ce0816864290f2b28a6ecdbe8006457f305852762837590ae0eb99563", + "evidence/files/61300511121_61300511121_b91171c2b942.pdf": "b91171c2b94275ccb3824762a4b77dcd0cd9031e8a818e869a6c9f18c053ad8b", + "evidence/files/MFR-25FBF52-1K1_YAGEO-MFR_DATASHEET_b460acdb4764.pdf": "b460acdb476469774e0785a8ef85aec79e2d95fe41beaa79c5a414e4e95e3fe0", + "evidence/files/WP710A10ID_WP710A10ID_42d464fbfd8d.pdf": "72723b3c5da3b26c1eb2cdec02bb8dbb351f7d1238ac80257497f7940607934d", + "evidence/index.yaml": "cece06b86df6f692fbfe52ceabf858e7996eb0721db00232d79f54c1c3c82149", + "fp-lib-table": "65851d1c9080d2cf944dcf740f2b9ad66fd62e6550f0feb7635f9dab55e1c329", + "gpio-indicator.kicad_dru": "fd6ec6cfd46f091c61ee7fa09ab3e1c5e29cb9b187e5045bcf055666f0239643", + "gpio-indicator.kicad_pcb": "aa4811a06c27b7d529da161f004cf5e5c1d192e04515ebd6aa9e8716a8536c71", + "gpio-indicator.kicad_pro": "b53a9bec0882a7dbd622aba8401f6616c067972c9d85dbffc407c407f9365fe2", + "gpio-indicator.kicad_sch": "bcf4b33bda22faff9d68be7498e96e7a83a40dc403b5fe2f4ffd79bf2f265ab4", + "jlcpcb-assembly.yaml": null, + "layout-intent.yaml": null, + "libs/Demo.kicad_sym": "c5e68806f7af78dceae8bff16e23446288e7247b32aa1a31d64f58da7e70a403", + "libs/Demo.pretty/LED_D3.0mm.kicad_mod": "9928bcc8ef35ea406d56af1480e43c606d8d646ba247b3d453d80386cd0f5b10", + "libs/Demo.pretty/MountingHole_3.2mm_M3.kicad_mod": "3853c52bba27d3e3e3e18db44a20dfb296eb9e6cd16ebf26fe4a96a2ee8add3b", + "libs/Demo.pretty/PinHeader_1x05_P2.54mm_Vertical.kicad_mod": "8e494ecb4bbaff9fecbe2b16962684513fae788c9b9c9902172781d64b01c2e3", + "libs/Demo.pretty/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.kicad_mod": "bf616ce7d49ae02d5c87d01dd19957ebf3aa66007809680c450de8561f4681a1", + "libs/LICENSE-kicad-footprints.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE-kicad-packages3D.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE-kicad-symbols.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE_PROVENANCE.json": "8fb14cbd87bbb53c2e381fa614336026b1ef1a6b69d252e40b5de8dafa7f9c66", + "libs/models/LED_D3.0mm.step": "e83c2186ad887c36d869f44e28c7b80646ea10cb388697b4380f5a2777268371", + "libs/models/PinHeader_1x05_P2.54mm_Vertical.step": "f03b716e453f6d4f2a111a227c671d96f92708e72a5a663cd4889296d021f4c3", + "libs/models/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.step": "85bdadc9190739c38429da06b1d9c76ccf33aef9a0794a2e7a9dd5b58d9d05fe", + "libs/PROVENANCE.json": "30cb553d1c3ac24055e98ae9dc41e45d3eaa876cad6a8894dee4959aef2f6314", + "libs/README.md": "c09361039bd440ad0aa9038cf81a652abfbbe1e2803ca0dbd3471ce576a2e2d0", + "libs/upstream/LED_D3.0mm.kicad_mod": "d45c606dbf639522eaeae8c6bd2569747ee454daff87ab2db66bdad3200676d0", + "libs/upstream/models/LED_D3.0mm.step": "e83c2186ad887c36d869f44e28c7b80646ea10cb388697b4380f5a2777268371", + "libs/upstream/models/PinHeader_1x05_P2.54mm_Vertical.step": "f03b716e453f6d4f2a111a227c671d96f92708e72a5a663cd4889296d021f4c3", + "libs/upstream/models/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.step": "85bdadc9190739c38429da06b1d9c76ccf33aef9a0794a2e7a9dd5b58d9d05fe", + "libs/upstream/MountingHole_3.2mm_M3.kicad_mod": "3853c52bba27d3e3e3e18db44a20dfb296eb9e6cd16ebf26fe4a96a2ee8add3b", + "libs/upstream/PinHeader_1x05_P2.54mm_Vertical.kicad_mod": "a9beaa5e3bf9f73f4667fd503d8ddc47f81aec7999b51211890c919363099acf", + "libs/upstream/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.kicad_mod": "1ba096b69c79e588cc54946fb6648699e5b301f67f8df0e0e0be43dcab326436", + "netmap.json": "8049b76e10dfec2faea46331a99f75b34a22956aa7c81a685046c1389f1f64cd", + "project.yaml": "aa7e36a756e811ac38745c30d60499eec18049f8ae8e1affcac57b4613a51f14", + "REFERENCE_REVIEW.md": "7ddb00764a476d5b8e30e9ad125b103b815c7352dbdec4906016349a96b04d00", + "REQUIREMENTS.md": "5752f874ffded6f7ad28952d14a08c1764db07e818f156fb1a99399c4a3c7efa", + "review-profile.yaml": "c6b7725c0945ace7546a27fb0ef93c313a09af05e6ae974c0ca8e75ecd9a0af2", + "review-signoff.yaml": null, + "schematic-intent.yaml": null, + "sym-lib-table": "accdd625891ba71beb5e534de13e680099f47f98dff64ca95182060d2072213c" + }, + "checks_preserved_inputs": true + }, + { + "name": "footprint-geometry", + "workspace": "workspaces/footprint-geometry/gpio-indicator", + "injection": { + "kind": "footprint-geometry", + "target": "libs/Demo.pretty/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.kicad_mod", + "selected_reference": "R1", + "selected_footprint": "Demo:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal" + }, + "expected": { + "exit_code": 1, + "diagnostic_contains": "beyond allowed model URI replacements" + }, + "actual": { + "interface": "validator-api", + "arguments": [ + "workspaces/footprint-geometry/gpio-indicator", + "[[\"J1\", \"Demo:PinHeader_1x05_P2.54mm_Vertical\"], [\"R1\", \"Demo:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal\"], [\"D1\", \"Demo:LED_D3.0mm\"], [\"R2\", \"Demo:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal\"], [\"D2\", \"Demo:LED_D3.0mm\"], [\"R3\", \"Demo:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal\"], [\"D3\", \"Demo:LED_D3.0mm\"], [\"R4\", \"Demo:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal\"], [\"D4\", \"Demo:LED_D3.0mm\"], [\"H1\", \"Demo:MountingHole_3.2mm_M3\"], [\"H2\", \"Demo:MountingHole_3.2mm_M3\"]]" + ], + "executed_argv": [ + "C:\\Users\\tae06\\CODE\\PCB\\.venv\\Scripts\\python.exe", + "-c", + "import json, sys\nfrom pathlib import Path\nfrom pcb_copilot.project import load_project\nfrom pcb_copilot.layout.footprints import resolve_footprint\nproject = load_project(Path(sys.argv[1]))\ntry:\n results = [resolve_footprint(project, ref, lib_id) for ref, lib_id in json.loads(sys.argv[2])]\nexcept ValueError as error:\n print(json.dumps({'accepted': False, 'exception': type(error).__name__, 'message': str(error)}))\n sys.exit(1)\nprint(json.dumps({'accepted': True, 'footprints': len(results), 'fidelities': [r.fidelity for r in results]}))\n", + "workspaces/footprint-geometry/gpio-indicator", + "[[\"J1\", \"Demo:PinHeader_1x05_P2.54mm_Vertical\"], [\"R1\", \"Demo:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal\"], [\"D1\", \"Demo:LED_D3.0mm\"], [\"R2\", \"Demo:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal\"], [\"D2\", \"Demo:LED_D3.0mm\"], [\"R3\", \"Demo:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal\"], [\"D3\", \"Demo:LED_D3.0mm\"], [\"R4\", \"Demo:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal\"], [\"D4\", \"Demo:LED_D3.0mm\"], [\"H1\", \"Demo:MountingHole_3.2mm_M3\"], [\"H2\", \"Demo:MountingHole_3.2mm_M3\"]]" + ], + "exit_code": 1, + "duration_seconds": 0.3, + "stdout": "logs/footprint-geometry.stdout.txt", + "stderr": "logs/footprint-geometry.stderr.txt", + "error": null + }, + "outcome": "met_expectation", + "inputs_before": { + "DESIGN_BASIS.md": "77119e5d1ab6ea43a385a17adec1874ffc9b6c20e35eb44d783278710b9f239f", + "DEVIATIONS.md": "324f110ce0816864290f2b28a6ecdbe8006457f305852762837590ae0eb99563", + "evidence/files/61300511121_61300511121_b91171c2b942.pdf": "b91171c2b94275ccb3824762a4b77dcd0cd9031e8a818e869a6c9f18c053ad8b", + "evidence/files/MFR-25FBF52-1K1_YAGEO-MFR_DATASHEET_b460acdb4764.pdf": "b460acdb476469774e0785a8ef85aec79e2d95fe41beaa79c5a414e4e95e3fe0", + "evidence/files/WP710A10ID_WP710A10ID_42d464fbfd8d.pdf": "42d464fbfd8d3ddef65fa6f9226d298547cdb25d5369aff0c47e5f896595c4bd", + "evidence/index.yaml": "cece06b86df6f692fbfe52ceabf858e7996eb0721db00232d79f54c1c3c82149", + "fp-lib-table": "65851d1c9080d2cf944dcf740f2b9ad66fd62e6550f0feb7635f9dab55e1c329", + "gpio-indicator.kicad_dru": "fd6ec6cfd46f091c61ee7fa09ab3e1c5e29cb9b187e5045bcf055666f0239643", + "gpio-indicator.kicad_pcb": "aa4811a06c27b7d529da161f004cf5e5c1d192e04515ebd6aa9e8716a8536c71", + "gpio-indicator.kicad_pro": "b53a9bec0882a7dbd622aba8401f6616c067972c9d85dbffc407c407f9365fe2", + "gpio-indicator.kicad_sch": "bcf4b33bda22faff9d68be7498e96e7a83a40dc403b5fe2f4ffd79bf2f265ab4", + "jlcpcb-assembly.yaml": null, + "layout-intent.yaml": null, + "libs/Demo.kicad_sym": "c5e68806f7af78dceae8bff16e23446288e7247b32aa1a31d64f58da7e70a403", + "libs/Demo.pretty/LED_D3.0mm.kicad_mod": "9928bcc8ef35ea406d56af1480e43c606d8d646ba247b3d453d80386cd0f5b10", + "libs/Demo.pretty/MountingHole_3.2mm_M3.kicad_mod": "3853c52bba27d3e3e3e18db44a20dfb296eb9e6cd16ebf26fe4a96a2ee8add3b", + "libs/Demo.pretty/PinHeader_1x05_P2.54mm_Vertical.kicad_mod": "8e494ecb4bbaff9fecbe2b16962684513fae788c9b9c9902172781d64b01c2e3", + "libs/Demo.pretty/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.kicad_mod": "bf616ce7d49ae02d5c87d01dd19957ebf3aa66007809680c450de8561f4681a1", + "libs/LICENSE-kicad-footprints.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE-kicad-packages3D.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE-kicad-symbols.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE_PROVENANCE.json": "8fb14cbd87bbb53c2e381fa614336026b1ef1a6b69d252e40b5de8dafa7f9c66", + "libs/models/LED_D3.0mm.step": "e83c2186ad887c36d869f44e28c7b80646ea10cb388697b4380f5a2777268371", + "libs/models/PinHeader_1x05_P2.54mm_Vertical.step": "f03b716e453f6d4f2a111a227c671d96f92708e72a5a663cd4889296d021f4c3", + "libs/models/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.step": "85bdadc9190739c38429da06b1d9c76ccf33aef9a0794a2e7a9dd5b58d9d05fe", + "libs/PROVENANCE.json": "30cb553d1c3ac24055e98ae9dc41e45d3eaa876cad6a8894dee4959aef2f6314", + "libs/README.md": "c09361039bd440ad0aa9038cf81a652abfbbe1e2803ca0dbd3471ce576a2e2d0", + "libs/upstream/LED_D3.0mm.kicad_mod": "d45c606dbf639522eaeae8c6bd2569747ee454daff87ab2db66bdad3200676d0", + "libs/upstream/models/LED_D3.0mm.step": "e83c2186ad887c36d869f44e28c7b80646ea10cb388697b4380f5a2777268371", + "libs/upstream/models/PinHeader_1x05_P2.54mm_Vertical.step": "f03b716e453f6d4f2a111a227c671d96f92708e72a5a663cd4889296d021f4c3", + "libs/upstream/models/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.step": "85bdadc9190739c38429da06b1d9c76ccf33aef9a0794a2e7a9dd5b58d9d05fe", + "libs/upstream/MountingHole_3.2mm_M3.kicad_mod": "3853c52bba27d3e3e3e18db44a20dfb296eb9e6cd16ebf26fe4a96a2ee8add3b", + "libs/upstream/PinHeader_1x05_P2.54mm_Vertical.kicad_mod": "a9beaa5e3bf9f73f4667fd503d8ddc47f81aec7999b51211890c919363099acf", + "libs/upstream/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.kicad_mod": "1ba096b69c79e588cc54946fb6648699e5b301f67f8df0e0e0be43dcab326436", + "netmap.json": "8049b76e10dfec2faea46331a99f75b34a22956aa7c81a685046c1389f1f64cd", + "project.yaml": "aa7e36a756e811ac38745c30d60499eec18049f8ae8e1affcac57b4613a51f14", + "REFERENCE_REVIEW.md": "7ddb00764a476d5b8e30e9ad125b103b815c7352dbdec4906016349a96b04d00", + "REQUIREMENTS.md": "5752f874ffded6f7ad28952d14a08c1764db07e818f156fb1a99399c4a3c7efa", + "review-profile.yaml": "c6b7725c0945ace7546a27fb0ef93c313a09af05e6ae974c0ca8e75ecd9a0af2", + "review-signoff.yaml": null, + "schematic-intent.yaml": null, + "sym-lib-table": "accdd625891ba71beb5e534de13e680099f47f98dff64ca95182060d2072213c" + }, + "inputs_after_injection": { + "DESIGN_BASIS.md": "77119e5d1ab6ea43a385a17adec1874ffc9b6c20e35eb44d783278710b9f239f", + "DEVIATIONS.md": "324f110ce0816864290f2b28a6ecdbe8006457f305852762837590ae0eb99563", + "evidence/files/61300511121_61300511121_b91171c2b942.pdf": "b91171c2b94275ccb3824762a4b77dcd0cd9031e8a818e869a6c9f18c053ad8b", + "evidence/files/MFR-25FBF52-1K1_YAGEO-MFR_DATASHEET_b460acdb4764.pdf": "b460acdb476469774e0785a8ef85aec79e2d95fe41beaa79c5a414e4e95e3fe0", + "evidence/files/WP710A10ID_WP710A10ID_42d464fbfd8d.pdf": "42d464fbfd8d3ddef65fa6f9226d298547cdb25d5369aff0c47e5f896595c4bd", + "evidence/index.yaml": "cece06b86df6f692fbfe52ceabf858e7996eb0721db00232d79f54c1c3c82149", + "fp-lib-table": "65851d1c9080d2cf944dcf740f2b9ad66fd62e6550f0feb7635f9dab55e1c329", + "gpio-indicator.kicad_dru": "fd6ec6cfd46f091c61ee7fa09ab3e1c5e29cb9b187e5045bcf055666f0239643", + "gpio-indicator.kicad_pcb": "aa4811a06c27b7d529da161f004cf5e5c1d192e04515ebd6aa9e8716a8536c71", + "gpio-indicator.kicad_pro": "b53a9bec0882a7dbd622aba8401f6616c067972c9d85dbffc407c407f9365fe2", + "gpio-indicator.kicad_sch": "bcf4b33bda22faff9d68be7498e96e7a83a40dc403b5fe2f4ffd79bf2f265ab4", + "jlcpcb-assembly.yaml": null, + "layout-intent.yaml": null, + "libs/Demo.kicad_sym": "c5e68806f7af78dceae8bff16e23446288e7247b32aa1a31d64f58da7e70a403", + "libs/Demo.pretty/LED_D3.0mm.kicad_mod": "9928bcc8ef35ea406d56af1480e43c606d8d646ba247b3d453d80386cd0f5b10", + "libs/Demo.pretty/MountingHole_3.2mm_M3.kicad_mod": "3853c52bba27d3e3e3e18db44a20dfb296eb9e6cd16ebf26fe4a96a2ee8add3b", + "libs/Demo.pretty/PinHeader_1x05_P2.54mm_Vertical.kicad_mod": "8e494ecb4bbaff9fecbe2b16962684513fae788c9b9c9902172781d64b01c2e3", + "libs/Demo.pretty/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.kicad_mod": "f4f33fe61c9e926d53f1e361ec2a51ca1b1b3833be6313c42b7f83e62b9b1a11", + "libs/LICENSE-kicad-footprints.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE-kicad-packages3D.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE-kicad-symbols.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE_PROVENANCE.json": "8fb14cbd87bbb53c2e381fa614336026b1ef1a6b69d252e40b5de8dafa7f9c66", + "libs/models/LED_D3.0mm.step": "e83c2186ad887c36d869f44e28c7b80646ea10cb388697b4380f5a2777268371", + "libs/models/PinHeader_1x05_P2.54mm_Vertical.step": "f03b716e453f6d4f2a111a227c671d96f92708e72a5a663cd4889296d021f4c3", + "libs/models/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.step": "85bdadc9190739c38429da06b1d9c76ccf33aef9a0794a2e7a9dd5b58d9d05fe", + "libs/PROVENANCE.json": "1fe9b3f7206a5f9c7f1898cc65465cfc316766e93c7c15798c9098a65a19da3b", + "libs/README.md": "c09361039bd440ad0aa9038cf81a652abfbbe1e2803ca0dbd3471ce576a2e2d0", + "libs/upstream/LED_D3.0mm.kicad_mod": "d45c606dbf639522eaeae8c6bd2569747ee454daff87ab2db66bdad3200676d0", + "libs/upstream/models/LED_D3.0mm.step": "e83c2186ad887c36d869f44e28c7b80646ea10cb388697b4380f5a2777268371", + "libs/upstream/models/PinHeader_1x05_P2.54mm_Vertical.step": "f03b716e453f6d4f2a111a227c671d96f92708e72a5a663cd4889296d021f4c3", + "libs/upstream/models/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.step": "85bdadc9190739c38429da06b1d9c76ccf33aef9a0794a2e7a9dd5b58d9d05fe", + "libs/upstream/MountingHole_3.2mm_M3.kicad_mod": "3853c52bba27d3e3e3e18db44a20dfb296eb9e6cd16ebf26fe4a96a2ee8add3b", + "libs/upstream/PinHeader_1x05_P2.54mm_Vertical.kicad_mod": "a9beaa5e3bf9f73f4667fd503d8ddc47f81aec7999b51211890c919363099acf", + "libs/upstream/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.kicad_mod": "1ba096b69c79e588cc54946fb6648699e5b301f67f8df0e0e0be43dcab326436", + "netmap.json": "8049b76e10dfec2faea46331a99f75b34a22956aa7c81a685046c1389f1f64cd", + "project.yaml": "aa7e36a756e811ac38745c30d60499eec18049f8ae8e1affcac57b4613a51f14", + "REFERENCE_REVIEW.md": "7ddb00764a476d5b8e30e9ad125b103b815c7352dbdec4906016349a96b04d00", + "REQUIREMENTS.md": "5752f874ffded6f7ad28952d14a08c1764db07e818f156fb1a99399c4a3c7efa", + "review-profile.yaml": "c6b7725c0945ace7546a27fb0ef93c313a09af05e6ae974c0ca8e75ecd9a0af2", + "review-signoff.yaml": null, + "schematic-intent.yaml": null, + "sym-lib-table": "accdd625891ba71beb5e534de13e680099f47f98dff64ca95182060d2072213c" + }, + "inputs_after_checks": { + "DESIGN_BASIS.md": "77119e5d1ab6ea43a385a17adec1874ffc9b6c20e35eb44d783278710b9f239f", + "DEVIATIONS.md": "324f110ce0816864290f2b28a6ecdbe8006457f305852762837590ae0eb99563", + "evidence/files/61300511121_61300511121_b91171c2b942.pdf": "b91171c2b94275ccb3824762a4b77dcd0cd9031e8a818e869a6c9f18c053ad8b", + "evidence/files/MFR-25FBF52-1K1_YAGEO-MFR_DATASHEET_b460acdb4764.pdf": "b460acdb476469774e0785a8ef85aec79e2d95fe41beaa79c5a414e4e95e3fe0", + "evidence/files/WP710A10ID_WP710A10ID_42d464fbfd8d.pdf": "42d464fbfd8d3ddef65fa6f9226d298547cdb25d5369aff0c47e5f896595c4bd", + "evidence/index.yaml": "cece06b86df6f692fbfe52ceabf858e7996eb0721db00232d79f54c1c3c82149", + "fp-lib-table": "65851d1c9080d2cf944dcf740f2b9ad66fd62e6550f0feb7635f9dab55e1c329", + "gpio-indicator.kicad_dru": "fd6ec6cfd46f091c61ee7fa09ab3e1c5e29cb9b187e5045bcf055666f0239643", + "gpio-indicator.kicad_pcb": "aa4811a06c27b7d529da161f004cf5e5c1d192e04515ebd6aa9e8716a8536c71", + "gpio-indicator.kicad_pro": "b53a9bec0882a7dbd622aba8401f6616c067972c9d85dbffc407c407f9365fe2", + "gpio-indicator.kicad_sch": "bcf4b33bda22faff9d68be7498e96e7a83a40dc403b5fe2f4ffd79bf2f265ab4", + "jlcpcb-assembly.yaml": null, + "layout-intent.yaml": null, + "libs/Demo.kicad_sym": "c5e68806f7af78dceae8bff16e23446288e7247b32aa1a31d64f58da7e70a403", + "libs/Demo.pretty/LED_D3.0mm.kicad_mod": "9928bcc8ef35ea406d56af1480e43c606d8d646ba247b3d453d80386cd0f5b10", + "libs/Demo.pretty/MountingHole_3.2mm_M3.kicad_mod": "3853c52bba27d3e3e3e18db44a20dfb296eb9e6cd16ebf26fe4a96a2ee8add3b", + "libs/Demo.pretty/PinHeader_1x05_P2.54mm_Vertical.kicad_mod": "8e494ecb4bbaff9fecbe2b16962684513fae788c9b9c9902172781d64b01c2e3", + "libs/Demo.pretty/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.kicad_mod": "f4f33fe61c9e926d53f1e361ec2a51ca1b1b3833be6313c42b7f83e62b9b1a11", + "libs/LICENSE-kicad-footprints.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE-kicad-packages3D.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE-kicad-symbols.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE_PROVENANCE.json": "8fb14cbd87bbb53c2e381fa614336026b1ef1a6b69d252e40b5de8dafa7f9c66", + "libs/models/LED_D3.0mm.step": "e83c2186ad887c36d869f44e28c7b80646ea10cb388697b4380f5a2777268371", + "libs/models/PinHeader_1x05_P2.54mm_Vertical.step": "f03b716e453f6d4f2a111a227c671d96f92708e72a5a663cd4889296d021f4c3", + "libs/models/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.step": "85bdadc9190739c38429da06b1d9c76ccf33aef9a0794a2e7a9dd5b58d9d05fe", + "libs/PROVENANCE.json": "1fe9b3f7206a5f9c7f1898cc65465cfc316766e93c7c15798c9098a65a19da3b", + "libs/README.md": "c09361039bd440ad0aa9038cf81a652abfbbe1e2803ca0dbd3471ce576a2e2d0", + "libs/upstream/LED_D3.0mm.kicad_mod": "d45c606dbf639522eaeae8c6bd2569747ee454daff87ab2db66bdad3200676d0", + "libs/upstream/models/LED_D3.0mm.step": "e83c2186ad887c36d869f44e28c7b80646ea10cb388697b4380f5a2777268371", + "libs/upstream/models/PinHeader_1x05_P2.54mm_Vertical.step": "f03b716e453f6d4f2a111a227c671d96f92708e72a5a663cd4889296d021f4c3", + "libs/upstream/models/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.step": "85bdadc9190739c38429da06b1d9c76ccf33aef9a0794a2e7a9dd5b58d9d05fe", + "libs/upstream/MountingHole_3.2mm_M3.kicad_mod": "3853c52bba27d3e3e3e18db44a20dfb296eb9e6cd16ebf26fe4a96a2ee8add3b", + "libs/upstream/PinHeader_1x05_P2.54mm_Vertical.kicad_mod": "a9beaa5e3bf9f73f4667fd503d8ddc47f81aec7999b51211890c919363099acf", + "libs/upstream/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.kicad_mod": "1ba096b69c79e588cc54946fb6648699e5b301f67f8df0e0e0be43dcab326436", + "netmap.json": "8049b76e10dfec2faea46331a99f75b34a22956aa7c81a685046c1389f1f64cd", + "project.yaml": "aa7e36a756e811ac38745c30d60499eec18049f8ae8e1affcac57b4613a51f14", + "REFERENCE_REVIEW.md": "7ddb00764a476d5b8e30e9ad125b103b815c7352dbdec4906016349a96b04d00", + "REQUIREMENTS.md": "5752f874ffded6f7ad28952d14a08c1764db07e818f156fb1a99399c4a3c7efa", + "review-profile.yaml": "c6b7725c0945ace7546a27fb0ef93c313a09af05e6ae974c0ca8e75ecd9a0af2", + "review-signoff.yaml": null, + "schematic-intent.yaml": null, + "sym-lib-table": "accdd625891ba71beb5e534de13e680099f47f98dff64ca95182060d2072213c" + }, + "checks_preserved_inputs": true + }, + { + "name": "model-corruption", + "workspace": "workspaces/model-corruption/gpio-indicator", + "injection": { + "kind": "model-corruption", + "target": "libs/models/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.step", + "selected_reference": "R1", + "selected_footprint": "Demo:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal" + }, + "expected": { + "exit_code": 1, + "diagnostic_contains": "hash mismatch" + }, + "actual": { + "interface": "validator-api", + "arguments": [ + "workspaces/model-corruption/gpio-indicator", + "[[\"J1\", \"Demo:PinHeader_1x05_P2.54mm_Vertical\"], [\"R1\", \"Demo:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal\"], [\"D1\", \"Demo:LED_D3.0mm\"], [\"R2\", \"Demo:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal\"], [\"D2\", \"Demo:LED_D3.0mm\"], [\"R3\", \"Demo:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal\"], [\"D3\", \"Demo:LED_D3.0mm\"], [\"R4\", \"Demo:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal\"], [\"D4\", \"Demo:LED_D3.0mm\"], [\"H1\", \"Demo:MountingHole_3.2mm_M3\"], [\"H2\", \"Demo:MountingHole_3.2mm_M3\"]]" + ], + "executed_argv": [ + "C:\\Users\\tae06\\CODE\\PCB\\.venv\\Scripts\\python.exe", + "-c", + "import json, sys\nfrom pathlib import Path\nfrom pcb_copilot.project import load_project\nfrom pcb_copilot.layout.footprints import resolve_footprint\nproject = load_project(Path(sys.argv[1]))\ntry:\n results = [resolve_footprint(project, ref, lib_id) for ref, lib_id in json.loads(sys.argv[2])]\nexcept ValueError as error:\n print(json.dumps({'accepted': False, 'exception': type(error).__name__, 'message': str(error)}))\n sys.exit(1)\nprint(json.dumps({'accepted': True, 'footprints': len(results), 'fidelities': [r.fidelity for r in results]}))\n", + "workspaces/model-corruption/gpio-indicator", + "[[\"J1\", \"Demo:PinHeader_1x05_P2.54mm_Vertical\"], [\"R1\", \"Demo:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal\"], [\"D1\", \"Demo:LED_D3.0mm\"], [\"R2\", \"Demo:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal\"], [\"D2\", \"Demo:LED_D3.0mm\"], [\"R3\", \"Demo:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal\"], [\"D3\", \"Demo:LED_D3.0mm\"], [\"R4\", \"Demo:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal\"], [\"D4\", \"Demo:LED_D3.0mm\"], [\"H1\", \"Demo:MountingHole_3.2mm_M3\"], [\"H2\", \"Demo:MountingHole_3.2mm_M3\"]]" + ], + "exit_code": 1, + "duration_seconds": 0.292, + "stdout": "logs/model-corruption.stdout.txt", + "stderr": "logs/model-corruption.stderr.txt", + "error": null + }, + "outcome": "met_expectation", + "inputs_before": { + "DESIGN_BASIS.md": "77119e5d1ab6ea43a385a17adec1874ffc9b6c20e35eb44d783278710b9f239f", + "DEVIATIONS.md": "324f110ce0816864290f2b28a6ecdbe8006457f305852762837590ae0eb99563", + "evidence/files/61300511121_61300511121_b91171c2b942.pdf": "b91171c2b94275ccb3824762a4b77dcd0cd9031e8a818e869a6c9f18c053ad8b", + "evidence/files/MFR-25FBF52-1K1_YAGEO-MFR_DATASHEET_b460acdb4764.pdf": "b460acdb476469774e0785a8ef85aec79e2d95fe41beaa79c5a414e4e95e3fe0", + "evidence/files/WP710A10ID_WP710A10ID_42d464fbfd8d.pdf": "42d464fbfd8d3ddef65fa6f9226d298547cdb25d5369aff0c47e5f896595c4bd", + "evidence/index.yaml": "cece06b86df6f692fbfe52ceabf858e7996eb0721db00232d79f54c1c3c82149", + "fp-lib-table": "65851d1c9080d2cf944dcf740f2b9ad66fd62e6550f0feb7635f9dab55e1c329", + "gpio-indicator.kicad_dru": "fd6ec6cfd46f091c61ee7fa09ab3e1c5e29cb9b187e5045bcf055666f0239643", + "gpio-indicator.kicad_pcb": "aa4811a06c27b7d529da161f004cf5e5c1d192e04515ebd6aa9e8716a8536c71", + "gpio-indicator.kicad_pro": "b53a9bec0882a7dbd622aba8401f6616c067972c9d85dbffc407c407f9365fe2", + "gpio-indicator.kicad_sch": "bcf4b33bda22faff9d68be7498e96e7a83a40dc403b5fe2f4ffd79bf2f265ab4", + "jlcpcb-assembly.yaml": null, + "layout-intent.yaml": null, + "libs/Demo.kicad_sym": "c5e68806f7af78dceae8bff16e23446288e7247b32aa1a31d64f58da7e70a403", + "libs/Demo.pretty/LED_D3.0mm.kicad_mod": "9928bcc8ef35ea406d56af1480e43c606d8d646ba247b3d453d80386cd0f5b10", + "libs/Demo.pretty/MountingHole_3.2mm_M3.kicad_mod": "3853c52bba27d3e3e3e18db44a20dfb296eb9e6cd16ebf26fe4a96a2ee8add3b", + "libs/Demo.pretty/PinHeader_1x05_P2.54mm_Vertical.kicad_mod": "8e494ecb4bbaff9fecbe2b16962684513fae788c9b9c9902172781d64b01c2e3", + "libs/Demo.pretty/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.kicad_mod": "bf616ce7d49ae02d5c87d01dd19957ebf3aa66007809680c450de8561f4681a1", + "libs/LICENSE-kicad-footprints.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE-kicad-packages3D.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE-kicad-symbols.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE_PROVENANCE.json": "8fb14cbd87bbb53c2e381fa614336026b1ef1a6b69d252e40b5de8dafa7f9c66", + "libs/models/LED_D3.0mm.step": "e83c2186ad887c36d869f44e28c7b80646ea10cb388697b4380f5a2777268371", + "libs/models/PinHeader_1x05_P2.54mm_Vertical.step": "f03b716e453f6d4f2a111a227c671d96f92708e72a5a663cd4889296d021f4c3", + "libs/models/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.step": "85bdadc9190739c38429da06b1d9c76ccf33aef9a0794a2e7a9dd5b58d9d05fe", + "libs/PROVENANCE.json": "30cb553d1c3ac24055e98ae9dc41e45d3eaa876cad6a8894dee4959aef2f6314", + "libs/README.md": "c09361039bd440ad0aa9038cf81a652abfbbe1e2803ca0dbd3471ce576a2e2d0", + "libs/upstream/LED_D3.0mm.kicad_mod": "d45c606dbf639522eaeae8c6bd2569747ee454daff87ab2db66bdad3200676d0", + "libs/upstream/models/LED_D3.0mm.step": "e83c2186ad887c36d869f44e28c7b80646ea10cb388697b4380f5a2777268371", + "libs/upstream/models/PinHeader_1x05_P2.54mm_Vertical.step": "f03b716e453f6d4f2a111a227c671d96f92708e72a5a663cd4889296d021f4c3", + "libs/upstream/models/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.step": "85bdadc9190739c38429da06b1d9c76ccf33aef9a0794a2e7a9dd5b58d9d05fe", + "libs/upstream/MountingHole_3.2mm_M3.kicad_mod": "3853c52bba27d3e3e3e18db44a20dfb296eb9e6cd16ebf26fe4a96a2ee8add3b", + "libs/upstream/PinHeader_1x05_P2.54mm_Vertical.kicad_mod": "a9beaa5e3bf9f73f4667fd503d8ddc47f81aec7999b51211890c919363099acf", + "libs/upstream/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.kicad_mod": "1ba096b69c79e588cc54946fb6648699e5b301f67f8df0e0e0be43dcab326436", + "netmap.json": "8049b76e10dfec2faea46331a99f75b34a22956aa7c81a685046c1389f1f64cd", + "project.yaml": "aa7e36a756e811ac38745c30d60499eec18049f8ae8e1affcac57b4613a51f14", + "REFERENCE_REVIEW.md": "7ddb00764a476d5b8e30e9ad125b103b815c7352dbdec4906016349a96b04d00", + "REQUIREMENTS.md": "5752f874ffded6f7ad28952d14a08c1764db07e818f156fb1a99399c4a3c7efa", + "review-profile.yaml": "c6b7725c0945ace7546a27fb0ef93c313a09af05e6ae974c0ca8e75ecd9a0af2", + "review-signoff.yaml": null, + "schematic-intent.yaml": null, + "sym-lib-table": "accdd625891ba71beb5e534de13e680099f47f98dff64ca95182060d2072213c" + }, + "inputs_after_injection": { + "DESIGN_BASIS.md": "77119e5d1ab6ea43a385a17adec1874ffc9b6c20e35eb44d783278710b9f239f", + "DEVIATIONS.md": "324f110ce0816864290f2b28a6ecdbe8006457f305852762837590ae0eb99563", + "evidence/files/61300511121_61300511121_b91171c2b942.pdf": "b91171c2b94275ccb3824762a4b77dcd0cd9031e8a818e869a6c9f18c053ad8b", + "evidence/files/MFR-25FBF52-1K1_YAGEO-MFR_DATASHEET_b460acdb4764.pdf": "b460acdb476469774e0785a8ef85aec79e2d95fe41beaa79c5a414e4e95e3fe0", + "evidence/files/WP710A10ID_WP710A10ID_42d464fbfd8d.pdf": "42d464fbfd8d3ddef65fa6f9226d298547cdb25d5369aff0c47e5f896595c4bd", + "evidence/index.yaml": "cece06b86df6f692fbfe52ceabf858e7996eb0721db00232d79f54c1c3c82149", + "fp-lib-table": "65851d1c9080d2cf944dcf740f2b9ad66fd62e6550f0feb7635f9dab55e1c329", + "gpio-indicator.kicad_dru": "fd6ec6cfd46f091c61ee7fa09ab3e1c5e29cb9b187e5045bcf055666f0239643", + "gpio-indicator.kicad_pcb": "aa4811a06c27b7d529da161f004cf5e5c1d192e04515ebd6aa9e8716a8536c71", + "gpio-indicator.kicad_pro": "b53a9bec0882a7dbd622aba8401f6616c067972c9d85dbffc407c407f9365fe2", + "gpio-indicator.kicad_sch": "bcf4b33bda22faff9d68be7498e96e7a83a40dc403b5fe2f4ffd79bf2f265ab4", + "jlcpcb-assembly.yaml": null, + "layout-intent.yaml": null, + "libs/Demo.kicad_sym": "c5e68806f7af78dceae8bff16e23446288e7247b32aa1a31d64f58da7e70a403", + "libs/Demo.pretty/LED_D3.0mm.kicad_mod": "9928bcc8ef35ea406d56af1480e43c606d8d646ba247b3d453d80386cd0f5b10", + "libs/Demo.pretty/MountingHole_3.2mm_M3.kicad_mod": "3853c52bba27d3e3e3e18db44a20dfb296eb9e6cd16ebf26fe4a96a2ee8add3b", + "libs/Demo.pretty/PinHeader_1x05_P2.54mm_Vertical.kicad_mod": "8e494ecb4bbaff9fecbe2b16962684513fae788c9b9c9902172781d64b01c2e3", + "libs/Demo.pretty/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.kicad_mod": "bf616ce7d49ae02d5c87d01dd19957ebf3aa66007809680c450de8561f4681a1", + "libs/LICENSE-kicad-footprints.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE-kicad-packages3D.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE-kicad-symbols.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE_PROVENANCE.json": "8fb14cbd87bbb53c2e381fa614336026b1ef1a6b69d252e40b5de8dafa7f9c66", + "libs/models/LED_D3.0mm.step": "e83c2186ad887c36d869f44e28c7b80646ea10cb388697b4380f5a2777268371", + "libs/models/PinHeader_1x05_P2.54mm_Vertical.step": "f03b716e453f6d4f2a111a227c671d96f92708e72a5a663cd4889296d021f4c3", + "libs/models/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.step": "b31b4261a8eec250ba14270cc3522d1df4bc9dde802450717b929faaa8fcf153", + "libs/PROVENANCE.json": "30cb553d1c3ac24055e98ae9dc41e45d3eaa876cad6a8894dee4959aef2f6314", + "libs/README.md": "c09361039bd440ad0aa9038cf81a652abfbbe1e2803ca0dbd3471ce576a2e2d0", + "libs/upstream/LED_D3.0mm.kicad_mod": "d45c606dbf639522eaeae8c6bd2569747ee454daff87ab2db66bdad3200676d0", + "libs/upstream/models/LED_D3.0mm.step": "e83c2186ad887c36d869f44e28c7b80646ea10cb388697b4380f5a2777268371", + "libs/upstream/models/PinHeader_1x05_P2.54mm_Vertical.step": "f03b716e453f6d4f2a111a227c671d96f92708e72a5a663cd4889296d021f4c3", + "libs/upstream/models/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.step": "85bdadc9190739c38429da06b1d9c76ccf33aef9a0794a2e7a9dd5b58d9d05fe", + "libs/upstream/MountingHole_3.2mm_M3.kicad_mod": "3853c52bba27d3e3e3e18db44a20dfb296eb9e6cd16ebf26fe4a96a2ee8add3b", + "libs/upstream/PinHeader_1x05_P2.54mm_Vertical.kicad_mod": "a9beaa5e3bf9f73f4667fd503d8ddc47f81aec7999b51211890c919363099acf", + "libs/upstream/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.kicad_mod": "1ba096b69c79e588cc54946fb6648699e5b301f67f8df0e0e0be43dcab326436", + "netmap.json": "8049b76e10dfec2faea46331a99f75b34a22956aa7c81a685046c1389f1f64cd", + "project.yaml": "aa7e36a756e811ac38745c30d60499eec18049f8ae8e1affcac57b4613a51f14", + "REFERENCE_REVIEW.md": "7ddb00764a476d5b8e30e9ad125b103b815c7352dbdec4906016349a96b04d00", + "REQUIREMENTS.md": "5752f874ffded6f7ad28952d14a08c1764db07e818f156fb1a99399c4a3c7efa", + "review-profile.yaml": "c6b7725c0945ace7546a27fb0ef93c313a09af05e6ae974c0ca8e75ecd9a0af2", + "review-signoff.yaml": null, + "schematic-intent.yaml": null, + "sym-lib-table": "accdd625891ba71beb5e534de13e680099f47f98dff64ca95182060d2072213c" + }, + "inputs_after_checks": { + "DESIGN_BASIS.md": "77119e5d1ab6ea43a385a17adec1874ffc9b6c20e35eb44d783278710b9f239f", + "DEVIATIONS.md": "324f110ce0816864290f2b28a6ecdbe8006457f305852762837590ae0eb99563", + "evidence/files/61300511121_61300511121_b91171c2b942.pdf": "b91171c2b94275ccb3824762a4b77dcd0cd9031e8a818e869a6c9f18c053ad8b", + "evidence/files/MFR-25FBF52-1K1_YAGEO-MFR_DATASHEET_b460acdb4764.pdf": "b460acdb476469774e0785a8ef85aec79e2d95fe41beaa79c5a414e4e95e3fe0", + "evidence/files/WP710A10ID_WP710A10ID_42d464fbfd8d.pdf": "42d464fbfd8d3ddef65fa6f9226d298547cdb25d5369aff0c47e5f896595c4bd", + "evidence/index.yaml": "cece06b86df6f692fbfe52ceabf858e7996eb0721db00232d79f54c1c3c82149", + "fp-lib-table": "65851d1c9080d2cf944dcf740f2b9ad66fd62e6550f0feb7635f9dab55e1c329", + "gpio-indicator.kicad_dru": "fd6ec6cfd46f091c61ee7fa09ab3e1c5e29cb9b187e5045bcf055666f0239643", + "gpio-indicator.kicad_pcb": "aa4811a06c27b7d529da161f004cf5e5c1d192e04515ebd6aa9e8716a8536c71", + "gpio-indicator.kicad_pro": "b53a9bec0882a7dbd622aba8401f6616c067972c9d85dbffc407c407f9365fe2", + "gpio-indicator.kicad_sch": "bcf4b33bda22faff9d68be7498e96e7a83a40dc403b5fe2f4ffd79bf2f265ab4", + "jlcpcb-assembly.yaml": null, + "layout-intent.yaml": null, + "libs/Demo.kicad_sym": "c5e68806f7af78dceae8bff16e23446288e7247b32aa1a31d64f58da7e70a403", + "libs/Demo.pretty/LED_D3.0mm.kicad_mod": "9928bcc8ef35ea406d56af1480e43c606d8d646ba247b3d453d80386cd0f5b10", + "libs/Demo.pretty/MountingHole_3.2mm_M3.kicad_mod": "3853c52bba27d3e3e3e18db44a20dfb296eb9e6cd16ebf26fe4a96a2ee8add3b", + "libs/Demo.pretty/PinHeader_1x05_P2.54mm_Vertical.kicad_mod": "8e494ecb4bbaff9fecbe2b16962684513fae788c9b9c9902172781d64b01c2e3", + "libs/Demo.pretty/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.kicad_mod": "bf616ce7d49ae02d5c87d01dd19957ebf3aa66007809680c450de8561f4681a1", + "libs/LICENSE-kicad-footprints.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE-kicad-packages3D.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE-kicad-symbols.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE_PROVENANCE.json": "8fb14cbd87bbb53c2e381fa614336026b1ef1a6b69d252e40b5de8dafa7f9c66", + "libs/models/LED_D3.0mm.step": "e83c2186ad887c36d869f44e28c7b80646ea10cb388697b4380f5a2777268371", + "libs/models/PinHeader_1x05_P2.54mm_Vertical.step": "f03b716e453f6d4f2a111a227c671d96f92708e72a5a663cd4889296d021f4c3", + "libs/models/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.step": "b31b4261a8eec250ba14270cc3522d1df4bc9dde802450717b929faaa8fcf153", + "libs/PROVENANCE.json": "30cb553d1c3ac24055e98ae9dc41e45d3eaa876cad6a8894dee4959aef2f6314", + "libs/README.md": "c09361039bd440ad0aa9038cf81a652abfbbe1e2803ca0dbd3471ce576a2e2d0", + "libs/upstream/LED_D3.0mm.kicad_mod": "d45c606dbf639522eaeae8c6bd2569747ee454daff87ab2db66bdad3200676d0", + "libs/upstream/models/LED_D3.0mm.step": "e83c2186ad887c36d869f44e28c7b80646ea10cb388697b4380f5a2777268371", + "libs/upstream/models/PinHeader_1x05_P2.54mm_Vertical.step": "f03b716e453f6d4f2a111a227c671d96f92708e72a5a663cd4889296d021f4c3", + "libs/upstream/models/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.step": "85bdadc9190739c38429da06b1d9c76ccf33aef9a0794a2e7a9dd5b58d9d05fe", + "libs/upstream/MountingHole_3.2mm_M3.kicad_mod": "3853c52bba27d3e3e3e18db44a20dfb296eb9e6cd16ebf26fe4a96a2ee8add3b", + "libs/upstream/PinHeader_1x05_P2.54mm_Vertical.kicad_mod": "a9beaa5e3bf9f73f4667fd503d8ddc47f81aec7999b51211890c919363099acf", + "libs/upstream/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.kicad_mod": "1ba096b69c79e588cc54946fb6648699e5b301f67f8df0e0e0be43dcab326436", + "netmap.json": "8049b76e10dfec2faea46331a99f75b34a22956aa7c81a685046c1389f1f64cd", + "project.yaml": "aa7e36a756e811ac38745c30d60499eec18049f8ae8e1affcac57b4613a51f14", + "REFERENCE_REVIEW.md": "7ddb00764a476d5b8e30e9ad125b103b815c7352dbdec4906016349a96b04d00", + "REQUIREMENTS.md": "5752f874ffded6f7ad28952d14a08c1764db07e818f156fb1a99399c4a3c7efa", + "review-profile.yaml": "c6b7725c0945ace7546a27fb0ef93c313a09af05e6ae974c0ca8e75ecd9a0af2", + "review-signoff.yaml": null, + "schematic-intent.yaml": null, + "sym-lib-table": "accdd625891ba71beb5e534de13e680099f47f98dff64ca95182060d2072213c" + }, + "checks_preserved_inputs": true + }, + { + "name": "selected-mpn", + "workspace": "workspaces/selected-mpn/gpio-indicator", + "injection": { + "kind": "selected-mpn", + "target": "gpio-indicator.kicad_sch", + "selected_reference": "R1", + "selected_footprint": "Demo:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal" + }, + "expected": { + "exit_code": 1, + "diagnostic_contains": "does not match the exact selected native MPN" + }, + "actual": { + "interface": "validator-api", + "arguments": [ + "workspaces/selected-mpn/gpio-indicator", + "[[\"J1\", \"Demo:PinHeader_1x05_P2.54mm_Vertical\"], [\"R1\", \"Demo:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal\"], [\"D1\", \"Demo:LED_D3.0mm\"], [\"R2\", \"Demo:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal\"], [\"D2\", \"Demo:LED_D3.0mm\"], [\"R3\", \"Demo:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal\"], [\"D3\", \"Demo:LED_D3.0mm\"], [\"R4\", \"Demo:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal\"], [\"D4\", \"Demo:LED_D3.0mm\"], [\"H1\", \"Demo:MountingHole_3.2mm_M3\"], [\"H2\", \"Demo:MountingHole_3.2mm_M3\"]]" + ], + "executed_argv": [ + "C:\\Users\\tae06\\CODE\\PCB\\.venv\\Scripts\\python.exe", + "-c", + "import json, sys\nfrom pathlib import Path\nfrom pcb_copilot.project import load_project\nfrom pcb_copilot.layout.footprints import resolve_footprint\nproject = load_project(Path(sys.argv[1]))\ntry:\n results = [resolve_footprint(project, ref, lib_id) for ref, lib_id in json.loads(sys.argv[2])]\nexcept ValueError as error:\n print(json.dumps({'accepted': False, 'exception': type(error).__name__, 'message': str(error)}))\n sys.exit(1)\nprint(json.dumps({'accepted': True, 'footprints': len(results), 'fidelities': [r.fidelity for r in results]}))\n", + "workspaces/selected-mpn/gpio-indicator", + "[[\"J1\", \"Demo:PinHeader_1x05_P2.54mm_Vertical\"], [\"R1\", \"Demo:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal\"], [\"D1\", \"Demo:LED_D3.0mm\"], [\"R2\", \"Demo:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal\"], [\"D2\", \"Demo:LED_D3.0mm\"], [\"R3\", \"Demo:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal\"], [\"D3\", \"Demo:LED_D3.0mm\"], [\"R4\", \"Demo:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal\"], [\"D4\", \"Demo:LED_D3.0mm\"], [\"H1\", \"Demo:MountingHole_3.2mm_M3\"], [\"H2\", \"Demo:MountingHole_3.2mm_M3\"]]" + ], + "exit_code": 1, + "duration_seconds": 0.309, + "stdout": "logs/selected-mpn.stdout.txt", + "stderr": "logs/selected-mpn.stderr.txt", + "error": null + }, + "outcome": "met_expectation", + "inputs_before": { + "DESIGN_BASIS.md": "77119e5d1ab6ea43a385a17adec1874ffc9b6c20e35eb44d783278710b9f239f", + "DEVIATIONS.md": "324f110ce0816864290f2b28a6ecdbe8006457f305852762837590ae0eb99563", + "evidence/files/61300511121_61300511121_b91171c2b942.pdf": "b91171c2b94275ccb3824762a4b77dcd0cd9031e8a818e869a6c9f18c053ad8b", + "evidence/files/MFR-25FBF52-1K1_YAGEO-MFR_DATASHEET_b460acdb4764.pdf": "b460acdb476469774e0785a8ef85aec79e2d95fe41beaa79c5a414e4e95e3fe0", + "evidence/files/WP710A10ID_WP710A10ID_42d464fbfd8d.pdf": "42d464fbfd8d3ddef65fa6f9226d298547cdb25d5369aff0c47e5f896595c4bd", + "evidence/index.yaml": "cece06b86df6f692fbfe52ceabf858e7996eb0721db00232d79f54c1c3c82149", + "fp-lib-table": "65851d1c9080d2cf944dcf740f2b9ad66fd62e6550f0feb7635f9dab55e1c329", + "gpio-indicator.kicad_dru": "fd6ec6cfd46f091c61ee7fa09ab3e1c5e29cb9b187e5045bcf055666f0239643", + "gpio-indicator.kicad_pcb": "aa4811a06c27b7d529da161f004cf5e5c1d192e04515ebd6aa9e8716a8536c71", + "gpio-indicator.kicad_pro": "b53a9bec0882a7dbd622aba8401f6616c067972c9d85dbffc407c407f9365fe2", + "gpio-indicator.kicad_sch": "bcf4b33bda22faff9d68be7498e96e7a83a40dc403b5fe2f4ffd79bf2f265ab4", + "jlcpcb-assembly.yaml": null, + "layout-intent.yaml": null, + "libs/Demo.kicad_sym": "c5e68806f7af78dceae8bff16e23446288e7247b32aa1a31d64f58da7e70a403", + "libs/Demo.pretty/LED_D3.0mm.kicad_mod": "9928bcc8ef35ea406d56af1480e43c606d8d646ba247b3d453d80386cd0f5b10", + "libs/Demo.pretty/MountingHole_3.2mm_M3.kicad_mod": "3853c52bba27d3e3e3e18db44a20dfb296eb9e6cd16ebf26fe4a96a2ee8add3b", + "libs/Demo.pretty/PinHeader_1x05_P2.54mm_Vertical.kicad_mod": "8e494ecb4bbaff9fecbe2b16962684513fae788c9b9c9902172781d64b01c2e3", + "libs/Demo.pretty/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.kicad_mod": "bf616ce7d49ae02d5c87d01dd19957ebf3aa66007809680c450de8561f4681a1", + "libs/LICENSE-kicad-footprints.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE-kicad-packages3D.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE-kicad-symbols.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE_PROVENANCE.json": "8fb14cbd87bbb53c2e381fa614336026b1ef1a6b69d252e40b5de8dafa7f9c66", + "libs/models/LED_D3.0mm.step": "e83c2186ad887c36d869f44e28c7b80646ea10cb388697b4380f5a2777268371", + "libs/models/PinHeader_1x05_P2.54mm_Vertical.step": "f03b716e453f6d4f2a111a227c671d96f92708e72a5a663cd4889296d021f4c3", + "libs/models/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.step": "85bdadc9190739c38429da06b1d9c76ccf33aef9a0794a2e7a9dd5b58d9d05fe", + "libs/PROVENANCE.json": "30cb553d1c3ac24055e98ae9dc41e45d3eaa876cad6a8894dee4959aef2f6314", + "libs/README.md": "c09361039bd440ad0aa9038cf81a652abfbbe1e2803ca0dbd3471ce576a2e2d0", + "libs/upstream/LED_D3.0mm.kicad_mod": "d45c606dbf639522eaeae8c6bd2569747ee454daff87ab2db66bdad3200676d0", + "libs/upstream/models/LED_D3.0mm.step": "e83c2186ad887c36d869f44e28c7b80646ea10cb388697b4380f5a2777268371", + "libs/upstream/models/PinHeader_1x05_P2.54mm_Vertical.step": "f03b716e453f6d4f2a111a227c671d96f92708e72a5a663cd4889296d021f4c3", + "libs/upstream/models/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.step": "85bdadc9190739c38429da06b1d9c76ccf33aef9a0794a2e7a9dd5b58d9d05fe", + "libs/upstream/MountingHole_3.2mm_M3.kicad_mod": "3853c52bba27d3e3e3e18db44a20dfb296eb9e6cd16ebf26fe4a96a2ee8add3b", + "libs/upstream/PinHeader_1x05_P2.54mm_Vertical.kicad_mod": "a9beaa5e3bf9f73f4667fd503d8ddc47f81aec7999b51211890c919363099acf", + "libs/upstream/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.kicad_mod": "1ba096b69c79e588cc54946fb6648699e5b301f67f8df0e0e0be43dcab326436", + "netmap.json": "8049b76e10dfec2faea46331a99f75b34a22956aa7c81a685046c1389f1f64cd", + "project.yaml": "aa7e36a756e811ac38745c30d60499eec18049f8ae8e1affcac57b4613a51f14", + "REFERENCE_REVIEW.md": "7ddb00764a476d5b8e30e9ad125b103b815c7352dbdec4906016349a96b04d00", + "REQUIREMENTS.md": "5752f874ffded6f7ad28952d14a08c1764db07e818f156fb1a99399c4a3c7efa", + "review-profile.yaml": "c6b7725c0945ace7546a27fb0ef93c313a09af05e6ae974c0ca8e75ecd9a0af2", + "review-signoff.yaml": null, + "schematic-intent.yaml": null, + "sym-lib-table": "accdd625891ba71beb5e534de13e680099f47f98dff64ca95182060d2072213c" + }, + "inputs_after_injection": { + "DESIGN_BASIS.md": "77119e5d1ab6ea43a385a17adec1874ffc9b6c20e35eb44d783278710b9f239f", + "DEVIATIONS.md": "324f110ce0816864290f2b28a6ecdbe8006457f305852762837590ae0eb99563", + "evidence/files/61300511121_61300511121_b91171c2b942.pdf": "b91171c2b94275ccb3824762a4b77dcd0cd9031e8a818e869a6c9f18c053ad8b", + "evidence/files/MFR-25FBF52-1K1_YAGEO-MFR_DATASHEET_b460acdb4764.pdf": "b460acdb476469774e0785a8ef85aec79e2d95fe41beaa79c5a414e4e95e3fe0", + "evidence/files/WP710A10ID_WP710A10ID_42d464fbfd8d.pdf": "42d464fbfd8d3ddef65fa6f9226d298547cdb25d5369aff0c47e5f896595c4bd", + "evidence/index.yaml": "cece06b86df6f692fbfe52ceabf858e7996eb0721db00232d79f54c1c3c82149", + "fp-lib-table": "65851d1c9080d2cf944dcf740f2b9ad66fd62e6550f0feb7635f9dab55e1c329", + "gpio-indicator.kicad_dru": "fd6ec6cfd46f091c61ee7fa09ab3e1c5e29cb9b187e5045bcf055666f0239643", + "gpio-indicator.kicad_pcb": "aa4811a06c27b7d529da161f004cf5e5c1d192e04515ebd6aa9e8716a8536c71", + "gpio-indicator.kicad_pro": "b53a9bec0882a7dbd622aba8401f6616c067972c9d85dbffc407c407f9365fe2", + "gpio-indicator.kicad_sch": "a0782fe08eec144504f9436d5ab193dca18acf7d97e40806add8147cf8a06527", + "jlcpcb-assembly.yaml": null, + "layout-intent.yaml": null, + "libs/Demo.kicad_sym": "c5e68806f7af78dceae8bff16e23446288e7247b32aa1a31d64f58da7e70a403", + "libs/Demo.pretty/LED_D3.0mm.kicad_mod": "9928bcc8ef35ea406d56af1480e43c606d8d646ba247b3d453d80386cd0f5b10", + "libs/Demo.pretty/MountingHole_3.2mm_M3.kicad_mod": "3853c52bba27d3e3e3e18db44a20dfb296eb9e6cd16ebf26fe4a96a2ee8add3b", + "libs/Demo.pretty/PinHeader_1x05_P2.54mm_Vertical.kicad_mod": "8e494ecb4bbaff9fecbe2b16962684513fae788c9b9c9902172781d64b01c2e3", + "libs/Demo.pretty/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.kicad_mod": "bf616ce7d49ae02d5c87d01dd19957ebf3aa66007809680c450de8561f4681a1", + "libs/LICENSE-kicad-footprints.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE-kicad-packages3D.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE-kicad-symbols.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE_PROVENANCE.json": "8fb14cbd87bbb53c2e381fa614336026b1ef1a6b69d252e40b5de8dafa7f9c66", + "libs/models/LED_D3.0mm.step": "e83c2186ad887c36d869f44e28c7b80646ea10cb388697b4380f5a2777268371", + "libs/models/PinHeader_1x05_P2.54mm_Vertical.step": "f03b716e453f6d4f2a111a227c671d96f92708e72a5a663cd4889296d021f4c3", + "libs/models/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.step": "85bdadc9190739c38429da06b1d9c76ccf33aef9a0794a2e7a9dd5b58d9d05fe", + "libs/PROVENANCE.json": "30cb553d1c3ac24055e98ae9dc41e45d3eaa876cad6a8894dee4959aef2f6314", + "libs/README.md": "c09361039bd440ad0aa9038cf81a652abfbbe1e2803ca0dbd3471ce576a2e2d0", + "libs/upstream/LED_D3.0mm.kicad_mod": "d45c606dbf639522eaeae8c6bd2569747ee454daff87ab2db66bdad3200676d0", + "libs/upstream/models/LED_D3.0mm.step": "e83c2186ad887c36d869f44e28c7b80646ea10cb388697b4380f5a2777268371", + "libs/upstream/models/PinHeader_1x05_P2.54mm_Vertical.step": "f03b716e453f6d4f2a111a227c671d96f92708e72a5a663cd4889296d021f4c3", + "libs/upstream/models/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.step": "85bdadc9190739c38429da06b1d9c76ccf33aef9a0794a2e7a9dd5b58d9d05fe", + "libs/upstream/MountingHole_3.2mm_M3.kicad_mod": "3853c52bba27d3e3e3e18db44a20dfb296eb9e6cd16ebf26fe4a96a2ee8add3b", + "libs/upstream/PinHeader_1x05_P2.54mm_Vertical.kicad_mod": "a9beaa5e3bf9f73f4667fd503d8ddc47f81aec7999b51211890c919363099acf", + "libs/upstream/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.kicad_mod": "1ba096b69c79e588cc54946fb6648699e5b301f67f8df0e0e0be43dcab326436", + "netmap.json": "8049b76e10dfec2faea46331a99f75b34a22956aa7c81a685046c1389f1f64cd", + "project.yaml": "aa7e36a756e811ac38745c30d60499eec18049f8ae8e1affcac57b4613a51f14", + "REFERENCE_REVIEW.md": "7ddb00764a476d5b8e30e9ad125b103b815c7352dbdec4906016349a96b04d00", + "REQUIREMENTS.md": "5752f874ffded6f7ad28952d14a08c1764db07e818f156fb1a99399c4a3c7efa", + "review-profile.yaml": "c6b7725c0945ace7546a27fb0ef93c313a09af05e6ae974c0ca8e75ecd9a0af2", + "review-signoff.yaml": null, + "schematic-intent.yaml": null, + "sym-lib-table": "accdd625891ba71beb5e534de13e680099f47f98dff64ca95182060d2072213c" + }, + "inputs_after_checks": { + "DESIGN_BASIS.md": "77119e5d1ab6ea43a385a17adec1874ffc9b6c20e35eb44d783278710b9f239f", + "DEVIATIONS.md": "324f110ce0816864290f2b28a6ecdbe8006457f305852762837590ae0eb99563", + "evidence/files/61300511121_61300511121_b91171c2b942.pdf": "b91171c2b94275ccb3824762a4b77dcd0cd9031e8a818e869a6c9f18c053ad8b", + "evidence/files/MFR-25FBF52-1K1_YAGEO-MFR_DATASHEET_b460acdb4764.pdf": "b460acdb476469774e0785a8ef85aec79e2d95fe41beaa79c5a414e4e95e3fe0", + "evidence/files/WP710A10ID_WP710A10ID_42d464fbfd8d.pdf": "42d464fbfd8d3ddef65fa6f9226d298547cdb25d5369aff0c47e5f896595c4bd", + "evidence/index.yaml": "cece06b86df6f692fbfe52ceabf858e7996eb0721db00232d79f54c1c3c82149", + "fp-lib-table": "65851d1c9080d2cf944dcf740f2b9ad66fd62e6550f0feb7635f9dab55e1c329", + "gpio-indicator.kicad_dru": "fd6ec6cfd46f091c61ee7fa09ab3e1c5e29cb9b187e5045bcf055666f0239643", + "gpio-indicator.kicad_pcb": "aa4811a06c27b7d529da161f004cf5e5c1d192e04515ebd6aa9e8716a8536c71", + "gpio-indicator.kicad_pro": "b53a9bec0882a7dbd622aba8401f6616c067972c9d85dbffc407c407f9365fe2", + "gpio-indicator.kicad_sch": "a0782fe08eec144504f9436d5ab193dca18acf7d97e40806add8147cf8a06527", + "jlcpcb-assembly.yaml": null, + "layout-intent.yaml": null, + "libs/Demo.kicad_sym": "c5e68806f7af78dceae8bff16e23446288e7247b32aa1a31d64f58da7e70a403", + "libs/Demo.pretty/LED_D3.0mm.kicad_mod": "9928bcc8ef35ea406d56af1480e43c606d8d646ba247b3d453d80386cd0f5b10", + "libs/Demo.pretty/MountingHole_3.2mm_M3.kicad_mod": "3853c52bba27d3e3e3e18db44a20dfb296eb9e6cd16ebf26fe4a96a2ee8add3b", + "libs/Demo.pretty/PinHeader_1x05_P2.54mm_Vertical.kicad_mod": "8e494ecb4bbaff9fecbe2b16962684513fae788c9b9c9902172781d64b01c2e3", + "libs/Demo.pretty/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.kicad_mod": "bf616ce7d49ae02d5c87d01dd19957ebf3aa66007809680c450de8561f4681a1", + "libs/LICENSE-kicad-footprints.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE-kicad-packages3D.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE-kicad-symbols.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE_PROVENANCE.json": "8fb14cbd87bbb53c2e381fa614336026b1ef1a6b69d252e40b5de8dafa7f9c66", + "libs/models/LED_D3.0mm.step": "e83c2186ad887c36d869f44e28c7b80646ea10cb388697b4380f5a2777268371", + "libs/models/PinHeader_1x05_P2.54mm_Vertical.step": "f03b716e453f6d4f2a111a227c671d96f92708e72a5a663cd4889296d021f4c3", + "libs/models/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.step": "85bdadc9190739c38429da06b1d9c76ccf33aef9a0794a2e7a9dd5b58d9d05fe", + "libs/PROVENANCE.json": "30cb553d1c3ac24055e98ae9dc41e45d3eaa876cad6a8894dee4959aef2f6314", + "libs/README.md": "c09361039bd440ad0aa9038cf81a652abfbbe1e2803ca0dbd3471ce576a2e2d0", + "libs/upstream/LED_D3.0mm.kicad_mod": "d45c606dbf639522eaeae8c6bd2569747ee454daff87ab2db66bdad3200676d0", + "libs/upstream/models/LED_D3.0mm.step": "e83c2186ad887c36d869f44e28c7b80646ea10cb388697b4380f5a2777268371", + "libs/upstream/models/PinHeader_1x05_P2.54mm_Vertical.step": "f03b716e453f6d4f2a111a227c671d96f92708e72a5a663cd4889296d021f4c3", + "libs/upstream/models/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.step": "85bdadc9190739c38429da06b1d9c76ccf33aef9a0794a2e7a9dd5b58d9d05fe", + "libs/upstream/MountingHole_3.2mm_M3.kicad_mod": "3853c52bba27d3e3e3e18db44a20dfb296eb9e6cd16ebf26fe4a96a2ee8add3b", + "libs/upstream/PinHeader_1x05_P2.54mm_Vertical.kicad_mod": "a9beaa5e3bf9f73f4667fd503d8ddc47f81aec7999b51211890c919363099acf", + "libs/upstream/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.kicad_mod": "1ba096b69c79e588cc54946fb6648699e5b301f67f8df0e0e0be43dcab326436", + "netmap.json": "8049b76e10dfec2faea46331a99f75b34a22956aa7c81a685046c1389f1f64cd", + "project.yaml": "aa7e36a756e811ac38745c30d60499eec18049f8ae8e1affcac57b4613a51f14", + "REFERENCE_REVIEW.md": "7ddb00764a476d5b8e30e9ad125b103b815c7352dbdec4906016349a96b04d00", + "REQUIREMENTS.md": "5752f874ffded6f7ad28952d14a08c1764db07e818f156fb1a99399c4a3c7efa", + "review-profile.yaml": "c6b7725c0945ace7546a27fb0ef93c313a09af05e6ae974c0ca8e75ecd9a0af2", + "review-signoff.yaml": null, + "schematic-intent.yaml": null, + "sym-lib-table": "accdd625891ba71beb5e534de13e680099f47f98dff64ca95182060d2072213c" + }, + "checks_preserved_inputs": true + }, + { + "name": "native-preview-control", + "workspace": "workspaces/native-preview-control/gpio-indicator", + "injection": null, + "expected": { + "exit_code": 0, + "diagnostic_contains": "\"source_mode\": \"native\"" + }, + "actual": { + "interface": "native-cli", + "arguments": [ + "update-schematic", + "workspaces/native-preview-control/gpio-indicator", + "--candidate", + "candidates/gpio-indicator/gpio-indicator.kicad_sch" + ], + "executed_argv": [ + "C:\\Users\\tae06\\CODE\\PCB\\.venv\\Scripts\\python.exe", + "-c", + "from pcb_copilot.cli import entrypoint; entrypoint()", + "update-schematic", + "workspaces/native-preview-control/gpio-indicator", + "--candidate", + "candidates/gpio-indicator/gpio-indicator.kicad_sch" + ], + "exit_code": 0, + "duration_seconds": 6.135, + "stdout": "logs/native-preview-control.stdout.txt", + "stderr": "logs/native-preview-control.stderr.txt", + "error": null + }, + "outcome": "met_expectation", + "inputs_before": { + "DESIGN_BASIS.md": "77119e5d1ab6ea43a385a17adec1874ffc9b6c20e35eb44d783278710b9f239f", + "DEVIATIONS.md": "324f110ce0816864290f2b28a6ecdbe8006457f305852762837590ae0eb99563", + "evidence/files/61300511121_61300511121_b91171c2b942.pdf": "b91171c2b94275ccb3824762a4b77dcd0cd9031e8a818e869a6c9f18c053ad8b", + "evidence/files/MFR-25FBF52-1K1_YAGEO-MFR_DATASHEET_b460acdb4764.pdf": "b460acdb476469774e0785a8ef85aec79e2d95fe41beaa79c5a414e4e95e3fe0", + "evidence/files/WP710A10ID_WP710A10ID_42d464fbfd8d.pdf": "42d464fbfd8d3ddef65fa6f9226d298547cdb25d5369aff0c47e5f896595c4bd", + "evidence/index.yaml": "cece06b86df6f692fbfe52ceabf858e7996eb0721db00232d79f54c1c3c82149", + "fp-lib-table": "65851d1c9080d2cf944dcf740f2b9ad66fd62e6550f0feb7635f9dab55e1c329", + "gpio-indicator.kicad_dru": "fd6ec6cfd46f091c61ee7fa09ab3e1c5e29cb9b187e5045bcf055666f0239643", + "gpio-indicator.kicad_pcb": "aa4811a06c27b7d529da161f004cf5e5c1d192e04515ebd6aa9e8716a8536c71", + "gpio-indicator.kicad_pro": "b53a9bec0882a7dbd622aba8401f6616c067972c9d85dbffc407c407f9365fe2", + "gpio-indicator.kicad_sch": "bcf4b33bda22faff9d68be7498e96e7a83a40dc403b5fe2f4ffd79bf2f265ab4", + "jlcpcb-assembly.yaml": null, + "layout-intent.yaml": null, + "libs/Demo.kicad_sym": "c5e68806f7af78dceae8bff16e23446288e7247b32aa1a31d64f58da7e70a403", + "libs/Demo.pretty/LED_D3.0mm.kicad_mod": "9928bcc8ef35ea406d56af1480e43c606d8d646ba247b3d453d80386cd0f5b10", + "libs/Demo.pretty/MountingHole_3.2mm_M3.kicad_mod": "3853c52bba27d3e3e3e18db44a20dfb296eb9e6cd16ebf26fe4a96a2ee8add3b", + "libs/Demo.pretty/PinHeader_1x05_P2.54mm_Vertical.kicad_mod": "8e494ecb4bbaff9fecbe2b16962684513fae788c9b9c9902172781d64b01c2e3", + "libs/Demo.pretty/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.kicad_mod": "bf616ce7d49ae02d5c87d01dd19957ebf3aa66007809680c450de8561f4681a1", + "libs/LICENSE-kicad-footprints.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE-kicad-packages3D.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE-kicad-symbols.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE_PROVENANCE.json": "8fb14cbd87bbb53c2e381fa614336026b1ef1a6b69d252e40b5de8dafa7f9c66", + "libs/models/LED_D3.0mm.step": "e83c2186ad887c36d869f44e28c7b80646ea10cb388697b4380f5a2777268371", + "libs/models/PinHeader_1x05_P2.54mm_Vertical.step": "f03b716e453f6d4f2a111a227c671d96f92708e72a5a663cd4889296d021f4c3", + "libs/models/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.step": "85bdadc9190739c38429da06b1d9c76ccf33aef9a0794a2e7a9dd5b58d9d05fe", + "libs/PROVENANCE.json": "30cb553d1c3ac24055e98ae9dc41e45d3eaa876cad6a8894dee4959aef2f6314", + "libs/README.md": "c09361039bd440ad0aa9038cf81a652abfbbe1e2803ca0dbd3471ce576a2e2d0", + "libs/upstream/LED_D3.0mm.kicad_mod": "d45c606dbf639522eaeae8c6bd2569747ee454daff87ab2db66bdad3200676d0", + "libs/upstream/models/LED_D3.0mm.step": "e83c2186ad887c36d869f44e28c7b80646ea10cb388697b4380f5a2777268371", + "libs/upstream/models/PinHeader_1x05_P2.54mm_Vertical.step": "f03b716e453f6d4f2a111a227c671d96f92708e72a5a663cd4889296d021f4c3", + "libs/upstream/models/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.step": "85bdadc9190739c38429da06b1d9c76ccf33aef9a0794a2e7a9dd5b58d9d05fe", + "libs/upstream/MountingHole_3.2mm_M3.kicad_mod": "3853c52bba27d3e3e3e18db44a20dfb296eb9e6cd16ebf26fe4a96a2ee8add3b", + "libs/upstream/PinHeader_1x05_P2.54mm_Vertical.kicad_mod": "a9beaa5e3bf9f73f4667fd503d8ddc47f81aec7999b51211890c919363099acf", + "libs/upstream/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.kicad_mod": "1ba096b69c79e588cc54946fb6648699e5b301f67f8df0e0e0be43dcab326436", + "netmap.json": "8049b76e10dfec2faea46331a99f75b34a22956aa7c81a685046c1389f1f64cd", + "project.yaml": "aa7e36a756e811ac38745c30d60499eec18049f8ae8e1affcac57b4613a51f14", + "REFERENCE_REVIEW.md": "7ddb00764a476d5b8e30e9ad125b103b815c7352dbdec4906016349a96b04d00", + "REQUIREMENTS.md": "5752f874ffded6f7ad28952d14a08c1764db07e818f156fb1a99399c4a3c7efa", + "review-profile.yaml": "c6b7725c0945ace7546a27fb0ef93c313a09af05e6ae974c0ca8e75ecd9a0af2", + "review-signoff.yaml": null, + "schematic-intent.yaml": null, + "sym-lib-table": "accdd625891ba71beb5e534de13e680099f47f98dff64ca95182060d2072213c" + }, + "inputs_after_injection": { + "DESIGN_BASIS.md": "77119e5d1ab6ea43a385a17adec1874ffc9b6c20e35eb44d783278710b9f239f", + "DEVIATIONS.md": "324f110ce0816864290f2b28a6ecdbe8006457f305852762837590ae0eb99563", + "evidence/files/61300511121_61300511121_b91171c2b942.pdf": "b91171c2b94275ccb3824762a4b77dcd0cd9031e8a818e869a6c9f18c053ad8b", + "evidence/files/MFR-25FBF52-1K1_YAGEO-MFR_DATASHEET_b460acdb4764.pdf": "b460acdb476469774e0785a8ef85aec79e2d95fe41beaa79c5a414e4e95e3fe0", + "evidence/files/WP710A10ID_WP710A10ID_42d464fbfd8d.pdf": "42d464fbfd8d3ddef65fa6f9226d298547cdb25d5369aff0c47e5f896595c4bd", + "evidence/index.yaml": "cece06b86df6f692fbfe52ceabf858e7996eb0721db00232d79f54c1c3c82149", + "fp-lib-table": "65851d1c9080d2cf944dcf740f2b9ad66fd62e6550f0feb7635f9dab55e1c329", + "gpio-indicator.kicad_dru": "fd6ec6cfd46f091c61ee7fa09ab3e1c5e29cb9b187e5045bcf055666f0239643", + "gpio-indicator.kicad_pcb": "aa4811a06c27b7d529da161f004cf5e5c1d192e04515ebd6aa9e8716a8536c71", + "gpio-indicator.kicad_pro": "b53a9bec0882a7dbd622aba8401f6616c067972c9d85dbffc407c407f9365fe2", + "gpio-indicator.kicad_sch": "bcf4b33bda22faff9d68be7498e96e7a83a40dc403b5fe2f4ffd79bf2f265ab4", + "jlcpcb-assembly.yaml": null, + "layout-intent.yaml": null, + "libs/Demo.kicad_sym": "c5e68806f7af78dceae8bff16e23446288e7247b32aa1a31d64f58da7e70a403", + "libs/Demo.pretty/LED_D3.0mm.kicad_mod": "9928bcc8ef35ea406d56af1480e43c606d8d646ba247b3d453d80386cd0f5b10", + "libs/Demo.pretty/MountingHole_3.2mm_M3.kicad_mod": "3853c52bba27d3e3e3e18db44a20dfb296eb9e6cd16ebf26fe4a96a2ee8add3b", + "libs/Demo.pretty/PinHeader_1x05_P2.54mm_Vertical.kicad_mod": "8e494ecb4bbaff9fecbe2b16962684513fae788c9b9c9902172781d64b01c2e3", + "libs/Demo.pretty/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.kicad_mod": "bf616ce7d49ae02d5c87d01dd19957ebf3aa66007809680c450de8561f4681a1", + "libs/LICENSE-kicad-footprints.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE-kicad-packages3D.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE-kicad-symbols.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE_PROVENANCE.json": "8fb14cbd87bbb53c2e381fa614336026b1ef1a6b69d252e40b5de8dafa7f9c66", + "libs/models/LED_D3.0mm.step": "e83c2186ad887c36d869f44e28c7b80646ea10cb388697b4380f5a2777268371", + "libs/models/PinHeader_1x05_P2.54mm_Vertical.step": "f03b716e453f6d4f2a111a227c671d96f92708e72a5a663cd4889296d021f4c3", + "libs/models/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.step": "85bdadc9190739c38429da06b1d9c76ccf33aef9a0794a2e7a9dd5b58d9d05fe", + "libs/PROVENANCE.json": "30cb553d1c3ac24055e98ae9dc41e45d3eaa876cad6a8894dee4959aef2f6314", + "libs/README.md": "c09361039bd440ad0aa9038cf81a652abfbbe1e2803ca0dbd3471ce576a2e2d0", + "libs/upstream/LED_D3.0mm.kicad_mod": "d45c606dbf639522eaeae8c6bd2569747ee454daff87ab2db66bdad3200676d0", + "libs/upstream/models/LED_D3.0mm.step": "e83c2186ad887c36d869f44e28c7b80646ea10cb388697b4380f5a2777268371", + "libs/upstream/models/PinHeader_1x05_P2.54mm_Vertical.step": "f03b716e453f6d4f2a111a227c671d96f92708e72a5a663cd4889296d021f4c3", + "libs/upstream/models/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.step": "85bdadc9190739c38429da06b1d9c76ccf33aef9a0794a2e7a9dd5b58d9d05fe", + "libs/upstream/MountingHole_3.2mm_M3.kicad_mod": "3853c52bba27d3e3e3e18db44a20dfb296eb9e6cd16ebf26fe4a96a2ee8add3b", + "libs/upstream/PinHeader_1x05_P2.54mm_Vertical.kicad_mod": "a9beaa5e3bf9f73f4667fd503d8ddc47f81aec7999b51211890c919363099acf", + "libs/upstream/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.kicad_mod": "1ba096b69c79e588cc54946fb6648699e5b301f67f8df0e0e0be43dcab326436", + "netmap.json": "8049b76e10dfec2faea46331a99f75b34a22956aa7c81a685046c1389f1f64cd", + "project.yaml": "aa7e36a756e811ac38745c30d60499eec18049f8ae8e1affcac57b4613a51f14", + "REFERENCE_REVIEW.md": "7ddb00764a476d5b8e30e9ad125b103b815c7352dbdec4906016349a96b04d00", + "REQUIREMENTS.md": "5752f874ffded6f7ad28952d14a08c1764db07e818f156fb1a99399c4a3c7efa", + "review-profile.yaml": "c6b7725c0945ace7546a27fb0ef93c313a09af05e6ae974c0ca8e75ecd9a0af2", + "review-signoff.yaml": null, + "schematic-intent.yaml": null, + "sym-lib-table": "accdd625891ba71beb5e534de13e680099f47f98dff64ca95182060d2072213c" + }, + "inputs_after_checks": { + "DESIGN_BASIS.md": "77119e5d1ab6ea43a385a17adec1874ffc9b6c20e35eb44d783278710b9f239f", + "DEVIATIONS.md": "324f110ce0816864290f2b28a6ecdbe8006457f305852762837590ae0eb99563", + "evidence/files/61300511121_61300511121_b91171c2b942.pdf": "b91171c2b94275ccb3824762a4b77dcd0cd9031e8a818e869a6c9f18c053ad8b", + "evidence/files/MFR-25FBF52-1K1_YAGEO-MFR_DATASHEET_b460acdb4764.pdf": "b460acdb476469774e0785a8ef85aec79e2d95fe41beaa79c5a414e4e95e3fe0", + "evidence/files/WP710A10ID_WP710A10ID_42d464fbfd8d.pdf": "42d464fbfd8d3ddef65fa6f9226d298547cdb25d5369aff0c47e5f896595c4bd", + "evidence/index.yaml": "cece06b86df6f692fbfe52ceabf858e7996eb0721db00232d79f54c1c3c82149", + "fp-lib-table": "65851d1c9080d2cf944dcf740f2b9ad66fd62e6550f0feb7635f9dab55e1c329", + "gpio-indicator.kicad_dru": "fd6ec6cfd46f091c61ee7fa09ab3e1c5e29cb9b187e5045bcf055666f0239643", + "gpio-indicator.kicad_pcb": "aa4811a06c27b7d529da161f004cf5e5c1d192e04515ebd6aa9e8716a8536c71", + "gpio-indicator.kicad_pro": "b53a9bec0882a7dbd622aba8401f6616c067972c9d85dbffc407c407f9365fe2", + "gpio-indicator.kicad_sch": "bcf4b33bda22faff9d68be7498e96e7a83a40dc403b5fe2f4ffd79bf2f265ab4", + "jlcpcb-assembly.yaml": null, + "layout-intent.yaml": null, + "libs/Demo.kicad_sym": "c5e68806f7af78dceae8bff16e23446288e7247b32aa1a31d64f58da7e70a403", + "libs/Demo.pretty/LED_D3.0mm.kicad_mod": "9928bcc8ef35ea406d56af1480e43c606d8d646ba247b3d453d80386cd0f5b10", + "libs/Demo.pretty/MountingHole_3.2mm_M3.kicad_mod": "3853c52bba27d3e3e3e18db44a20dfb296eb9e6cd16ebf26fe4a96a2ee8add3b", + "libs/Demo.pretty/PinHeader_1x05_P2.54mm_Vertical.kicad_mod": "8e494ecb4bbaff9fecbe2b16962684513fae788c9b9c9902172781d64b01c2e3", + "libs/Demo.pretty/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.kicad_mod": "bf616ce7d49ae02d5c87d01dd19957ebf3aa66007809680c450de8561f4681a1", + "libs/LICENSE-kicad-footprints.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE-kicad-packages3D.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE-kicad-symbols.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE_PROVENANCE.json": "8fb14cbd87bbb53c2e381fa614336026b1ef1a6b69d252e40b5de8dafa7f9c66", + "libs/models/LED_D3.0mm.step": "e83c2186ad887c36d869f44e28c7b80646ea10cb388697b4380f5a2777268371", + "libs/models/PinHeader_1x05_P2.54mm_Vertical.step": "f03b716e453f6d4f2a111a227c671d96f92708e72a5a663cd4889296d021f4c3", + "libs/models/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.step": "85bdadc9190739c38429da06b1d9c76ccf33aef9a0794a2e7a9dd5b58d9d05fe", + "libs/PROVENANCE.json": "30cb553d1c3ac24055e98ae9dc41e45d3eaa876cad6a8894dee4959aef2f6314", + "libs/README.md": "c09361039bd440ad0aa9038cf81a652abfbbe1e2803ca0dbd3471ce576a2e2d0", + "libs/upstream/LED_D3.0mm.kicad_mod": "d45c606dbf639522eaeae8c6bd2569747ee454daff87ab2db66bdad3200676d0", + "libs/upstream/models/LED_D3.0mm.step": "e83c2186ad887c36d869f44e28c7b80646ea10cb388697b4380f5a2777268371", + "libs/upstream/models/PinHeader_1x05_P2.54mm_Vertical.step": "f03b716e453f6d4f2a111a227c671d96f92708e72a5a663cd4889296d021f4c3", + "libs/upstream/models/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.step": "85bdadc9190739c38429da06b1d9c76ccf33aef9a0794a2e7a9dd5b58d9d05fe", + "libs/upstream/MountingHole_3.2mm_M3.kicad_mod": "3853c52bba27d3e3e3e18db44a20dfb296eb9e6cd16ebf26fe4a96a2ee8add3b", + "libs/upstream/PinHeader_1x05_P2.54mm_Vertical.kicad_mod": "a9beaa5e3bf9f73f4667fd503d8ddc47f81aec7999b51211890c919363099acf", + "libs/upstream/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.kicad_mod": "1ba096b69c79e588cc54946fb6648699e5b301f67f8df0e0e0be43dcab326436", + "netmap.json": "8049b76e10dfec2faea46331a99f75b34a22956aa7c81a685046c1389f1f64cd", + "project.yaml": "aa7e36a756e811ac38745c30d60499eec18049f8ae8e1affcac57b4613a51f14", + "REFERENCE_REVIEW.md": "7ddb00764a476d5b8e30e9ad125b103b815c7352dbdec4906016349a96b04d00", + "REQUIREMENTS.md": "5752f874ffded6f7ad28952d14a08c1764db07e818f156fb1a99399c4a3c7efa", + "review-profile.yaml": "c6b7725c0945ace7546a27fb0ef93c313a09af05e6ae974c0ca8e75ecd9a0af2", + "review-signoff.yaml": null, + "schematic-intent.yaml": null, + "sym-lib-table": "accdd625891ba71beb5e534de13e680099f47f98dff64ca95182060d2072213c" + }, + "checks_preserved_inputs": true, + "native_tool_version": "10.0.6", + "native_pcbnew_version": "10.0.6" + }, + { + "name": "changed-candidate", + "workspace": "workspaces/native-preview-control/gpio-indicator", + "injection": { + "kind": "candidate-bytes-changed-after-real-preview", + "target": "candidates/gpio-indicator/gpio-indicator.kicad_sch", + "before_sha256": "bcf4b33bda22faff9d68be7498e96e7a83a40dc403b5fe2f4ffd79bf2f265ab4", + "after_sha256": "2d0f596f7eb6d0743005574fdebac744bb1f089cd9f6d228132639ed12ffc5ee", + "after_check_sha256": "2d0f596f7eb6d0743005574fdebac744bb1f089cd9f6d228132639ed12ffc5ee", + "detail": "One trailing newline was added; circuit connectivity was not changed." + }, + "expected": { + "exit_code": 2, + "diagnostic_contains": "No successful matching unconsumed preview" + }, + "actual": { + "interface": "native-cli", + "arguments": [ + "update-schematic", + "workspaces/native-preview-control/gpio-indicator", + "--candidate", + "candidates/gpio-indicator/gpio-indicator.kicad_sch", + "--apply" + ], + "executed_argv": [ + "C:\\Users\\tae06\\CODE\\PCB\\.venv\\Scripts\\python.exe", + "-c", + "from pcb_copilot.cli import entrypoint; entrypoint()", + "update-schematic", + "workspaces/native-preview-control/gpio-indicator", + "--candidate", + "candidates/gpio-indicator/gpio-indicator.kicad_sch", + "--apply" + ], + "exit_code": 2, + "duration_seconds": 0.373, + "stdout": "logs/changed-candidate.stdout.txt", + "stderr": "logs/changed-candidate.stderr.txt", + "error": null + }, + "outcome": "met_expectation", + "inputs_before": { + "DESIGN_BASIS.md": "77119e5d1ab6ea43a385a17adec1874ffc9b6c20e35eb44d783278710b9f239f", + "DEVIATIONS.md": "324f110ce0816864290f2b28a6ecdbe8006457f305852762837590ae0eb99563", + "evidence/files/61300511121_61300511121_b91171c2b942.pdf": "b91171c2b94275ccb3824762a4b77dcd0cd9031e8a818e869a6c9f18c053ad8b", + "evidence/files/MFR-25FBF52-1K1_YAGEO-MFR_DATASHEET_b460acdb4764.pdf": "b460acdb476469774e0785a8ef85aec79e2d95fe41beaa79c5a414e4e95e3fe0", + "evidence/files/WP710A10ID_WP710A10ID_42d464fbfd8d.pdf": "42d464fbfd8d3ddef65fa6f9226d298547cdb25d5369aff0c47e5f896595c4bd", + "evidence/index.yaml": "cece06b86df6f692fbfe52ceabf858e7996eb0721db00232d79f54c1c3c82149", + "fp-lib-table": "65851d1c9080d2cf944dcf740f2b9ad66fd62e6550f0feb7635f9dab55e1c329", + "gpio-indicator.kicad_dru": "fd6ec6cfd46f091c61ee7fa09ab3e1c5e29cb9b187e5045bcf055666f0239643", + "gpio-indicator.kicad_pcb": "aa4811a06c27b7d529da161f004cf5e5c1d192e04515ebd6aa9e8716a8536c71", + "gpio-indicator.kicad_pro": "b53a9bec0882a7dbd622aba8401f6616c067972c9d85dbffc407c407f9365fe2", + "gpio-indicator.kicad_sch": "bcf4b33bda22faff9d68be7498e96e7a83a40dc403b5fe2f4ffd79bf2f265ab4", + "jlcpcb-assembly.yaml": null, + "layout-intent.yaml": null, + "libs/Demo.kicad_sym": "c5e68806f7af78dceae8bff16e23446288e7247b32aa1a31d64f58da7e70a403", + "libs/Demo.pretty/LED_D3.0mm.kicad_mod": "9928bcc8ef35ea406d56af1480e43c606d8d646ba247b3d453d80386cd0f5b10", + "libs/Demo.pretty/MountingHole_3.2mm_M3.kicad_mod": "3853c52bba27d3e3e3e18db44a20dfb296eb9e6cd16ebf26fe4a96a2ee8add3b", + "libs/Demo.pretty/PinHeader_1x05_P2.54mm_Vertical.kicad_mod": "8e494ecb4bbaff9fecbe2b16962684513fae788c9b9c9902172781d64b01c2e3", + "libs/Demo.pretty/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.kicad_mod": "bf616ce7d49ae02d5c87d01dd19957ebf3aa66007809680c450de8561f4681a1", + "libs/LICENSE-kicad-footprints.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE-kicad-packages3D.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE-kicad-symbols.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE_PROVENANCE.json": "8fb14cbd87bbb53c2e381fa614336026b1ef1a6b69d252e40b5de8dafa7f9c66", + "libs/models/LED_D3.0mm.step": "e83c2186ad887c36d869f44e28c7b80646ea10cb388697b4380f5a2777268371", + "libs/models/PinHeader_1x05_P2.54mm_Vertical.step": "f03b716e453f6d4f2a111a227c671d96f92708e72a5a663cd4889296d021f4c3", + "libs/models/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.step": "85bdadc9190739c38429da06b1d9c76ccf33aef9a0794a2e7a9dd5b58d9d05fe", + "libs/PROVENANCE.json": "30cb553d1c3ac24055e98ae9dc41e45d3eaa876cad6a8894dee4959aef2f6314", + "libs/README.md": "c09361039bd440ad0aa9038cf81a652abfbbe1e2803ca0dbd3471ce576a2e2d0", + "libs/upstream/LED_D3.0mm.kicad_mod": "d45c606dbf639522eaeae8c6bd2569747ee454daff87ab2db66bdad3200676d0", + "libs/upstream/models/LED_D3.0mm.step": "e83c2186ad887c36d869f44e28c7b80646ea10cb388697b4380f5a2777268371", + "libs/upstream/models/PinHeader_1x05_P2.54mm_Vertical.step": "f03b716e453f6d4f2a111a227c671d96f92708e72a5a663cd4889296d021f4c3", + "libs/upstream/models/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.step": "85bdadc9190739c38429da06b1d9c76ccf33aef9a0794a2e7a9dd5b58d9d05fe", + "libs/upstream/MountingHole_3.2mm_M3.kicad_mod": "3853c52bba27d3e3e3e18db44a20dfb296eb9e6cd16ebf26fe4a96a2ee8add3b", + "libs/upstream/PinHeader_1x05_P2.54mm_Vertical.kicad_mod": "a9beaa5e3bf9f73f4667fd503d8ddc47f81aec7999b51211890c919363099acf", + "libs/upstream/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.kicad_mod": "1ba096b69c79e588cc54946fb6648699e5b301f67f8df0e0e0be43dcab326436", + "netmap.json": "8049b76e10dfec2faea46331a99f75b34a22956aa7c81a685046c1389f1f64cd", + "project.yaml": "aa7e36a756e811ac38745c30d60499eec18049f8ae8e1affcac57b4613a51f14", + "REFERENCE_REVIEW.md": "7ddb00764a476d5b8e30e9ad125b103b815c7352dbdec4906016349a96b04d00", + "REQUIREMENTS.md": "5752f874ffded6f7ad28952d14a08c1764db07e818f156fb1a99399c4a3c7efa", + "review-profile.yaml": "c6b7725c0945ace7546a27fb0ef93c313a09af05e6ae974c0ca8e75ecd9a0af2", + "review-signoff.yaml": null, + "schematic-intent.yaml": null, + "sym-lib-table": "accdd625891ba71beb5e534de13e680099f47f98dff64ca95182060d2072213c" + }, + "inputs_after_injection": { + "DESIGN_BASIS.md": "77119e5d1ab6ea43a385a17adec1874ffc9b6c20e35eb44d783278710b9f239f", + "DEVIATIONS.md": "324f110ce0816864290f2b28a6ecdbe8006457f305852762837590ae0eb99563", + "evidence/files/61300511121_61300511121_b91171c2b942.pdf": "b91171c2b94275ccb3824762a4b77dcd0cd9031e8a818e869a6c9f18c053ad8b", + "evidence/files/MFR-25FBF52-1K1_YAGEO-MFR_DATASHEET_b460acdb4764.pdf": "b460acdb476469774e0785a8ef85aec79e2d95fe41beaa79c5a414e4e95e3fe0", + "evidence/files/WP710A10ID_WP710A10ID_42d464fbfd8d.pdf": "42d464fbfd8d3ddef65fa6f9226d298547cdb25d5369aff0c47e5f896595c4bd", + "evidence/index.yaml": "cece06b86df6f692fbfe52ceabf858e7996eb0721db00232d79f54c1c3c82149", + "fp-lib-table": "65851d1c9080d2cf944dcf740f2b9ad66fd62e6550f0feb7635f9dab55e1c329", + "gpio-indicator.kicad_dru": "fd6ec6cfd46f091c61ee7fa09ab3e1c5e29cb9b187e5045bcf055666f0239643", + "gpio-indicator.kicad_pcb": "aa4811a06c27b7d529da161f004cf5e5c1d192e04515ebd6aa9e8716a8536c71", + "gpio-indicator.kicad_pro": "b53a9bec0882a7dbd622aba8401f6616c067972c9d85dbffc407c407f9365fe2", + "gpio-indicator.kicad_sch": "bcf4b33bda22faff9d68be7498e96e7a83a40dc403b5fe2f4ffd79bf2f265ab4", + "jlcpcb-assembly.yaml": null, + "layout-intent.yaml": null, + "libs/Demo.kicad_sym": "c5e68806f7af78dceae8bff16e23446288e7247b32aa1a31d64f58da7e70a403", + "libs/Demo.pretty/LED_D3.0mm.kicad_mod": "9928bcc8ef35ea406d56af1480e43c606d8d646ba247b3d453d80386cd0f5b10", + "libs/Demo.pretty/MountingHole_3.2mm_M3.kicad_mod": "3853c52bba27d3e3e3e18db44a20dfb296eb9e6cd16ebf26fe4a96a2ee8add3b", + "libs/Demo.pretty/PinHeader_1x05_P2.54mm_Vertical.kicad_mod": "8e494ecb4bbaff9fecbe2b16962684513fae788c9b9c9902172781d64b01c2e3", + "libs/Demo.pretty/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.kicad_mod": "bf616ce7d49ae02d5c87d01dd19957ebf3aa66007809680c450de8561f4681a1", + "libs/LICENSE-kicad-footprints.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE-kicad-packages3D.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE-kicad-symbols.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE_PROVENANCE.json": "8fb14cbd87bbb53c2e381fa614336026b1ef1a6b69d252e40b5de8dafa7f9c66", + "libs/models/LED_D3.0mm.step": "e83c2186ad887c36d869f44e28c7b80646ea10cb388697b4380f5a2777268371", + "libs/models/PinHeader_1x05_P2.54mm_Vertical.step": "f03b716e453f6d4f2a111a227c671d96f92708e72a5a663cd4889296d021f4c3", + "libs/models/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.step": "85bdadc9190739c38429da06b1d9c76ccf33aef9a0794a2e7a9dd5b58d9d05fe", + "libs/PROVENANCE.json": "30cb553d1c3ac24055e98ae9dc41e45d3eaa876cad6a8894dee4959aef2f6314", + "libs/README.md": "c09361039bd440ad0aa9038cf81a652abfbbe1e2803ca0dbd3471ce576a2e2d0", + "libs/upstream/LED_D3.0mm.kicad_mod": "d45c606dbf639522eaeae8c6bd2569747ee454daff87ab2db66bdad3200676d0", + "libs/upstream/models/LED_D3.0mm.step": "e83c2186ad887c36d869f44e28c7b80646ea10cb388697b4380f5a2777268371", + "libs/upstream/models/PinHeader_1x05_P2.54mm_Vertical.step": "f03b716e453f6d4f2a111a227c671d96f92708e72a5a663cd4889296d021f4c3", + "libs/upstream/models/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.step": "85bdadc9190739c38429da06b1d9c76ccf33aef9a0794a2e7a9dd5b58d9d05fe", + "libs/upstream/MountingHole_3.2mm_M3.kicad_mod": "3853c52bba27d3e3e3e18db44a20dfb296eb9e6cd16ebf26fe4a96a2ee8add3b", + "libs/upstream/PinHeader_1x05_P2.54mm_Vertical.kicad_mod": "a9beaa5e3bf9f73f4667fd503d8ddc47f81aec7999b51211890c919363099acf", + "libs/upstream/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.kicad_mod": "1ba096b69c79e588cc54946fb6648699e5b301f67f8df0e0e0be43dcab326436", + "netmap.json": "8049b76e10dfec2faea46331a99f75b34a22956aa7c81a685046c1389f1f64cd", + "project.yaml": "aa7e36a756e811ac38745c30d60499eec18049f8ae8e1affcac57b4613a51f14", + "REFERENCE_REVIEW.md": "7ddb00764a476d5b8e30e9ad125b103b815c7352dbdec4906016349a96b04d00", + "REQUIREMENTS.md": "5752f874ffded6f7ad28952d14a08c1764db07e818f156fb1a99399c4a3c7efa", + "review-profile.yaml": "c6b7725c0945ace7546a27fb0ef93c313a09af05e6ae974c0ca8e75ecd9a0af2", + "review-signoff.yaml": null, + "schematic-intent.yaml": null, + "sym-lib-table": "accdd625891ba71beb5e534de13e680099f47f98dff64ca95182060d2072213c" + }, + "inputs_after_checks": { + "DESIGN_BASIS.md": "77119e5d1ab6ea43a385a17adec1874ffc9b6c20e35eb44d783278710b9f239f", + "DEVIATIONS.md": "324f110ce0816864290f2b28a6ecdbe8006457f305852762837590ae0eb99563", + "evidence/files/61300511121_61300511121_b91171c2b942.pdf": "b91171c2b94275ccb3824762a4b77dcd0cd9031e8a818e869a6c9f18c053ad8b", + "evidence/files/MFR-25FBF52-1K1_YAGEO-MFR_DATASHEET_b460acdb4764.pdf": "b460acdb476469774e0785a8ef85aec79e2d95fe41beaa79c5a414e4e95e3fe0", + "evidence/files/WP710A10ID_WP710A10ID_42d464fbfd8d.pdf": "42d464fbfd8d3ddef65fa6f9226d298547cdb25d5369aff0c47e5f896595c4bd", + "evidence/index.yaml": "cece06b86df6f692fbfe52ceabf858e7996eb0721db00232d79f54c1c3c82149", + "fp-lib-table": "65851d1c9080d2cf944dcf740f2b9ad66fd62e6550f0feb7635f9dab55e1c329", + "gpio-indicator.kicad_dru": "fd6ec6cfd46f091c61ee7fa09ab3e1c5e29cb9b187e5045bcf055666f0239643", + "gpio-indicator.kicad_pcb": "aa4811a06c27b7d529da161f004cf5e5c1d192e04515ebd6aa9e8716a8536c71", + "gpio-indicator.kicad_pro": "b53a9bec0882a7dbd622aba8401f6616c067972c9d85dbffc407c407f9365fe2", + "gpio-indicator.kicad_sch": "bcf4b33bda22faff9d68be7498e96e7a83a40dc403b5fe2f4ffd79bf2f265ab4", + "jlcpcb-assembly.yaml": null, + "layout-intent.yaml": null, + "libs/Demo.kicad_sym": "c5e68806f7af78dceae8bff16e23446288e7247b32aa1a31d64f58da7e70a403", + "libs/Demo.pretty/LED_D3.0mm.kicad_mod": "9928bcc8ef35ea406d56af1480e43c606d8d646ba247b3d453d80386cd0f5b10", + "libs/Demo.pretty/MountingHole_3.2mm_M3.kicad_mod": "3853c52bba27d3e3e3e18db44a20dfb296eb9e6cd16ebf26fe4a96a2ee8add3b", + "libs/Demo.pretty/PinHeader_1x05_P2.54mm_Vertical.kicad_mod": "8e494ecb4bbaff9fecbe2b16962684513fae788c9b9c9902172781d64b01c2e3", + "libs/Demo.pretty/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.kicad_mod": "bf616ce7d49ae02d5c87d01dd19957ebf3aa66007809680c450de8561f4681a1", + "libs/LICENSE-kicad-footprints.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE-kicad-packages3D.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE-kicad-symbols.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE_PROVENANCE.json": "8fb14cbd87bbb53c2e381fa614336026b1ef1a6b69d252e40b5de8dafa7f9c66", + "libs/models/LED_D3.0mm.step": "e83c2186ad887c36d869f44e28c7b80646ea10cb388697b4380f5a2777268371", + "libs/models/PinHeader_1x05_P2.54mm_Vertical.step": "f03b716e453f6d4f2a111a227c671d96f92708e72a5a663cd4889296d021f4c3", + "libs/models/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.step": "85bdadc9190739c38429da06b1d9c76ccf33aef9a0794a2e7a9dd5b58d9d05fe", + "libs/PROVENANCE.json": "30cb553d1c3ac24055e98ae9dc41e45d3eaa876cad6a8894dee4959aef2f6314", + "libs/README.md": "c09361039bd440ad0aa9038cf81a652abfbbe1e2803ca0dbd3471ce576a2e2d0", + "libs/upstream/LED_D3.0mm.kicad_mod": "d45c606dbf639522eaeae8c6bd2569747ee454daff87ab2db66bdad3200676d0", + "libs/upstream/models/LED_D3.0mm.step": "e83c2186ad887c36d869f44e28c7b80646ea10cb388697b4380f5a2777268371", + "libs/upstream/models/PinHeader_1x05_P2.54mm_Vertical.step": "f03b716e453f6d4f2a111a227c671d96f92708e72a5a663cd4889296d021f4c3", + "libs/upstream/models/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.step": "85bdadc9190739c38429da06b1d9c76ccf33aef9a0794a2e7a9dd5b58d9d05fe", + "libs/upstream/MountingHole_3.2mm_M3.kicad_mod": "3853c52bba27d3e3e3e18db44a20dfb296eb9e6cd16ebf26fe4a96a2ee8add3b", + "libs/upstream/PinHeader_1x05_P2.54mm_Vertical.kicad_mod": "a9beaa5e3bf9f73f4667fd503d8ddc47f81aec7999b51211890c919363099acf", + "libs/upstream/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.kicad_mod": "1ba096b69c79e588cc54946fb6648699e5b301f67f8df0e0e0be43dcab326436", + "netmap.json": "8049b76e10dfec2faea46331a99f75b34a22956aa7c81a685046c1389f1f64cd", + "project.yaml": "aa7e36a756e811ac38745c30d60499eec18049f8ae8e1affcac57b4613a51f14", + "REFERENCE_REVIEW.md": "7ddb00764a476d5b8e30e9ad125b103b815c7352dbdec4906016349a96b04d00", + "REQUIREMENTS.md": "5752f874ffded6f7ad28952d14a08c1764db07e818f156fb1a99399c4a3c7efa", + "review-profile.yaml": "c6b7725c0945ace7546a27fb0ef93c313a09af05e6ae974c0ca8e75ecd9a0af2", + "review-signoff.yaml": null, + "schematic-intent.yaml": null, + "sym-lib-table": "accdd625891ba71beb5e534de13e680099f47f98dff64ca95182060d2072213c" + }, + "checks_preserved_inputs": true, + "depends_on": "native-preview-control" + } + ], + "exit_code": 0, + "source_inputs_after": { + "DESIGN_BASIS.md": "77119e5d1ab6ea43a385a17adec1874ffc9b6c20e35eb44d783278710b9f239f", + "DEVIATIONS.md": "324f110ce0816864290f2b28a6ecdbe8006457f305852762837590ae0eb99563", + "evidence/files/61300511121_61300511121_b91171c2b942.pdf": "b91171c2b94275ccb3824762a4b77dcd0cd9031e8a818e869a6c9f18c053ad8b", + "evidence/files/MFR-25FBF52-1K1_YAGEO-MFR_DATASHEET_b460acdb4764.pdf": "b460acdb476469774e0785a8ef85aec79e2d95fe41beaa79c5a414e4e95e3fe0", + "evidence/files/WP710A10ID_WP710A10ID_42d464fbfd8d.pdf": "42d464fbfd8d3ddef65fa6f9226d298547cdb25d5369aff0c47e5f896595c4bd", + "evidence/index.yaml": "cece06b86df6f692fbfe52ceabf858e7996eb0721db00232d79f54c1c3c82149", + "fp-lib-table": "65851d1c9080d2cf944dcf740f2b9ad66fd62e6550f0feb7635f9dab55e1c329", + "gpio-indicator.kicad_dru": "fd6ec6cfd46f091c61ee7fa09ab3e1c5e29cb9b187e5045bcf055666f0239643", + "gpio-indicator.kicad_pcb": "aa4811a06c27b7d529da161f004cf5e5c1d192e04515ebd6aa9e8716a8536c71", + "gpio-indicator.kicad_pro": "b53a9bec0882a7dbd622aba8401f6616c067972c9d85dbffc407c407f9365fe2", + "gpio-indicator.kicad_sch": "bcf4b33bda22faff9d68be7498e96e7a83a40dc403b5fe2f4ffd79bf2f265ab4", + "jlcpcb-assembly.yaml": null, + "layout-intent.yaml": null, + "libs/Demo.kicad_sym": "c5e68806f7af78dceae8bff16e23446288e7247b32aa1a31d64f58da7e70a403", + "libs/Demo.pretty/LED_D3.0mm.kicad_mod": "9928bcc8ef35ea406d56af1480e43c606d8d646ba247b3d453d80386cd0f5b10", + "libs/Demo.pretty/MountingHole_3.2mm_M3.kicad_mod": "3853c52bba27d3e3e3e18db44a20dfb296eb9e6cd16ebf26fe4a96a2ee8add3b", + "libs/Demo.pretty/PinHeader_1x05_P2.54mm_Vertical.kicad_mod": "8e494ecb4bbaff9fecbe2b16962684513fae788c9b9c9902172781d64b01c2e3", + "libs/Demo.pretty/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.kicad_mod": "bf616ce7d49ae02d5c87d01dd19957ebf3aa66007809680c450de8561f4681a1", + "libs/LICENSE-kicad-footprints.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE-kicad-packages3D.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE-kicad-symbols.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE_PROVENANCE.json": "8fb14cbd87bbb53c2e381fa614336026b1ef1a6b69d252e40b5de8dafa7f9c66", + "libs/models/LED_D3.0mm.step": "e83c2186ad887c36d869f44e28c7b80646ea10cb388697b4380f5a2777268371", + "libs/models/PinHeader_1x05_P2.54mm_Vertical.step": "f03b716e453f6d4f2a111a227c671d96f92708e72a5a663cd4889296d021f4c3", + "libs/models/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.step": "85bdadc9190739c38429da06b1d9c76ccf33aef9a0794a2e7a9dd5b58d9d05fe", + "libs/PROVENANCE.json": "30cb553d1c3ac24055e98ae9dc41e45d3eaa876cad6a8894dee4959aef2f6314", + "libs/README.md": "c09361039bd440ad0aa9038cf81a652abfbbe1e2803ca0dbd3471ce576a2e2d0", + "libs/upstream/LED_D3.0mm.kicad_mod": "d45c606dbf639522eaeae8c6bd2569747ee454daff87ab2db66bdad3200676d0", + "libs/upstream/models/LED_D3.0mm.step": "e83c2186ad887c36d869f44e28c7b80646ea10cb388697b4380f5a2777268371", + "libs/upstream/models/PinHeader_1x05_P2.54mm_Vertical.step": "f03b716e453f6d4f2a111a227c671d96f92708e72a5a663cd4889296d021f4c3", + "libs/upstream/models/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.step": "85bdadc9190739c38429da06b1d9c76ccf33aef9a0794a2e7a9dd5b58d9d05fe", + "libs/upstream/MountingHole_3.2mm_M3.kicad_mod": "3853c52bba27d3e3e3e18db44a20dfb296eb9e6cd16ebf26fe4a96a2ee8add3b", + "libs/upstream/PinHeader_1x05_P2.54mm_Vertical.kicad_mod": "a9beaa5e3bf9f73f4667fd503d8ddc47f81aec7999b51211890c919363099acf", + "libs/upstream/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.kicad_mod": "1ba096b69c79e588cc54946fb6648699e5b301f67f8df0e0e0be43dcab326436", + "netmap.json": "8049b76e10dfec2faea46331a99f75b34a22956aa7c81a685046c1389f1f64cd", + "project.yaml": "aa7e36a756e811ac38745c30d60499eec18049f8ae8e1affcac57b4613a51f14", + "REFERENCE_REVIEW.md": "7ddb00764a476d5b8e30e9ad125b103b815c7352dbdec4906016349a96b04d00", + "REQUIREMENTS.md": "5752f874ffded6f7ad28952d14a08c1764db07e818f156fb1a99399c4a3c7efa", + "review-profile.yaml": "c6b7725c0945ace7546a27fb0ef93c313a09af05e6ae974c0ca8e75ecd9a0af2", + "review-signoff.yaml": null, + "schematic-intent.yaml": null, + "sym-lib-table": "accdd625891ba71beb5e534de13e680099f47f98dff64ca95182060d2072213c" + }, + "source_inputs_unchanged": true, + "implementation_after": { + "packages/kicad-claude-mcp/src/kicad_claude/__init__.py": "5b28f96fbb8ebb7b8423327a55695d83887c40b7da2c1d5cf42d3c80fc1a80e6", + "packages/kicad-claude-mcp/src/kicad_claude/adapters/__init__.py": "7eb70257593da06f682a3ddda54a9d260d4fc514f645237f5ca74b08f8da61a6", + "packages/kicad-claude-mcp/src/kicad_claude/adapters/dsn_keepouts.py": "3389f5afe23111f017d3b9a7269a8219422045a28b4aa4c8251a8e41b0885ab0", + "packages/kicad-claude-mcp/src/kicad_claude/adapters/freerouting.py": "0cee29adf149fdd06ed65b606e085f58a37ae782b8b346e60c821dd48c9be67a", + "packages/kicad-claude-mcp/src/kicad_claude/adapters/kicad_cli.py": "c9da34c1a44a69ed39befb80e2a47171283d66904d69b48faf045b96a4491e54", + "packages/kicad-claude-mcp/src/kicad_claude/adapters/kicad_python.py": "a0266e0a698c473b7eef5a5c43215c6e29e7f29df4ae961bf863f2d29a234820", + "packages/kicad-claude-mcp/src/kicad_claude/adapters/project_settings.py": "3e6fb974e1420b2f98c63f1e923cf1a6e9cd67616c1dc45cbba75aa44302f6e7", + "packages/kicad-claude-mcp/src/kicad_claude/adapters/route_pipeline.py": "6e4e395c9cd5637dc872172c67cd17f52877124fc92a53b6124b050403e748f2", + "packages/kicad-claude-mcp/src/kicad_claude/adapters/sch_editor.py": "7961edfc06853340150b54c59b8a531979e7480552a58b7f7853966e5d44fd55", + "packages/kicad-claude-mcp/src/kicad_claude/adapters/sch_io.py": "e18745d87a80727e134c2da60cdd6c23b7c2cdd671a7020a99bd8c0c4b602756", + "packages/kicad-claude-mcp/src/kicad_claude/templates/__init__.py": "7eb70257593da06f682a3ddda54a9d260d4fc514f645237f5ca74b08f8da61a6", + "packages/kicad-claude-mcp/src/kicad_claude/templates/blank.py": "40c53dd4fa1c653768be45b274e8df3f9fd16a9b87146c0eb04f8b9c50bb601d", + "packages/kicad-claude-mcp/src/kicad_claude/utils/__init__.py": "7eb70257593da06f682a3ddda54a9d260d4fc514f645237f5ca74b08f8da61a6", + "packages/kicad-claude-mcp/src/kicad_claude/utils/geometry.py": "df698d34494a2a0b4d3479d9481cc6bca3be11f3c165012c0b62431e15044b53", + "packages/kicad-claude-mcp/src/kicad_claude/utils/kicad_paths.py": "afd67274d7333368ff5ee6fbe0c27f812373bcc602d9b39de079f3d0b7855c51", + "src/pcb_copilot/__init__.py": "abc926d65ee286bbec3ec36efcee3080866c0de4c980515817c7fbd745d154b5", + "src/pcb_copilot/accept.py": "af815a9e26285a249c49038bcbe18e6de2965613b8fa6b189227d136399985be", + "src/pcb_copilot/assembly.py": "e94f6c7eca098e4021040550bbe323807f47af402a49849abd6db5920dd488c6", + "src/pcb_copilot/cleanup.py": "0b55310f83b64106443496f70b0f7eac7b6cabd5ea95276994aa9c409a47eb76", + "src/pcb_copilot/cli.py": "c065d836779cea4f2baf8a453ac08f10bfc09ec7ac3358748a1128dbaa7307bf", + "src/pcb_copilot/copper_features.py": "c25aca11c4a5ff687a859febe16351bcf8b815a3a9ffbcb47006d706b769da3e", + "src/pcb_copilot/deviations.py": "3420252cefd82aaa3ae7726619b555346336e468b6eb215be5da87ef758eae11", + "src/pcb_copilot/doctor.py": "48e58656f2b262ae3123a5024dec0db4c85ae65f5b04ede849b27e6cb5963433", + "src/pcb_copilot/drafts.py": "a57f81cd11cae45af23db548a6c657e8ed1d99e90943925fa67bc72c392b9af3", + "src/pcb_copilot/evidence/__init__.py": "68456f40918d99fa6b89fcfb8dbc1f794444578c54a965d9b321d33f54f13b4d", + "src/pcb_copilot/evidence/archive.py": "c9694f9ba712b422c2a962eef80f63489410ff93a59d6c2febeec41ea1dc2e73", + "src/pcb_copilot/evidence/checks.py": "dec2cc2d9e1a302c500ca8387c5d49b4cd11347dd14bc8f0db99e225aa5874a2", + "src/pcb_copilot/evidence/commands.py": "f6bdc59e66ca4a683e57931896aff86a2fe4eaac0becd84403de97f403213ca9", + "src/pcb_copilot/evidence/extract.py": "0741d82391e7abee40a006402a05c36f67146d9530147ecb074a0c86a9a1fb3d", + "src/pcb_copilot/evidence/facts.py": "f755f082fb5a8cbb0da78b3073d526e86ecc3e122b747036c09a15204dd962e6", + "src/pcb_copilot/evidence/index.py": "1030eb94b3f399aa51a41e89ef7ccc840572d415f4a408d6154f95f3a32013e1", + "src/pcb_copilot/evidence/inventory.py": "36128f77a832158d5a71bb82f6feccbe88b04b52434949cd8a10bd608857fa82", + "src/pcb_copilot/evidence/models.py": "2560530d617a68885c5e1dada3c843f6f4a8d1f7cfb3fae2a2cdbe023c59da50", + "src/pcb_copilot/evidence/references.py": "2c658388613d42c38643909324f263e41e4a783327d3d355ea50f716883726f3", + "src/pcb_copilot/evidence/schematic_inventory.py": "954041ea4de8f2855556908d25101cc3cc15f70557257a473a5cbe8e681c1d0b", + "src/pcb_copilot/jlcpcb.py": "185e2b63319244e96757f1062dd3394f1c199ec71742009f0dd48e559b57f256", + "src/pcb_copilot/layout/__init__.py": "17478a6ca71f1dba38b8328a185fb8f651e36dc020b17f1aebdcf6420a875c80", + "src/pcb_copilot/layout/commands.py": "efe3a506a4c7bb20e6ab14abd35617b8fd294df7a74ed16c515d54876ac2aaf5", + "src/pcb_copilot/layout/constraints.py": "30c51d9605c5c796cd7b70f4abadd0862442a9abe2bc47e32fccd6b2a5c9ef64", + "src/pcb_copilot/layout/fix_via_annular_native.py": "a27ae49e936c36398a5ee7ab644fd2e2cc942cf5355e22ab89f5e996fe702afa", + "src/pcb_copilot/layout/footprint_provenance.py": "2f2df72f7ff8a2b325bfc07ba758f8f7c1f7468d473199f998f79392d64efe2c", + "src/pcb_copilot/layout/footprints.py": "97dbdb50deb4440fdcc6e5faf85578788fdfa67a681c691e9a5576cb9d4188cc", + "src/pcb_copilot/layout/geometry.py": "06491818f3912a537f1422b73de39de3cc2155260d156cd950942692e667ba8a", + "src/pcb_copilot/layout/io.py": "6095fb532a1f2138f175edeb54711979b60b3743c2b4788fe68c46083458afc4", + "src/pcb_copilot/layout/lib_ids.py": "f07b9d9c70befccf3b442ec16d8151d594c7f14b530b16f65c59b5ffacd8a0d5", + "src/pcb_copilot/layout/models.py": "00b34b237f3f9c43ba0046e3e64cd586bab3fdc1b4e7f4507d860d92b9c49c0b", + "src/pcb_copilot/layout/official_footprint_provenance.py": "619d2531260d6d5ad61007c09840b757660d519e1fdd46695033176939628380", + "src/pcb_copilot/layout/place.py": "406a87da19300c1b0eb078a3162a21aa49736b8f7fdfccaaff7658e04853789a", + "src/pcb_copilot/layout/preview.py": "a93eba4fc8e44a904cadbd56b10db0d2ab49c7379e78bbc8b8728c599b70a650", + "src/pcb_copilot/layout/render.py": "d51299ac6141bb5126c73370524c9bdff97a9e1b7e0d36feba0c8bb44b73a99b", + "src/pcb_copilot/layout/research.py": "cec67659a6fbd40306bdf0cc8b6dbd9a0f08e7183c9c51cc918acc47ba5aa574", + "src/pcb_copilot/layout/route.py": "ae2ecbbed5e17ebd1d6c15d13adbfbf4cf1f9539566295eff9163316d33ef061", + "src/pcb_copilot/layout/schematic_links.py": "6c224ffc1234748323f10cdfcb583ca431ddefa9aaee5db0682999ec516ab344", + "src/pcb_copilot/layout/stitch_vias_native.py": "86661724b42809b259c944a4f66183e7732a25901abe02dd60c3e9174ac30e60", + "src/pcb_copilot/layout/update.py": "c73ceb0a2feb63a10b5c40a517ba3d7dfc8ce97d86298f5df2fcc98fcdcd556f", + "src/pcb_copilot/manufacturing.py": "ea322af968c83b64be04c3acdbcd86804e88956c1bfc53aae5fbe8346c41cb8b", + "src/pcb_copilot/models.py": "abd6542840110e8f6a553c8300042f3b117aa873fe36ebb742932ccde04a0888", + "src/pcb_copilot/parts.py": "785fb40565a35fcf92f2e908dba29bac92b0598b7340560605e77a083de8f294", + "src/pcb_copilot/parts_converter.py": "905a1d3670e8b9ff4b6f92f1cdc228c158b1c7c5688016dacc6219f7297b58ba", + "src/pcb_copilot/preview_publication.py": "3741a31e3f58f21ccc5291c7d462a13c720728da4a8b5222e52b4a63a20766ea", + "src/pcb_copilot/project.py": "95c84651521b8a95d4f67e0a1c786e4e50a6256b12cb1c2222bb5211c70e26ad", + "src/pcb_copilot/release.py": "9a8a6a9a657097916e79c1f667ec7acea2df08d77208f02595cdf97a1b9970ef", + "src/pcb_copilot/review/__init__.py": "1f874626fe24ed43882f78d77c6a6c265850522bcd1b530cbecfa0a21bf004bb", + "src/pcb_copilot/review/checks.py": "ae2e9354b1bcc35c861609d6f1688898641ea030e3fbded14d347e5c7b0f8c9f", + "src/pcb_copilot/review/commands.py": "e4b194b9dd99dda20addf0893e36e39523166e82a2260b327aa4f11c29f29e2c", + "src/pcb_copilot/review/design_rules_native.py": "26e95ca0321ed50e870536d64ece0351c3e9dfc8a12b4100c526f6886e78100f", + "src/pcb_copilot/review/fingerprint.py": "78b00b916403f9000c36129b83392ef96f0f46616c35a3eca4d278baacbdcc77", + "src/pcb_copilot/review/models.py": "e7eb68fd5ffa26d48afd362aa5d205ca74092d59ec5d8e9d950e25f68788b412", + "src/pcb_copilot/review/placement.py": "232776b27695e30a0119e54faca0d4590eceb2c9fa76179b585180fd1bf4d8b6", + "src/pcb_copilot/review/registry.py": "308456033f2ca6f14fdd5e9ef97edb2b840438af9946fc97af8bd1c4956c7526", + "src/pcb_copilot/review/routing_settings.py": "1efdd4d28fabf803747959e815e0cc809da14309d1d4dfa376491271000d614d", + "src/pcb_copilot/review/routing_topology.py": "a41e17028da6ae50c6c1cc03f84574af4cba76d3e06d9740a248bed02d470259", + "src/pcb_copilot/review/schematic_quality.py": "c4dc2a0686ea7ab4d15f1bf593bab2978fc58ba6c60c4eed45ec8c278e35de6e", + "src/pcb_copilot/review/signoff.py": "5115abe286a976ebfda39ac95445936cf507ead383cbabdecb152a4228da81ef", + "src/pcb_copilot/review/views.py": "b38c71f8dedded461903c279a1bd5ff93ddc6c56aac77128fa098f018a24a103", + "src/pcb_copilot/schematic/__init__.py": "9a853ada9a7ab2af1acbbd888d898028f28a2577be832902bad6c369a5d80383", + "src/pcb_copilot/schematic/commands.py": "90a88446242afd3db6935c46f2dce940deed00c21a9198407169b0f3d8033a8c", + "src/pcb_copilot/schematic/fields.py": "abd6bf39f4aeb8a630dc19a3eea2cb1cd4919d233adfc2adc950ea18efe97b0f", + "src/pcb_copilot/schematic/geometry.py": "377e7797a5f7ea8ff25a8960aa53a3d928c8dcbacb7ca2222ee0d77c95b47ec5", + "src/pcb_copilot/schematic/hierarchy.py": "5528f826c34771cb870784e3e3415e79e454352464a951a80619988725d89f8b", + "src/pcb_copilot/schematic/io.py": "cef634448c32831d98dd6c607fcf608366cc3b9187b2376c5c0d3c7c249e1ebb", + "src/pcb_copilot/schematic/models.py": "bce58d906d419bb2f60750282af209ccf2ab8b9359e7a15b57bbcd56594c114b", + "src/pcb_copilot/schematic/native_candidate.py": "9de35fd89e331e8bdd5d1f0fc724fb3fc5b1c42d1642978b7f85895e5c5eb5bd", + "src/pcb_copilot/schematic/netlist.py": "a243d76ac438b7e88a43ab3b6a34182bd9181d0af6bc4105d2d3e234f4a68b49", + "src/pcb_copilot/schematic/netmap.py": "5aebb1541912ef87a08ed088799bc228c83d7537eeffa6516ee1e6a6d5ab12c2", + "src/pcb_copilot/schematic/parity.py": "7b4bd58f7f217c26e615bf5d05275682fcb90cbc3c9f754e7cb301e3cd07f1fc", + "src/pcb_copilot/schematic/pcb_net_inventory.py": "e3299d2525a159ca9d58dc0d261a00453ff4a5aa3260a639828f30a5707d8c89", + "src/pcb_copilot/schematic/power.py": "0397ced9886999f1afccce119a16a4a3f541b0797c571d5f49b4f1e2d5f8bcb5", + "src/pcb_copilot/schematic/preview.py": "348ee4d0d8bf091822dc4413fc0299e700c59fbfddb7c9b3be15110d44d57c6e", + "src/pcb_copilot/schematic/quality.py": "d2fa4fcbd8133ba78125b0ba8e48ddd0709d2d502bfb45c54eeaa0b7387124ad", + "src/pcb_copilot/schematic/render.py": "fa746aaa5b0801525c686069899256bb96967fb8df2f22bec873becd39a16e64", + "src/pcb_copilot/schematic/update.py": "98284012a1d044d5ccbb5ef6104f188d14dd696520750c7c364e5e24ff402f67", + "src/pcb_copilot/schematic/wiring.py": "0e3f94a9f030546eec7e30976f100eea6dba4639cec61b1696f7cd6b5625ca3a", + "src/pcb_copilot/state.py": "9f482e69b357d0c5fa4734351ca840e2415d5090bb9c0eb5ea54e1a182f9bcbd", + "src/pcb_copilot/status.py": "36c9b50254abc470e31368c3f74b73d1d4c7668fd496231cf6a835a61e559258", + "src/pcb_copilot/stock.py": "4750bfc03f4d1f4bcd3b29c811df53c86c55c69680b32513316d50ac718fd72f", + "src/pcb_copilot/toolchain.py": "6cc1892895fe3822da9ac9809e42651bc7b03e9b5a40f5de512ccb9f21b54f71", + "src/pcb_copilot/transaction.py": "89b517943dcca9921223ba086812a308e68e2d0a8cfd46ab0f82e6b40b8a6eaf", + "src/pcb_copilot/update_guard.py": "5db6fba62677f47da7dbc1ab45575e04fecd0e8cfbae6d372f2c7f8129888dd3", + "tools/evaluate.py": "1c2ce0ea4bbe02d96e3405335e93844ecc1f60fc88b7d02c07391e8c7abced38" + }, + "implementation_unchanged": true, + "duration_seconds": 14.72 +} diff --git a/docs/evaluation/2026-10-29/evaluation.png b/docs/evaluation/2026-10-29/evaluation.png new file mode 100644 index 0000000..b0ce013 Binary files /dev/null and b/docs/evaluation/2026-10-29/evaluation.png differ diff --git a/docs/evaluation/2026-10-29/logs/changed-candidate.stderr.txt b/docs/evaluation/2026-10-29/logs/changed-candidate.stderr.txt new file mode 100644 index 0000000..8878af8 --- /dev/null +++ b/docs/evaluation/2026-10-29/logs/changed-candidate.stderr.txt @@ -0,0 +1,3 @@ +usage: pcb-copilot [-h] [--version] + {doctor,status,clean,views,update-schematic,review,prepare-signoff,update-layout,release,research,parts} ... +pcb-copilot: error: No successful matching unconsumed preview; run preview again against saved current CAD before applying diff --git a/docs/evaluation/2026-10-29/logs/changed-candidate.stdout.txt b/docs/evaluation/2026-10-29/logs/changed-candidate.stdout.txt new file mode 100644 index 0000000..e69de29 diff --git a/docs/evaluation/2026-10-29/logs/control-evidence.stderr.txt b/docs/evaluation/2026-10-29/logs/control-evidence.stderr.txt new file mode 100644 index 0000000..e69de29 diff --git a/docs/evaluation/2026-10-29/logs/control-evidence.stdout.txt b/docs/evaluation/2026-10-29/logs/control-evidence.stdout.txt new file mode 100644 index 0000000..b884bad --- /dev/null +++ b/docs/evaluation/2026-10-29/logs/control-evidence.stdout.txt @@ -0,0 +1,12 @@ +3 evidence record(s) verified + +MACHINE FAILURES: none + +EXTRACTED FACTS: none + +REVIEW REQUIRED: +- Archive integrity does not prove circuit completeness or engineering correctness. + +CONFLICTS: none + +PROPOSED DESIGN_BASIS ROWS: none diff --git a/docs/evaluation/2026-10-29/logs/control-footprints.stderr.txt b/docs/evaluation/2026-10-29/logs/control-footprints.stderr.txt new file mode 100644 index 0000000..e69de29 diff --git a/docs/evaluation/2026-10-29/logs/control-footprints.stdout.txt b/docs/evaluation/2026-10-29/logs/control-footprints.stdout.txt new file mode 100644 index 0000000..b46e581 --- /dev/null +++ b/docs/evaluation/2026-10-29/logs/control-footprints.stdout.txt @@ -0,0 +1 @@ +{"accepted": true, "footprints": 11, "fidelities": ["real", "real", "real", "real", "real", "real", "real", "real", "real", "real", "real"]} diff --git a/docs/evaluation/2026-10-29/logs/evidence-corruption.stderr.txt b/docs/evaluation/2026-10-29/logs/evidence-corruption.stderr.txt new file mode 100644 index 0000000..e69de29 diff --git a/docs/evaluation/2026-10-29/logs/evidence-corruption.stdout.txt b/docs/evaluation/2026-10-29/logs/evidence-corruption.stdout.txt new file mode 100644 index 0000000..e36b072 --- /dev/null +++ b/docs/evaluation/2026-10-29/logs/evidence-corruption.stdout.txt @@ -0,0 +1,13 @@ +0 evidence record(s) verified + +MACHINE FAILURES: +- archive.hash_mismatch: hash mismatch for files/WP710A10ID_WP710A10ID_42d464fbfd8d.pdf + +EXTRACTED FACTS: none + +REVIEW REQUIRED: +- Archive integrity does not prove circuit completeness or engineering correctness. + +CONFLICTS: none + +PROPOSED DESIGN_BASIS ROWS: none diff --git a/docs/evaluation/2026-10-29/logs/footprint-geometry.stderr.txt b/docs/evaluation/2026-10-29/logs/footprint-geometry.stderr.txt new file mode 100644 index 0000000..e69de29 diff --git a/docs/evaluation/2026-10-29/logs/footprint-geometry.stdout.txt b/docs/evaluation/2026-10-29/logs/footprint-geometry.stdout.txt new file mode 100644 index 0000000..a480e85 --- /dev/null +++ b/docs/evaluation/2026-10-29/logs/footprint-geometry.stdout.txt @@ -0,0 +1 @@ +{"accepted": false, "exception": "ValueError", "message": "local footprint differs from archived KiCad source beyond allowed model URI replacements"} diff --git a/docs/evaluation/2026-10-29/logs/missing-preview.stderr.txt b/docs/evaluation/2026-10-29/logs/missing-preview.stderr.txt new file mode 100644 index 0000000..8878af8 --- /dev/null +++ b/docs/evaluation/2026-10-29/logs/missing-preview.stderr.txt @@ -0,0 +1,3 @@ +usage: pcb-copilot [-h] [--version] + {doctor,status,clean,views,update-schematic,review,prepare-signoff,update-layout,release,research,parts} ... +pcb-copilot: error: No successful matching unconsumed preview; run preview again against saved current CAD before applying diff --git a/docs/evaluation/2026-10-29/logs/missing-preview.stdout.txt b/docs/evaluation/2026-10-29/logs/missing-preview.stdout.txt new file mode 100644 index 0000000..e69de29 diff --git a/docs/evaluation/2026-10-29/logs/model-corruption.stderr.txt b/docs/evaluation/2026-10-29/logs/model-corruption.stderr.txt new file mode 100644 index 0000000..e69de29 diff --git a/docs/evaluation/2026-10-29/logs/model-corruption.stdout.txt b/docs/evaluation/2026-10-29/logs/model-corruption.stdout.txt new file mode 100644 index 0000000..86ad901 --- /dev/null +++ b/docs/evaluation/2026-10-29/logs/model-corruption.stdout.txt @@ -0,0 +1 @@ +{"accepted": false, "exception": "ValueError", "message": "official footprint provenance hash mismatch: R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.step"} diff --git a/docs/evaluation/2026-10-29/logs/native-preview-control.stderr.txt b/docs/evaluation/2026-10-29/logs/native-preview-control.stderr.txt new file mode 100644 index 0000000..e69de29 diff --git a/docs/evaluation/2026-10-29/logs/native-preview-control.stdout.txt b/docs/evaluation/2026-10-29/logs/native-preview-control.stdout.txt new file mode 100644 index 0000000..4c88670 --- /dev/null +++ b/docs/evaluation/2026-10-29/logs/native-preview-control.stdout.txt @@ -0,0 +1,70 @@ +{ + "applied": false, + "schematic": "C:\\Users\\tae06\\AppData\\Local\\Temp\\pcb-copilot-evaluation-i3cyja7m\\workspaces\\native-preview-control\\gpio-indicator\\gpio-indicator.kicad_sch", + "source_mode": "native", + "intent_status": "historical; unchanged and not used to redraw CAD", + "human_review": "pending", + "preview": "C:\\Users\\tae06\\AppData\\Local\\Temp\\pcb-copilot-evaluation-i3cyja7m\\workspaces\\native-preview-control\\gpio-indicator\\.pcb-copilot\\preview\\schematic.pdf", + "erc_report": "C:\\Users\\tae06\\AppData\\Local\\Temp\\pcb-copilot-evaluation-i3cyja7m\\workspaces\\native-preview-control\\gpio-indicator\\.pcb-copilot\\preview\\schematic-erc.json", + "metrics": "C:\\Users\\tae06\\AppData\\Local\\Temp\\pcb-copilot-evaluation-i3cyja7m\\workspaces\\native-preview-control\\gpio-indicator\\.pcb-copilot\\preview\\schematic-metrics.json", + "findings": [], + "exit_code": 0, + "preview_binding": { + "version": 1, + "project": "C:\\Users\\tae06\\AppData\\Local\\Temp\\pcb-copilot-evaluation-i3cyja7m\\workspaces\\native-preview-control\\gpio-indicator", + "inputs": { + "DESIGN_BASIS.md": "77119e5d1ab6ea43a385a17adec1874ffc9b6c20e35eb44d783278710b9f239f", + "DEVIATIONS.md": "324f110ce0816864290f2b28a6ecdbe8006457f305852762837590ae0eb99563", + "evidence/files/61300511121_61300511121_b91171c2b942.pdf": "b91171c2b94275ccb3824762a4b77dcd0cd9031e8a818e869a6c9f18c053ad8b", + "evidence/files/MFR-25FBF52-1K1_YAGEO-MFR_DATASHEET_b460acdb4764.pdf": "b460acdb476469774e0785a8ef85aec79e2d95fe41beaa79c5a414e4e95e3fe0", + "evidence/files/WP710A10ID_WP710A10ID_42d464fbfd8d.pdf": "42d464fbfd8d3ddef65fa6f9226d298547cdb25d5369aff0c47e5f896595c4bd", + "evidence/index.yaml": "cece06b86df6f692fbfe52ceabf858e7996eb0721db00232d79f54c1c3c82149", + "fp-lib-table": "65851d1c9080d2cf944dcf740f2b9ad66fd62e6550f0feb7635f9dab55e1c329", + "gpio-indicator.kicad_dru": "fd6ec6cfd46f091c61ee7fa09ab3e1c5e29cb9b187e5045bcf055666f0239643", + "gpio-indicator.kicad_pcb": "aa4811a06c27b7d529da161f004cf5e5c1d192e04515ebd6aa9e8716a8536c71", + "gpio-indicator.kicad_pro": "b53a9bec0882a7dbd622aba8401f6616c067972c9d85dbffc407c407f9365fe2", + "gpio-indicator.kicad_sch": "bcf4b33bda22faff9d68be7498e96e7a83a40dc403b5fe2f4ffd79bf2f265ab4", + "jlcpcb-assembly.yaml": null, + "layout-intent.yaml": null, + "libs/Demo.kicad_sym": "c5e68806f7af78dceae8bff16e23446288e7247b32aa1a31d64f58da7e70a403", + "libs/Demo.pretty/LED_D3.0mm.kicad_mod": "9928bcc8ef35ea406d56af1480e43c606d8d646ba247b3d453d80386cd0f5b10", + "libs/Demo.pretty/MountingHole_3.2mm_M3.kicad_mod": "3853c52bba27d3e3e3e18db44a20dfb296eb9e6cd16ebf26fe4a96a2ee8add3b", + "libs/Demo.pretty/PinHeader_1x05_P2.54mm_Vertical.kicad_mod": "8e494ecb4bbaff9fecbe2b16962684513fae788c9b9c9902172781d64b01c2e3", + "libs/Demo.pretty/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.kicad_mod": "bf616ce7d49ae02d5c87d01dd19957ebf3aa66007809680c450de8561f4681a1", + "libs/LICENSE-kicad-footprints.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE-kicad-packages3D.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE-kicad-symbols.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE_PROVENANCE.json": "8fb14cbd87bbb53c2e381fa614336026b1ef1a6b69d252e40b5de8dafa7f9c66", + "libs/models/LED_D3.0mm.step": "e83c2186ad887c36d869f44e28c7b80646ea10cb388697b4380f5a2777268371", + "libs/models/PinHeader_1x05_P2.54mm_Vertical.step": "f03b716e453f6d4f2a111a227c671d96f92708e72a5a663cd4889296d021f4c3", + "libs/models/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.step": "85bdadc9190739c38429da06b1d9c76ccf33aef9a0794a2e7a9dd5b58d9d05fe", + "libs/PROVENANCE.json": "30cb553d1c3ac24055e98ae9dc41e45d3eaa876cad6a8894dee4959aef2f6314", + "libs/README.md": "c09361039bd440ad0aa9038cf81a652abfbbe1e2803ca0dbd3471ce576a2e2d0", + "libs/upstream/LED_D3.0mm.kicad_mod": "d45c606dbf639522eaeae8c6bd2569747ee454daff87ab2db66bdad3200676d0", + "libs/upstream/models/LED_D3.0mm.step": "e83c2186ad887c36d869f44e28c7b80646ea10cb388697b4380f5a2777268371", + "libs/upstream/models/PinHeader_1x05_P2.54mm_Vertical.step": "f03b716e453f6d4f2a111a227c671d96f92708e72a5a663cd4889296d021f4c3", + "libs/upstream/models/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.step": "85bdadc9190739c38429da06b1d9c76ccf33aef9a0794a2e7a9dd5b58d9d05fe", + "libs/upstream/MountingHole_3.2mm_M3.kicad_mod": "3853c52bba27d3e3e3e18db44a20dfb296eb9e6cd16ebf26fe4a96a2ee8add3b", + "libs/upstream/PinHeader_1x05_P2.54mm_Vertical.kicad_mod": "a9beaa5e3bf9f73f4667fd503d8ddc47f81aec7999b51211890c919363099acf", + "libs/upstream/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.kicad_mod": "1ba096b69c79e588cc54946fb6648699e5b301f67f8df0e0e0be43dcab326436", + "netmap.json": "8049b76e10dfec2faea46331a99f75b34a22956aa7c81a685046c1389f1f64cd", + "project.yaml": "aa7e36a756e811ac38745c30d60499eec18049f8ae8e1affcac57b4613a51f14", + "REFERENCE_REVIEW.md": "7ddb00764a476d5b8e30e9ad125b103b815c7352dbdec4906016349a96b04d00", + "REQUIREMENTS.md": "5752f874ffded6f7ad28952d14a08c1764db07e818f156fb1a99399c4a3c7efa", + "review-profile.yaml": "c6b7725c0945ace7546a27fb0ef93c313a09af05e6ae974c0ca8e75ecd9a0af2", + "review-signoff.yaml": null, + "schematic-intent.yaml": null, + "sym-lib-table": "accdd625891ba71beb5e534de13e680099f47f98dff64ca95182060d2072213c" + }, + "options": { + "mode": "native", + "paired_pcb": false + }, + "sources": { + "schematic/gpio-indicator.kicad_sch": { + "path": "C:\\Users\\tae06\\AppData\\Local\\Temp\\pcb-copilot-evaluation-i3cyja7m\\candidates\\gpio-indicator\\gpio-indicator.kicad_sch", + "sha256": "bcf4b33bda22faff9d68be7498e96e7a83a40dc403b5fe2f4ffd79bf2f265ab4" + } + } + } +} diff --git a/docs/evaluation/2026-10-29/logs/selected-mpn.stderr.txt b/docs/evaluation/2026-10-29/logs/selected-mpn.stderr.txt new file mode 100644 index 0000000..e69de29 diff --git a/docs/evaluation/2026-10-29/logs/selected-mpn.stdout.txt b/docs/evaluation/2026-10-29/logs/selected-mpn.stdout.txt new file mode 100644 index 0000000..f06c04a --- /dev/null +++ b/docs/evaluation/2026-10-29/logs/selected-mpn.stdout.txt @@ -0,0 +1 @@ +{"accepted": false, "exception": "ValueError", "message": "R1: official footprint receipt does not match the exact selected native MPN"} diff --git a/docs/evaluation/2026-10-29/manifest.json b/docs/evaluation/2026-10-29/manifest.json new file mode 100644 index 0000000..5579fbc --- /dev/null +++ b/docs/evaluation/2026-10-29/manifest.json @@ -0,0 +1,94 @@ +{ + "schema_version": 1, + "source_project": "examples/gpio-indicator", + "scope": "One recorded Windows software fault evaluation. Raw process output retained; no general accuracy, hardware qualification or fabrication approval claim. Disposable CAD/preview trees remain external.", + "record": "evaluation.json", + "recorded_utc": "2026-10-28T18:38:25.705763+00:00", + "visual_generator_sha256": "5f9ca492ee815eee249e956ade8b50cb86f3e5ac71e8155c7de26d75e1cfd180", + "outputs": { + "evaluation.json": { + "sha256": "12fcc92009affeffc4fe56373e5f3f3981253303e7ba71503a8a409d358204a2", + "bytes": 174337 + }, + "evaluation.png": { + "sha256": "cba13eea6b878613991691590cc5631aec1f250f9f24ca6acac86df74071cb93", + "bytes": 110146 + }, + "logs/changed-candidate.stderr.txt": { + "sha256": "56e7a33413863b60c84f18d4f40a6b530d39b43914c8a24ef91fe39b0c81de3a", + "bytes": 290 + }, + "logs/changed-candidate.stdout.txt": { + "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "bytes": 0 + }, + "logs/control-evidence.stderr.txt": { + "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "bytes": 0 + }, + "logs/control-evidence.stdout.txt": { + "sha256": "c1dbf338152fbfaa933805df2b5c2847d9e33b1d109d703d102d9a56609474df", + "bytes": 242 + }, + "logs/control-footprints.stderr.txt": { + "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "bytes": 0 + }, + "logs/control-footprints.stdout.txt": { + "sha256": "f92f7af1264bfded8d46ab37192637c5662bc8b0eb4d303044d0cba1fb825657", + "bytes": 142 + }, + "logs/evidence-corruption.stderr.txt": { + "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "bytes": 0 + }, + "logs/evidence-corruption.stdout.txt": { + "sha256": "32e935e0e56d88f6bece24054ee42eae1805a95e90abcb9f40f80894102e6dce", + "bytes": 326 + }, + "logs/footprint-geometry.stderr.txt": { + "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "bytes": 0 + }, + "logs/footprint-geometry.stdout.txt": { + "sha256": "76d502cd9684860678b32ffbc09f8265701e66a657e45487fb473daee16d0a51", + "bytes": 151 + }, + "logs/missing-preview.stderr.txt": { + "sha256": "56e7a33413863b60c84f18d4f40a6b530d39b43914c8a24ef91fe39b0c81de3a", + "bytes": 290 + }, + "logs/missing-preview.stdout.txt": { + "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "bytes": 0 + }, + "logs/model-corruption.stderr.txt": { + "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "bytes": 0 + }, + "logs/model-corruption.stdout.txt": { + "sha256": "5bd02101f558c497f66cd50d74d6e59bf32824b5b132f8078db251e48bc61040", + "bytes": 162 + }, + "logs/native-preview-control.stderr.txt": { + "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "bytes": 0 + }, + "logs/native-preview-control.stdout.txt": { + "sha256": "151c99bfdaecaf3a5b2a30ea9def1ecb110d204c3bcbf3e983785a7d92ced977", + "bytes": 6000 + }, + "logs/selected-mpn.stderr.txt": { + "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "bytes": 0 + }, + "logs/selected-mpn.stdout.txt": { + "sha256": "aee6c1e0955478745910a4db75c24f5434fc569ca6767eaeb8e34ddbdc45e116", + "bytes": 138 + }, + "report.md": { + "sha256": "e5057f05d887f635abe8cfab52e4614e916cc4826bab6ba3184df74666981170", + "bytes": 2417 + } + } +} diff --git a/docs/evaluation/2026-10-29/report.md b/docs/evaluation/2026-10-29/report.md new file mode 100644 index 0000000..aa14de0 --- /dev/null +++ b/docs/evaluation/2026-10-29/report.md @@ -0,0 +1,25 @@ +# PCB Copilot fault evaluation + +Run: `2026-10-28T18:38:25.705763+00:00` · mode: `native` + +This is a small manually selected software regression exercise. A met expectation is not a design approval or an engineering-quality score. + +| Case | Interface | Expected exit | Actual exit | Outcome | Logs | +| --- | --- | ---: | ---: | --- | --- | +| control-evidence | cli | 0 | 0 | met_expectation | [stdout](logs/control-evidence.stdout.txt) · [stderr](logs/control-evidence.stderr.txt) | +| control-footprints | validator-api | 0 | 0 | met_expectation | [stdout](logs/control-footprints.stdout.txt) · [stderr](logs/control-footprints.stderr.txt) | +| missing-preview | cli | 2 | 2 | met_expectation | [stdout](logs/missing-preview.stdout.txt) · [stderr](logs/missing-preview.stderr.txt) | +| evidence-corruption | cli | 1 | 1 | met_expectation | [stdout](logs/evidence-corruption.stdout.txt) · [stderr](logs/evidence-corruption.stderr.txt) | +| footprint-geometry | validator-api | 1 | 1 | met_expectation | [stdout](logs/footprint-geometry.stdout.txt) · [stderr](logs/footprint-geometry.stderr.txt) | +| model-corruption | validator-api | 1 | 1 | met_expectation | [stdout](logs/model-corruption.stdout.txt) · [stderr](logs/model-corruption.stderr.txt) | +| selected-mpn | validator-api | 1 | 1 | met_expectation | [stdout](logs/selected-mpn.stdout.txt) · [stderr](logs/selected-mpn.stderr.txt) | +| native-preview-control | native-cli | 0 | 0 | met_expectation | [stdout](logs/native-preview-control.stdout.txt) · [stderr](logs/native-preview-control.stderr.txt) | +| changed-candidate | native-cli | 2 | 2 | met_expectation | [stdout](logs/changed-candidate.stdout.txt) · [stderr](logs/changed-candidate.stderr.txt) | + +Source inputs unchanged: **True**. Implementation unchanged during run: **True**. + +Exact commands, input manifests, fault descriptions, environment, durations and outcomes: [evaluation.json](evaluation.json). All workspace paths are relative to this report; raw logs and executed argv retain their actual paths. + +The API cases call `pcb_copilot.layout.footprints.resolve_footprint` directly. They do not claim the whole CLI review or release ran. Native preview is optional; its successful creation is not human visual review, approval, or fabrication release. + +Harness exit: `0` (0: enabled expectations met; 1: observed behavior differs; 2: execution/preservation error). diff --git a/docs/media/README.md b/docs/media/README.md index 0d5c69b..e65018e 100644 --- a/docs/media/README.md +++ b/docs/media/README.md @@ -19,6 +19,7 @@ results, not a screen recording or proof of autonomous circuit design. | `gpio-3d.png` | Transparent native GPIO board render | | `example-manifest.json` | Exact example CAD inputs and turntable outputs | | `change-proof.md` / `.json` | Completed preview, stale rejection and inspected apply | +| [Evaluation graphic](../evaluation/2026-10-29/evaluation.png) | Three valid controls and six expected rejections from one recorded Windows run | ## Reproduce @@ -27,7 +28,7 @@ repository root: ```sh uv sync --group media -uv run python tools/demo.py --full +uv run python tools/demo.py --project projects/rover-pdb --full # A blocked review returns 1. The demo still prints its external transcript path. uv run --group media python tools/render_readme_media.py --demo /path/to/transcript.json uv run --group media python tools/render_example_media.py @@ -35,7 +36,12 @@ uv run --group media python tools/render_example_media.py The generator requires a real full-mode transcript for current Rover inputs, refuses stale inputs, copies declared CAD and libraries to temporary storage, -then exports. It rechecks source hashes and writes only its named media assets. +then exports. It stages the complete bundle before publication, rechecks source +hashes, and installs its named assets with the manifest last. An encoding, +publication or source-check failure restores the previous bundle. If filesystem +errors prevent recovery, it retains a backup and prints its recovery path. +Individual replacements are atomic; simultaneous readers can observe a mixed +bundle during publication and should verify the manifest after it completes. It does not modify circuits or create sign-offs. Add `--work-dir /path/to/new/external-directory` to retain all sheet exports and @@ -45,6 +51,12 @@ README display size as well. Export success alone is not visual review. Images can vary with KiCad, model libraries or encoder versions. Output hashes identify this capture; they do not promise identical video bytes on every system. +The capture's `source_inputs` retain the exact original bytes. +`source_repository_inputs` separately identify the published Git blob bytes: +some pre-existing Rover text files change CRLF/LF during checkout. The landing +page checker accepts either recorded byte identity, and rejects changed content, +missing inputs, extra declared inputs or false preservation flags. This portable +check does not rerun native exports or establish new CAD qualification. The example turntable uses 48 separate native KiCad 3D renders. It does not invent intermediate geometry. To reproduce the scoped-change proof, run @@ -52,25 +64,34 @@ invent intermediate geometry. To reproduce the scoped-change proof, run hash-bound resume command. [The published record](change-proof.md) describes the exact author-inspected run; it is not owner fabrication approval. +Reproduce the evaluation graphic from its retained record and raw logs: + +```sh +uv run --group media python tools/render_evaluation_media.py --record docs/evaluation/2026-10-29/evaluation.json --output /path/to/new/external-evaluation.png +``` + +The graphic embeds the record, raw-log, generator and font hashes in its PNG +metadata. It verifies the declared case outcomes and rechecks evidence bytes +before creating the new file. Its [bundle manifest](../evaluation/2026-10-29/manifest.json) +binds the published graphic, report, JSON and raw logs together. + ## Visual direction: measured space Native geometry carries the detail. Generous margins let the viewer inspect it, while small technical markers suggest the precision of a laboratory drawing. -The composition is meticulously crafted around real source material, keeping -its shape and labels intact. +The composition keeps the source geometry and labels intact. Dark slate establishes depth without competing with board materials. Pale type and a restrained lime accent establish hierarchy; amber marks an open decision. -Painstaking attention to contrast keeps the result readable at repository scale. +Contrast keeps the result readable at repository scale. Instrument Sans introduces purpose in a few words. JetBrains Mono identifies -commands, stages and recorded facts. Their carefully balanced scale keeps the +commands, stages and recorded facts. Their scale keeps the artifact central and lets details reward closer inspection. Motion follows the inspection sequence: native CAD, source verification, an application guard, and the actual review result. Measured holds allow reading. -The craft lies in hierarchy and honest evidence, with blockers still visible -in the final frame and every alignment refined. +Blockers remain visible in the final frame. Fonts are bundled for reproducible generation. Their SIL Open Font License notices are under [fonts](fonts/). diff --git a/docs/media/example-manifest.json b/docs/media/example-manifest.json index 205a655..48c3de7 100644 --- a/docs/media/example-manifest.json +++ b/docs/media/example-manifest.json @@ -1226,5 +1226,50 @@ "bytes": 1107835 } }, - "scope": "Actual native 3D views of an unbuilt educational PCB. No physical or fabrication approval." + "scope": "Actual native 3D views of an unbuilt educational PCB. No physical or fabrication approval.", + "source_repository_revision": "c57ceecc0d95f1b71e5eef328be3a31277e00ef2", + "source_repository_inputs": { + "DESIGN_BASIS.md": "77119e5d1ab6ea43a385a17adec1874ffc9b6c20e35eb44d783278710b9f239f", + "DEVIATIONS.md": "324f110ce0816864290f2b28a6ecdbe8006457f305852762837590ae0eb99563", + "evidence/files/61300511121_61300511121_b91171c2b942.pdf": "b91171c2b94275ccb3824762a4b77dcd0cd9031e8a818e869a6c9f18c053ad8b", + "evidence/files/MFR-25FBF52-1K1_YAGEO-MFR_DATASHEET_b460acdb4764.pdf": "b460acdb476469774e0785a8ef85aec79e2d95fe41beaa79c5a414e4e95e3fe0", + "evidence/files/WP710A10ID_WP710A10ID_42d464fbfd8d.pdf": "42d464fbfd8d3ddef65fa6f9226d298547cdb25d5369aff0c47e5f896595c4bd", + "evidence/index.yaml": "cece06b86df6f692fbfe52ceabf858e7996eb0721db00232d79f54c1c3c82149", + "fp-lib-table": "65851d1c9080d2cf944dcf740f2b9ad66fd62e6550f0feb7635f9dab55e1c329", + "gpio-indicator.kicad_dru": "fd6ec6cfd46f091c61ee7fa09ab3e1c5e29cb9b187e5045bcf055666f0239643", + "gpio-indicator.kicad_pcb": "aa4811a06c27b7d529da161f004cf5e5c1d192e04515ebd6aa9e8716a8536c71", + "gpio-indicator.kicad_pro": "b53a9bec0882a7dbd622aba8401f6616c067972c9d85dbffc407c407f9365fe2", + "gpio-indicator.kicad_sch": "bcf4b33bda22faff9d68be7498e96e7a83a40dc403b5fe2f4ffd79bf2f265ab4", + "jlcpcb-assembly.yaml": null, + "layout-intent.yaml": null, + "libs/Demo.kicad_sym": "c5e68806f7af78dceae8bff16e23446288e7247b32aa1a31d64f58da7e70a403", + "libs/Demo.pretty/LED_D3.0mm.kicad_mod": "9928bcc8ef35ea406d56af1480e43c606d8d646ba247b3d453d80386cd0f5b10", + "libs/Demo.pretty/MountingHole_3.2mm_M3.kicad_mod": "3853c52bba27d3e3e3e18db44a20dfb296eb9e6cd16ebf26fe4a96a2ee8add3b", + "libs/Demo.pretty/PinHeader_1x05_P2.54mm_Vertical.kicad_mod": "8e494ecb4bbaff9fecbe2b16962684513fae788c9b9c9902172781d64b01c2e3", + "libs/Demo.pretty/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.kicad_mod": "bf616ce7d49ae02d5c87d01dd19957ebf3aa66007809680c450de8561f4681a1", + "libs/LICENSE-kicad-footprints.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE-kicad-packages3D.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE-kicad-symbols.md": "285b027a721577d0bc0198f36e948c6c282ddaa4b58fef8ed826749576eb0aef", + "libs/LICENSE_PROVENANCE.json": "8fb14cbd87bbb53c2e381fa614336026b1ef1a6b69d252e40b5de8dafa7f9c66", + "libs/models/LED_D3.0mm.step": "e83c2186ad887c36d869f44e28c7b80646ea10cb388697b4380f5a2777268371", + "libs/models/PinHeader_1x05_P2.54mm_Vertical.step": "f03b716e453f6d4f2a111a227c671d96f92708e72a5a663cd4889296d021f4c3", + "libs/models/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.step": "85bdadc9190739c38429da06b1d9c76ccf33aef9a0794a2e7a9dd5b58d9d05fe", + "libs/PROVENANCE.json": "30cb553d1c3ac24055e98ae9dc41e45d3eaa876cad6a8894dee4959aef2f6314", + "libs/README.md": "c09361039bd440ad0aa9038cf81a652abfbbe1e2803ca0dbd3471ce576a2e2d0", + "libs/upstream/LED_D3.0mm.kicad_mod": "d45c606dbf639522eaeae8c6bd2569747ee454daff87ab2db66bdad3200676d0", + "libs/upstream/models/LED_D3.0mm.step": "e83c2186ad887c36d869f44e28c7b80646ea10cb388697b4380f5a2777268371", + "libs/upstream/models/PinHeader_1x05_P2.54mm_Vertical.step": "f03b716e453f6d4f2a111a227c671d96f92708e72a5a663cd4889296d021f4c3", + "libs/upstream/models/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.step": "85bdadc9190739c38429da06b1d9c76ccf33aef9a0794a2e7a9dd5b58d9d05fe", + "libs/upstream/MountingHole_3.2mm_M3.kicad_mod": "3853c52bba27d3e3e3e18db44a20dfb296eb9e6cd16ebf26fe4a96a2ee8add3b", + "libs/upstream/PinHeader_1x05_P2.54mm_Vertical.kicad_mod": "a9beaa5e3bf9f73f4667fd503d8ddc47f81aec7999b51211890c919363099acf", + "libs/upstream/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal.kicad_mod": "1ba096b69c79e588cc54946fb6648699e5b301f67f8df0e0e0be43dcab326436", + "netmap.json": "8049b76e10dfec2faea46331a99f75b34a22956aa7c81a685046c1389f1f64cd", + "project.yaml": "aa7e36a756e811ac38745c30d60499eec18049f8ae8e1affcac57b4613a51f14", + "REFERENCE_REVIEW.md": "7ddb00764a476d5b8e30e9ad125b103b815c7352dbdec4906016349a96b04d00", + "REQUIREMENTS.md": "5752f874ffded6f7ad28952d14a08c1764db07e818f156fb1a99399c4a3c7efa", + "review-profile.yaml": "c6b7725c0945ace7546a27fb0ef93c313a09af05e6ae974c0ca8e75ecd9a0af2", + "review-signoff.yaml": null, + "schematic-intent.yaml": null, + "sym-lib-table": "accdd625891ba71beb5e534de13e680099f47f98dff64ca95182060d2072213c" + } } diff --git a/docs/media/manifest.json b/docs/media/manifest.json index 9a3fe4f..dc8cdc4 100644 --- a/docs/media/manifest.json +++ b/docs/media/manifest.json @@ -224,5 +224,127 @@ "bytes": 79361 } }, - "scope": "Native 3D renders and animated recorded CLI results. Not manufactured-board photos, a screen recording, a successful edit, or fabrication approval." + "scope": "Native 3D renders and animated recorded CLI results. Not manufactured-board photos, a screen recording, a successful edit, or fabrication approval.", + "source_repository_revision": "c57ceecc0d95f1b71e5eef328be3a31277e00ef2", + "source_repository_inputs": { + "buck-12v.kicad_sch": "873f5e81e3344a94f9601e9a27d7ac99eea4a482d0690968526a2d6031b3c1d9", + "buck-5v.kicad_sch": "19f6ff5581255d1087d14433cc4a337839f2ad0f636cc9bd5dce463ca7f8f9c5", + "buck-motor.kicad_sch": "2ecd62becf9d151b10a42760f780f80e4c75b7b70591d1abd1788ce1fc36a73f", + "DESIGN_BASIS.md": "94b060c6b1c110bebcb49b1acdbae64bb39f394e51809b241f06ae655086470c", + "DEVIATIONS.md": "d1651d02c4f56fc5efbf5718b00116ec21c0ddcb09cdeca780213a9dc04d81bd", + "dxl-enable.kicad_sch": "64cd97516ab8e8b06f8959621d13ccab740b671601454fb33db45852ba1af5ef", + "evidence/assembly/C54431777-components-2026-10-06.json": "2e5c07eb9432f630b1c0fbaf02bcf601e7e9ddd0d3df5008254d90298764c1f2", + "evidence/assembly/orientation-preview-2026-10-06.png": "1d33af553ef092a0453bc28f149b4657ea2d99d1489f5734b8fe7514d631e7ba", + "evidence/characterization/CL32B226KAJNNN-curves.json": "ca9c15de4ba56ffa2f65581fd4a6f84330d485e5ffa9a44e234fa9ea3ae31c56", + "evidence/characterization/CL32B226KAJNNN-manufacturer.html": "01fb26dbcfc8d2b63a5471d2854ead365eac428adc7f81eed49b8cce19ea5b00", + "evidence/characterization/CL32B226KAJNNN-provenance.json": "13aab8babc635b7017cc3f2250ac272d2417d0167eca3f3c33a034e53429d0fe", + "evidence/characterization/GRM32ER71H106KA12-ADI-provenance.json": "b2297048385d6ae2b0a226e27b0b99c33f5b66b57a2bf507ae2c0aacca032e6c", + "evidence/characterization/GRM32ER71H106KA12-ADI-web-extract.json": "45c955ccb9074cd4dacba292f6023c51c9e19aa45ea1f2376a0e93c50453d503", + "evidence/characterization/GRM32ER71H106KA12-DC-bias.png": "32dcc30eedbb9a5670923faa511aa14ab76da17d426a62cf52fdbf5c763eb01e", + "evidence/characterization/GRM32ER71H106KA12-Murata-provenance.json": "462c7b3e95f00d724c57270cf0ba4a73cf27fd481fe42d94a5f1fa3bb17c884a", + "evidence/files/01530008Z_5dd658d7c0c120ed4252709c4e00b44b_dd28a686cd10.pdf": "dd28a686cd106b2228fb3e0ef107b580a8f58177765c71c08a16ebbac66415af", + "evidence/files/01530008Z_components_038492248339.txt": "03849224833909976715d61c81a63e22a81bae159978d19f1043732f6d1470a1", + "evidence/files/0297010.WXNV_6640fa58723348e000da25e795536560_cfd43f753274.pdf": "cfd43f753274bc97a027685b0a8a2867969272113cc8d41980242a1a949c2e9f", + "evidence/files/0805W8F1001T5E_components_fcc6d3130eae.txt": "fcc6d3130eae3bfb44c7b9c0486f3ad1a87557cc636a8d55a50acb1fed2219db", + "evidence/files/0805W8F1912T5E_components_79fd6539982f.txt": "79fd6539982f1d79ed3018e0a12171ace376531618d9b3be292fa6c34316ea3d", + "evidence/files/0805W8F2202T5E_components_b881e8433fdd.txt": "b881e8433fdd135185516817550c693872ca46933563aeccfb8cab05a871fa90", + "evidence/files/0805W8F3741T5E_components_f6e9d7b40fa5.txt": "f6e9d7b40fa5e096c6c8cf85ba055347bcdd4d4d8e096ca566b7c155293348c1", + "evidence/files/0805W8F7151T5E_0a975aaa49b7c97f38a963127be4a823_11cd644d5d8a.pdf": "11cd644d5d8a34a6d12775afb80bf58d8fc11f0c3b700dbd0f7a59942ceaa5ef", + "evidence/files/0805W8F7151T5E_components_4c0fa2ed98d0.txt": "4c0fa2ed98d0f580651d003b779f36fb39b62cc28ddc014f50cc1a852b811674", + "evidence/files/2.54-1x6P_cb0770a379b121177c8c7d26dfb00406_013649a580c9.pdf": "013649a580c9ee0d2a54502601713be2b1811ff6d44e21887c8077307a7c2dea", + "evidence/files/2.54-1x6P_components_47044365dfa6.txt": "47044365dfa67edea30c22b574f71b2fdfd0bde188952771ba9b01d5a469c88b", + "evidence/files/254PM-1x20P-V_f0f6c3d8697d24302649e706e8fbe0d7_5778f815e84c.pdf": "5778f815e84ca5a0e1d490c5be5db4f228194b3df5b59abb1346ace54a11685d", + "evidence/files/APS1365M3R3DW_68d4a03c5920925210785d7848183ed4_a794e72576cd.pdf": "a794e72576cd6433b8b51d01831ba1f10941c8e2b2878077b7597d3c20c94de2", + "evidence/files/B4B-EH-A_LF_SN_eEH_9e35874bf275.pdf": "9e35874bf27505bab79d6af783118fa926ceef7a91b7cb8421f108ff69a1b7f2", + "evidence/files/CL10C330JB8NNNC_02336ea48ea44ca18c72517dd3cb7b47_96baebe4bd0c.pdf": "96baebe4bd0ce363e87be28b5b003f511f1502e084a6fc4f02333ded56c808f6", + "evidence/files/CL10C330JB8NNNC_CL10C330JB8NNNC_Spec_b3b5f1a6680a.pdf": "b3b5f1a6680a5f083fb5913555c82821d0cb2d1e540dcf250f9e5f0de071922e", + "evidence/files/CL10C330JB8NNNC_components_3afd8ebb8b5f.txt": "3afd8ebb8b5f42332bc6726820af872cd657dd6c85e14e82c99c5ec66e44556e", + "evidence/files/CSS2H-2512_b11b79a9d324.stp": "b11b79a9d3245b4634fd4a02dc9062700c637b0e0a8e435f60456296413ee491", + "evidence/files/CSS2H-2512K-2L00F_css2h-2512_7e32b223f4b0.pdf": "7e32b223f4b0f086d9e08cd5a4fb42e9935cf119db3dd9cf3ea7969bdd643909", + "evidence/files/DMG2305UX-7_components_a9248858bbeb.txt": "a9248858bbeb08d798204569f4cc794263e395d1a35717d850248020bf886626", + "evidence/files/DMG2305UX-7_DMG2305UX_7421a75157a2.pdf": "7421a75157a2e700a217d1a20d075216abed29e81192bf7609d3df6dbb08eb2d", + "evidence/files/EEU-FR1H221B_d9089262f7a6df5ba99d8a966a03ede0_bf99d179b367.pdf": "bf99d179b36759edbd615725840c0fb0c87640b0800ba9ecd967ed3172b2198c", + "evidence/files/GRM32ER71H106KA12_Murata_characteristics_20141111_9281c34a22b3.pdf": "9281c34a22b351bb841a7a23d0aaa1c58b4d633f6bf1a9c03d15475ac5d11f2e", + "evidence/files/INA226AIDGSR_ina226_c9b67f886d4a.pdf": "c9b67f886d4a5241a5e070723f7b61867409eeb27eed768b9cdd9cb17e03ca2d", + "evidence/files/INA226AIDGSR_sbou276_e5dc5b492908.pdf": "e5dc5b492908c656b6be0dd2ef0f8c829fd445a918a0839889fc1e3046a021ec", + "evidence/files/Jetson-Orin-Nano-Carrier_jetson_orin_nano_devkit_carrier_board_specification_sp_4a0f7ba948bc.pdf": "4a0f7ba948bce4881e176f0f8636ef3dbd40e3df9dd33134e6a7433359d18c02", + "evidence/files/KT-0805G_de342fde3322df0797012cd7a04e2194_853e6752f600.pdf": "853e6752f600e247475ba548092207fa4fc707a3f8a0b1562a834bc9a901a8d9", + "evidence/files/LM73606RNPR_components_84dd5258bfcf.txt": "84dd5258bfcf4e2fc532a38a03f5384d4e5a3dbb39213213438466c9d3850cc7", + "evidence/files/LM73606RNPR_lm73606_98c77e8b42dd.pdf": "98c77e8b42ddc52021083dae660e5277705cc82a2c469ae16a4ad4660d904a3c", + "evidence/files/LM73606RNPR_snvu579_0988f0efa67e.pdf": "0988f0efa67eeda38478578e8fb8b30e3adbbd73b6f5c15cbb79269ece0c8eb8", + "evidence/files/LMR51450SDRRR_components_5009d4a2ce02.txt": "5009d4a2ce026741df9d81ce6d1f1dc5d399daa2816fe21778862eb2377b9aa5", + "evidence/files/LMR51450SDRRR_lmr51450_7f80073eb777.pdf": "7f80073eb7773dddd87df44808e8e78f5b83520b20e815cbb0a17018d1cae413", + "evidence/files/LMR51450SDRRR_SNVMCB2_e1fd811f3bcb.zip": "e1fd811f3bcb494bf528772421a5af4dd37b37f50461caaa5e834d3256ac1a40", + "evidence/files/LMR51450SDRRR_snvu838a_6086805dfb70.pdf": "6086805dfb7070abce87077d95aa4ec9b2e2a7fd25af52ddeb7d0e457de655de", + "evidence/files/OS102011MA1QN1_9e68893bade4341f8dc17b91bf8fc979_96f8f741dec9.pdf": "96f8f741dec9336a05c73ffc78116f4aefba9c876e170b26f01505c80eb3cbc7", + "evidence/files/OS102011MA1QN1_components_b07e077150de.txt": "b07e077150dea4db0a7d7ce5023c7de60dfd49444675640f9c4bd2c0e262f974", + "evidence/files/PCB-width-screen_snva766_89d111dd96c8.pdf": "89d111dd96c8fe53c01451d52e60a3bca226ccc998ae1967e323dfca005b3267", + "evidence/files/Pico_2_pico-2-datasheet_cbcfaf881018.pdf": "cbcfaf881018c686495a2e53c7bd281e7e0a8217d79447d73eda7c8f74b7f675", + "evidence/files/PowerPAD-assembly_slma002h_cdab5db91631.pdf": "cdab5db916315b40c6b445a30ccff90de3d391d39231c3f519533113a8cb1f22", + "evidence/files/Raspberry_Pi_Pico_hardware-design-with-rp2040_51c4f430153f.pdf": "51c4f430153fcdbf3209d9b3b41662c8527ff0150bc25777e3fcd6f5221a1c19", + "evidence/files/RC0805FR-07100KL_components_6ac1220cb8d4.txt": "6ac1220cb8d45c5d1453642c051c48f8bc146b1aaa30f9323d9ec358c77b3b91", + "evidence/files/RC0805FR-07100KL_RC0805FR-07100KL_ce1449c65535.pdf": "ce1449c655356f5c0415d6b3aa72d28be6d26b08e45a0050fdae16d08c592120", + "evidence/files/RC0805FR-0710KL_Yageo_specsheet_a12caa1d29a9.pdf": "a12caa1d29a94167f5c5526d5e608f7ebfae5761f169e790543246d48d0dbc02", + "evidence/files/RC1206FR-073K9L_components_7f63ec628a0a.txt": "7f63ec628a0ac346ff8d1176e02ccd5293d802e88275bad9098787f03d1c782e", + "evidence/files/RC1206FR-073K9L_RC1206FR-073K9L_496bcb915f16.pdf": "496bcb915f1683dbad13314e506756eacb78e9792e2655403987b36eaef22f88", + "evidence/files/SRP1265A-3R3M_components_be7c4a1aad13.txt": "be7c4a1aad13d106277a386070850a01f4c436eb1811e8d2c32405460b6b6820", + "evidence/files/SRP1265A-4R7M_components_9a3de3ffe216.txt": "9a3de3ffe216c5ee56e0458b90602c35f93c94712adec490c3ec2d52357444df", + "evidence/files/SRP1265A-6R8M_components_9dda4654fb4d.txt": "9dda4654fb4d363ef71e786eab994e32c9ebd65ea02222a47daace02bd249781", + "evidence/files/SRP1265A-6R8M_srp1265a_30b470999b73.pdf": "30b470999b737a6350ce5b09a917a5f12090c2e0895a78ddc15285e3d44ec649", + "evidence/files/Sunlord_MWSA-S_55a6f5de0d34.pdf": "55a6f5de0d3424730210584c2a732f5209bba52cffa5c226885944f3d9e1be9a", + "evidence/files/TSW-103-07-G-S_tsw_th_3a5770b11668.pdf": "3a5770b11668f4e5a11ba9ceeb4817a23f467b8507e3592f55fb6bd8f96e71bc", + "evidence/index.yaml": "987e31c509b0b674d92f58097db3e12dccdcd08ee42b774772b009ed5949c979", + "evidence/PDB_Design_Handover.md": "0115fda198001c86e08545682cc86de63730aadfbdcb9721cb9fbe8218a75a3c", + "footprints/rover.pretty/AGND_Tie_LMR51450.kicad_mod": "de3267b7221b324d645b57de1e51a64e0539ea62e3e213ae1f214a168c97ccf4", + "footprints/rover.pretty/APS1365DW_13.8x12.6_P11.5.kicad_mod": "1caf3cda1887de89a6347504b43e62058deeb7aad80af7f706db0fa1e0403d22", + "footprints/rover.pretty/CSS2H_2512_6.35x3.05.kicad_mod": "0fbdc31b02833b7de48aeaa28e72b8f2e3a3e8df1d535e6ea9f620816366d8c9", + "footprints/rover.pretty/Fuseholder_Littelfuse_01530008Z.kicad_mod": "b398d913b7eb281789007834162ae63213ed054fd517115ac9bc97208a39b6af", + "footprints/rover.pretty/KT0805G_0805_A1_K2.kicad_mod": "17a480dea35715444191f4d24b02af447d1b5ebec8bd726bb8672e0f46b7a48c", + "footprints/rover.pretty/LMR51450_DRR_WSON12_3x3.kicad_mod": "ee27e26f9ded0937357a3657f0da65d5ca819fae001c4991c87fbcaa6793a0f0", + "footprints/rover.pretty/Pico2_Sockets_LXWCONN_254PM_1x20.kicad_mod": "6cf73ebe85719168dbb913143db78fe8b65649ce29d2709e5c125eb500eab6d4", + "footprints/rover.pretty/SRP1265A_LeadFrame_13.5x12.5_P11.1.kicad_mod": "d7c50719c95fb2594e62ec8bcc972ad4500591d96d7f5f1e7533bdd5d238abf5", + "footprints/rover.pretty/WirePads_2_5x6_P9.kicad_mod": "e6d7ce117dab22f6261fa4e275cc9d49d06a24dd9aaedeb702535f717c383406", + "footprints/rover.pretty/WirePads_2_6x8_P12.kicad_mod": "f113077671fa871a392058a194e46bad6699816faf9ce0fcd825a020255245d7", + "fp-lib-table": "9f4a4ddb9dae3e17980a498db2b604ef87c10bf3b8356cfd9ead752d2110fae3", + "input-monitor.kicad_sch": "aadd475e1fb096653ec14ef1464adff469910ba7c44aea91c807072cd4aa26f1", + "jlcpcb-assembly.yaml": "5e5d30dd1a1d3de7f4deee9483c3542fc7720d02bb49e33883781ed57d6cde7d", + "layout-intent.yaml": null, + "libs/Coilank_APS1365DW.3dshapes/APS1365DW-envelope.step": "3478c6172c157f88ef3312bf0c3150066a4d97b4e4ae5901fec7bcc08dc7f3e9", + "libs/Coilank_APS1365DW.3dshapes/build_model.py": "3d66e0fc596545f71f1cc7849b75f09a69c0e16cc8889a2467ab578a6cbd4e0b", + "libs/Coilank_APS1365DW.3dshapes/README.md": "52fc3a5b20c2ba30634457e9105dc07ff646449da7a985390d95e7ef6ac90a40", + "libs/lcsc_C2041326.3dshapes/IND-SMD_L12.6-W12.5-SRP1265A-220M.step": "f966640bba311bab63a1bdf0ded8a929662a43a5266c73b315636af6d3eee925", + "libs/lcsc_C2041326.3dshapes/IND-SMD_L12.6-W12.5-SRP1265A-220M.wrl": "989ac1116f4b3bd9f90e8e6c302f04a73902f2677d1672832cc5f817cee43b8d", + "libs/lcsc_C2041326.kicad_sym": "24dab114e7f33c78605d6c62ffaf1f34a75692cb2cfd97adf02af7e1ccd6a32a", + "libs/lcsc_C2041326.pretty/IND-SMD_L12.6-W12.5-SRP1265A-220M.kicad_mod": "2306c9c2a33310fae974cafd3111ebc998e3e6305abf49b3eff6dc226574344e", + "libs/lcsc_C206907.3dshapes/FUSE-TH_L17.2-W7.62-H12.9-P7.62-S3.45.step": "2475ec64bb0f63563442f817e92943e45300a0d1f46f2809ee94b53bef5b6b04", + "libs/lcsc_C206907.3dshapes/FUSE-TH_L17.2-W7.62-H12.9-P7.62-S3.45.wrl": "39ee19bb68c6852e54fe0191a6d6d6d7655aee56842e9eeec377c7b4a002a47d", + "libs/lcsc_C206907.kicad_sym": "fac73506325f2c546f49b7856455b9dc95de1727e4f4cbf2c4c428117cf2cf6b", + "libs/lcsc_C206907.pretty/01530008Z.kicad_mod": "60c09baa3733083e1ee7a43868c0bfbdfb1bcce8b69730528f9119d384eb23f6", + "libs/lcsc_C226259.3dshapes/SW-TH_OS102011MA1QN1.step": "1a3e4c8314663d00e9b374272c768f3c9a44c30680ed42768e58491210dc60e4", + "libs/lcsc_C226259.3dshapes/SW-TH_OS102011MA1QN1.wrl": "763d72c5a37efec3139677ce9f11ec67c73b15a9adfa4a6a5e7866d7f034897f", + "libs/lcsc_C226259.kicad_sym": "a57b2db79fb56c62633d04e245426a6828795df55243799f3539b478392838e8", + "libs/lcsc_C226259.pretty/SW-TH_OS102011MA1QN1.kicad_mod": "5a6b47bb0b90ab2be37c8f35b281239323056271d00095f05c63e46232dab449", + "libs/lcsc_C544826.3dshapes/WQFN-30_L6.0-W4.0-H0.8-P0.50-BL-EP.step": "0b1c461af69d03cbef2b2a70e2b64f88a86c7b48de9f80ab92fb3d3fcf9d9341", + "libs/lcsc_C544826.3dshapes/WQFN-30_L6.0-W4.0-H0.8-P0.50-BL-EP.wrl": "cd78842a93db5384dda212f3adf1260152ef4dc753be19c76575bd2287349514", + "libs/lcsc_C544826.kicad_sym": "f98d695a982543193e118c820aae44adf3383463ac4e0ece7624bb85379da3aa", + "libs/lcsc_C544826.pretty/WQFN-30_L6.0-W4.0-P0.50-BL-EP.kicad_mod": "42089af0a9803879ce90b644cda44b7148aaf2f2cac8ce89a80f7784887adffc", + "libs/lcsc_C6890985.3dshapes/WSON-12_L3.0-W3.0-P0.50-TL-EP-2.step": "ad40c6f7c3dfd9a686d08e033c77deb68c9bc4932befa040ae33c65f61e9c5c7", + "libs/lcsc_C6890985.3dshapes/WSON-12_L3.0-W3.0-P0.50-TL-EP-2.wrl": "1e03981a17857305f9a25e8e863a1cf7e6cd6caa7b9773c1544cb6e4a5c8e6c7", + "libs/lcsc_C6890985.kicad_sym": "2af4e8feb72b04c4ccae3c2e0dd365ead80e8b2c9798d4cbd1a4bfd522273a61", + "libs/lcsc_C6890985.pretty/WSON-12_L3.0-W3.0-P0.50-TL-EP-2.kicad_mod": "5d3c3cbf23f0c313413a5d188d0ec78c84f4585a1988a031ad8e1931616d2a20", + "netmap.json": "d04b48cc0cd88fd0bbae01b9144573d5442e4f1898cfbda2f6048b8c86ee4f1e", + "pico-servos.kicad_sch": "5ec1dd41c7ffe0010fe0049d0cb87f7b36af39e98dcf1a82d43e263498efb330", + "project.yaml": "bcbfca4ba6343d58c53f8400d4891eecca44406c1b7b12136bf7169b4d82581d", + "REFERENCE_REVIEW.md": "a32fe8f1a5952dcf17c7d5a1327f110ffd3bc6f0b5620c5eec4102c9da5c6789", + "REQUIREMENTS.md": "100950a8afff6f778caabff5ae44449614911d6ac2fdc402e1b1f090e02a1be2", + "review-profile.yaml": "3107c275652e7ba35c5a7eb4a1a2b4bb6a246f57b0809bd38b23e8f28a2b58e1", + "review-signoff.yaml": null, + "rover-pdb.kicad_dru": "fd6ec6cfd46f091c61ee7fa09ab3e1c5e29cb9b187e5045bcf055666f0239643", + "rover-pdb.kicad_pcb": "22892c0ddab37151abd5226f39a81648c395ee91076690b24d9833741c74fbf4", + "rover-pdb.kicad_pro": "dcdcab785e3988ee8eeb84f040a368da62630ae6fd3b2af99134c206c43c95d4", + "rover-pdb.kicad_sch": "962592d540c480460d016656ff095c3728e17d667cb6475a5a9edbc59c456c90", + "schematic-intent.yaml": "6d34e4f1fddbaf9c8eb65112a9d548dd3a3904bfa439e6b8d7d19ad3cfb4f889", + "sym-lib-table": "87c2fa8e7874234a41cf12f93925913c55575d5d3a7d7b32684d38682a127d7c", + "symbols/rover.kicad_sym": "ef79776d950c69ea1edefad93227089345fdcb4464e1d4bda2657b85f343b492" + } } diff --git a/tests/test_check_readme.py b/tests/test_check_readme.py new file mode 100644 index 0000000..5e3652a --- /dev/null +++ b/tests/test_check_readme.py @@ -0,0 +1,297 @@ +"""Published evidence checks use synthetic files and a mocked hash boundary.""" + +import copy +import hashlib +import json +from pathlib import Path + +import pytest + +from tools import check_readme as checker + + +def sha(payload: bytes) -> str: + return hashlib.sha256(payload).hexdigest() + + +@pytest.fixture +def landing(tmp_path, monkeypatch): + root = tmp_path / 'repo' + root.mkdir() + monkeypatch.setattr(checker, 'ROOT', root) + for name in checker.DOCUMENTS: + path = root / name + path.parent.mkdir(parents=True, exist_ok=True) + path.write_text('# Start\n', encoding='utf-8') + source = root / 'examples/board' + source.mkdir(parents=True) + (source / 'project.yaml').write_text( + 'schema_version: 1\nname: board\nlifecycle: DRAFT\n' + 'design:\n schematic: board.kicad_sch\n pcb: board.kicad_pcb\n netmap: netmap.json\n' + 'evidence:\n index: evidence/index.yaml\nmanufacturing:\n profile: test\n', encoding='utf-8') + current = {'board.kicad_sch': sha(b'current CAD\r\n'), 'review-signoff.yaml': None} + monkeypatch.setattr(checker, 'input_hashes', lambda _project: current.copy()) + media = root / 'docs/media' + manifests = {} + for index, name in enumerate(checker.MEDIA_MANIFESTS): + output_name = f'capture-{index}.bin' + payload = f'published bytes {index}'.encode() + (media / output_name).write_bytes(payload) + manifest = {'schema_version': 1, + 'outputs': {output_name: {'sha256': sha(payload), 'bytes': len(payload)}}} + if name in checker.CAD_MANIFESTS: + manifest.update(source_project='examples/board', source_cad_unchanged=True, + source_inputs=current.copy()) + manifests[name] = manifest + (media / name).write_text(json.dumps(manifest), encoding='utf-8') + evaluation = root / Path(checker.EVALUATION_MANIFESTS[0]).parent + (evaluation / 'logs').mkdir() + (evaluation / 'logs/run.stdout.txt').write_bytes(b'retained raw log') + (evaluation / 'evaluation.png').write_bytes(b'retained chart image') + evaluation_outputs = {path.relative_to(evaluation).as_posix(): + {'sha256': sha(path.read_bytes()), 'bytes': path.stat().st_size} + for path in evaluation.rglob('*') if path.is_file()} + (evaluation / 'manifest.json').write_text(json.dumps({'schema_version': 1, 'outputs': evaluation_outputs})) + return root, media, manifests, current + + +def save(media: Path, name: str, manifest: dict) -> None: + (media / name).write_text(json.dumps(manifest), encoding='utf-8') + + +def test_exact_inputs_and_all_three_named_manifests_pass_without_git_or_native_tools(landing, capsys): + assert checker.main() == 0 + assert '4 required evidence manifests' in capsys.readouterr().out + + +@pytest.mark.parametrize('name', checker.MEDIA_MANIFESTS) +def test_each_named_manifest_is_required(landing, capsys, name): + _root, media, _manifests, _current = landing + (media / name).unlink() + assert checker.main() == 1 + assert name in capsys.readouterr().out + + +def test_no_manifests_cannot_silently_pass(landing, capsys): + _root, media, _manifests, _current = landing + for name in checker.MEDIA_MANIFESTS: + (media / name).unlink() + assert checker.main() == 1 + output = capsys.readouterr().out + assert all(name in output for name in checker.MEDIA_MANIFESTS) + + +@pytest.mark.parametrize('value', [False, 1, 'true', None]) +def test_capture_requires_literal_preservation_true(landing, value): + _root, media, manifests, _current = landing + manifest = manifests['manifest.json'] + manifest['source_cad_unchanged'] = value + save(media, 'manifest.json', manifest) + assert checker.main() == 1 + + +def test_proof_manifest_has_no_capture_only_requirements(landing): + _root, _media, manifests, _current = landing + assert set(manifests['proof-manifest.json']) == {'schema_version', 'outputs'} + assert checker.main() == 0 + + +@pytest.mark.parametrize('value', [{}, [], None, {'board.kicad_sch': 'not-a-sha'}]) +def test_capture_requires_a_valid_nonempty_input_map(landing, value): + _root, media, manifests, _current = landing + manifests['manifest.json']['source_inputs'] = value + save(media, 'manifest.json', manifests['manifest.json']) + assert checker.main() == 1 + + +def test_changed_current_hash_cannot_be_hidden_by_intact_output_media(landing, capsys): + _root, _media, _manifests, current = landing + current['board.kicad_sch'] = sha(b'new circuit') + assert checker.main() == 1 + assert 'current project input hashes differ' in capsys.readouterr().out + + +@pytest.mark.parametrize('change', ['added', 'removed']) +def test_current_keyset_detects_added_or_removed_declared_inputs(landing, change, capsys): + _root, _media, _manifests, current = landing + if change == 'added': + current['libs/new-symbol.kicad_sym'] = sha(b'new library') + else: + del current['review-signoff.yaml'] + assert checker.main() == 1 + assert 'current project input keys differ' in capsys.readouterr().out + + +def test_explicit_canonical_blob_hashes_allow_a_fresh_lf_checkout(landing): + _root, media, manifests, current = landing + for name in checker.CAD_MANIFESTS: + canonical = manifests[name]['source_inputs'].copy() + canonical['board.kicad_sch'] = sha(b'current CAD\n') + manifests[name]['source_repository_inputs'] = canonical + save(media, name, manifests[name]) + current['board.kicad_sch'] = sha(b'current CAD\n') + assert checker.main() == 0 + + +def test_no_implicit_newline_normalization_or_fallback_to_unrecorded_bytes(landing): + _root, media, manifests, current = landing + for name in checker.CAD_MANIFESTS: + manifests[name]['source_repository_inputs'] = manifests[name]['source_inputs'].copy() + manifests[name]['source_repository_inputs']['board.kicad_sch'] = sha(b'current CAD\n') + save(media, name, manifests[name]) + current['board.kicad_sch'] = sha(b'current CAD\n\n') + assert checker.main() == 1 + + +@pytest.mark.parametrize('fault', ['extra_key', 'missing_key', 'bad_hash', 'changed_null', 'empty']) +def test_optional_repository_map_must_match_schema_keys_and_nulls(landing, fault): + _root, media, manifests, _current = landing + manifest = manifests['manifest.json'] + canonical = manifest['source_inputs'].copy() + if fault == 'extra_key': canonical['extra'] = sha(b'extra') + if fault == 'missing_key': del canonical['review-signoff.yaml'] + if fault == 'bad_hash': canonical['board.kicad_sch'] = 'bad' + if fault == 'changed_null': canonical['review-signoff.yaml'] = sha(b'unsigned') + if fault == 'empty': canonical = {} + manifest['source_repository_inputs'] = canonical + save(media, 'manifest.json', manifest) + assert checker.main() == 1 + + +@pytest.mark.parametrize('name', ['../outside.bin', '/absolute.bin', 'C:/outside.bin', + 'C:outside.bin', '..\\outside.bin', './capture-0.bin', + 'nested//capture.bin', '.', '']) +def test_manifest_output_names_are_canonical_and_contained_on_all_hosts(landing, name): + _root, media, manifests, _current = landing + manifest = manifests['manifest.json'] + record = next(iter(manifest['outputs'].values())) + manifest['outputs'] = {name: record} + save(media, 'manifest.json', manifest) + assert checker.main() == 1 + + +@pytest.mark.parametrize('field,value', [('sha256', 'bad'), ('sha256', 'F' * 64), + ('bytes', True), ('bytes', -1), ('bytes', 0), + ('bytes', 1.5), ('bytes', '17')]) +def test_media_records_need_sha256_and_a_positive_integer_byte_count(landing, field, value): + _root, media, manifests, _current = landing + manifest = manifests['proof-manifest.json'] + next(iter(manifest['outputs'].values()))[field] = value + save(media, 'proof-manifest.json', manifest) + assert checker.main() == 1 + + +@pytest.mark.parametrize('fault', ['missing_file', 'wrong_hash', 'wrong_byte_count', 'empty_outputs']) +def test_media_byte_and_hash_claims_are_both_enforced(landing, fault): + _root, media, manifests, _current = landing + manifest = manifests['proof-manifest.json'] + name, record = next(iter(manifest['outputs'].items())) + if fault == 'missing_file': (media / name).unlink() + if fault == 'wrong_hash': record['sha256'] = sha(b'other content') + if fault == 'wrong_byte_count': record['bytes'] += 1 + if fault == 'empty_outputs': manifest['outputs'] = {} + save(media, 'proof-manifest.json', manifest) + assert checker.main() == 1 + + +def test_duplicate_json_keys_are_rejected(landing, capsys): + _root, media, manifests, _current = landing + text = json.dumps(manifests['manifest.json']) + text = text.replace('"schema_version": 1', '"schema_version": 1, "schema_version": 1') + (media / 'manifest.json').write_text(text) + assert checker.main() == 1 + assert 'duplicate manifest key' in capsys.readouterr().out + + +def test_evaluation_links_are_checked(landing, capsys): + root, _media, _manifests, _current = landing + (root / 'docs/EVALUATION.md').write_text('# Evaluation\n\n[missing](does-not-exist.md)\n') + assert checker.main() == 1 + assert 'docs/EVALUATION.md: missing local target' in capsys.readouterr().out + + +def test_a_missing_required_document_is_an_actionable_failure(landing, capsys): + root, _media, _manifests, _current = landing + (root / 'docs/EVALUATION.md').unlink() + assert checker.main() == 1 + assert 'docs/EVALUATION.md: cannot read required document' in capsys.readouterr().out + + +def test_media_symlink_cannot_escape_the_media_directory(landing, tmp_path): + _root, media, manifests, _current = landing + outside = tmp_path / 'outside.bin' + outside.write_bytes(b'outside media') + alias = media / 'alias.bin' + try: + alias.symlink_to(outside) + except OSError: + pytest.skip('symlinks unavailable on this host') + manifests['proof-manifest.json']['outputs'] = {'alias.bin': {'sha256': sha(outside.read_bytes()), 'bytes': outside.stat().st_size}} + save(media, 'proof-manifest.json', manifests['proof-manifest.json']) + assert checker.main() == 1 + + +def test_manifest_alias_cannot_bypass_named_capture_requirements(landing): + _root, media, manifests, _current = landing + alternate = media / 'noncapture.json' + alternate.write_text(json.dumps(manifests['proof-manifest.json'])) + manifest = media / 'manifest.json' + manifest.unlink() + try: + manifest.symlink_to(alternate) + except OSError: + pytest.skip('symlinks unavailable on this host') + assert checker.main() == 1 + + +@pytest.mark.parametrize('source', ['tests/fixtures/boards/frozen', '../outside', '/outside']) +def test_capture_sources_cannot_be_fixtures_or_outside_the_checkout(landing, source): + _root, media, manifests, _current = landing + manifest = copy.deepcopy(manifests['manifest.json']) + manifest['source_project'] = source + save(media, 'manifest.json', manifest) + assert checker.main() == 1 + + +def test_evaluation_manifest_is_required_independently_of_all_three_media_bundles(landing, capsys): + root, _media, _manifests, _current = landing + (root / checker.EVALUATION_MANIFESTS[0]).unlink() + assert checker.main() == 1 + assert checker.EVALUATION_MANIFESTS[0] in capsys.readouterr().out + + +@pytest.mark.parametrize('name', ['report.md', 'logs/run.stdout.txt', 'evaluation.png']) +def test_evaluation_artifact_bytes_are_checked_in_their_own_bundle_root(landing, name, capsys): + root, _media, _manifests, _current = landing + bundle = root / Path(checker.EVALUATION_MANIFESTS[0]).parent + path = bundle / name + path.write_bytes(path.read_bytes() + b'changed') + assert checker.main() == 1 + assert name in capsys.readouterr().out + + +def test_evaluation_report_links_are_checked(landing, capsys): + root, _media, _manifests, _current = landing + bundle = root / Path(checker.EVALUATION_MANIFESTS[0]).parent + (bundle / 'report.md').write_text('# Report\n\n[raw log](logs/missing.txt)\n') + assert checker.main() == 1 + assert 'report.md: missing local target' in capsys.readouterr().out + + +def test_unlisted_evaluation_image_or_log_cannot_bypass_integrity_checking(landing, capsys): + root, _media, _manifests, _current = landing + bundle = root / Path(checker.EVALUATION_MANIFESTS[0]).parent + (bundle / 'unlisted-image.png').write_bytes(b'not hash bound') + assert checker.main() == 1 + assert 'complete manifest output list' in capsys.readouterr().out + + +def test_empty_raw_evaluation_stream_is_valid_when_exact_empty_bytes_are_recorded(landing): + root, _media, _manifests, _current = landing + path = root / checker.EVALUATION_MANIFESTS[0] + manifest = json.loads(path.read_text()) + log = path.parent / 'logs/run.stdout.txt' + log.write_bytes(b'') + manifest['outputs']['logs/run.stdout.txt'] = {'sha256': sha(b''), 'bytes': 0} + path.write_text(json.dumps(manifest)) + assert checker.main() == 0 diff --git a/tests/test_demo.py b/tests/test_demo.py index 26ef7d1..6537e31 100644 --- a/tests/test_demo.py +++ b/tests/test_demo.py @@ -10,18 +10,19 @@ from tools import demo -def minimal_source(repository: Path): - root = repository / "projects" / "rover-pdb" +def minimal_source(repository: Path, project_path: Path = demo.DEFAULT_PROJECT): + root = repository / project_path root.mkdir(parents=True) + name = root.name (root / "project.yaml").write_text( - "schema_version: 1\nname: rover-pdb\nlifecycle: DRAFT\n" - "design:\n schematic: rover-pdb.kicad_sch\n pcb: rover-pdb.kicad_pcb\n" + f"schema_version: 1\nname: {name}\nlifecycle: DRAFT\n" + f"design:\n schematic: {name}.kicad_sch\n pcb: {name}.kicad_pcb\n" " netmap: netmap.json\nevidence:\n index: evidence/index.yaml\n" "manufacturing:\n profile: jlcpcb_2layer_default\n", encoding="utf-8", ) # Parser envelope only; no generated demo circuit or retired board fixture. - (root / "rover-pdb.kicad_sch").write_text("(kicad_sch (version 20250114))", encoding="utf-8") - (root / "rover-pdb.kicad_pcb").write_bytes(b"owner PCB bytes") + (root / f"{name}.kicad_sch").write_text("(kicad_sch (version 20250114))", encoding="utf-8") + (root / f"{name}.kicad_pcb").write_bytes(b"owner PCB bytes") (root / "evidence").mkdir() (root / "evidence/index.yaml").write_text("schema_version: 1\nrecords: []\n", encoding="utf-8") return load_project(root) @@ -74,7 +75,12 @@ def fake_commands(output, name, arguments, **kwargs): logs.mkdir(exist_ok=True) stdout = logs / f"{name}.stdout.txt" stderr = logs / f"{name}.stderr.txt" - stdout.write_text(json.dumps({"blocking": True, "results": []}) if name == "review" else "actual output", encoding="utf-8") + review = {'project': Path(arguments[1]).name, 'blocking': True, + 'results': [{'check_id': 'signoff', 'passed': False}]} + content = (json.dumps(review) if name == 'review' else + '3 evidence record(s) verified\nMACHINE FAILURES: none\n' if name == 'evidence' + else 'actual output') + stdout.write_text(content, encoding="utf-8") stderr.write_text(demo.GUARD_MESSAGE if name == "missing-preview" else "", encoding="utf-8") return {"name": name, "command": ["pcb-copilot", *arguments], "exit_code": 2 if name == "missing-preview" else int(name == "review"), @@ -118,3 +124,152 @@ def concurrent_edit(*args, **kwargs): assert not result["source_inputs_unchanged"] assert not result["source_cad_unchanged"] assert project.pcb_path.read_bytes() == b"concurrent owner save" + + +def test_default_quick_demo_selects_small_example_without_requiring_kicad(tmp_path, monkeypatch): + repository = tmp_path / 'repo' + project = minimal_source(repository) + output = tmp_path / 'run' + output.mkdir() + monkeypatch.setattr(demo, 'run_command', fake_commands) + monkeypatch.setattr('pcb_copilot.toolchain.discover_toolchain', + lambda *_args: pytest.fail('quick mode must not require native discovery')) + result = demo.execute_demo(repository, output, full=False) + assert result['exit_code'] == 0 + assert result['source_project'] == 'examples/gpio-indicator' + assert result['snapshot_project'] == 'workspace/gpio-indicator' + assert result['source_inputs_unchanged'] and result['snapshot_inputs_unchanged'] + report = (output / 'report.md').read_text() + assert '[workspace](workspace/gpio-indicator/)' in report + assert 'workspace/rover-pdb' not in report + assert 'were **not run**' in report + assert project.pcb_path.read_bytes() == b'owner PCB bytes' + + +def test_explicit_rover_project_keeps_its_own_report_paths(tmp_path, monkeypatch): + repository = tmp_path / 'repo' + project = minimal_source(repository, Path('projects/rover-pdb')) + output = tmp_path / 'run' + output.mkdir() + monkeypatch.setattr(demo, 'run_command', fake_commands) + result = demo.execute_demo(repository, output, full=False, project_path=Path('projects/rover-pdb')) + assert result['exit_code'] == 0 + assert result['source_project'] == 'projects/rover-pdb' + assert result['snapshot_project'] == 'workspace/rover-pdb' + assert '[workspace](workspace/rover-pdb/)' in (output / 'report.md').read_text() + assert project.pcb_path.read_bytes() == b'owner PCB bytes' + + +@pytest.mark.parametrize('requested', ['tests/fixtures/boards/tms-v3', + 'examples/../tests/fixtures/boards/tms-v3', + '../outside', '.', 'templates/project']) +def test_project_selection_rejects_fixtures_and_non_project_roots(tmp_path, requested): + repository = tmp_path / 'repo' + repository.mkdir() + with pytest.raises(ValueError, match='examples/ or projects/'): + demo.select_project(repository, Path(requested)) + assert list(repository.iterdir()) == [] + + +def test_fixture_alias_cannot_bypass_resolved_project_selection(tmp_path): + repository = tmp_path / 'repo' + fixture = repository / 'tests/fixtures/boards/frozen' + fixture.mkdir(parents=True) + examples = repository / 'examples' + examples.mkdir() + alias = examples / 'alias' + try: + alias.symlink_to(fixture, target_is_directory=True) + except OSError: + pytest.skip('directory symlinks unavailable on this host') + with pytest.raises(ValueError, match='frozen fixtures'): + demo.select_project(repository, Path('examples/alias')) + + +def test_invalid_cli_project_does_not_create_an_output_directory(tmp_path, monkeypatch, capsys): + repository = tmp_path / 'repo' + repository.mkdir() + monkeypatch.setattr(demo, '__file__', str(repository / 'tools/demo.py')) + output = tmp_path / 'must-not-be-created' + assert demo.main(['--project', 'tests/fixtures/boards/frozen', '--output', str(output)]) == 2 + assert not output.exists() + assert 'frozen fixtures' in capsys.readouterr().err + + +@pytest.mark.parametrize('crash_code', [1, 2, 7]) +def test_evidence_process_failure_is_not_misreported_as_archive_blocker(tmp_path, monkeypatch, crash_code): + repository = tmp_path / 'repo' + minimal_source(repository) + output = tmp_path / 'run' + output.mkdir() + + def failed_evidence(output, name, arguments, **kwargs): + result = fake_commands(output, name, arguments, **kwargs) + if name == 'evidence': + result['exit_code'] = crash_code + (output / result['stdout']).write_text('') + (output / result['stderr']).write_text('dependency or runtime failure') + return result + + monkeypatch.setattr(demo, 'run_command', failed_evidence) + result = demo.execute_demo(repository, output, full=False) + assert result['exit_code'] == 2 + assert 'did not complete' in result['error'] + assert len(result['steps']) == 2 + assert result['source_inputs_unchanged'] and result['snapshot_inputs_unchanged'] + + +def test_archive_blockers_keep_exit_one_and_exact_logs(tmp_path, monkeypatch): + repository = tmp_path / 'repo' + minimal_source(repository) + output = tmp_path / 'run' + output.mkdir() + + def blocked_evidence(output, name, arguments, **kwargs): + result = fake_commands(output, name, arguments, **kwargs) + if name == 'evidence': + result['exit_code'] = 1 + (output / result['stdout']).write_text('0 evidence record(s) verified\nMACHINE FAILURES:\n- hash mismatch\n') + return result + + monkeypatch.setattr(demo, 'run_command', blocked_evidence) + result = demo.execute_demo(repository, output, full=False) + assert result['exit_code'] == 1 + assert result['steps'][1]['interpretation'] == 'archive verification reported blockers' + assert 'hash mismatch' in demo.step_output(output, result['steps'][1], 'stdout') + + +@pytest.mark.parametrize('report,code', [ + ({'project': 'other', 'blocking': False, 'results': [{'check_id': 'erc', 'passed': True}]}, 0), + ({'project': 'gpio-indicator', 'blocking': False, 'results': []}, 0), + ({'project': 'gpio-indicator', 'blocking': False, 'results': [{'check_id': 'erc', 'passed': False}]}, 0), + ({'project': 'gpio-indicator', 'blocking': True, 'results': [{'check_id': 'erc', 'passed': True}]}, 1), + ({'project': 'gpio-indicator', 'blocking': True, 'results': [{'check_id': 'erc', 'passed': False}]}, 0), + ({'project': 'gpio-indicator', 'blocking': False, 'results': [ + {'check_id': 'erc', 'passed': True}, {'check_id': 'erc', 'passed': True}]}, 0), + ({'project': 'gpio-indicator', 'blocking': False, 'results': [{'check_id': 'erc', 'passed': True}], + 'findings': [{'blocking': 'true'}]}, 0), +]) +def test_incomplete_or_contradictory_native_results_are_rejected(report, code): + with pytest.raises(ValueError): + demo.review_document(json.dumps(report), 'gpio-indicator', code) + + +def test_source_change_between_initial_capture_and_snapshot_is_detected(tmp_path, monkeypatch): + repository = tmp_path / 'repo' + project = minimal_source(repository) + output = tmp_path / 'run' + output.mkdir() + real_snapshot = demo.snapshot_project + + def changed_before_copy(project, output): + project.pcb_path.write_bytes(b'new owner save before copy') + return real_snapshot(project, output) + + monkeypatch.setattr(demo, 'snapshot_project', changed_before_copy) + monkeypatch.setattr(demo, 'run_command', lambda *_args, **_kwargs: pytest.fail('commands must not run')) + result = demo.execute_demo(repository, output, full=False) + assert result['exit_code'] == 2 + assert not result['source_inputs_unchanged'] + assert not result['source_cad_unchanged'] + assert project.pcb_path.read_bytes() == b'new owner save before copy' diff --git a/tests/test_demo_change.py b/tests/test_demo_change.py index 10430ea..cd2d989 100644 --- a/tests/test_demo_change.py +++ b/tests/test_demo_change.py @@ -15,6 +15,26 @@ from tools import demo_change as change +@pytest.mark.parametrize('selection', ['tests/fixtures/boards/frozen-board', '../external-board']) +def test_cli_rejects_fixtures_and_external_projects_before_creating_output(tmp_path, monkeypatch, capsys, selection): + repository = tmp_path / 'repo' + repository.mkdir() + monkeypatch.setattr(change, '__file__', str(repository / 'tools/demo_change.py')) + output = tmp_path / 'external-output' + assert change.main(['--project', selection, '--output', str(output)]) == 2 + assert not output.exists() + error = capsys.readouterr().err + assert ('inside this checkout' if selection.startswith('..') else 'frozen fixtures') in error + + +def test_prepare_rejects_fixture_source_before_creating_any_snapshot(tmp_path): + repository = tmp_path / 'repo' + repository.mkdir() + with pytest.raises(ValueError, match='frozen fixtures'): + change.prepare(repository, repository / 'tests/fixtures/boards/frozen-board', tmp_path / 'output') + assert not (tmp_path / 'output').exists() + + def source_project(repository): source = repository / 'examples' / 'gpio-indicator' source.mkdir(parents=True) diff --git a/tests/test_evaluate.py b/tests/test_evaluate.py new file mode 100644 index 0000000..2bb452f --- /dev/null +++ b/tests/test_evaluate.py @@ -0,0 +1,102 @@ +import json + +import pytest + +from pcb_copilot.evidence.commands import verify_evidence +from pcb_copilot.layout.footprints import resolve_footprint +from pcb_copilot.project import load_project +from pcb_copilot.transaction import input_hashes +from tools import evaluate + + +def source_project(repo_root): + return load_project(repo_root / 'examples/gpio-indicator') + + +def test_evaluation_output_is_new_and_external(tmp_path): + repository = tmp_path / 'repository' + repository.mkdir() + with pytest.raises(ValueError, match='outside'): + evaluate.new_output_directory(repository / 'evaluation', repository) + existing = tmp_path / 'owner-files' + existing.mkdir() + (existing / 'notes.txt').write_bytes(b'owner work') + with pytest.raises(FileExistsError): + evaluate.new_output_directory(existing, repository) + assert (existing / 'notes.txt').read_bytes() == b'owner work' + + +def test_snapshot_is_exact_and_omits_generated_outputs(repo_root, tmp_path): + source = source_project(repo_root) + expected = input_hashes(source) + snapshot = evaluate.snapshot_project(source, tmp_path, 'control', expected) + assert input_hashes(snapshot) == expected == input_hashes(source) + assert not (snapshot.root / 'output').exists() + assert not (snapshot.root / '.pcb-copilot').exists() + with pytest.raises(ValueError, match='outside the source'): + evaluate.snapshot_project(source, source.root / 'evaluation', 'unsafe', expected) + + +def test_direct_entrypoint_rejects_repository_output_before_any_write(repo_root): + with pytest.raises(ValueError, match='outside'): + evaluate.evaluate(repo_root, repo_root) + + +@pytest.mark.parametrize(('fault', 'message'), [ + ('footprint-geometry', 'beyond allowed model URI replacements'), + ('model-corruption', 'hash mismatch'), + ('selected-mpn', 'does not match the exact selected native MPN'), +]) +def test_fault_injectors_reach_the_declared_validator_boundary(repo_root, tmp_path, fault, message): + source = source_project(repo_root) + expected = input_hashes(source) + snapshot = evaluate.snapshot_project(source, tmp_path, fault, expected) + _, _, selected = evaluate._targets(snapshot) + assert resolve_footprint(snapshot, *selected).fidelity == 'real' + injection = evaluate.inject_fault(snapshot, fault) + assert injection['kind'] == fault + after_injection = input_hashes(snapshot) + assert after_injection != expected + with pytest.raises(ValueError, match=message): + resolve_footprint(snapshot, *selected) + assert input_hashes(snapshot) == after_injection + assert input_hashes(source) == expected + + +def test_evidence_injector_causes_real_archive_hash_failure(repo_root, tmp_path): + source = source_project(repo_root) + expected = input_hashes(source) + snapshot = evaluate.snapshot_project(source, tmp_path, 'evidence', expected) + assert verify_evidence(snapshot).exit_code == 0 + evaluate.inject_fault(snapshot, 'evidence-corruption') + result = verify_evidence(snapshot) + assert result.exit_code == 1 + assert any('archive.hash_mismatch' in item for item in result.machine_failures) + assert input_hashes(source) == expected + + +@pytest.mark.parametrize(('interface', 'code', 'stdout', 'stderr', 'error', 'expected'), [ + ('cli', 2, '', evaluate.GUARD_MESSAGE, None, 'met_expectation'), + ('cli', 2, '', 'a different argparse failure', None, 'mismatch'), + ('cli', 0, '', evaluate.GUARD_MESSAGE, None, 'mismatch'), + ('cli', None, '', '', 'timed out', 'harness_error'), + ('validator-api', 1, 'Traceback only', '', None, 'harness_error'), + ('validator-api', 1, json.dumps({'accepted': True}), '', None, 'mismatch'), +]) +def test_unrelated_errors_and_acceptance_are_not_counted_as_expected_rejections( + interface, code, stdout, stderr, error, expected, +): + actual = {'interface': interface, 'exit_code': code, 'error': error} + assert evaluate.classify_result(actual, stdout, stderr, 2, evaluate.GUARD_MESSAGE) == expected + + +def test_missing_preview_case_uses_real_cli_and_preserves_source(repo_root, tmp_path): + source = source_project(repo_root) + expected = input_hashes(source) + case, snapshot = evaluate._case(source, tmp_path, 'missing-preview', expected, + interface='cli', expected_code=2, + diagnostic=evaluate.GUARD_MESSAGE) + assert case['outcome'] == 'met_expectation' + assert case['actual']['exit_code'] == 2 + assert case['checks_preserved_inputs'] + assert input_hashes(source) == expected == input_hashes(snapshot) diff --git a/tests/test_media_evidence.py b/tests/test_media_evidence.py new file mode 100644 index 0000000..5bd17e9 --- /dev/null +++ b/tests/test_media_evidence.py @@ -0,0 +1,264 @@ +"""Synthetic CLI packets exercise media claims without image or native tools.""" + +import copy +import hashlib +import json +import subprocess +from types import SimpleNamespace + +import pytest + +from tools import media_evidence + + +def sha(payload): + return hashlib.sha256(payload).hexdigest() + + +def packet(tmp_path): + root = tmp_path / 'capture' + logs = root / 'logs' + logs.mkdir(parents=True) + snapshot = 'workspace/rover-pdb' + commands = [ + ['pcb-copilot', 'status', snapshot], + ['pcb-copilot', 'research', snapshot, '--verify'], + ['pcb-copilot', 'update-schematic', snapshot, '--candidate', + snapshot + '/rover-pdb.kicad_sch', '--apply'], + ['pcb-copilot', 'review', snapshot, '--format', 'json'], + ] + review = { + 'schema_version': 1, 'project': 'rover-pdb', 'schematic_hash': 'f' * 64, + 'pcb_hash': 'b' * 64, 'blocking': True, + 'results': [{'check_id': name, 'passed': name != 'signoff', 'detail': 'synthetic scoped result'} + for name in ('research', 'datasheets', 'erc', 'schematic_ownership', 'netlist_parity', + 'placement', 'design_rules', 'drc', 'jlcpcb_dfm', 'assembly_contracts', + 'routing_settings', 'routing_topology', 'schematic_quality', 'signoff')], + 'findings': [{'check_id': 'signoff', 'kind': 'human_decision', 'blocking': True, + 'detail': 'Synthetic review remains unsigned.'}], + } + evidence = ('1 evidence record(s) verified\n\nMACHINE FAILURES: none\n\n' + 'EXTRACTED FACTS: none\n\nREVIEW REQUIRED:\n- Archive identity is not circuit correctness.\n\n' + 'CONFLICTS: none\n\nPROPOSED DESIGN_BASIS ROWS: none\n') + output = {'status': 'Project: rover-pdb\nLifecycle: DRAFT\n', + 'evidence': evidence, 'missing-preview': '', 'review': json.dumps(review)} + steps = [] + for name, command, code in zip(('status', 'evidence', 'missing-preview', 'review'), + commands, (0, 0, 2, 1), strict=True): + (logs / f'{name}.stdout.txt').write_text(output[name], encoding='utf-8') + (logs / f'{name}.stderr.txt').write_text( + 'pcb-copilot: error: ' + media_evidence.GUARD + '; run preview again\n' + if name == 'missing-preview' else '', encoding='utf-8') + steps.append({'name': name, 'command': command, 'exit_code': code, 'error': None, + 'stdout': f'logs/{name}.stdout.txt', 'stderr': f'logs/{name}.stderr.txt'}) + inputs = {'rover-pdb.kicad_sch': 'a' * 64, 'rover-pdb.kicad_pcb': 'b' * 64, + 'rover-pdb.kicad_dru': None, 'evidence/index.yaml': 'c' * 64} + cad = {key: value for key, value in inputs.items() if key.endswith(('.kicad_sch', '.kicad_pcb', '.kicad_dru'))} + document = {'schema_version': 1, 'started_utc': '2026-10-29T00:00:00+00:00', + 'mode': 'full', 'source_project': 'projects/rover-pdb', 'error': None, + 'source_inputs_unchanged': True, 'source_cad_unchanged': True, + 'snapshot_inputs_unchanged': True, 'source_inputs_before': inputs, + 'source_inputs_after': dict(inputs), 'source_cad_before': cad, + 'source_cad_after': dict(cad), 'steps': steps, 'review': review, 'exit_code': 1} + path = root / 'transcript.json' + save(path, document) + return path, document + + +def save(path, document): + path.write_text(json.dumps(document), encoding='utf-8') + + +def write_review(path, document, review): + (path.parent / document['steps'][3]['stdout']).write_text(json.dumps(review), encoding='utf-8') + document['review'] = copy.deepcopy(review) + save(path, document) + + +def test_valid_packet_retains_raw_log_hashes_and_blocked_results(tmp_path): + path, document = packet(tmp_path) + result = media_evidence.demo_data(path) + assert result['demo_exit_code'] == 1 + assert result['review']['blocking'] is True + assert sum(item['passed'] for item in result['review']['results']) == 13 + for record, original in zip(result['steps'], document['steps'], strict=True): + for stream in ('stdout', 'stderr'): + assert record[stream + '_sha256'] == sha((path.parent / original[stream]).read_bytes()) + + +def test_forged_cached_pass_cannot_replace_blocked_raw_review(tmp_path): + path, document = packet(tmp_path) + document['review']['blocking'] = False + document['review']['findings'] = [] + for result in document['review']['results']: + result['passed'] = True + save(path, document) + with pytest.raises(ValueError, match='cached review'): + media_evidence.demo_data(path) + + +@pytest.mark.parametrize('fault', ['blocking_flag', 'blocked_exit', 'blocking_finding', + 'string_blocker', 'duplicate_check', 'empty_results']) +def test_raw_review_inconsistencies_are_rejected_even_when_cache_matches(tmp_path, fault): + path, document = packet(tmp_path) + review = document['review'] + if fault == 'blocking_flag': review['blocking'] = False + if fault == 'blocked_exit': document['steps'][3]['exit_code'] = document['exit_code'] = 0 + if fault in {'blocking_finding', 'string_blocker'}: + for result in review['results']: + result['passed'] = True + review['blocking'] = False + document['steps'][3]['exit_code'] = document['exit_code'] = 0 + if fault == 'string_blocker': review['findings'][0]['blocking'] = 'true' + if fault == 'duplicate_check': review['results'].append(copy.deepcopy(review['results'][0])) + if fault == 'empty_results': review['results'] = [] + write_review(path, document, review) + with pytest.raises(ValueError): + media_evidence.demo_data(path) + + +@pytest.mark.parametrize('name', ['../outside.txt', '/outside.txt', 'C:/outside.txt', + 'logs/../../outside.txt', 'logs\\status.stdout.txt', '']) +def test_log_paths_cannot_escape_or_use_ambiguous_platform_syntax(tmp_path, name): + path, document = packet(tmp_path) + document['steps'][0]['stdout'] = name + save(path, document) + with pytest.raises(ValueError, match='relative path'): + media_evidence.demo_data(path) + + +@pytest.mark.parametrize('directory_link', [False, True]) +def test_log_file_and_directory_symlinks_are_rejected(tmp_path, directory_link): + path, document = packet(tmp_path) + if directory_link: + outside = tmp_path / 'outside' + outside.mkdir() + target = path.parent / 'linked-logs' + document['steps'][0]['stdout'] = 'linked-logs/status.stdout.txt' + (outside / 'status.stdout.txt').write_text('Project: rover-pdb', encoding='utf-8') + else: + outside = tmp_path / 'outside.txt' + outside.write_text('Project: rover-pdb', encoding='utf-8') + target = path.parent / document['steps'][0]['stdout'] + target.unlink() + try: + target.symlink_to(outside, target_is_directory=directory_link) + except OSError: + pytest.skip('symlink creation is unavailable on this host') + save(path, document) + with pytest.raises(ValueError, match='symlink'): + media_evidence.demo_data(path) + + +@pytest.mark.parametrize('fault', ['quick', 'error', 'source', 'incomplete_steps', 'duplicate_steps', + 'reordered_steps', 'missing_stream', 'top_level_list']) +def test_only_a_completed_full_rover_packet_is_accepted(tmp_path, fault): + path, document = packet(tmp_path) + if fault == 'quick': document['mode'] = 'quick' + if fault == 'error': document['error'] = 'command timed out' + if fault == 'source': document['source_project'] = 'examples/other' + if fault == 'incomplete_steps': document['steps'].pop() + if fault == 'duplicate_steps': document['steps'][3] = copy.deepcopy(document['steps'][0]) + if fault == 'reordered_steps': document['steps'].reverse() + if fault == 'missing_stream': del document['steps'][0]['stdout'] + if fault == 'top_level_list': document = [] + save(path, document) + with pytest.raises(ValueError): + media_evidence.demo_data(path) + + +@pytest.mark.parametrize('flag', ['source_inputs_unchanged', 'source_cad_unchanged', 'snapshot_inputs_unchanged']) +@pytest.mark.parametrize('value', [False, None, 'true']) +def test_preservation_flags_must_be_actual_true(tmp_path, flag, value): + path, document = packet(tmp_path) + document[flag] = value + save(path, document) + with pytest.raises(ValueError, match='unchanged'): + media_evidence.demo_data(path) + + +@pytest.mark.parametrize('fault', ['input_after', 'bad_digest', 'missing_hashes', 'cad_before', 'cad_after']) +def test_input_and_cad_hash_maps_must_agree(tmp_path, fault): + path, document = packet(tmp_path) + if fault == 'input_after': document['source_inputs_after']['evidence/index.yaml'] = 'd' * 64 + if fault == 'bad_digest': document['source_inputs_before']['evidence/index.yaml'] = document['source_inputs_after']['evidence/index.yaml'] = 'bad' + if fault == 'missing_hashes': document['source_inputs_before'] = document['source_inputs_after'] = {} + if fault == 'cad_before': document['source_cad_before']['rover-pdb.kicad_pcb'] = 'd' * 64 + if fault == 'cad_after': document['source_cad_after'].pop('rover-pdb.kicad_sch') + save(path, document) + with pytest.raises(ValueError, match='hash maps'): + media_evidence.demo_data(path) + + +@pytest.mark.parametrize('fault', ['command', 'execution_error', 'evidence_exit', 'status_exit', 'missing_guard', + 'guard_exit', 'demo_exit', 'bool_exit', 'missing_header', 'bad_headline', + 'nonempty_failures', 'hidden_failure_body', 'conflicts', 'duplicate_header']) +def test_commands_and_log_diagnostics_cannot_hide_failed_checks(tmp_path, fault): + path, document = packet(tmp_path) + evidence_path = path.parent / document['steps'][1]['stdout'] + evidence = evidence_path.read_text(encoding='utf-8') + if fault == 'command': document['steps'][1]['command'][-1] = '--verify-schematic-parts' + if fault == 'execution_error': document['steps'][1]['error'] = 'subprocess failed' + if fault == 'evidence_exit': document['steps'][1]['exit_code'] = 1 + if fault == 'status_exit': document['steps'][0]['exit_code'] = 1 + if fault == 'missing_guard': (path.parent / document['steps'][2]['stderr']).write_text('unrelated argparse error', encoding='utf-8') + if fault == 'guard_exit': document['steps'][2]['exit_code'] = 1 + if fault == 'demo_exit': document['exit_code'] = 0 + if fault == 'bool_exit': document['steps'][0]['exit_code'] = False + if fault == 'missing_header': evidence = evidence.replace('MACHINE FAILURES: none', '') + if fault == 'bad_headline': evidence = evidence.replace('1 evidence record(s) verified', 'verification aborted') + if fault == 'nonempty_failures': evidence = evidence.replace('MACHINE FAILURES: none', 'MACHINE FAILURES:\n- archive.hash_mismatch') + if fault == 'hidden_failure_body': evidence = evidence.replace('MACHINE FAILURES: none', 'MACHINE FAILURES: none\n- archive.hash_mismatch') + if fault == 'conflicts': evidence = evidence.replace('CONFLICTS: none', 'CONFLICTS:\n- inconsistent source') + if fault == 'duplicate_header': evidence += '\nMACHINE FAILURES: none\n' + evidence_path.write_text(evidence, encoding='utf-8') + save(path, document) + with pytest.raises(ValueError): + media_evidence.demo_data(path) + + +def repository_packet(tmp_path, monkeypatch, *, blob=b'line\n'): + repository = tmp_path / 'repository' + source = repository / 'projects/rover-pdb' + source.mkdir(parents=True) + path = source / 'rover-pdb.kicad_sch' + path.write_bytes(b'line\r\n') + expected = {path.name: sha(path.read_bytes()), 'absent.kicad_dru': None} + monkeypatch.setattr(media_evidence.subprocess, 'check_output', lambda *args, **kwargs: b'a' * 40 + b'\n') + + def git_show(command, **kwargs): + return SimpleNamespace(returncode=1 if command[-1].endswith('absent.kicad_dru') else 0, stdout=blob) + + monkeypatch.setattr(media_evidence.subprocess, 'run', git_show) + return repository, source, path, expected + + +def test_optional_repository_binding_preserves_capture_hashes_and_records_exact_head_blobs(tmp_path, monkeypatch): + repository, source, path, expected = repository_packet(tmp_path, monkeypatch) + captured = dict(expected) + result = media_evidence.repository_binding(repository, source, expected) + assert result == {'source_repository_revision': 'a' * 40, + 'source_repository_inputs': {path.name: sha(b'line\n'), 'absent.kicad_dru': None}} + assert expected == captured and path.read_bytes() == b'line\r\n' + + +@pytest.mark.parametrize('fault', ['different_content', 'unavailable_git', 'timeout', 'unexpected_blob']) +def test_optional_repository_binding_is_omitted_without_exact_head_equivalence(tmp_path, monkeypatch, fault): + repository, source, _, expected = repository_packet(tmp_path, monkeypatch, + blob=b'different\n' if fault == 'different_content' else b'line\n') + if fault in {'unavailable_git', 'timeout'}: + def failed_probe(*args, **kwargs): + if fault == 'timeout': + raise subprocess.TimeoutExpired('git', 15) + raise FileNotFoundError('git unavailable') + monkeypatch.setattr(media_evidence.subprocess, 'check_output', failed_probe) + if fault == 'unexpected_blob': + monkeypatch.setattr(media_evidence.subprocess, 'run', lambda *args, **kwargs: SimpleNamespace(returncode=0, stdout=b'line\n')) + assert media_evidence.repository_binding(repository, source, expected) == {} + + +def test_repository_binding_rejects_source_changed_after_capture(tmp_path, monkeypatch): + repository, source, path, expected = repository_packet(tmp_path, monkeypatch) + path.write_bytes(b'new owner save\n') + with pytest.raises(ValueError, match='source changed'): + media_evidence.repository_binding(repository, source, expected) diff --git a/tests/test_media_publication.py b/tests/test_media_publication.py new file mode 100644 index 0000000..db16690 --- /dev/null +++ b/tests/test_media_publication.py @@ -0,0 +1,283 @@ +"""Transactional media publication without importing any rendering libraries.""" + +import hashlib +import json +import os + +import pytest + +from tools import media_publication as media + + +def bundle(directory, payloads, manifest_name='manifest.json'): + directory.mkdir(exist_ok=True) + manifest = {'outputs': {name: {'sha256': hashlib.sha256(payload).hexdigest(), 'bytes': len(payload)} + for name, payload in payloads.items()}} + for name, payload in payloads.items(): + (directory / name).write_bytes(payload) + (directory / manifest_name).write_text(json.dumps(manifest, indent=2), encoding='utf-8') + return manifest + + +def files(directory): + return {path.relative_to(directory).as_posix(): path.read_bytes() + for path in directory.rglob('*') if path.is_file()} + + +@pytest.fixture +def prepared(tmp_path): + destination, staged = tmp_path / 'media', tmp_path / 'staged' + bundle(destination, {'a.png': b'old a', 'b.mp4': b'old b'}) + bundle(staged, {'a.png': b'new a', 'b.mp4': b'new b'}) + (destination / 'other-manifest.json').write_bytes(b'unrelated bundle') + (destination / 'fonts').mkdir() + (destination / 'fonts/font.ttf').write_bytes(b'unchanged font') + return staged, destination + + +def test_success_publishes_manifest_last_and_preserves_unrelated_files(prepared, monkeypatch): + staged, destination = prepared + order = [] + replace = media._atomic_replace + + def record(path, payload): + assert path.parent == destination + order.append(path.name) + replace(path, payload) + + monkeypatch.setattr(media, '_atomic_replace', record) + sources = [] + result = media.publish_bundle(staged, destination, 'manifest.json', source_check=lambda: sources.append(True)) + assert order == ['a.png', 'b.mp4', 'manifest.json'] + assert len(sources) == 2 + assert (destination / 'manifest.json').read_bytes() == (staged / 'manifest.json').read_bytes() + assert result == json.loads((destination / 'manifest.json').read_text()) + assert (destination / 'other-manifest.json').read_bytes() == b'unrelated bundle' + assert (destination / 'fonts/font.ttf').read_bytes() == b'unchanged font' + assert not list(destination.glob('.media-*')) + + +@pytest.mark.parametrize('failure', [OSError('encoder/publish failure'), KeyboardInterrupt()]) +def test_failure_after_first_publish_restores_exact_previous_bundle(prepared, monkeypatch, failure): + staged, destination = prepared + before = files(destination) + replace = media._atomic_replace + calls = 0 + + def interrupt(path, payload): + nonlocal calls + calls += 1 + if calls == 2: + raise failure + replace(path, payload) + + monkeypatch.setattr(media, '_atomic_replace', interrupt) + with pytest.raises(type(failure)): + media.publish_bundle(staged, destination, 'manifest.json', source_check=lambda: None) + assert files(destination) == before + assert not list(destination.glob('.media-*')) + + +def test_post_publication_source_failure_rolls_back_new_files_and_old_manifest(tmp_path): + destination, staged = tmp_path / 'media', tmp_path / 'staged' + bundle(destination, {'b.mp4': b'old b'}) + bundle(staged, {'a.png': b'new file', 'b.mp4': b'new b'}) + before = files(destination) + calls = 0 + + def source_check(): + nonlocal calls + calls += 1 + if calls == 2: + raise RuntimeError('CAD changed concurrently') + + with pytest.raises(RuntimeError, match='CAD changed'): + media.publish_bundle(staged, destination, 'manifest.json', source_check=source_check) + assert files(destination) == before + assert not (destination / 'a.png').exists() + + +@pytest.mark.parametrize('tamper', ['hash', 'bytes', 'missing', 'extra', 'escape', 'alias', 'self', 'boolean-bytes']) +def test_invalid_staging_does_not_touch_destination(prepared, tamper): + staged, destination = prepared + before = files(destination) + manifest = json.loads((staged / 'manifest.json').read_text()) + if tamper == 'hash': + (staged / 'a.png').write_bytes(b'tampered') + elif tamper == 'bytes': + manifest['outputs']['a.png']['bytes'] += 1 + elif tamper == 'missing': + (staged / 'a.png').unlink() + elif tamper == 'extra': + (staged / 'unlisted.txt').write_bytes(b'no silent publication') + elif tamper == 'escape': + manifest['outputs']['../outside.png'] = manifest['outputs'].pop('a.png') + elif tamper == 'alias': + manifest['outputs']['A.PNG'] = manifest['outputs']['a.png'] + elif tamper == 'self': + manifest['outputs']['manifest.json'] = manifest['outputs']['a.png'] + else: + manifest['outputs']['a.png']['bytes'] = True + (staged / 'manifest.json').write_text(json.dumps(manifest), encoding='utf-8') + with pytest.raises(ValueError): + media.publish_bundle(staged, destination, 'manifest.json', source_check=lambda: None) + assert files(destination) == before + + +def test_existing_target_case_alias_is_rejected(prepared): + staged, destination = prepared + (destination / 'a.png').rename(destination / 'A.PNG') + before = files(destination) + with pytest.raises(ValueError, match='aliases'): + media.publish_bundle(staged, destination, 'manifest.json', source_check=lambda: None) + assert files(destination) == before + + +@pytest.mark.parametrize('place', ['stage', 'target']) +def test_hardlinked_output_alias_is_rejected(prepared, tmp_path, place): + staged, destination = prepared + path = (staged if place == 'stage' else destination) / 'a.png' + alias = tmp_path / 'owner-file.bin' + try: + os.link(path, alias) + except OSError: + pytest.skip('hard links unavailable on this filesystem') + before = files(destination) + with pytest.raises(ValueError, match='unaliased'): + media.publish_bundle(staged, destination, 'manifest.json', source_check=lambda: None) + assert files(destination) == before + assert alias.read_bytes() == (b'new a' if place == 'stage' else b'old a') + + +def test_target_symlink_is_not_replaced_or_followed(prepared, tmp_path): + staged, destination = prepared + owner = tmp_path / 'owner-file.bin' + owner.write_bytes(b'owner bytes') + (destination / 'a.png').unlink() + try: + (destination / 'a.png').symlink_to(owner) + except OSError: + pytest.skip('symlinks unavailable on this platform') + with pytest.raises(ValueError, match='symlinks'): + media.publish_bundle(staged, destination, 'manifest.json', source_check=lambda: None) + assert (destination / 'a.png').is_symlink() + assert owner.read_bytes() == b'owner bytes' + + +def test_exclusive_lock_rejects_a_second_publisher(prepared, monkeypatch): + staged, destination = prepared + replace = media._atomic_replace + attempted = False + + def concurrent(path, payload): + nonlocal attempted + if not attempted: + attempted = True + with pytest.raises(RuntimeError, match='lock already exists'): + media.publish_bundle(staged, destination, 'manifest.json', source_check=lambda: None) + replace(path, payload) + + monkeypatch.setattr(media, '_atomic_replace', concurrent) + media.publish_bundle(staged, destination, 'manifest.json', source_check=lambda: None) + assert attempted and not (destination / '.media-publication.lock').exists() + + +@pytest.mark.parametrize('rollback_error', [OSError('rollback failed'), KeyboardInterrupt()]) +def test_rollback_failure_retains_every_original_and_explicit_recovery_path(prepared, monkeypatch, rollback_error): + staged, destination = prepared + before = files(destination) + replace = media._atomic_replace + calls = 0 + + def broken_disk(path, payload): + nonlocal calls + calls += 1 + if calls == 2: + raise OSError('injected publication failure') + if calls == 3: + raise rollback_error + replace(path, payload) + + monkeypatch.setattr(media, '_atomic_replace', broken_disk) + with pytest.raises(media.MediaRecoveryRequired) as raised: + media.publish_bundle(staged, destination, 'manifest.json', source_check=lambda: None) + recovery = raised.value.recovery_path + assert str(recovery) in str(raised.value) + journal = json.loads((recovery / 'journal.json').read_text()) + for item in journal: + assert (recovery / item['backup']).read_bytes() == before[item['name']] + assert (destination / '.media-publication.lock').exists() + assert (destination / 'other-manifest.json').read_bytes() == before['other-manifest.json'] + with pytest.raises(RuntimeError, match='retained recovery'): + media.publish_bundle(staged, destination, 'manifest.json', source_check=lambda: None) + + +@pytest.mark.parametrize('failure_name', ['original-0.bin', 'journal.json']) +def test_backup_or_journal_write_failure_cleans_only_owned_partial_files(prepared, monkeypatch, failure_name): + staged, destination = prepared + before = files(destination) + write = media._write_recovery + + def disk_full(path, payload, owned): + if path.name == failure_name: + with path.open('xb') as stream: + owned.append(path) + stream.write(payload[:2]) + raise OSError('injected partial recovery write') + write(path, payload, owned) + + monkeypatch.setattr(media, '_write_recovery', disk_full) + with pytest.raises(OSError, match='partial recovery write'): + media.publish_bundle(staged, destination, 'manifest.json', source_check=lambda: None) + assert files(destination) == before + assert not list(destination.glob('.media-*')) + + +def test_failed_cleanup_after_publication_retains_lock_and_reports_complete_bundle(prepared, monkeypatch): + staged, destination = prepared + + def cannot_clean(_directory, _owned): + raise OSError('backup cleanup blocked') + + monkeypatch.setattr(media, '_discard_recovery', cannot_clean) + with pytest.raises(media.MediaRecoveryRequired, match='published and verified') as raised: + media.publish_bundle(staged, destination, 'manifest.json', source_check=lambda: None) + assert raised.value.published + recovery = raised.value.recovery_path + assert recovery.is_dir() and (recovery / 'journal.json').is_file() + assert (destination / '.media-publication.lock').exists() + for name in ('a.png', 'b.mp4', 'manifest.json'): + assert (destination / name).read_bytes() == (staged / name).read_bytes() + + +def test_setup_cleanup_failure_is_explicit_and_assets_remain_untouched(prepared, monkeypatch): + staged, destination = prepared + before = files(destination) + + def cannot_write(_path, _payload, _owned): + raise OSError('backup write failed') + + def cannot_clean(_directory, _owned): + raise OSError('working-file cleanup failed') + + monkeypatch.setattr(media, '_write_recovery', cannot_write) + monkeypatch.setattr(media, '_discard_recovery', cannot_clean) + with pytest.raises(media.MediaRecoveryRequired, match='before any asset publication') as raised: + media.publish_bundle(staged, destination, 'manifest.json', source_check=lambda: None) + assert not raised.value.published + assert raised.value.recovery_path.is_dir() + assert (destination / '.media-publication.lock').exists() + assert all((destination / name).read_bytes() == payload for name, payload in before.items()) + + +def test_recovery_cleanup_never_deletes_an_unlisted_matching_filename(tmp_path): + recovery = tmp_path / 'recovery' + recovery.mkdir() + owned = recovery / 'original-0.bin' + owned.write_bytes(b'owned backup') + unknown = recovery / 'original-owner.bin' + unknown.write_bytes(b'not owned by this operation') + with pytest.raises(RuntimeError, match='unexpected file'): + media._discard_recovery(recovery, [owned]) + assert owned.read_bytes() == b'owned backup' + assert unknown.read_bytes() == b'not owned by this operation' diff --git a/tests/test_media_renderers.py b/tests/test_media_renderers.py new file mode 100644 index 0000000..8077a8d --- /dev/null +++ b/tests/test_media_renderers.py @@ -0,0 +1,150 @@ +"""A failed encoder must never partially refresh the public README assets. + +Native exports are stubbed here; this tests publication orchestration, not CAD. +""" + +import importlib +import json +import shutil +import sys +from pathlib import Path +from types import SimpleNamespace + +import pytest + +Image = pytest.importorskip('PIL.Image') +pytest.importorskip('imageio_ffmpeg') + + +@pytest.fixture +def renderers(tmp_path, monkeypatch): + monkeypatch.syspath_prepend(str(Path(__file__).resolve().parents[1] / 'tools')) + rover = importlib.import_module('render_readme_media') + gpio = importlib.import_module('render_example_media') + media = tmp_path / 'published' + media.mkdir() + project = SimpleNamespace(root=tmp_path / 'source', pcb_path=tmp_path / 'source/board.kicad_pcb') + hashes = {'board.kicad_pcb': 'a' * 64} + board = Image.new('RGBA', (32, 32), (30, 80, 40, 255)) + sheets = [('sheet.svg', board.convert('RGB'))] + for module in (rover, gpio): + monkeypatch.setattr(module, 'MEDIA', media) + monkeypatch.setattr(module, 'load_project', lambda _: project) + monkeypatch.setattr(module, 'capture', lambda *a: (board, board, sheets, hashes)) + monkeypatch.setattr(module, 'repository_binding', lambda *a: {}) + monkeypatch.setattr(module, 'discover_toolchain', lambda _: SimpleNamespace(kicad_cli=Path('stub-cli'))) + monkeypatch.setattr(module, 'assert_current', lambda *a: None) + monkeypatch.setattr(rover, 'input_hashes', lambda _: hashes) + monkeypatch.setattr(rover, 'hero', lambda *a, **k: board) + monkeypatch.setattr(rover, 'gallery', lambda *a: board) + monkeypatch.setattr(rover, 'sheet_contact', lambda *a: board) + monkeypatch.setattr(rover, 'scene', lambda *a: board.convert('RGB')) + monkeypatch.setattr(rover, 'demo_data', lambda _: {'source_input_hashes': hashes}) + monkeypatch.setattr(gpio, 'showcase', lambda *a: board) + monkeypatch.setattr(gpio, 'turntable_frame', lambda *a: board.convert('RGB')) + + def native_frame(cli, work, arguments, commands): + board.save(Path(arguments[arguments.index('-o') + 1])) + + monkeypatch.setattr(gpio, 'run_native', native_frame) + monkeypatch.setattr(rover.subprocess, 'check_output', lambda *a, **k: 'stub-native-version') + return rover, gpio, media, hashes + + +@pytest.mark.parametrize('which', ['rover', 'gpio']) +def test_encoding_failure_preserves_every_published_byte(renderers, tmp_path, monkeypatch, which): + rover, gpio, media, _ = renderers + names = ['hero.png', 'social-preview.png', 'native-cad.png', 'rover-3d.png', + 'workflow.gif', 'workflow.mp4', 'demo-results.json', 'manifest.json', + 'gpio-demo.png', 'gpio-3d.png', 'gpio-turntable.gif', 'gpio-turntable.mp4', + 'example-manifest.json', 'unrelated.txt'] + originals = {name: ('original ' + name).encode() for name in names} + for name, payload in originals.items(): + (media / name).write_bytes(payload) + + def broken_encoder(*args, **kwargs): + raise RuntimeError('injected encoder failure') + + monkeypatch.setattr(rover.imageio_ffmpeg, 'write_frames', broken_encoder) + work = tmp_path / 'new-work' + with pytest.raises(RuntimeError, match='injected encoder failure'): + if which == 'rover': + monkeypatch.setattr(sys, 'argv', ['render', '--demo', 'unused.json', '--work-dir', str(work)]) + rover.main() + else: + work.mkdir() + gpio.render(work, 12) + assert {p.name: p.read_bytes() for p in media.iterdir()} == originals + assert list((work / 'assets').glob('*.png')), 'partial generation happened only in staging' + + +def test_rover_source_changed_after_transcript_validation_stops_before_assets(renderers, tmp_path, monkeypatch): + rover, _, media, _ = renderers + board = Image.new('RGBA', (8, 8)) + monkeypatch.setattr(rover, 'capture', lambda *a: (board, board, [], {'board.kicad_pcb': 'b' * 64})) + monkeypatch.setattr(sys, 'argv', ['render', '--demo', 'unused.json', '--work-dir', str(tmp_path / 'work')]) + with pytest.raises(RuntimeError, match='project changed'): + rover.main() + assert not list(media.iterdir()) + + +@pytest.mark.parametrize('which', ['rover', 'gpio']) +def test_source_check_runs_after_encoding_and_rolls_back(renderers, tmp_path, monkeypatch, which): + rover, gpio, media, _ = renderers + original = b'previous published image' + target = 'hero.png' if which == 'rover' else 'gpio-demo.png' + (media / target).write_bytes(original) + calls = [] + + def fake_writer(path, *args, **kwargs): + Path(path).write_bytes(b'encoded video') + calls.append('encoded') + while True: + yield + + def check(*args): + calls.append('source-check') + # GPIO has an earlier check immediately after native frame capture. + if 'encoded' in calls and (media / target).read_bytes() != original: + raise RuntimeError('source changed during publication') + + module = rover if which == 'rover' else gpio + monkeypatch.setattr(module, 'assert_current', check) + monkeypatch.setattr(rover.imageio_ffmpeg, 'write_frames', fake_writer) + work = tmp_path / 'work' + with pytest.raises(RuntimeError, match='source changed during publication'): + if which == 'rover': + monkeypatch.setattr(sys, 'argv', ['render', '--demo', 'unused.json', '--work-dir', str(work)]) + rover.main() + else: + work.mkdir() + gpio.render(work, 12) + assert calls[-1] == 'source-check' and 'encoded' in calls + assert {p.name: p.read_bytes() for p in media.iterdir()} == {target: original} + + +@pytest.mark.parametrize('fault', ['preservation', 'log-content', 'interface', 'exit']) +def test_evaluation_graphic_rejects_unsupported_claims(tmp_path, monkeypatch, fault): + tools_path = Path(__file__).resolve().parents[1] / 'tools' + monkeypatch.syspath_prepend(str(tools_path)) + renderer = importlib.import_module('render_evaluation_media') + source = tools_path.parent / 'docs/evaluation/2026-10-29' + packet = tmp_path / 'packet' + packet.mkdir() + shutil.copyfile(source / 'evaluation.json', packet / 'evaluation.json') + shutil.copytree(source / 'logs', packet / 'logs') + path = packet / 'evaluation.json' + record = json.loads(path.read_bytes()) + assert len(renderer.read_record(path)[1]) == 19 + if fault == 'preservation': + record['source_inputs_unchanged'] = False + elif fault == 'log-content': + (packet / record['cases'][0]['actual']['stdout']).write_bytes(b'no recorded diagnostic') + elif fault == 'interface': + record['cases'][0]['actual']['interface'] = 'validator-api' + else: + case = next(c for c in record['cases'] if c['name'] == 'evidence-corruption') + case['actual']['exit_code'] = case['expected']['exit_code'] = 0 + path.write_bytes(json.dumps(record).encode()) + with pytest.raises(ValueError): + renderer.read_record(path) diff --git a/tools/check_readme.py b/tools/check_readme.py index fe3886b..4efd600 100644 --- a/tools/check_readme.py +++ b/tools/check_readme.py @@ -5,11 +5,110 @@ import hashlib import json import re -from pathlib import Path +from pathlib import Path, PurePosixPath, PureWindowsPath from urllib.parse import unquote, urlsplit +from pcb_copilot.project import load_project +from pcb_copilot.transaction import input_hashes + ROOT = Path(__file__).resolve().parents[1] -DOCUMENTS = ["README.md", "docs/QUICKSTART.md", "docs/ROADMAP.md", "docs/media/README.md"] +DOCUMENTS = ["README.md", "docs/QUICKSTART.md", "docs/ROADMAP.md", "docs/EVALUATION.md", "docs/media/README.md", + "docs/evaluation/2026-10-29/report.md"] +MEDIA_MANIFESTS = ('manifest.json', 'example-manifest.json', 'proof-manifest.json') +CAD_MANIFESTS = frozenset(MEDIA_MANIFESTS[:2]) +EVALUATION_MANIFESTS = ('docs/evaluation/2026-10-29/manifest.json',) + + +def contained_path(root: Path, name: str) -> Path: + """Use canonical relative file names on every host, including Windows paths.""" + if not isinstance(name, str) or not name: + raise ValueError('file name must be a nonempty relative path') + posix, windows = PurePosixPath(name), PureWindowsPath(name) + if (posix.is_absolute() or windows.drive or '\\' in name or ':' in name + or '..' in posix.parts or posix.as_posix() != name or name == '.' + or any(ord(char) < 32 for char in name)): + raise ValueError(f'file name must be a canonical contained relative path: {name!r}') + path = (root / name).resolve() + if path == root.resolve() or not path.is_relative_to(root.resolve()): + raise ValueError(f'file path escapes its root: {name!r}') + return path + + +def digest(value) -> bool: + return isinstance(value, str) and re.fullmatch(r'[0-9a-f]{64}', value) is not None + + +def unique_object(pairs): + result = {} + for key, value in pairs: + if key in result: + raise ValueError(f'duplicate manifest key: {key}') + result[key] = value + return result + + +def source_map(value, project_root: Path, field: str) -> dict: + if not isinstance(value, dict) or not value: + raise ValueError(f'{field} must be a nonempty input hash map') + for name, value_hash in value.items(): + contained_path(project_root, name) + if value_hash is not None and not digest(value_hash): + raise ValueError(f'{field}: invalid SHA-256 or null for {name}') + return value + + +def check_capture(manifest: dict, repository: Path) -> None: + if manifest.get('source_cad_unchanged') is not True: + raise ValueError('source_cad_unchanged must be exactly true') + project_root = contained_path(repository, manifest.get('source_project')) + relative = project_root.relative_to(repository.resolve()) + if len(relative.parts) < 2 or relative.parts[0] not in {'projects', 'examples'}: + raise ValueError('capture source must be an active project under examples/ or projects/') + captured = source_map(manifest.get('source_inputs'), project_root, 'source_inputs') + canonical = None + if 'source_repository_inputs' in manifest: + canonical = source_map(manifest['source_repository_inputs'], project_root, 'source_repository_inputs') + if canonical.keys() != captured.keys(): + raise ValueError('captured and repository source maps must have the same input keys') + if any((captured[name] is None) != (canonical[name] is None) for name in captured): + raise ValueError('captured and repository source maps must preserve null inputs') + current = input_hashes(load_project(project_root)) + if not isinstance(current, dict) or current.keys() != captured.keys(): + raise ValueError('current project input keys differ from the captured source inputs') + stale = [name for name, current_hash in current.items() + if current_hash != captured[name] and (canonical is None or current_hash != canonical[name])] + if stale: + raise ValueError('current project input hashes differ from captured/repository bytes: ' + ', '.join(sorted(stale))) + + +def check_manifest(path: Path, media: Path, repository: Path, *, capture: bool, + complete_bundle: bool = False) -> int: + manifest = json.loads(path.read_bytes(), object_pairs_hook=unique_object) + if not isinstance(manifest, dict) or type(manifest.get('schema_version')) is not int or manifest['schema_version'] != 1: + raise ValueError('media manifest needs schema_version 1') + outputs = manifest.get('outputs') + if not isinstance(outputs, dict) or not outputs: + raise ValueError('media manifest outputs must be a nonempty mapping') + minimum_bytes = 0 if complete_bundle else 1 # Retained raw command streams may be empty. + for name, record in outputs.items(): + output = contained_path(media, name) + if (not isinstance(record, dict) or not digest(record.get('sha256')) + or type(record.get('bytes')) is not int or record['bytes'] < minimum_bytes): + raise ValueError(f'invalid media SHA-256/byte count record: {name}') + if not output.is_file(): + raise ValueError(f'missing media {name}') + payload = output.read_bytes() + if len(payload) != record['bytes']: + raise ValueError(f'media byte count mismatch {name}') + if hashlib.sha256(payload).hexdigest() != record['sha256']: + raise ValueError(f'media hash mismatch {name}') + if complete_bundle: + present = {item.relative_to(media).as_posix() for item in media.rglob('*') if item.is_file()} + if present != {*outputs, path.name}: + raise ValueError('retained evaluation artifacts differ from the complete manifest output list') + if capture: + check_capture(manifest, repository) + return len(outputs) def anchors(path: Path) -> set[str]: @@ -23,9 +122,14 @@ def anchors(path: Path) -> set[str]: def main() -> int: failures = [] count = 0 + repository = ROOT.resolve() for name in DOCUMENTS: - document = ROOT / name - content = re.sub(r"```[^\n]*\n.*?```", "", document.read_text(encoding="utf-8"), flags=re.DOTALL) + document = repository / name + try: + content = re.sub(r"```[^\n]*\n.*?```", "", document.read_text(encoding="utf-8"), flags=re.DOTALL) + except (OSError, UnicodeError) as exc: + failures.append(f'{name}: cannot read required document: {exc}') + continue for target in re.findall(r"\]\(([^)\n]+)\)", content): target = target.strip().strip("<>") url = urlsplit(target) @@ -33,24 +137,36 @@ def main() -> int: continue destination = (document.parent / unquote(url.path)).resolve() if url.path else document count += 1 - if not destination.is_relative_to(ROOT) or not destination.exists(): + if not destination.is_relative_to(repository) or not destination.exists(): failures.append(f"{name}: missing local target {target}") elif url.fragment and destination.suffix == ".md" and unquote(url.fragment) not in anchors(destination): failures.append(f"{name}: missing Markdown heading {target}") - media = ROOT / "docs" / "media" - for manifest_path in sorted(media.glob("*manifest.json")): - manifest = json.loads(manifest_path.read_text(encoding="utf-8")) - for name, record in manifest["outputs"].items(): - path = (media / name).resolve() - if not path.is_relative_to(media) or not path.is_file(): - failures.append(f"{manifest_path.name}: missing media {name}") - elif hashlib.sha256(path.read_bytes()).hexdigest() != record["sha256"]: - failures.append(f"{manifest_path.name}: media hash mismatch {name}") + output_count = 0 + try: + media = contained_path(repository, 'docs/media') + except ValueError as exc: + failures.append(str(exc)) + else: + for name in MEDIA_MANIFESTS: + try: + manifest_path = contained_path(media, name) + output_count += check_manifest(manifest_path, media, repository, capture=name in CAD_MANIFESTS) + except (OSError, ValueError, UnicodeError) as exc: + failures.append(f'{name}: {exc}') + for name in EVALUATION_MANIFESTS: + try: + relative = PurePosixPath(name) + bundle = contained_path(repository, relative.parent.as_posix()) + manifest_path = contained_path(bundle, relative.name) + output_count += check_manifest(manifest_path, bundle, repository, capture=False, complete_bundle=True) + except (OSError, ValueError, UnicodeError) as exc: + failures.append(f'{name}: {exc}') if failures: print("\n".join(failures)) return 1 - print(f"Landing-page checks passed: {count} local links; published media hashes match.") - print("Scope: local links and captured output bytes; not external URLs or CAD qualification.") + total_manifests = len(MEDIA_MANIFESTS) + len(EVALUATION_MANIFESTS) + print(f"Landing-page checks passed: {count} local links; {total_manifests} required evidence manifests; {output_count} published byte/hash identities match.") + print("Scope: local links, exact captured/repository input identities and published output bytes; not external URLs, capture authenticity or CAD qualification.") return 0 diff --git a/tools/demo.py b/tools/demo.py index 7fe53c6..f1523bf 100644 --- a/tools/demo.py +++ b/tools/demo.py @@ -1,6 +1,6 @@ -"""Run real first-use commands on an external copy of the saved Rover inputs. +"""Try PCB Copilot on an external copy of the small GPIO indicator example. -Usage: uv run python tools/demo.py [--full] [--output NEW_DIRECTORY] +Usage: uv run python tools/demo.py [--project PROJECT] [--full] [--output NEW_DIRECTORY] The quick demo needs Python dependencies, but does not require KiCad. Full review needs the native toolchain. No fabrication package or approval is made. """ @@ -19,6 +19,22 @@ CLI_ENTRYPOINT = "from pcb_copilot.cli import entrypoint; entrypoint()" GUARD_MESSAGE = "No successful matching unconsumed preview" +DEFAULT_PROJECT = Path('examples/gpio-indicator') + + +def select_project(repository: Path, requested: Path): + """Select active repository inputs; fixtures never become demo projects.""" + from pcb_copilot.project import load_project + + repository = repository.resolve() + source = (repository / requested).resolve() + try: + relative = source.relative_to(repository) + except ValueError as exc: + raise ValueError('demo project must be inside this checkout under examples/ or projects/') from exc + if len(relative.parts) < 2 or relative.parts[0] not in {'examples', 'projects'}: + raise ValueError('select a project under examples/ or projects/; tests and frozen fixtures are not demo projects') + return load_project(source), relative.as_posix() def new_output_directory(requested: Path | None, repository: Path) -> Path: @@ -93,6 +109,29 @@ def step_output(output: Path, step: dict, stream: str) -> str: return (output / step[stream]).read_text(encoding="utf-8") +def review_document(text: str, project_name: str, exit_code: int) -> dict: + """Reject incomplete or contradictory results instead of calling them a review.""" + review = json.loads(text) + if (not isinstance(review, dict) or review.get('project') != project_name + or type(review.get('blocking')) is not bool + or not isinstance(review.get('results'), list) or not review['results']): + raise ValueError('native review returned an incomplete result for the selected project') + results = review['results'] + if any(not isinstance(item, dict) or not isinstance(item.get('check_id'), str) + or not item['check_id'] or type(item.get('passed')) is not bool for item in results): + raise ValueError('native review returned an invalid check result') + if len({item['check_id'] for item in results}) != len(results): + raise ValueError('native review returned duplicate check identifiers') + findings = review.get('findings', []) + if not isinstance(findings, list) or any(not isinstance(item, dict) + or type(item.get('blocking')) is not bool for item in findings): + raise ValueError('native review returned invalid findings') + blocked = any(not item['passed'] for item in results) or any(item.get('blocking') is True for item in findings) + if review['blocking'] != blocked or exit_code != int(blocked): + raise ValueError('native review blockers and process exit code disagree') + return review + + def write_report(output: Path, transcript: dict) -> None: (output / "transcript.json").write_text( json.dumps(transcript, indent=2, ensure_ascii=False) + "\n", encoding="utf-8", @@ -100,8 +139,9 @@ def write_report(output: Path, transcript: dict) -> None: lines = [ "# PCB Copilot first-use demo", "", f"Source: `{transcript['source_project']}` · mode: `{transcript['mode']}`", "", - ("Commands ran on the disposable [workspace](workspace/rover-pdb/). " - "Command paths below are relative to this report. Logs retain the exact process output."), "", + (f"Commands ran on the disposable [workspace]({transcript['snapshot_project']}/). " + if transcript.get('snapshot_project') else 'Disposable workspace creation did not complete. ') + + "Command paths below are relative to this report. Logs retain the exact process output.", "", "| Step | Actual exit code | Result | Logs |", "| --- | ---: | --- | --- |", ] @@ -140,23 +180,26 @@ def write_report(output: Path, transcript: dict) -> None: (output / "report.md").write_text("\n".join(lines), encoding="utf-8") -def execute_demo(repository: Path, output: Path, *, full: bool) -> dict: +def execute_demo(repository: Path, output: Path, *, full: bool, + project_path: Path = DEFAULT_PROJECT) -> dict: from pcb_copilot import __version__ - from pcb_copilot.project import load_project from pcb_copilot.toolchain import ToolchainDiscoveryError, discover_toolchain from pcb_copilot.transaction import input_hashes - project = load_project(repository / "projects" / "rover-pdb") + project, relative_source = select_project(repository, project_path) transcript = { "schema_version": 1, "started_utc": datetime.now(UTC).isoformat(), - "pcb_copilot_version": __version__, "source_project": "projects/rover-pdb", + "pcb_copilot_version": __version__, "source_project": relative_source, "mode": "full" if full else "quick", "steps": [], "exit_code": 2, } snapshot = None before = input_hashes(project) try: - snapshot, before = snapshot_project(project, output) + snapshot, captured = snapshot_project(project, output) + if captured != before: + raise RuntimeError('source inputs changed before the disposable snapshot was captured') relative = snapshot.root.relative_to(output).as_posix() + transcript['snapshot_project'] = relative print(f"Disposable project: {snapshot.root}", flush=True) for name, arguments in ( ("status", ["status", relative]), @@ -171,6 +214,13 @@ def execute_demo(repository: Path, output: Path, *, full: bool) -> dict: raise RuntimeError(step["error"]) if name == "status" and step["exit_code"] != 0: raise RuntimeError("status could not run; inspect its logs") + if name == 'evidence': + if (step['exit_code'] not in {0, 1} + or 'evidence record(s) verified' not in step_output(output, step, 'stdout') + or 'MACHINE FAILURES:' not in step_output(output, step, 'stdout')): + raise RuntimeError('archive verification did not complete; inspect its exact logs') + step['interpretation'] = ('archive bytes verified' if step['exit_code'] == 0 + else 'archive verification reported blockers') if name == "missing-preview": if step["exit_code"] != 2 or GUARD_MESSAGE not in step_output(output, step, "stderr"): raise RuntimeError("expected missing-preview rejection was not observed") @@ -186,9 +236,8 @@ def execute_demo(repository: Path, output: Path, *, full: bool) -> dict: transcript["steps"].append(step) if step["error"] or step["exit_code"] not in {0, 1}: raise RuntimeError(step["error"] or "native review could not run; inspect its logs") - transcript["review"] = json.loads(step_output(output, step, "stdout")) - if not isinstance(transcript["review"].get("blocking"), bool): - raise RuntimeError("native review did not return a valid blocking result") + transcript["review"] = review_document(step_output(output, step, "stdout"), + snapshot.manifest.name, step['exit_code']) step["interpretation"] = "review blocked" if transcript["review"]["blocking"] else "no registered blocker" transcript["exit_code"] = max(transcript["exit_code"], step["exit_code"]) except (OSError, ValueError, RuntimeError) as exc: @@ -210,14 +259,19 @@ def execute_demo(repository: Path, output: Path, *, full: bool) -> dict: def main(argv: list[str] | None = None) -> int: - parser = argparse.ArgumentParser(description=__doc__) + parser = argparse.ArgumentParser(description=__doc__, epilog=( + 'Exit codes: 0 = demo completed; 1 = archive/full-review blockers; ' + '2 = runtime failure or changed saved inputs. Quick mode does not run ERC/DRC.')) + parser.add_argument('--project', type=Path, default=DEFAULT_PROJECT, + help='project under examples/ or projects/ (default: examples/gpio-indicator; Rover: projects/rover-pdb)') parser.add_argument("--output", type=Path, help="new output directory outside the repository (default: temporary directory)") parser.add_argument("--full", action="store_true", help="also run native KiCad review; preserve its actual blockers") args = parser.parse_args(argv) repository = Path(__file__).resolve().parents[1] try: + select_project(repository, args.project) output = new_output_directory(args.output, repository) - transcript = execute_demo(repository, output, full=args.full) + transcript = execute_demo(repository, output, full=args.full, project_path=args.project) except ImportError as exc: print(f"Demo dependencies unavailable: {exc}. Run `uv sync`, then `uv run python tools/demo.py`.", file=sys.stderr) return 2 diff --git a/tools/demo_change.py b/tools/demo_change.py index 30a124d..fe2767a 100644 --- a/tools/demo_change.py +++ b/tools/demo_change.py @@ -147,7 +147,7 @@ def write_report(output: Path, transcript: dict) -> None: def prepare(repository: Path, source: Path, output: Path) -> dict: - project = load_project(source) + project, _relative = demo.select_project(repository, source) transcript = {'schema_version': 1, 'started_utc': datetime.now(UTC).isoformat(), 'source_root': str(project.root), 'status': 'failed', 'exit_code': 2, 'source_inputs_before': input_hashes(project), 'steps': [], 'applied': False} @@ -273,8 +273,8 @@ def main(argv: list[str] | None = None) -> int: raise ValueError('resumed proof directory must be outside the repository') result = apply_reviewed(output, reviewed_sha256=args.reviewed_render_sha256, reviewer=args.reviewer) else: - source = (repository / args.project).resolve() - load_project(source) + project, _relative = demo.select_project(repository, args.project) + source = project.root if args.output and args.output.expanduser().resolve().is_relative_to(source): raise ValueError('proof output must also be outside the source project') if args.output is None and Path(tempfile.gettempdir()).resolve().is_relative_to(source): diff --git a/tools/evaluate.py b/tools/evaluate.py new file mode 100644 index 0000000..2473f50 --- /dev/null +++ b/tools/evaluate.py @@ -0,0 +1,384 @@ +"""Exercise a small, declared fault set on disposable copies of gpio-indicator. + +Run: uv run python tools/evaluate.py [--native] [--output NEW_EXTERNAL_DIRECTORY] +No source CAD, approval, or fabrication package is written. This is a software +regression exercise, not engineering validation or a comparative benchmark. +""" + +from __future__ import annotations + +import argparse +import hashlib +import json +import os +import platform +import re +import subprocess +import sys +import tempfile +import time +from datetime import UTC, datetime +from pathlib import Path + +CLI = 'from pcb_copilot.cli import entrypoint; entrypoint()' +VALIDATOR = '''import json, sys +from pathlib import Path +from pcb_copilot.project import load_project +from pcb_copilot.layout.footprints import resolve_footprint +project = load_project(Path(sys.argv[1])) +try: + results = [resolve_footprint(project, ref, lib_id) for ref, lib_id in json.loads(sys.argv[2])] +except ValueError as error: + print(json.dumps({'accepted': False, 'exception': type(error).__name__, 'message': str(error)})) + sys.exit(1) +print(json.dumps({'accepted': True, 'footprints': len(results), 'fidelities': [r.fidelity for r in results]})) +''' +GUARD_MESSAGE = 'No successful matching unconsumed preview' + + +def new_output_directory(requested: Path | None, repository: Path) -> Path: + parent = Path(tempfile.gettempdir()).resolve() if requested is None else requested.expanduser().resolve() + if parent == repository.resolve() or parent.is_relative_to(repository.resolve()): + raise ValueError('evaluation output must be outside the repository') + if requested is None: + return Path(tempfile.mkdtemp(prefix='pcb-copilot-evaluation-', dir=parent)).resolve() + parent.mkdir(parents=True, exist_ok=False) + return parent + + +def _hash(path: Path) -> str: + return hashlib.sha256(path.read_bytes()).hexdigest() + + +def _implementation(repository: Path) -> dict: + paths = [repository / 'tools/evaluate.py'] + for directory in ('src/pcb_copilot', 'packages/kicad-claude-mcp/src'): + paths.extend((repository / directory).rglob('*.py')) + return {path.relative_to(repository).as_posix(): _hash(path) for path in sorted(paths)} + + +def snapshot_project(source, output: Path, name: str, expected: dict): + from pcb_copilot.project import load_project + from pcb_copilot.transaction import copy_inputs, input_hashes + + if output.resolve() == source.root.resolve() or output.resolve().is_relative_to(source.root.resolve()): + raise ValueError('evaluation snapshots must be outside the source project') + destination = output / 'workspaces' / name / source.root.name + copy_inputs(source, destination, expected) + snapshot = load_project(destination) + if input_hashes(snapshot) != expected: + raise RuntimeError('disposable snapshot does not match the source input manifest') + return snapshot + + +def _targets(project) -> tuple[list[list[str]], dict, list[str]]: + from kicad_claude.adapters import sch_io + + from pcb_copilot.schematic.preview import schematic_files + + records = json.loads((project.root / 'libs/PROVENANCE.json').read_bytes())['records'] + record = next(item for item in records if not item.get('fabricated_only') and item['models']) + targets = [] + for path in schematic_files(project.schematic_path): + for symbol in sch_io.find_children(sch_io.parse_file(path), 'symbol'): + fields = {str(item[1]): str(item[2]) for item in sch_io.find_children(symbol, 'property')} + if fields.get('Reference', '').startswith('#') or not fields.get('Footprint'): + continue + pair = [fields['Reference'], fields['Footprint']] + if pair not in targets: + targets.append(pair) + selected = next(pair for pair in targets if pair[1] == record['footprint']) + return targets, record, selected + + +def inject_fault(project, kind: str) -> dict: + """Alter only a declared input in this external case's snapshot.""" + from kicad_claude.adapters import sch_io + + from pcb_copilot.evidence.index import load_evidence_index + from pcb_copilot.schematic.preview import schematic_files + from pcb_copilot.transaction import contained + + _, record, selected = _targets(project) + if kind == 'evidence-corruption': + source = load_evidence_index(project.evidence_index_path).records[0] + path = contained(project.root, project.evidence_index_path.parent / source.path) + path.write_bytes(path.read_bytes() + b'\nEVALUATION CORRUPTION\n') + elif kind == 'footprint-geometry': + path = contained(project.root, project.root / record['local_path']) + payload = path.read_bytes() + match = re.search(rb'(\(pad\s+"[^"]*"\s+\w+\s+\w+.*?\(size\s+)([-+0-9.]+)', payload, re.DOTALL) + if match is None: + raise ValueError('evaluation could not locate a numbered pad size') + payload = payload[:match.start(2)] + str(float(match[2]) + 0.1).encode() + payload[match.end(2):] + path.write_bytes(payload) + # A refreshed local hash must not authorize a geometry change from upstream. + manifest = project.root / 'libs/PROVENANCE.json' + data = json.loads(manifest.read_bytes()) + next(item for item in data['records'] if item['local_path'] == record['local_path'])['local_sha256'] = _hash(path) + manifest.write_text(json.dumps(data, indent=2) + '\n', encoding='utf-8') + elif kind == 'model-corruption': + path = contained(project.root, project.root / record['models'][0]['path']) + path.write_bytes(path.read_bytes() + b'\nEVALUATION CORRUPTION\n') + elif kind == 'selected-mpn': + changed = [] + for path in schematic_files(project.schematic_path): + tree = sch_io.parse_file(path) + for symbol in sch_io.find_children(tree, 'symbol'): + properties = sch_io.find_children(symbol, 'property') + fields = {str(item[1]): str(item[2]) for item in properties} + if fields.get('Reference') == selected[0]: + next(item for item in properties if str(item[1]) == 'MPN')[2] = record['mpn'] + '-EVALUATION-FAULT' + changed.append(path) + if path in changed: + path.write_text(sch_io.dumps(tree), encoding='utf-8') + if not changed: + raise ValueError('evaluation could not locate the selected native MPN') + path = changed[0] + else: + raise ValueError(f'unknown evaluation fault: {kind}') + return {'kind': kind, 'target': path.relative_to(project.root).as_posix(), + 'selected_reference': selected[0], 'selected_footprint': selected[1]} + + +def run_process(output: Path, name: str, interface: str, arguments: list[str], *, timeout: int = 60) -> dict: + logs = output / 'logs' + logs.mkdir(exist_ok=True) + code = CLI if interface in {'cli', 'native-cli'} else VALIDATOR + command = [sys.executable, '-c', code, *arguments] + started = time.monotonic() + error, returncode = None, None + try: + result = subprocess.run(command, cwd=output, capture_output=True, check=False, timeout=timeout, + env=dict(os.environ, PYTHONIOENCODING='utf-8', PYTHONUTF8='1')) + stdout, stderr, returncode = result.stdout, result.stderr, result.returncode + except subprocess.TimeoutExpired as exc: + stdout, stderr = exc.stdout or b'', exc.stderr or b'' + error = f'command exceeded {timeout}s; no process exit code observed' + except OSError as exc: + stdout, stderr, error = b'', b'', str(exc) + stdout_path, stderr_path = logs / f'{name}.stdout.txt', logs / f'{name}.stderr.txt' + stdout_path.write_bytes(stdout) + stderr_path.write_bytes(stderr) + return {'interface': interface, 'arguments': arguments, 'executed_argv': command, + 'exit_code': returncode, 'duration_seconds': round(time.monotonic() - started, 3), + 'stdout': stdout_path.relative_to(output).as_posix(), + 'stderr': stderr_path.relative_to(output).as_posix(), 'error': error} + + +def classify_result(actual: dict, stdout: str, stderr: str, expected_code: int, diagnostic: str) -> str: + if actual['error'] is not None or actual['exit_code'] is None: + return 'harness_error' + if actual['interface'] == 'validator-api': + try: + payload = json.loads(stdout) + accepted = payload['accepted'] + if type(accepted) is not bool: + return 'harness_error' + except (ValueError, KeyError, TypeError): + return 'harness_error' + if accepted != (expected_code == 0): + return 'mismatch' + if accepted: + fidelities = payload.get('fidelities') + if not isinstance(fidelities, list) or not fidelities: + return 'harness_error' + if any(item != 'real' for item in fidelities): + return 'mismatch' + if actual['exit_code'] != expected_code or diagnostic not in stdout + stderr: + return 'mismatch' + return 'met_expectation' + + +def _case(source, output: Path, name: str, expected: dict, *, interface: str, + expected_code: int, diagnostic: str, fault: str | None = None, + project=None, arguments: list[str] | None = None, timeout: int = 60) -> tuple[dict, object]: + from pcb_copilot.transaction import input_hashes + + project = project or snapshot_project(source, output, name, expected) + before = input_hashes(project) + injection = inject_fault(project, fault) if fault else None + injected = input_hashes(project) + if fault and injected == before: + raise RuntimeError('fault injection did not change any declared input') + targets, _, _ = _targets(project) + relative = project.root.relative_to(output).as_posix() + if arguments is None: + if interface == 'validator-api': + arguments = [relative, json.dumps(targets)] + elif name == 'missing-preview': + arguments = ['update-schematic', relative, '--candidate', + project.schematic_path.relative_to(output).as_posix(), '--apply'] + else: + arguments = ['research', relative, '--verify'] + print(f'Evaluating {name} ({interface})...', flush=True) + actual = run_process(output, name, interface, arguments, timeout=timeout) + stdout = (output / actual['stdout']).read_text(encoding='utf-8', errors='replace') + stderr = (output / actual['stderr']).read_text(encoding='utf-8', errors='replace') + outcome = classify_result(actual, stdout, stderr, expected_code, diagnostic) + after = input_hashes(project) + if after != injected: + outcome = 'harness_error' + actual['error'] = 'checks changed declared snapshot inputs' + return {'name': name, 'workspace': relative, 'injection': injection, + 'expected': {'exit_code': expected_code, 'diagnostic_contains': diagnostic}, + 'actual': actual, 'outcome': outcome, 'inputs_before': before, + 'inputs_after_injection': injected, 'inputs_after_checks': after, + 'checks_preserved_inputs': after == injected}, project + + +def _native_cases(source, output: Path, expected: dict) -> list[dict]: + from pcb_copilot.toolchain import discover_toolchain + from pcb_copilot.transaction import copy_inputs + + tools = discover_toolchain(Path(__file__).resolve().parents[1]) + version = subprocess.run([str(tools.kicad_cli), '--version'], capture_output=True, + check=False, timeout=10) + if version.returncode: + raise RuntimeError('native evaluation could not probe kicad-cli --version') + if tools.kipython is None: + raise RuntimeError('native evaluation requires KiCad Python with pcbnew; run pcb-copilot doctor') + pcbnew = subprocess.run([str(tools.kipython), '-I', '-c', + 'import pcbnew; print(pcbnew.GetBuildVersion())'], + capture_output=True, check=False, timeout=10) + if pcbnew.returncode: + raise RuntimeError('native evaluation could not import pcbnew; run pcb-copilot doctor') + project = snapshot_project(source, output, 'native-preview-control', expected) + candidate = output / 'candidates' / source.root.name + copy_inputs(source, candidate, expected) + candidate_root = candidate / source.schematic_path.relative_to(source.root) + arguments = ['update-schematic', project.root.relative_to(output).as_posix(), '--candidate', + candidate_root.relative_to(output).as_posix()] + control, _ = _case(source, output, 'native-preview-control', expected, interface='native-cli', + expected_code=0, diagnostic='"source_mode": "native"', project=project, + arguments=arguments, timeout=300) + control['native_tool_version'] = version.stdout.decode('utf-8', errors='replace').strip() + control['native_pcbnew_version'] = pcbnew.stdout.decode('utf-8', errors='replace').strip() + if control['outcome'] != 'met_expectation': + return [control, {'name': 'changed-candidate', 'outcome': 'skipped', + 'reason': 'a real successful native preview was not obtained'}] + preview = json.loads((output / control['actual']['stdout']).read_bytes()) + if (preview.get('exit_code') != 0 or preview.get('applied') is not False + or not isinstance(preview.get('preview_binding'), dict) + or preview['preview_binding'].get('inputs') != expected): + raise RuntimeError('native command did not return a successful unapplied preview binding') + before = _hash(candidate_root) + candidate_root.write_bytes(candidate_root.read_bytes() + b'\n') + changed = _hash(candidate_root) + stale, _ = _case(source, output, 'changed-candidate', expected, interface='native-cli', + expected_code=2, diagnostic=GUARD_MESSAGE, project=project, + arguments=[*arguments, '--apply']) + stale.update(depends_on='native-preview-control', injection={ + 'kind': 'candidate-bytes-changed-after-real-preview', + 'target': candidate_root.relative_to(output).as_posix(), + 'before_sha256': before, 'after_sha256': changed, + 'after_check_sha256': _hash(candidate_root), + 'detail': 'One trailing newline was added; circuit connectivity was not changed.', + }) + return [control, stale] + + +def write_report(output: Path, report: dict) -> None: + (output / 'evaluation.json').write_text(json.dumps(report, indent=2) + '\n', encoding='utf-8') + lines = ['# PCB Copilot fault evaluation', '', + f"Run: `{report['started_utc']}` · mode: `{report['mode']}`", '', + ('This is a small manually selected software regression exercise. ' + 'A met expectation is not a design approval or an engineering-quality score.'), '', + '| Case | Interface | Expected exit | Actual exit | Outcome | Logs |', + '| --- | --- | ---: | ---: | --- | --- |'] + for case in report['cases']: + if case['outcome'] == 'skipped': + lines.append(f"| {case['name']} | not run | — | — | skipped: {case['reason']} | — |") + continue + actual = case['actual'] + lines.append(f"| {case['name']} | {actual['interface']} | {case['expected']['exit_code']} | " + f"{actual['exit_code']} | {case['outcome']} | " + f"[stdout]({actual['stdout']}) · [stderr]({actual['stderr']}) |") + lines.extend(['', (f"Source inputs unchanged: **{report.get('source_inputs_unchanged', False)}**. " + f"Implementation unchanged during run: **{report.get('implementation_unchanged', False)}**."), '', + ('Exact commands, input manifests, fault descriptions, environment, durations and outcomes: ' + '[evaluation.json](evaluation.json). All workspace paths are relative to this report; ' + 'raw logs and executed argv retain their actual paths.'), '', + ('The API cases call `pcb_copilot.layout.footprints.resolve_footprint` directly. ' + 'They do not claim the whole CLI review or release ran. Native preview is optional; ' + 'its successful creation is not human visual review, approval, or fabrication release.'), '', + (f"Harness exit: `{report['exit_code']}` (0: enabled expectations met; " + '1: observed behavior differs; 2: execution/preservation error).'), '']) + if report.get('error'): + lines.extend(['Error: ' + report['error'], '']) + (output / 'report.md').write_text('\n'.join(lines), encoding='utf-8') + + +def evaluate(repository: Path, output: Path, *, native: bool = False) -> dict: + from pcb_copilot import __version__ + from pcb_copilot.project import load_project + from pcb_copilot.transaction import input_hashes + + if output.resolve() == repository.resolve() or output.resolve().is_relative_to(repository.resolve()): + raise ValueError('evaluation output must be outside the repository') + source = load_project(repository / 'examples/gpio-indicator') + expected, implementation = input_hashes(source), _implementation(repository) + started = time.monotonic() + report = {'schema_version': 1, 'started_utc': datetime.now(UTC).isoformat(), + 'mode': 'native' if native else 'quick', 'source_project': 'examples/gpio-indicator', + 'environment': {'python': sys.version, 'platform': platform.platform(), + 'pcb_copilot_version': __version__}, + 'source_inputs_before': expected, 'implementation_before': implementation, + 'cases': [], 'exit_code': 2} + specifications = [ + ('control-evidence', 'cli', 0, 'evidence record(s) verified', None), + ('control-footprints', 'validator-api', 0, '"accepted": true', None), + ('missing-preview', 'cli', 2, GUARD_MESSAGE, None), + ('evidence-corruption', 'cli', 1, 'archive.hash_mismatch', 'evidence-corruption'), + ('footprint-geometry', 'validator-api', 1, 'beyond allowed model URI replacements', 'footprint-geometry'), + ('model-corruption', 'validator-api', 1, 'hash mismatch', 'model-corruption'), + ('selected-mpn', 'validator-api', 1, 'does not match the exact selected native MPN', 'selected-mpn'), + ] + try: + for name, interface, code, diagnostic, fault in specifications: + case, _ = _case(source, output, name, expected, interface=interface, + expected_code=code, diagnostic=diagnostic, fault=fault) + report['cases'].append(case) + if native: + report['cases'].extend(_native_cases(source, output, expected)) + else: + report['cases'].extend({'name': name, 'outcome': 'skipped', 'reason': '--native not requested'} + for name in ('native-preview-control', 'changed-candidate')) + outcomes = {case['outcome'] for case in report['cases']} + report['exit_code'] = 2 if 'harness_error' in outcomes else int('mismatch' in outcomes) + except (OSError, ValueError, RuntimeError, subprocess.TimeoutExpired) as exc: + report.update(error=str(exc), exit_code=2) + if native and not any(case['name'] == 'native-preview-control' for case in report['cases']): + report['cases'].extend({'name': name, 'outcome': 'skipped', + 'reason': 'native evaluation could not complete; see run error'} + for name in ('native-preview-control', 'changed-candidate')) + finally: + after, current_implementation = input_hashes(source), _implementation(repository) + report.update(source_inputs_after=after, source_inputs_unchanged=expected == after, + implementation_after=current_implementation, + implementation_unchanged=implementation == current_implementation, + duration_seconds=round(time.monotonic() - started, 3)) + if expected != after or implementation != current_implementation: + report.update(error='source inputs or implementation changed during evaluation', exit_code=2) + write_report(output, report) + return report + + +def main(argv: list[str] | None = None) -> int: + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('--output', type=Path, help='new external run directory; default: retained OS temporary directory') + parser.add_argument('--native', action='store_true', help='also obtain a real KiCad preview and test candidate invalidation') + args = parser.parse_args(argv) + repository = Path(__file__).resolve().parents[1] + try: + output = new_output_directory(args.output, repository) + report = evaluate(repository, output, native=args.native) + except (ImportError, OSError, ValueError, RuntimeError) as exc: + print(f'Evaluation could not start: {exc}. Install dependencies with `uv sync`.', file=sys.stderr) + return 2 + print(f"Report: {output / 'report.md'}\nResults: {output / 'evaluation.json'}\nHarness exit: {report['exit_code']}") + return report['exit_code'] + + +if __name__ == '__main__': + raise SystemExit(main()) diff --git a/tools/media_evidence.py b/tools/media_evidence.py new file mode 100644 index 0000000..00c8e7b --- /dev/null +++ b/tools/media_evidence.py @@ -0,0 +1,167 @@ +"""Validate recorded CLI evidence before it becomes a public media claim. + +This checks internal consistency and raw log identities, not log authenticity +against a hostile author. It requires no image or native-tool dependencies. +""" + +from __future__ import annotations + +import hashlib +import json +import re +import subprocess +from pathlib import Path, PurePosixPath + +GUARD = 'No successful matching unconsumed preview' + + +def repository_binding(repository: Path, source: Path, expected: dict) -> dict: + """Add exact HEAD blob identities only after proving checkout equivalence. + + The original capture hashes remain untouched. If sources are uncommitted, + Git is unavailable, or any difference exceeds CRLF/LF, omit this optional + portable binding and let the checker require the original captured bytes. + """ + base = source.relative_to(repository).as_posix() + blobs = {} + try: + revision = subprocess.check_output(['git', 'rev-parse', 'HEAD'], cwd=repository, + stderr=subprocess.DEVNULL, timeout=15).decode().strip() + for name, digest in expected.items(): + result = subprocess.run(['git', 'show', f'{revision}:{base}/{name}'], cwd=repository, + capture_output=True, timeout=15, check=False) + if digest is None: + if result.returncode == 0: + return {} + blobs[name] = None + continue + payload = (source / name).read_bytes() + if hashlib.sha256(payload).hexdigest() != digest: + raise ValueError('source changed while binding media to repository bytes') + if result.returncode or result.stdout.replace(b'\r\n', b'\n') != payload.replace(b'\r\n', b'\n'): + return {} + blobs[name] = hashlib.sha256(result.stdout).hexdigest() + except (OSError, subprocess.SubprocessError): + return {} + return {'source_repository_revision': revision, 'source_repository_inputs': blobs} + + +def _log(root: Path, name: str) -> bytes: + if not isinstance(name, str) or '\\' in name or ':' in name: + raise ValueError('log must be a contained relative path') + parts = PurePosixPath(name) + if parts.is_absolute() or not parts.parts or any(p in {'.', '..'} for p in parts.parts): + raise ValueError('log must be a contained relative path') + path = root + for part in parts.parts: + path /= part + if path.is_symlink(): + raise ValueError('log symlinks are not accepted') + if not path.resolve().is_relative_to(root.resolve()): + raise ValueError('log escapes transcript directory') + return path.read_bytes() + + +def _review(raw: str, code: int) -> dict: + review = json.loads(raw) + if (not isinstance(review, dict) or review.get('project') != 'rover-pdb' + or type(review.get('blocking')) is not bool + or not isinstance(review.get('results'), list) or not review['results']): + raise ValueError('incomplete Rover native review') + results = review['results'] + if any(not isinstance(r, dict) or not isinstance(r.get('check_id'), str) + or not r['check_id'] or type(r.get('passed')) is not bool for r in results): + raise ValueError('invalid native review result') + if len({r['check_id'] for r in results}) != len(results): + raise ValueError('duplicate native review check') + findings = review.get('findings', []) + if not isinstance(findings, list) or any(not isinstance(f, dict) + or type(f.get('blocking')) is not bool for f in findings): + raise ValueError('invalid native review findings') + blocked = any(not r['passed'] for r in results) or any(f.get('blocking') is True for f in findings) + if review['blocking'] != blocked or code != int(blocked): + raise ValueError('native review findings and exit code disagree') + return review + + +def _normalize(value): + if isinstance(value, str): + return re.sub(r'[A-Za-z]:[\\/][^\n]*?pcb-copilot-review-[^\\/\s]+', + '', value) + if isinstance(value, list): + return [_normalize(item) for item in value] + if isinstance(value, dict): + return {key: _normalize(item) for key, item in value.items()} + return value + + +def demo_data(path: Path) -> dict: + document = json.loads(path.read_text(encoding='utf-8')) + if (not isinstance(document, dict) or document.get('schema_version') != 1 or document.get('mode') != 'full' + or document.get('source_project') != 'projects/rover-pdb' or document.get('error')): + raise ValueError('media requires a completed full Rover demo') + if any(document.get(flag) is not True for flag in + ('source_inputs_unchanged', 'source_cad_unchanged', 'snapshot_inputs_unchanged')): + raise ValueError('media requires unchanged source CAD and snapshot inputs') + before = document.get('source_inputs_before') + if (not isinstance(before, dict) or not before or before != document.get('source_inputs_after') + or any(not isinstance(p, str) or (h is not None and + (not isinstance(h, str) or not re.fullmatch(r'[0-9a-f]{64}', h))) for p, h in before.items())): + raise ValueError('source input hash maps are missing or inconsistent') + cad = {p: h for p, h in before.items() if Path(p).suffix in + {'.kicad_sch', '.kicad_pcb', '.kicad_pro', '.kicad_dru'}} + if not cad or document.get('source_cad_before') != cad or document.get('source_cad_after') != cad: + raise ValueError('source CAD hash maps disagree with declared inputs') + steps = document.get('steps') + if (not isinstance(steps, list) or [s.get('name') for s in steps if isinstance(s, dict)] != + ['status', 'evidence', 'missing-preview', 'review'] or len(steps) != 4): + raise ValueError('media requires exactly the completed full-demo steps') + snapshot = 'workspace/rover-pdb' + commands = [ + ['pcb-copilot', 'status', snapshot], + ['pcb-copilot', 'research', snapshot, '--verify'], + ['pcb-copilot', 'update-schematic', snapshot, '--candidate', + snapshot + '/rover-pdb.kicad_sch', '--apply'], + ['pcb-copilot', 'review', snapshot, '--format', 'json'], + ] + logs, records = {}, [] + for step, command in zip(steps, commands, strict=True): + if step.get('command') != command or step.get('error') or type(step.get('exit_code')) is not int: + raise ValueError('demo command, execution error or exit code is inconsistent') + record = {key: step[key] for key in ('name', 'command', 'exit_code')} + for stream in ('stdout', 'stderr'): + payload = _log(path.parent, step.get(stream)) + logs[step['name'], stream] = payload.decode('utf-8') + record[stream + '_sha256'] = hashlib.sha256(payload).hexdigest() + records.append(record) + if steps[0]['exit_code'] != 0 or steps[1]['exit_code'] != 0: + raise ValueError('media requires successful status and evidence verification') + evidence = logs['evidence', 'stdout'] + if not evidence.splitlines() or not re.fullmatch(r'\d+ evidence record\(s\) verified', evidence.splitlines()[0]): + raise ValueError('evidence verification did not produce its completed report') + for heading in ('MACHINE FAILURES', 'CONFLICTS'): + sections = list(re.finditer(r'^' + heading + r':[ \t]*(.*)$', evidence, re.MULTILINE)) + if len(sections) != 1 or sections[0].group(1).strip() != 'none': + raise ValueError('evidence verification contains failures or conflicts') + body = re.split(r'\n[A-Z][A-Z _]+:', evidence[sections[0].end():], maxsplit=1)[0] + if body.strip(): + raise ValueError('evidence verification contains failures or conflicts') + stderr = logs['missing-preview', 'stderr'] + if steps[2]['exit_code'] != 2 or GUARD not in stderr: + raise ValueError('media requires the actual missing-preview rejection') + review = _review(logs['review', 'stdout'], steps[3]['exit_code']) + if document.get('review') != review: + raise ValueError('cached review differs from the original review stdout') + if type(document.get('exit_code')) is not int or document['exit_code'] != steps[3]['exit_code']: + raise ValueError('demo exit code differs from the native review') + return { + 'captured_utc': document['started_utc'], 'source_project': document['source_project'], + 'mode': 'full', 'demo_exit_code': document['exit_code'], + 'source_inputs_unchanged': True, 'snapshot_inputs_unchanged': True, + 'declared_input_count': len(before), 'source_input_hashes': before, + 'steps': records, 'evidence_excerpt': evidence.splitlines()[:5], + 'guard_excerpt': next(line for line in stderr.splitlines() if GUARD in line), + 'review': _normalize(review), + 'scope': 'Recorded CLI results with temporary absolute review paths normalized. Original log hashes ' + 'are retained. Not a screen recording, CAD edit demonstration or fabrication approval.', + } diff --git a/tools/media_publication.py b/tools/media_publication.py new file mode 100644 index 0000000..7daa5ba --- /dev/null +++ b/tools/media_publication.py @@ -0,0 +1,263 @@ +"""Publish one validated media bundle with rollback and manifest-last ordering. + +Individual replacements are atomic and use temporary files in the destination +folder. The bundle has a transactional final outcome, not a simultaneously +atomic view for readers opening multiple files during publication. +""" + +from __future__ import annotations + +import hashlib +import json +import os +import re +import stat +import tempfile +from collections.abc import Callable +from pathlib import Path + + +class MediaRecoveryRequired(RuntimeError): + """Publication could not restore all originals; retain the named backups.""" + + def __init__(self, recovery_path: Path, detail: str, *, published: bool = False): + self.recovery_path = recovery_path + self.published = published + super().__init__(f'{detail}; retained media recovery directory: {recovery_path}') + + +def _name(value: str) -> str: + if (not isinstance(value, str) or not re.fullmatch(r'[A-Za-z0-9][A-Za-z0-9._-]*', value) + or value.endswith('.') or value.split('.')[0].upper() in + {'CON', 'PRN', 'AUX', 'NUL', *[f'COM{n}' for n in range(1, 10)], + *[f'LPT{n}' for n in range(1, 10)]}): + raise ValueError(f'media bundle requires unaliased flat filenames: {value!r}') + return value + + +def _reject_link(path: Path) -> None: + try: + info = path.lstat() + except FileNotFoundError: + return + if stat.S_ISLNK(info.st_mode) or getattr(info, 'st_file_attributes', 0) & 0x400: + raise ValueError(f'media paths must not be symlinks or reparse points: {path}') + + +def _directory(path: Path) -> Path: + absolute = path.expanduser().absolute() + for component in (*reversed(absolute.parents), absolute): + _reject_link(component) + return absolute.resolve() + + +def _read(path: Path) -> bytes | None: + _reject_link(path) + if not path.exists(): + return None + info = path.stat() + if not stat.S_ISREG(info.st_mode) or info.st_nlink != 1: + raise ValueError(f'media target must be an ordinary unaliased file: {path}') + return path.read_bytes() + + +def _unique_pairs(pairs): + document = {} + for key, value in pairs: + if key in document: + raise ValueError(f'duplicate media manifest key: {key}') + document[key] = value + return document + + +def _capture(staged: Path, manifest_name: str) -> tuple[dict, dict[str, bytes]]: + raw = _read(staged / manifest_name) + if raw is None: + raise ValueError('staged media manifest is missing') + manifest = json.loads(raw, object_pairs_hook=_unique_pairs) + outputs = manifest.get('outputs') if isinstance(manifest, dict) else None + if not isinstance(outputs, dict) or not outputs: + raise ValueError('media manifest must list its expected outputs') + names = [_name(name) for name in outputs] + if len({name.casefold() for name in [*names, manifest_name]}) != len(names) + 1: + raise ValueError('media output names alias each other or the manifest') + if {path.name for path in staged.iterdir()} != {*names, manifest_name}: + raise ValueError('staged directory has missing or unlisted media outputs') + payloads = {} + for name, record in outputs.items(): + if (not isinstance(record, dict) or not isinstance(record.get('sha256'), str) + or not re.fullmatch(r'[0-9a-f]{64}', record['sha256']) + or type(record.get('bytes')) is not int or record['bytes'] < 0): + raise ValueError(f'invalid media output hash/byte count: {name}') + payload = _read(staged / name) + if (payload is None or len(payload) != record['bytes'] + or hashlib.sha256(payload).hexdigest() != record['sha256']): + raise ValueError(f'staged media does not match its manifest: {name}') + payloads[name] = payload + payloads[manifest_name] = raw # Commit marker is always published last. + return manifest, payloads + + +def _atomic_replace(target: Path, payload: bytes) -> None: + descriptor, temporary = tempfile.mkstemp(prefix=f'.{target.name}.publish-', dir=target.parent) + temporary = Path(temporary) + try: + with os.fdopen(descriptor, 'wb') as stream: + stream.write(payload) + stream.flush() + os.fsync(stream.fileno()) + os.replace(temporary, target) + finally: + temporary.unlink(missing_ok=True) + + +def _write_recovery(path: Path, payload: bytes, owned: list[Path]) -> None: + with path.open('xb') as stream: + owned.append(path) + stream.write(payload) + stream.flush() + os.fsync(stream.fileno()) + + +def _discard_recovery(directory: Path, owned: list[Path]) -> None: + # Only this operation's explicitly named files are removed; never recurse + # through a computed destination or remove unrelated media/fonts/bundles. + if set(directory.iterdir()) != set(owned): + raise RuntimeError(f'unexpected file in media recovery directory: {directory}') + for path in owned: + _reject_link(path) + # The journal is created last and remains available if an earlier backup + # cannot be removed. No wildcard grants ownership of extra files. + for path in owned: + path.unlink() + directory.rmdir() + + +def _check_source(source_check: Callable[[], None]) -> None: + if source_check() is False: + raise RuntimeError('media source check failed') + + +def publish_bundle(staged_dir: Path, destination: Path, manifest_name: str, + *, source_check: Callable[[], None]) -> dict: + """Validate, publish, or restore exact bytes for one flat-file media bundle. + + ``staged_dir`` must contain exactly the manifest and its listed outputs. + Output records require ``sha256`` and integer ``bytes``. ``source_check`` + must raise (or return False) on stale inputs; it runs before destination + writes and after publication. Other destination files are untouched. + + A destination-wide exclusive lock serializes cooperating publishers. Any + incomplete rollback retains that lock, original-byte backups and a journal + at ``MediaRecoveryRequired.recovery_path`` for explicit recovery. + If publication verified successfully but housekeeping cannot finish, + ``MediaRecoveryRequired.published`` is True and the lock/path are retained. + """ + manifest_name = _name(manifest_name) + if not manifest_name.endswith('.json'): + raise ValueError('media manifest filename must end with .json') + staged, destination = _directory(Path(staged_dir)), _directory(Path(destination)) + if (staged == destination or staged.is_relative_to(destination) + or destination.is_relative_to(staged)): + raise ValueError('media staging and destination directories must be separate') + manifest, payloads = _capture(staged, manifest_name) + _check_source(source_check) + destination.mkdir(parents=True, exist_ok=True) + lock = destination / '.media-publication.lock' + try: + descriptor = os.open(lock, os.O_CREAT | os.O_EXCL | os.O_WRONLY, 0o600) + except FileExistsError as exc: + recovery = ', '.join(str(path) for path in destination.glob('.media-recovery-*')) + raise RuntimeError(f'media publication lock already exists: {lock}' + + (f'; inspect retained recovery: {recovery}' if recovery else '')) from exc + keep_lock = False + recovery = None + owned_recovery = [] + before = {} + attempted = [] + try: + with os.fdopen(descriptor, 'w', encoding='utf-8') as stream: + json.dump({'pid': os.getpid(), 'manifest': manifest_name}, stream) + retained = list(destination.glob('.media-recovery-*')) + if retained: + raise MediaRecoveryRequired(retained[0], 'an earlier media operation needs explicit inspection') + # Reject Windows case aliases on every platform, including existing + # differently cased target entries in a case-sensitive checkout. + for path in destination.iterdir(): + if any(path.name.casefold() == name.casefold() and path.name != name for name in payloads): + raise ValueError(f'existing destination filename aliases a bundle target: {path.name}') + before = {name: _read(destination / name) for name in payloads} + recovery = Path(tempfile.mkdtemp(prefix='.media-recovery-', dir=destination)) + journal = [] + for index, (name, original) in enumerate(before.items()): + backup = f'original-{index}.bin' if original is not None else None + if backup is not None: + _write_recovery(recovery / backup, original, owned_recovery) + journal.append({'name': name, 'backup': backup, + 'original_sha256': hashlib.sha256(original).hexdigest() if original is not None else None, + 'published_sha256': hashlib.sha256(payloads[name]).hexdigest()}) + _write_recovery(recovery / 'journal.json', (json.dumps(journal, indent=2) + '\n').encode(), owned_recovery) + expected = dict(before) + try: + for name, payload in payloads.items(): + for current, wanted in expected.items(): + if _read(destination / current) != wanted: + raise RuntimeError(f'concurrent media edit preserved: {current}') + attempted.append(name) + _atomic_replace(destination / name, payload) + expected[name] = payload + _check_source(source_check) + for name, payload in payloads.items(): + if _read(destination / name) != payload: + raise RuntimeError(f'published media changed concurrently: {name}') + except BaseException as original_error: + failures = [] + for name in reversed(attempted): + try: + current = _read(destination / name) + if current == before[name]: + continue + if current != payloads[name]: + raise RuntimeError(f'concurrent media edit preserved: {name}') + if before[name] is None: + (destination / name).unlink() + else: + _atomic_replace(destination / name, before[name]) + if _read(destination / name) != before[name]: + raise RuntimeError(f'original media was not restored: {name}') + except BaseException as rollback_error: # noqa: BLE001 -- Finish restoring other files after failure or interruption. + failures.append(f'{name}: {rollback_error or type(rollback_error).__name__}') + if failures: + raise MediaRecoveryRequired(recovery, 'media rollback incomplete; all original-byte backups and journal retained: ' + + '; '.join(failures)) from original_error + try: + _discard_recovery(recovery, owned_recovery) + except BaseException as cleanup_error: # noqa: BLE001 -- Retain recovery and its lock on cleanup errors or interruption. + raise MediaRecoveryRequired(recovery, 'Original bundle restored, but recovery cleanup failed: ' + + str(cleanup_error)) from original_error + recovery = None + raise + try: + _discard_recovery(recovery, owned_recovery) + except BaseException as cleanup_error: + raise MediaRecoveryRequired(recovery, 'Bundle published and verified, but recovery cleanup failed: ' + + str(cleanup_error), published=True) from cleanup_error + recovery = None + except MediaRecoveryRequired: + keep_lock = True + raise + except BaseException as setup_error: + if recovery is not None and not attempted: + try: + _discard_recovery(recovery, owned_recovery) + except BaseException as cleanup_error: # noqa: BLE001 -- Retain partial setup and its lock on cleanup errors or interruption. + keep_lock = True + raise MediaRecoveryRequired(recovery, 'Media setup failed before any asset publication; ' + 'original assets are untouched, but working-file cleanup failed: ' + + str(cleanup_error)) from setup_error + recovery = None + raise + finally: + if not keep_lock: + lock.unlink() + return manifest diff --git a/tools/render_evaluation_media.py b/tools/render_evaluation_media.py new file mode 100644 index 0000000..f29a531 --- /dev/null +++ b/tools/render_evaluation_media.py @@ -0,0 +1,227 @@ +"""Render a source-bound 1600 x 1000 evaluation graphic from saved actual logs. + +Measured Proof: large type carries the observation; restrained cells keep the +three interfaces distinct. Lime marks controls, amber marks expected rejection. +The quiet grid and precise spacing follow the repository's native CAD media. + +Run: uv run --group media python tools/render_evaluation_media.py + --record docs/evaluation/2026-10-29/evaluation.json --output NEW_EXTERNAL.png +This renderer creates one new external PNG; it never updates CAD or the record. +""" + +from __future__ import annotations + +import argparse +import hashlib +import io +import json +import math +from pathlib import Path, PurePosixPath + +from PIL import Image, ImageDraw, ImageFont, PngImagePlugin + +ROOT = Path(__file__).resolve().parents[1] +FONT_ROOT = ROOT / 'docs/media/fonts' +BG, PANEL, LINE = '#101c24', '#182832', '#31444f' +WHITE, MUTED, LIME, AMBER = '#f2f5ed', '#a8bdc7', '#d4f37c', '#f7c47d' +GROUPS = [('cli', 'ACTUAL CLI'), ('validator-api', 'VALIDATOR API'), ('native-cli', 'NATIVE CLI')] +LABELS = { + 'control-evidence': ('Archive control', '3 evidence record(s) verified'), + 'missing-preview': ('Apply without preview', 'No successful matching unconsumed preview'), + 'evidence-corruption': ('Corrupted evidence', 'archive.hash_mismatch'), + 'control-footprints': ('Footprint control', '"accepted": true'), + 'footprint-geometry': ('Edited footprint geometry', 'beyond allowed model URI replacements'), + 'model-corruption': ('Changed STEP bytes', 'provenance hash mismatch'), + 'selected-mpn': ('Selected MPN mismatch', 'does not match the exact selected native MPN'), + 'native-preview-control': ('Native preview control', '"source_mode": "native"'), + 'changed-candidate': ('Candidate bytes changed', 'No successful matching unconsumed preview'), +} +DECLARED = { + 'control-evidence': ('cli', 0), 'missing-preview': ('cli', 2), 'evidence-corruption': ('cli', 1), + 'control-footprints': ('validator-api', 0), 'footprint-geometry': ('validator-api', 1), + 'model-corruption': ('validator-api', 1), 'selected-mpn': ('validator-api', 1), + 'native-preview-control': ('native-cli', 0), 'changed-candidate': ('native-cli', 2), +} + + +def digest(path: Path) -> str: + return hashlib.sha256(path.read_bytes()).hexdigest() + + +def face(size: int, *, bold=False, mono=False): + name = 'JetBrainsMono-Regular.ttf' if mono else f'InstrumentSans-{"Bold" if bold else "Regular"}.ttf' + return ImageFont.truetype(str(FONT_ROOT / name), size) + + +def log_path(directory: Path, relative: str) -> Path: + if not isinstance(relative, str) or '\\' in relative: + raise ValueError('evaluation log paths must use scoped POSIX paths') + parts = PurePosixPath(relative) + if parts.is_absolute() or len(parts.parts) != 2 or parts.parts[0] != 'logs' or '..' in parts.parts: + raise ValueError('evaluation log must be directly inside the record logs directory') + path = directory / relative + if path.is_symlink() or path.parent.is_symlink() or not path.resolve().is_relative_to(directory): + raise ValueError('evaluation log path is aliased or escapes the record directory') + return path + + +def read_record(path: Path) -> tuple[dict, dict[str, str]]: + path = path.resolve() + record = json.loads(path.read_text(encoding='utf-8')) + if not isinstance(record, dict): + raise ValueError('evaluation record must be an object') # noqa: TRY004 -- Invalid JSON artifact schema, not an API argument type. + maps = ['source_inputs_before', 'source_inputs_after', 'implementation_before', 'implementation_after'] + if (any(not isinstance(record.get(key), dict) or not record[key] for key in maps) + or type(record.get('schema_version')) is not int or record['schema_version'] != 1 + or record.get('mode') != 'native' or type(record.get('exit_code')) is not int or record['exit_code'] != 0 + or record.get('source_inputs_unchanged') is not True or record.get('implementation_unchanged') is not True + or record.get('source_inputs_before') != record.get('source_inputs_after') + or record.get('implementation_before') != record.get('implementation_after')): + raise ValueError('evaluation is incomplete or does not preserve its recorded source/implementation inputs') + cases = record.get('cases', []) + if (not isinstance(cases, list) or len(cases) != len(LABELS) + or any(not isinstance(case, dict) or not isinstance(case.get('name'), str) for case in cases) + or {case['name'] for case in cases} != set(LABELS)): + raise ValueError('this graphic requires the nine declared evaluation cases') + sources = {path.name: digest(path)} + seen_logs = set() + for case in cases: + actual, expected = case['actual'], case['expected'] + interface, exit_code = DECLARED[case['name']] + if (not isinstance(actual, dict) or not isinstance(expected, dict) + or any(not isinstance(case.get(key), dict) or not case[key] for key in + ('inputs_before', 'inputs_after_injection', 'inputs_after_checks')) + or case.get('outcome') != 'met_expectation' or case.get('checks_preserved_inputs') is not True + or case.get('inputs_after_injection') != case.get('inputs_after_checks') + or actual.get('error') is not None or type(actual.get('exit_code')) is not int + or actual['exit_code'] != exit_code or type(expected.get('exit_code')) is not int + or expected['exit_code'] != exit_code or actual.get('interface') != interface): + raise ValueError(f'evaluation case did not meet its declared preserved-input expectation: {case["name"]}') + logs = [] + for stream in ('stdout', 'stderr'): + relative = actual[stream] + if not isinstance(relative, str) or relative.casefold() in seen_logs: + raise ValueError('evaluation cases alias the same raw log') + seen_logs.add(relative.casefold()) + raw = log_path(path.parent, relative) + sources[relative] = digest(raw) + if actual.get(stream + '_sha256', sources[relative]) != sources[relative]: + raise ValueError(f'evaluation raw log hash mismatch: {relative}') + logs.append(raw.read_text(encoding='utf-8')) + combined = '\n'.join(logs) + diagnostic = expected.get('diagnostic_contains') + if not diagnostic or diagnostic not in combined or LABELS[case['name']][1] not in combined: + raise ValueError(f'evaluation raw diagnostic does not support the recorded outcome: {case["name"]}') + versions = {case['native_tool_version'] for case in cases if case.get('native_tool_version')} + if len(versions) != 1 or not record['environment']['platform'].startswith('Windows'): + raise ValueError('this evaluation graphic needs its declared Windows/native-tool environment') + duration = record.get('duration_seconds') + if type(duration) not in {float, int} or not math.isfinite(duration) or duration <= 0: + raise ValueError('evaluation duration must be a finite observed value') + record['display_native_version'] = next(iter(versions)) + return record, sources + + +def render(record: dict, sources: dict) -> Image.Image: + image = Image.new('RGB', (1600, 1000), BG) + draw = ImageDraw.Draw(image) + for x in range(32, 1600, 40): + for y in range(32, 1000, 40): + draw.ellipse((x, y, x + 1, y + 1), fill='#263741') + + def text(x, y, value, size=24, color=WHITE, *, bold=False, mono=False): + font = face(size, bold=bold, mono=mono) + bounds = draw.multiline_textbbox((x, y), value, font=font, spacing=8) + if bounds[0] < 0 or bounds[1] < 0 or bounds[2] > image.width or bounds[3] > image.height: + raise ValueError(f'graphic text exceeds canvas: {value}') + draw.multiline_text((x, y), value, font=font, fill=color, spacing=8) + + def wrapped(value, font, width): + lines, line = [], '' + for word in value.split(): + candidate = (line + ' ' + word).strip() + if line and draw.textlength(candidate, font=font) > width: + lines.append(line) + line = word + else: + line = candidate + return '\n'.join([*lines, line]) + + draw.rectangle((64, 45, 88, 69), outline=LIME, width=2) + draw.rectangle((72, 53, 80, 61), fill=LIME) + text(104, 40, 'PCB COPILOT', 25, bold=True) + text(1075, 46, 'RECORDED SOFTWARE EVALUATION', 17, MUTED, mono=True) + cases = record['cases'] + controls = sum(case['actual']['exit_code'] == 0 for case in cases) + rejected = len(cases) - controls + text(57, 99, str(len(cases)), 158, LIME, bold=True) + text(220, 116, 'declared expectations', 61, bold=True) + text(220, 184, 'observed', 61, bold=True) + text(224, 275, f'{controls} valid controls / {rejected} invalid requests rejected', 29, MUTED) + text(64, 329, f'{record["duration_seconds"]:.2f}s • Windows • KiCad {record["display_native_version"]} • one run', + 21, MUTED, mono=True) + draw.line((64, 376, 1536, 376), fill=LINE, width=2) + for column, (interface, heading) in enumerate(GROUPS): + left, top, width = 64 + column * 496, 402, 480 + draw.rounded_rectangle((left, top, left + width, 854), radius=7, fill=PANEL, outline=LINE) + group = [case for case in cases if case['actual']['interface'] == interface] + if len(group) > 4: + raise ValueError('evaluation group exceeds the graphic row capacity') + text(left + 22, top + 18, heading, 18, LIME, mono=True) + text(left + 425, top + 18, f'{len(group):02}', 18, MUTED, mono=True) + draw.line((left + 22, top + 58, left + width - 22, top + 58), fill=LINE) + for index, case in enumerate(group): + y = top + 76 + index * 92 + label, excerpt = LABELS[case['name']] + code = case['actual']['exit_code'] + color = LIME if code == 0 else AMBER + text(left + 22, y, label, 21, bold=True) + draw.rounded_rectangle((left + 381, y - 1, left + 458, y + 29), radius=4, outline=LINE, fill=BG) + text(left + 392, y + 3, f'exit {code}', 15, color, mono=True) + text(left + 22, y + 33, wrapped(excerpt, face(17, mono=True), width - 44), 17, MUTED, mono=True) + if index < len(group) - 1: + draw.line((left + 22, y + 81, left + width - 22, y + 81), fill=LINE) + if interface == 'native-cli': + y = 741 + text(left + 22, y, 'REAL PREVIEW → + NEWLINE → REJECT', 16, AMBER, mono=True) + text(left + 22, y + 33, 'Candidate circuit was unchanged.', 19, MUTED) + text(left + 22, y + 64, 'Saved inputs stayed intact.', 19, MUTED) + text(65, 877, f'SOURCE INPUTS UNCHANGED / {len(sources) - 1} RAW LOGS HASHED', 17, LIME, mono=True) + text(64, 916, 'Small software regression. Unbuilt hardware.', 26, bold=True) + text(64, 955, 'One board, one run. No general accuracy claim or fabrication approval.', 21, MUTED) + return image + + +def main(argv: list[str] | None = None) -> int: + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('--record', type=Path, required=True) + parser.add_argument('--output', type=Path, required=True, help='new external PNG; existing files are never overwritten') + args = parser.parse_args(argv) + output = args.output.expanduser().resolve() + if output.is_relative_to(ROOT) or output.suffix.lower() != '.png' or output.exists() or args.output.is_symlink(): + parser.error('--output must be a new PNG outside the repository') + record, sources = read_record(args.record) + image = render(record, sources) + metadata = PngImagePlugin.PngInfo() + provenance = {'record_and_raw_logs': sources, 'generator_sha256': digest(Path(__file__)), + 'font_hashes': {path.name: digest(path) for path in sorted(FONT_ROOT.glob('*.ttf'))}, + 'scope': 'One saved software regression; no general accuracy or hardware validation claim.'} + metadata.add_text('evaluation_provenance', json.dumps(provenance, sort_keys=True)) + buffer = io.BytesIO() + image.save(buffer, format='PNG', pnginfo=metadata, optimize=True) + # Recheck the exact evidence bytes after rendering, before publishing even + # this single new file. The PNG's metadata retains every raw-log digest. + for relative, expected in sources.items(): + path = args.record.resolve() if relative == args.record.name else log_path(args.record.resolve().parent, relative) + if digest(path) != expected: + raise RuntimeError(f'evaluation evidence changed during rendering: {relative}') + output.parent.mkdir(parents=True, exist_ok=True) + with output.open('xb') as stream: + stream.write(buffer.getvalue()) + print(json.dumps({'output': str(output), 'sha256': digest(output), 'width': 1600, 'height': 1000, + 'record_and_raw_logs': sources}, indent=2)) + return 0 + + +if __name__ == '__main__': + raise SystemExit(main()) diff --git a/tools/render_example_media.py b/tools/render_example_media.py index f41bc43..6ac2e0b 100644 --- a/tools/render_example_media.py +++ b/tools/render_example_media.py @@ -14,6 +14,8 @@ from pathlib import Path import imageio_ffmpeg +from media_evidence import repository_binding +from media_publication import publish_bundle from PIL import Image, ImageDraw from render_readme_media import ( BG, @@ -34,7 +36,7 @@ from pcb_copilot.project import load_project from pcb_copilot.toolchain import discover_toolchain -from pcb_copilot.transaction import assert_current, input_hashes +from pcb_copilot.transaction import assert_current def showcase(board: Image.Image, sheets: list) -> Image.Image: @@ -67,11 +69,13 @@ def turntable_frame(board: Image.Image, index: int, frames: int) -> Image.Image: def render(work: Path, frames: int): + output = work / "assets" + output.mkdir() project = load_project(ROOT / "examples" / "gpio-indicator") commands = [] board, _, sheets, before = capture(project, work, commands) - showcase(board, sheets).save(MEDIA / "gpio-demo.png", optimize=True) - board.save(MEDIA / "gpio-3d.png", optimize=True) + showcase(board, sheets).save(output / "gpio-demo.png", optimize=True) + board.save(output / "gpio-3d.png", optimize=True) snapshot = load_project(work / "project") cli = discover_toolchain(ROOT).kicad_cli orbit = work / "orbit" @@ -112,9 +116,9 @@ def native_frame(index): palette_sample.paste(images[index], (column * 960, 0)) palette = palette_sample.quantize(colors=192) gifs = [image.quantize(palette=palette, dither=Image.Dither.NONE) for image in images] - gifs[0].save(MEDIA / "gpio-turntable.gif", save_all=True, append_images=gifs[1:], + gifs[0].save(output / "gpio-turntable.gif", save_all=True, append_images=gifs[1:], duration=round(4000 / frames), loop=0, optimize=True, disposal=1) - writer = imageio_ffmpeg.write_frames(str(MEDIA / "gpio-turntable.mp4"), (960, 720), fps=24, + writer = imageio_ffmpeg.write_frames(str(output / "gpio-turntable.mp4"), (960, 720), fps=24, codec="libx264", quality=8, ffmpeg_log_level="error", output_params=["-movflags", "+faststart"]) writer.send(None) @@ -132,16 +136,18 @@ def native_frame(index): manifest = { "schema_version": 1, "generated_utc": datetime.now(UTC).isoformat(), "source_project": "examples/gpio-indicator", "source_inputs": before, - "source_cad_unchanged": input_hashes(project) == before, + **repository_binding(ROOT, project.root, before), + "source_cad_unchanged": True, "kicad_version": subprocess.check_output([str(cli), "version"], encoding="utf-8").strip(), "generator_sha256": digest(Path(__file__)), "shared_renderer_sha256": digest(ROOT / "tools" / "render_readme_media.py"), "native_commands": sorted(commands, key=lambda item: str(item["command"])), - "outputs": {name: {"sha256": digest(MEDIA / name), "bytes": (MEDIA / name).stat().st_size} + "outputs": {name: {"sha256": digest(output / name), "bytes": (output / name).stat().st_size} for name in outputs}, "scope": "Actual native 3D views of an unbuilt educational PCB. No physical or fabrication approval.", } - (MEDIA / "example-manifest.json").write_text(json.dumps(manifest, indent=2) + "\n", encoding="utf-8") + (output / "example-manifest.json").write_text(json.dumps(manifest, indent=2) + "\n", encoding="utf-8") + publish_bundle(output, MEDIA, "example-manifest.json", source_check=lambda: assert_current(project, before)) print(json.dumps({"outputs": manifest["outputs"], "visual_review": str(work / "turntable-contact.png")}, indent=2)) diff --git a/tools/render_readme_media.py b/tools/render_readme_media.py index 1ab92e8..f4138cc 100644 --- a/tools/render_readme_media.py +++ b/tools/render_readme_media.py @@ -11,7 +11,6 @@ import hashlib import json import math -import re import subprocess import tempfile from datetime import UTC, datetime @@ -19,6 +18,8 @@ import imageio_ffmpeg import pymupdf as fitz +from media_evidence import demo_data, repository_binding +from media_publication import publish_bundle from PIL import Image, ImageDraw, ImageFont, ImageOps from pcb_copilot.project import load_project @@ -185,47 +186,6 @@ def sheet_contact(sheets: list) -> Image.Image: return canvas -def demo_data(path: Path) -> dict: - document = json.loads(path.read_text(encoding="utf-8")) - if not document.get("source_inputs_unchanged") or not document.get("snapshot_inputs_unchanged"): - raise ValueError("media requires a completed demo with unchanged source and snapshot inputs") - steps = document["steps"] - observed = {step["name"]: step for step in steps} - guard = observed["missing-preview"] - stderr = (path.parent / guard["stderr"]).read_text(encoding="utf-8") - expected = "No successful matching unconsumed preview" - if guard["exit_code"] != 2 or expected not in stderr: - raise ValueError("media requires the actual missing-preview rejection") - evidence = (path.parent / observed["evidence"]["stdout"]).read_text(encoding="utf-8") - review = document.get("review") - # Export a clearly normalized display copy; original stdout/stderr SHA-256s - # remain below. Native review internally creates its own temporary directory. - def normalize(value): - if isinstance(value, str): - return re.sub(r"[A-Za-z]:[\\/][^\n]*?pcb-copilot-review-[^\\/\s]+", "", value) - if isinstance(value, list): - return [normalize(item) for item in value] - if isinstance(value, dict): - return {key: normalize(item) for key, item in value.items()} - return value - review = normalize(review) - return { - "captured_utc": document["started_utc"], "source_project": document["source_project"], - "mode": document["mode"], "demo_exit_code": document["exit_code"], - "source_inputs_unchanged": True, "snapshot_inputs_unchanged": True, - "declared_input_count": len(document["source_inputs_before"]), - "source_input_hashes": document["source_inputs_before"], - "steps": [{"name": s["name"], "command": s["command"], "exit_code": s["exit_code"], - "stdout_sha256": digest(path.parent / s["stdout"]), - "stderr_sha256": digest(path.parent / s["stderr"])} for s in steps], - "evidence_excerpt": evidence.splitlines()[:5], - "guard_excerpt": next(line for line in stderr.splitlines() if expected in line), - "review": review, - "scope": "Recorded CLI results with temporary absolute review paths normalized. Original log hashes " - "are retained. Not a screen recording, CAD edit demonstration or fabrication approval.", - } - - def scene(index: int, progress: float, board: Image.Image, sheets: list, demo: dict) -> Image.Image: canvas = base(1280, 720) draw = ImageDraw.Draw(canvas) @@ -276,7 +236,7 @@ def scene(index: int, progress: float, board: Image.Image, sheets: list, demo: d return canvas -def animations(board, sheets, demo): +def animations(board, sheets, demo, output: Path): # Low frame rate keeps the in-README GIF light; the MP4 is the same evidence at 24 fps. fps, seconds = 4, 4 frames = [scene(index, frame / (fps * seconds - 1), board, sheets, demo) @@ -284,9 +244,9 @@ def animations(board, sheets, demo): palette = frames[0].resize((960, 540), Image.Resampling.LANCZOS).quantize(colors=128) gif_frames = [frame.resize((960, 540), Image.Resampling.LANCZOS).quantize(palette=palette, dither=Image.Dither.NONE) for frame in frames] - gif_frames[0].save(MEDIA / "workflow.gif", save_all=True, append_images=gif_frames[1:], + gif_frames[0].save(output / "workflow.gif", save_all=True, append_images=gif_frames[1:], duration=250, loop=0, optimize=True, disposal=1) - video = imageio_ffmpeg.write_frames(str(MEDIA / "workflow.mp4"), (1280, 720), fps=24, + video = imageio_ffmpeg.write_frames(str(output / "workflow.mp4"), (1280, 720), fps=24, codec="libx264", quality=8, macro_block_size=16, ffmpeg_log_level="error", output_params=["-movflags", "+faststart"]) video.send(None) @@ -311,31 +271,37 @@ def main(): commands = [] def render(work): + output = work / "assets" + output.mkdir() board, top, sheets, inputs = capture(project, work, commands) - hero(board).save(MEDIA / "hero.png", optimize=True) - hero(board, social=True).save(MEDIA / "social-preview.png", optimize=True) - gallery(sheets, top).save(MEDIA / "native-cad.png", optimize=True) + if inputs != demo["source_input_hashes"]: + raise RuntimeError("project changed after the transcript was validated") + hero(board).save(output / "hero.png", optimize=True) + hero(board, social=True).save(output / "social-preview.png", optimize=True) + gallery(sheets, top).save(output / "native-cad.png", optimize=True) sheet_contact(sheets).save(work / "all-sheets.png", optimize=True) - board.save(MEDIA / "rover-3d.png", optimize=True) - animations(board, sheets, demo) - (MEDIA / "demo-results.json").write_text(json.dumps(demo, indent=2) + "\n", encoding="utf-8") + board.save(output / "rover-3d.png", optimize=True) + animations(board, sheets, demo, output) + (output / "demo-results.json").write_text(json.dumps(demo, indent=2) + "\n", encoding="utf-8") outputs = ["hero.png", "social-preview.png", "native-cad.png", "rover-3d.png", "workflow.gif", "workflow.mp4", "demo-results.json"] manifest = { "schema_version": 1, "generated_utc": datetime.now(UTC).isoformat(), "source_project": "projects/rover-pdb", "source_inputs": inputs, - "source_cad_unchanged": input_hashes(project) == inputs, + **repository_binding(ROOT, project.root, inputs), + "source_cad_unchanged": True, "kicad_version": subprocess.check_output([str(discover_toolchain(ROOT).kicad_cli), "version"], encoding="utf-8").strip(), "schematic_sheets": [name for name, _ in sheets], "native_commands": commands, "generator_sha256": digest(Path(__file__)), "font_hashes": {path.name: digest(path) for path in sorted((MEDIA / "fonts").glob("*.ttf"))}, - "outputs": {name: {"sha256": digest(MEDIA / name), "bytes": (MEDIA / name).stat().st_size} + "outputs": {name: {"sha256": digest(output / name), "bytes": (output / name).stat().st_size} for name in outputs}, "scope": "Native 3D renders and animated recorded CLI results. Not manufactured-board photos, " "a screen recording, a successful edit, or fabrication approval.", } - (MEDIA / "manifest.json").write_text(json.dumps(manifest, indent=2) + "\n", encoding="utf-8") + (output / "manifest.json").write_text(json.dumps(manifest, indent=2) + "\n", encoding="utf-8") + publish_bundle(output, MEDIA, "manifest.json", source_check=lambda: assert_current(project, inputs)) print(json.dumps({"outputs": manifest["outputs"], "review_sheet_contact": str(work / "all-sheets.png")}, indent=2)) if args.work_dir: