From dc42eb151b4149c1707b58c7241ff28c023a06de Mon Sep 17 00:00:00 2001 From: Jonathan Stokes Date: Tue, 22 Sep 2026 13:57:07 -0500 Subject: [PATCH 01/14] Commit the CorOS 4.0.1 ModelRepo payload, so regeneration needs no unit The three generators in `scripts/` accept `--payload`, and until now the only payload was on the maintainer's disk. Regenerating the 4.0.1 snapshot therefore needed the baseline unit, which is the one thing a contributor cannot borrow. #45 stalled on exactly that: its parser change makes `options.py` stale and its author runs CorOS 4.1.0, where generating into the 4.0.1 snapshot would mislabel firmware data. Read from the baseline unit on 2026-09-22: `zenos_git_hash` 4.0.1, `app_fw_version` d14e, `device_type` QC. The payload is a firmware fact, not a fact about this unit. It describes every model the firmware knows, including plugin content the unit holds no licence for: `is_factory` is false for anything carrying a `sku` or a `plugin_id`, which marks a model purchasable rather than purchased. This unit has no plugin purchases and its catalog still lists the Gojira, Cory Wong, Nolly and Plini families. Neural Capture slots are user content and carry no option lists, so they cannot move a generated count either. Each read rotates a per-model `blob` token, so payloads never match byte for byte. With the 351 `blob` attributes blanked, the catalog read on 2026-07-26 is identical to this one. Compare parsed catalogs, never payload hashes. `docs/capture.md` gains the section that says all of this and gives the command. Co-Authored-By: Claude Opus 5 --- docs/capture.md | 27 ++++++++++++++++++ .../catalog/model_repo_coros_4_0_1.bin | Bin 0 -> 46695 bytes 2 files changed, 27 insertions(+) create mode 100644 tests/fixtures/catalog/model_repo_coros_4_0_1.bin diff --git a/docs/capture.md b/docs/capture.md index 53dbcfed..1a6730fb 100644 --- a/docs/capture.md +++ b/docs/capture.md @@ -225,6 +225,33 @@ Then replay the captured shape host to device, save, and read it back. A shape i confirmed once the value survives a save and recall; see [Operation coverage](protocol.md#operation-coverage). +## The catalog payload is saved, so you do not need the unit + +The three generators in `scripts/` read a `ModelRepo` payload, live or saved: + + python scripts/generate_options.py --snapshot coros_4_0_1 \ + --payload tests/fixtures/catalog/model_repo_coros_4_0_1.bin + +`tests/fixtures/catalog/model_repo_coros_4_0_1.bin` is that payload for CorOS +4.0.1, read from the baseline unit on 2026-09-22 (`zenos_git_hash` 4.0.1, +`app_fw_version` d14e, `device_type` `QC`). Regenerating the 4.0.1 snapshot needs +this file, not the unit. + +Two things it is useful to know about the payload. + +It describes every model the firmware knows, including plugin content the unit +holds no licence for. `Model.is_factory` is false for anything carrying a `sku` +or a `plugin_id`, and that marks a model as purchasable, not purchased. The +baseline unit has no plugin purchases and its catalog still lists the Gojira, +Cory Wong, Nolly and Plini families. So the catalog is a firmware fact, and the +generated snapshot does not vary with what a unit owns. Neural Capture slots are +user content and carry no option lists at all. + +Each read rotates a per-model `blob` token, so two payloads never match byte for +byte. Blank the 351 `blob` attributes and the catalog read on 2026-07-26 is +identical to the one read on 2026-09-22. Compare parsed catalogs, never payload +hashes. + ## Caveats `_dispatch` and `_t` are private. This is a debugging technique, not an API. diff --git a/tests/fixtures/catalog/model_repo_coros_4_0_1.bin b/tests/fixtures/catalog/model_repo_coros_4_0_1.bin new file mode 100644 index 0000000000000000000000000000000000000000..b60c9c3e0c01b9e5decff61edfe223a9694ed1f5 GIT binary patch literal 46695 zcmYhiV{j!*8?~EcV%swl+fF97ZF9%AZB2G;+qNh6j&0jczUTc;ojRwks;<>tclFP% zzE`jQ9SsW>#RLWh_T!@4(rHh-htVs%U^GJIIg9EdR@DD&p*;}1w40NIp>KNa(JcH8 z+Oiqltc`ACi?k;Ju`MsIs zJKpN6a{2rcfN}rj^8M#4vCN%Ev@~)t_`8lLt~K)QyYCF^^7uqxy-9L#Q+n=Q^!HWb z$Fsrr1fRRj5PnHnx&LR__HwV$_j&L4`4B0>eebumpf+7C9)Yas*W1)5WwPo@uiv{} z^p(sY#nm#dh;IG%lR+PqR^iv1+(L`aBB1xxU;xFyYgH41vZcW))ZIikXgI+InyLb05WA^b35XSQx>MTd9#zp z|5LnaZQJj*$Gk0CyDE^GPGYU$QE0rS)A*dA_&Hp^L4yxcE`GQX?Q8i!t_@S+^eW4a@V|bT@hx;Z z8RH!z%y@|V5=y=H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P)hCz6>YM%I$6J7n9L5vFtGSmtxlr7pbRiLby9 z#@eGZls@qB`**?eqlNN;r#_a|6X`A>?4Fc94Lt;}^1V{RMl=5enx9dX=pHnw?@2xd YzVgm{|L5!P_m@9s8wUkY7!=U|15Ue>C;$Ke literal 0 HcmV?d00001 From 9aa633b091c16586aab05dd0b10bf6f9f9284699 Mon Sep 17 00:00:00 2001 From: Jonathan Stokes Date: Tue, 22 Sep 2026 14:14:59 -0500 Subject: [PATCH 02/14] Triage: the payload needed a test, an ADR, and three corrected claims Findings from /triage-pr on this branch. The blocking three: STEERING section 2 said the catalog dump lives in the lab repository, which this branch makes false. Corrected in place rather than added to. The `is_factory` sentence read as a biconditional. 119 models are non-factory and only 90 carry a `sku` and a `plugin_id`; the other 29 are internal helpers and hidden entries. `sku` and `plugin_id` also always occur together, 90 of 90, so "a sku or a plugin_id" implied a split the payload never shows. The claim now lives in ADR-0022, stated one way round and with the numbers. The decision had no record and nothing protected the file. ADR-0022 holds it with the four rejected options; `CLAUDE.md` gains a bullet beside the one for the generated bindings. The rest of the triage that earned a change: Nothing held the fixture. It was the only file under `tests/` no test touched, so the suite would have passed identically on a truncated or wrong-firmware payload. `tests/test_catalog_payload.py` regenerates every snapshot from its own payload and compares byte for byte, plus a shape tripwire. This is the check the offline suite was missing, and it is not the hardware check: that one asks whether the snapshot matches the unit, this one whether it matches its recorded input. The section was in the wrong document. `docs/capture.md` is how to observe what the unit sends, and `architecture.md` step 1 already owned the regeneration recipe while still saying "against the new unit". The note went there instead, and capture.md is untouched. Dropped rather than kept: the 351 `blob` count, which conflicts on its face with `domain-model.md`'s 338 because 13 are empty strings; and the 2026-07-26 comparison, which no reader of this repository can repeat. Both survive in ADR-0022 as consequences, where their limits are stated. Co-Authored-By: Claude Opus 5 --- CLAUDE.md | 5 ++ docs/ADR.md | 24 +++++++++ docs/STEERING.md | 21 ++++++-- docs/architecture.md | 6 ++- tests/test_catalog_payload.py | 99 +++++++++++++++++++++++++++++++++++ 5 files changed, 150 insertions(+), 5 deletions(-) create mode 100644 tests/test_catalog_payload.py diff --git a/CLAUDE.md b/CLAUDE.md index 413e5366..7d5dce00 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -65,6 +65,11 @@ small documentation fixes. footswitch index and a block's column are different numbers that usually agree. - `import hid` appears once, lazily, inside `session.open_device()`. `tests/test_import_cleanliness.py` proves it. +- Never gitignore, delete or edit `tests/fixtures/catalog/model_repo_*.bin`. + Each is the captured input its snapshot is generated from, and deleting one + puts regeneration back behind a unit nobody else has. + `tests/test_catalog_payload.py` holds each payload to the snapshot it + generates; a failure there means regenerating, never editing. (ADR-0022) - Never gitignore or delete `pyquadcortex/protocol/proto/*_pb2.py` or `*_pb2.pyi`. Regenerate only with `scripts/compile_protos.sh`, and bump the `protobuf` pin and the `grpcio-tools` floor in the same commit. Details in diff --git a/docs/ADR.md b/docs/ADR.md index ee610752..e6a0b68b 100644 --- a/docs/ADR.md +++ b/docs/ADR.md @@ -396,3 +396,27 @@ Records are append-only once `Decided` and built upon: a shipped decision is nev - The settings start to matter the day any contributor is granted write access. Granting that access is a separate, deliberate act and is not part of this record. - This is repository governance rather than library architecture, and it lives here rather than in `contributing.md` or `docs/STEERING.md` because the durable part is the reasoning - in particular why `require_last_push_approval` was rejected, which is the decision a future maintainer would otherwise re-litigate from scratch. `contributing.md` gains its note about sync-before-review only once contributors can actually merge. - Reversal is one API call and costs nothing, which is why this record is short on hedging: the setting is cheap to try and cheap to undo. + +## ADR-0022: The payload a catalog snapshot is generated from is committed beside it + +- **Status:** Decided (2026-09-22) +- **Decision:** The `ModelRepo` reply each snapshot in `pyquadcortex/protocol/catalogs/` was generated from is committed to this repository, under `tests/fixtures/catalog/model_repo_.bin`. `tests/test_catalog_payload.py` regenerates every snapshot from its own payload and compares byte for byte, so the pair cannot drift apart unnoticed. A profile that saves a payload adds a row to `PAYLOADS` there. The payload is a captured input and is never edited; a snapshot is still produced only by its generator. +- **Context:** The three generators in `scripts/` have always accepted `--payload`, but the only 4.0.1 payload lived on the maintainer's disk. Regenerating the 4.0.1 snapshot therefore needed the one unit running that firmware, which is the single input a contributor cannot borrow, share or reconstruct. #45 stalled on exactly this: its parser change makes `options.py` stale, and its author runs CorOS 4.1.0, where generating into the 4.0.1 snapshot would stamp the wrong firmware's data into a file named for 4.0.1. The maintainer could regenerate on request, but that makes every future catalog change wait on one person owning one device. + Measured while writing this record, against the committed payload: 533 models, 414 of them factory across 22 categories, which matches the numbers the generators already recorded. Using main's own generators, the payload reproduces `models.py`, `params.py`, `options.py` and the package `__init__.py` byte for byte. + Two properties of the payload decided the shape of this record. It describes every model the firmware knows, including plugin content no licence has been bought for: 90 models carry a `sku` and a `plugin_id`, always together and never one alone, and the unit that produced this payload owns none of them. And each read rotates a per-model `blob` token, so two reads of the same catalog never match byte for byte. +- **Options:** + - **(a) Commit the payload beside the snapshot, held by a test - chosen.** Makes regeneration reproducible for anyone, puts the input under review like any other file, and lets CI catch a snapshot that no longer matches its own input. + - **(b) Leave it in the private lab repository.** Where it was. Rejected: the people who most need it are outside contributors, who cannot read that repository. It also splits a generated file from its input across two repositories, so nothing can check the pair. + - **(c) Attach it to the issue or pull request that needs it.** Rejected. It solves one request and leaves the next one asking again, and a comment attachment is not versioned, not reviewable and easily lost. + - **(d) The maintainer regenerates on request.** Rejected as the status quo that caused the stall. It makes a device the bottleneck for work that needs no device. + - **(e) Commit the extracted `ModelRepo.xml` instead of the payload.** Rejected: the payload is what the unit actually sent, and `parse_model_repo` is the thing under test. Committing a derived form would test the parser against our own extraction rather than against the wire. +- **Rationale:** The generated catalog files are already committed rather than built at install time (ADR-0001 makes the same trade for the protobuf bindings). Committing the output while leaving the input on one person's disk is the half of that argument which does not hold: a generated file whose source nobody else has is only nominally regenerable. This closes it. + The test is the part that matters. A saved input nothing reads rots silently, and the offline suite would pass identically if the payload were truncated or from the wrong firmware. Holding the payload to the snapshot it generates turns the file from documentation into a check. + This does not weaken ADR-0020 or replace the hardware check. `tests/hardware/test_generated_constants.py` asks whether the snapshot still matches the **unit**, which only a unit can answer. This asks whether the snapshot still matches its own **recorded input**, which is what makes regeneration reproducible off the unit. Both are needed and they fail for different reasons. +- **Consequences:** + - Regenerating a snapshot no longer needs a unit. A contributor on other firmware can rebuild the 4.0.1 snapshot correctly. + - The snapshot and its input are reviewed together, and CI catches them parting company. + - A payload ships in the sdist, because `pyproject.toml` includes `/tests` wholesale. It is not in the wheel. 47KB, already gzipped. + - A new profile that wants the same guarantee saves its payload and adds a row to `PAYLOADS`. Nothing forces it to, so a profile with no committed payload stays regenerable only on its own unit. + - Payload bytes are not reproducible between reads and must never be compared by hash; compare parsed catalogs. The one recorded comparison is the maintainer's, across reads on 2026-07-26 and 2026-09-22, identical once the `blob` attributes are blanked. The earlier payload is not committed, so that comparison cannot be repeated from this repository. + - The claim that a snapshot does not vary with what a unit owns rests on one unit, which owns no plugin content. A payload from a unit that does own some would settle it; none has been read. diff --git a/docs/STEERING.md b/docs/STEERING.md index f48c53a3..514a4b40 100644 --- a/docs/STEERING.md +++ b/docs/STEERING.md @@ -44,10 +44,11 @@ generated bindings in `pyquadcortex/protocol/proto/`), the recovered schema in which users install themselves (see the README). - **PyPI.** Published as `pyquadcortex` with the `qcctl` console script. Release process in [`releasing.md`](releasing.md). -- **The lab repository.** Planning material, raw USB captures, the catalog dump, - and the narrative history behind the documents here live in the private - `quad-cortex` repository. This repository carries the library and its - engineering documents. +- **The lab repository.** Planning material, raw USB captures and the narrative + history behind the documents here live in the private `quad-cortex` + repository. This repository carries the library, its engineering documents, + and the `ModelRepo` payload each catalog snapshot is generated from + (`tests/fixtures/catalog/`, ADR-0022). ## 3. Architecture Overview @@ -168,6 +169,7 @@ Decisions are recorded in [`ADR.md`](ADR.md): | ADR-0019 | The frame trailer's flags are read and reported; an encrypted payload is labelled, not decrypted | | ADR-0020 | Connect resolves a device profile, and nothing else branches on firmware or model | | ADR-0021 | An approval stops counting once the pull request's code changes | +| ADR-0022 | The payload a catalog snapshot is generated from is committed beside it | ## 8. Open Questions @@ -231,6 +233,17 @@ Entries are short by design ([`writing.md`](writing.md)). The full narrative behind each one is in the lab repository, `doc/pyquadcortex/history/steering-change-log.md`, and in the pull requests. +### 2026-09-22 - A snapshot's input is committed beside it (ADR-0022) + +- **What changed:** the `ModelRepo` payload the 4.0.1 snapshot is generated from + is committed, and a test regenerates each snapshot from its own payload and + compares. Section 2 no longer sends the reader to the lab repository for it. +- **Why:** regenerating needed the one unit on that firmware, so #45 could not + finish its own change. +- **Scope:** `tests/fixtures/catalog/`, new `tests/test_catalog_payload.py`, + `CLAUDE.md`, `ADR.md`, `architecture.md`, sections 2 and 7 here. No library + code, and no generated file changed. + ### 2026-09-21 - The hardware suite puts the edited flag back - **What changed:** a session teardown clears the preset's edited flag with a diff --git a/docs/architecture.md b/docs/architecture.md index d04e6d1c..0e95557e 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -507,7 +507,11 @@ On the unit it covers: 1. **Generate the snapshot.** `scripts/generate_models.py --snapshot coros_x_y_z` and the params and options generators, against the new unit. Bind the three - modules on the new class. + modules on the new class. Each generator also takes `--payload`, a saved + `ModelRepo` reply, so a snapshot can be rebuilt with no unit attached; + `tests/fixtures/catalog/model_repo_coros_4_0_1.bin` is that reply for 4.0.1. + Save the new profile's alongside it. `tests/test_catalog_payload.py` holds + each committed payload to the snapshot it generates. 2. **Run the suite.** `pytest tests/hardware --hardware --profile YourClass`. `--profile` connects as that class instead of the one the unit resolves to, so the suite runs on a unit the registry would refuse. The suite connects with diff --git a/tests/test_catalog_payload.py b/tests/test_catalog_payload.py new file mode 100644 index 00000000..0578609e --- /dev/null +++ b/tests/test_catalog_payload.py @@ -0,0 +1,99 @@ +"""The committed `ModelRepo` payload still generates the committed snapshot. + +`tests/fixtures/catalog/model_repo_coros_4_0_1.bin` is the reply the 4.0.1 unit +sent on 2026-09-22. It exists so a snapshot can be regenerated with no unit +attached (ADR-0022), which is the only way a contributor without that firmware +can touch the generated catalog at all. + +A saved input nothing reads is a file that rots silently. The offline suite +would pass identically if this payload were truncated, from the wrong firmware, +or replaced with noise, and `tests/hardware/test_generated_constants.py` cannot +help: it reads the unit, not this file. So the check that matters is the one +below - regenerate from the payload and compare with what is committed. + +This is NOT the hardware check. That one asks whether the snapshot still matches +the UNIT, and only a unit can answer it. This one asks whether the snapshot +still matches its own recorded input, which is what makes regeneration +reproducible for someone who has no unit. +""" +import importlib.util +import pathlib + +import pytest + +from pyquadcortex.protocol import catalog + +REPO = pathlib.Path(__file__).resolve().parents[1] + +#: Each committed payload and the snapshot package it generates. A new profile +#: that saves its payload adds a row here, and is then held the same way. +PAYLOADS = [ + ("coros_4_0_1", "tests/fixtures/catalog/model_repo_coros_4_0_1.bin"), +] + +GENERATORS = ("models", "params", "options") + + +def _generator(name): + spec = importlib.util.spec_from_file_location( + f"qc_{name}", REPO / "scripts" / f"generate_{name}.py") + module = importlib.util.module_from_spec(spec) + spec.loader.exec_module(module) + return module + + +@pytest.fixture(scope="module", params=PAYLOADS, ids=[s for s, _ in PAYLOADS]) +def payload(request): + snapshot, relative = request.param + path = REPO / relative + assert path.exists(), f"{relative} is missing; it is the snapshot's input" + return snapshot, catalog.parse_model_repo(path.read_bytes()) + + +@pytest.mark.parametrize("name", GENERATORS) +def test_the_payload_still_generates_the_committed_snapshot(payload, name): + """Regenerate from the saved payload and compare, byte for byte. + + A failure means the payload and the snapshot have parted company. Either + someone edited a generated file by hand, which nothing may do, or a + generator changed its output and the snapshot was not regenerated with it. + The fix is to run the generator, never to edit the file: + + python scripts/generate_.py --snapshot \\ + --payload tests/fixtures/catalog/model_repo_.bin + """ + snapshot, parsed = payload + generated = _generator(name).render(parsed, snapshot=snapshot) + committed_path = (REPO / "pyquadcortex" / "protocol" / "catalogs" + / snapshot / f"{name}.py") + committed = committed_path.read_text(encoding="utf-8") + if generated == committed: + return + + gen, com = generated.splitlines(), committed.splitlines() + first = next((i for i, (a, b) in enumerate(zip(gen, com)) if a != b), + min(len(gen), len(com))) + pytest.fail( + f"{snapshot}/{name}.py no longer matches what the committed payload " + f"generates. First difference at line {first + 1}:\n" + f" committed: {com[first] if first < len(com) else ''}\n" + f" generated: {gen[first] if first < len(gen) else ''}\n" + f"Regenerate with `python scripts/generate_{name}.py --snapshot " + f"{snapshot} --payload tests/fixtures/catalog/model_repo_{snapshot}.bin` " + f"and read the diff. Never edit a generated file by hand.") + + +def test_the_payload_is_the_catalog_it_claims_to_be(payload): + """A shape tripwire, so a truncated or wrong-firmware payload is caught here. + + The numbers are the 4.0.1 catalog's own, recorded when the generators last + ran: 533 models, of which 414 are factory across 22 categories. They are + asserted rather than derived so that replacing the file with a different + unit's reply fails loudly instead of quietly regenerating a new snapshot. + """ + snapshot, parsed = payload + if snapshot != "coros_4_0_1": + pytest.skip(f"no recorded shape for {snapshot}") + factory = [m for m in parsed if m.is_factory] + assert (len(parsed), len(factory)) == (533, 414) + assert len({m.category for m in factory}) == 22 From 3589a647d830268baf0ea19693be3271f6d8c9ee Mon Sep 17 00:00:00 2001 From: Jonathan Stokes Date: Tue, 22 Sep 2026 14:15:28 -0500 Subject: [PATCH 03/14] Mark the catalog payloads binary explicitly Git already detects them, so this changes no behaviour today. It is stated because the file exists to serve contributors on Windows, and this repository added its .gitattributes rule after CRLF fixture failures in #42 and #45. Co-Authored-By: Claude Opus 5 --- .gitattributes | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitattributes b/.gitattributes index eca11902..b19d56a2 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1,2 @@ tests/fixtures/surface/pre_flip_init.py.txt text eol=lf +tests/fixtures/catalog/*.bin binary From c054e932d393b2c6cd4d459523ef740f9cc326de Mon Sep 17 00:00:00 2001 From: Jonathan Stokes Date: Tue, 22 Sep 2026 14:25:13 -0500 Subject: [PATCH 04/14] Second triage: the capture.md removal never happened, and three overstatements The first triage's document move was written up as done and was not done. The revert used `git checkout -- docs/capture.md`, which restores the file to its COMMITTED state - and the section was already committed one commit earlier. So the file never changed, the payload story was told in three places at once, and the commit message and pull request description both claimed otherwise. The section is deleted here, and the deletion is asserted rather than assumed. ADR-0022 claimed the payload reproduces the package `__init__.py` byte for byte. It does not reproduce it at all: `_snapshots.py` builds that file from the directory listing, and `tests/test_generators.py` already pins it. Claim narrowed to the three files the payload actually generates. The 351 `blob` attributes were dropped from every document while the pull request description said they survived in ADR-0022. They now do, with the 13 empty strings that reconcile them against `domain-model.md`'s 338. ADR-0022's decision sentence said the test covers every snapshot; its consequences said an unlisted profile is not covered. The decision now says what the test does, which is to cover what `PAYLOADS` lists. Also from the second pass: The payload states nothing about its own origin - no root attributes, no tar metadata - so "this is the 4.0.1 catalog" rested on the committer's word. `model_repo_coros_4_0_1.provenance.json` records the firmware fields of the `Version` reply, and a test holds every payload to having one. The serial number, MAC address and custom name are deliberately left out: they identify an owner's unit and say nothing about the firmware. The shape tripwire's docstring claimed it catches a truncated or wrong-firmware payload. It catches neither - truncation raises while the fixture parses, and another unit's reply already fails the byte-for-byte comparison. What it gives is a legible failure, and it now says so. Its numbers move into the `PAYLOADS` row so a second payload cannot be added and silently go unchecked. `_generator` was a second copy of `test_generators._load` that registered nothing, so each of three parametrized runs re-executed a generator and pushed `scripts/` onto `sys.path` again. It reuses the existing loader. Co-Authored-By: Claude Opus 5 --- docs/ADR.md | 7 +- docs/architecture.md | 2 +- docs/capture.md | 27 ------ .../model_repo_coros_4_0_1.provenance.json | 26 ++++++ tests/test_catalog_payload.py | 83 +++++++++++++------ 5 files changed, 89 insertions(+), 56 deletions(-) create mode 100644 tests/fixtures/catalog/model_repo_coros_4_0_1.provenance.json diff --git a/docs/ADR.md b/docs/ADR.md index e6a0b68b..3b4cd260 100644 --- a/docs/ADR.md +++ b/docs/ADR.md @@ -400,10 +400,10 @@ Records are append-only once `Decided` and built upon: a shipped decision is nev ## ADR-0022: The payload a catalog snapshot is generated from is committed beside it - **Status:** Decided (2026-09-22) -- **Decision:** The `ModelRepo` reply each snapshot in `pyquadcortex/protocol/catalogs/` was generated from is committed to this repository, under `tests/fixtures/catalog/model_repo_.bin`. `tests/test_catalog_payload.py` regenerates every snapshot from its own payload and compares byte for byte, so the pair cannot drift apart unnoticed. A profile that saves a payload adds a row to `PAYLOADS` there. The payload is a captured input and is never edited; a snapshot is still produced only by its generator. +- **Decision:** The `ModelRepo` reply each snapshot in `pyquadcortex/protocol/catalogs/` was generated from is committed to this repository, under `tests/fixtures/catalog/model_repo_.bin`. `tests/test_catalog_payload.py` regenerates from every payload listed in its `PAYLOADS` table and compares byte for byte, so a snapshot and its recorded input cannot drift apart unnoticed. A snapshot whose payload is not listed is not covered. A profile that saves a payload adds a row to `PAYLOADS` there. The payload is a captured input and is never edited; a snapshot is still produced only by its generator. - **Context:** The three generators in `scripts/` have always accepted `--payload`, but the only 4.0.1 payload lived on the maintainer's disk. Regenerating the 4.0.1 snapshot therefore needed the one unit running that firmware, which is the single input a contributor cannot borrow, share or reconstruct. #45 stalled on exactly this: its parser change makes `options.py` stale, and its author runs CorOS 4.1.0, where generating into the 4.0.1 snapshot would stamp the wrong firmware's data into a file named for 4.0.1. The maintainer could regenerate on request, but that makes every future catalog change wait on one person owning one device. - Measured while writing this record, against the committed payload: 533 models, 414 of them factory across 22 categories, which matches the numbers the generators already recorded. Using main's own generators, the payload reproduces `models.py`, `params.py`, `options.py` and the package `__init__.py` byte for byte. - Two properties of the payload decided the shape of this record. It describes every model the firmware knows, including plugin content no licence has been bought for: 90 models carry a `sku` and a `plugin_id`, always together and never one alone, and the unit that produced this payload owns none of them. And each read rotates a per-model `blob` token, so two reads of the same catalog never match byte for byte. + Measured while writing this record, against the committed payload: 533 models, 414 of them factory across 22 categories, which matches the numbers the generators already recorded. Using main's own generators, the payload reproduces `models.py`, `params.py` and `options.py` byte for byte. The package `__init__.py` is not payload-derived: `scripts/_snapshots.py` builds it from the directory listing, and `tests/test_generators.py` already pins it. + Two properties of the payload decided the shape of this record. It describes every model the firmware knows, including plugin content no licence has been bought for: 90 models carry a `sku` and a `plugin_id`, always together and never one alone, and the unit that produced this payload owns none of them. And each read rotates a per-model `blob` token, so two reads of the same catalog never match byte for byte. There are 351 of these attributes, 13 of them empty strings, which is why `docs/domain-model.md` counts 338 models carrying one and a reader counting attributes finds 351. - **Options:** - **(a) Commit the payload beside the snapshot, held by a test - chosen.** Makes regeneration reproducible for anyone, puts the input under review like any other file, and lets CI catch a snapshot that no longer matches its own input. - **(b) Leave it in the private lab repository.** Where it was. Rejected: the people who most need it are outside contributors, who cannot read that repository. It also splits a generated file from its input across two repositories, so nothing can check the pair. @@ -418,5 +418,6 @@ Records are append-only once `Decided` and built upon: a shipped decision is nev - The snapshot and its input are reviewed together, and CI catches them parting company. - A payload ships in the sdist, because `pyproject.toml` includes `/tests` wholesale. It is not in the wheel. 47KB, already gzipped. - A new profile that wants the same guarantee saves its payload and adds a row to `PAYLOADS`. Nothing forces it to, so a profile with no committed payload stays regenerable only on its own unit. + - A payload carries no statement of its own provenance: the XML root has no attributes and the tar member has no metadata. `model_repo_.provenance.json` records the identifying fields of the `Version` reply beside it, minus the serial number, MAC address and custom name, which are the owner's and not the firmware's. - Payload bytes are not reproducible between reads and must never be compared by hash; compare parsed catalogs. The one recorded comparison is the maintainer's, across reads on 2026-07-26 and 2026-09-22, identical once the `blob` attributes are blanked. The earlier payload is not committed, so that comparison cannot be repeated from this repository. - The claim that a snapshot does not vary with what a unit owns rests on one unit, which owns no plugin content. A payload from a unit that does own some would settle it; none has been read. diff --git a/docs/architecture.md b/docs/architecture.md index 0e95557e..3bc5eab5 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -510,7 +510,7 @@ On the unit it covers: modules on the new class. Each generator also takes `--payload`, a saved `ModelRepo` reply, so a snapshot can be rebuilt with no unit attached; `tests/fixtures/catalog/model_repo_coros_4_0_1.bin` is that reply for 4.0.1. - Save the new profile's alongside it. `tests/test_catalog_payload.py` holds + Save the new profile's payload alongside it. `tests/test_catalog_payload.py` holds each committed payload to the snapshot it generates. 2. **Run the suite.** `pytest tests/hardware --hardware --profile YourClass`. `--profile` connects as that class instead of the one the unit resolves to, so diff --git a/docs/capture.md b/docs/capture.md index 1a6730fb..53dbcfed 100644 --- a/docs/capture.md +++ b/docs/capture.md @@ -225,33 +225,6 @@ Then replay the captured shape host to device, save, and read it back. A shape i confirmed once the value survives a save and recall; see [Operation coverage](protocol.md#operation-coverage). -## The catalog payload is saved, so you do not need the unit - -The three generators in `scripts/` read a `ModelRepo` payload, live or saved: - - python scripts/generate_options.py --snapshot coros_4_0_1 \ - --payload tests/fixtures/catalog/model_repo_coros_4_0_1.bin - -`tests/fixtures/catalog/model_repo_coros_4_0_1.bin` is that payload for CorOS -4.0.1, read from the baseline unit on 2026-09-22 (`zenos_git_hash` 4.0.1, -`app_fw_version` d14e, `device_type` `QC`). Regenerating the 4.0.1 snapshot needs -this file, not the unit. - -Two things it is useful to know about the payload. - -It describes every model the firmware knows, including plugin content the unit -holds no licence for. `Model.is_factory` is false for anything carrying a `sku` -or a `plugin_id`, and that marks a model as purchasable, not purchased. The -baseline unit has no plugin purchases and its catalog still lists the Gojira, -Cory Wong, Nolly and Plini families. So the catalog is a firmware fact, and the -generated snapshot does not vary with what a unit owns. Neural Capture slots are -user content and carry no option lists at all. - -Each read rotates a per-model `blob` token, so two payloads never match byte for -byte. Blank the 351 `blob` attributes and the catalog read on 2026-07-26 is -identical to the one read on 2026-09-22. Compare parsed catalogs, never payload -hashes. - ## Caveats `_dispatch` and `_t` are private. This is a debugging technique, not an API. diff --git a/tests/fixtures/catalog/model_repo_coros_4_0_1.provenance.json b/tests/fixtures/catalog/model_repo_coros_4_0_1.provenance.json new file mode 100644 index 00000000..9b9560ac --- /dev/null +++ b/tests/fixtures/catalog/model_repo_coros_4_0_1.provenance.json @@ -0,0 +1,26 @@ +{ + "_comment": [ + "Provenance for model_repo_coros_4_0_1.bin: the identifying fields of the", + "Version reply from the unit that produced it. The payload itself states", + "nothing about its own origin, so without this file nothing can tell which", + "firmware generated the snapshot beside it.", + "The serial number, MAC address, custom name and comms_version are left out", + "on purpose. They identify one owner's unit and say nothing about the firmware." + ], + "captured_utc": "2026-09-22T18:30:21Z", + "payload_bytes": 46695, + "payload_sha256": "fdc30861953be15ce4e776f3e66d101fb55d7bb4ec6aa85f77e35e856777ac14", + "payload_sha256_note": "Identifies THIS capture only. Each read rotates the per-model blob tokens, so a later read of the same catalog has a different hash. Compare parsed catalogs, never this value.", + "version_reply": { + "zenos_git_hash": "4.0.1", + "device_type": "QC", + "app_fw_version": "d14e", + "bootloader_fw_version": "d14d", + "zencoder_fw_app": "d111", + "zencoder_fw_bootloader": "d10d", + "zenwireless_fw_version": "cf9daede4300aaae664fc527cede12ae", + "uboot_version": "U-Boot 2015.01 ADI-1.3.0 (Sep 30 2021 - 01:01:44)", + "linux_kernel_version": "Linux buildroot 4.0.0-ADI-1.3.0 #1 PREEMPT Fri Feb 20 12:30:04 UTC 2026 armv7l (none)", + "is_ess": true + } +} diff --git a/tests/test_catalog_payload.py b/tests/test_catalog_payload.py index 0578609e..328bd47b 100644 --- a/tests/test_catalog_payload.py +++ b/tests/test_catalog_payload.py @@ -17,37 +17,44 @@ reproducible for someone who has no unit. """ import importlib.util +import json import pathlib +import sys import pytest from pyquadcortex.protocol import catalog REPO = pathlib.Path(__file__).resolve().parents[1] +sys.path.insert(0, str(REPO / "scripts")) -#: Each committed payload and the snapshot package it generates. A new profile -#: that saves its payload adds a row here, and is then held the same way. +import _snapshots # noqa: E402 (snapshot_version, so the version is derived not repeated) + +#: Each committed payload, the snapshot package it generates, and that +#: catalog's recorded shape as `(models, factory models, factory categories)`. +#: A new profile that saves its payload adds a row here, and is then held the +#: same way. The shape lives in the row rather than in the test, so a payload +#: cannot be added and silently go unchecked. PAYLOADS = [ - ("coros_4_0_1", "tests/fixtures/catalog/model_repo_coros_4_0_1.bin"), + ("coros_4_0_1", "tests/fixtures/catalog/model_repo_coros_4_0_1.bin", (533, 414, 22)), ] GENERATORS = ("models", "params", "options") -def _generator(name): - spec = importlib.util.spec_from_file_location( - f"qc_{name}", REPO / "scripts" / f"generate_{name}.py") - module = importlib.util.module_from_spec(spec) - spec.loader.exec_module(module) - return module +#: `tests/test_generators.py` already loads these, registers them in +#: `sys.modules` and caches them. Reuse it rather than keeping a second copy: +#: each bare exec of a generator inserts the repo root and `scripts/` at +#: `sys.path[0]` again, and those entries outlive the test that made them. +from test_generators import _load as _generator # noqa: E402 -@pytest.fixture(scope="module", params=PAYLOADS, ids=[s for s, _ in PAYLOADS]) +@pytest.fixture(scope="module", params=PAYLOADS, ids=[row[0] for row in PAYLOADS]) def payload(request): - snapshot, relative = request.param + snapshot, relative, shape = request.param path = REPO / relative assert path.exists(), f"{relative} is missing; it is the snapshot's input" - return snapshot, catalog.parse_model_repo(path.read_bytes()) + return snapshot, catalog.parse_model_repo(path.read_bytes()), shape @pytest.mark.parametrize("name", GENERATORS) @@ -62,8 +69,8 @@ def test_the_payload_still_generates_the_committed_snapshot(payload, name): python scripts/generate_.py --snapshot \\ --payload tests/fixtures/catalog/model_repo_.bin """ - snapshot, parsed = payload - generated = _generator(name).render(parsed, snapshot=snapshot) + snapshot, parsed, _ = payload + generated = _generator(f"generate_{name}").render(parsed, snapshot=snapshot) committed_path = (REPO / "pyquadcortex" / "protocol" / "catalogs" / snapshot / f"{name}.py") committed = committed_path.read_text(encoding="utf-8") @@ -83,17 +90,43 @@ def test_the_payload_still_generates_the_committed_snapshot(payload, name): f"and read the diff. Never edit a generated file by hand.") -def test_the_payload_is_the_catalog_it_claims_to_be(payload): - """A shape tripwire, so a truncated or wrong-firmware payload is caught here. +def test_the_payload_still_has_the_shape_its_row_records(payload): + """A named shape, so a swapped payload says what changed and not just where. - The numbers are the 4.0.1 catalog's own, recorded when the generators last - ran: 533 models, of which 414 are factory across 22 categories. They are - asserted rather than derived so that replacing the file with a different - unit's reply fails loudly instead of quietly regenerating a new snapshot. + This catches nothing the byte-for-byte test misses: a truncated payload + raises while the fixture parses it, and a different unit's reply already + fails the comparison above. What it adds is the failure message. "533 models + became 471" names the problem; "first difference at line 812" does not. """ - snapshot, parsed = payload - if snapshot != "coros_4_0_1": - pytest.skip(f"no recorded shape for {snapshot}") + _, parsed, (models, factory_models, factory_categories) = payload factory = [m for m in parsed if m.is_factory] - assert (len(parsed), len(factory)) == (533, 414) - assert len({m.category for m in factory}) == 22 + assert (len(parsed), len(factory)) == (models, factory_models) + assert len({m.category for m in factory}) == factory_categories + + +def test_every_payload_records_which_unit_produced_it(payload): + """A payload cannot say what firmware it came from, so a sibling file does. + + The XML root carries no attributes and the tar member no metadata, so + nothing in the payload states its own origin. Without the record beside it, + "this is the 4.0.1 catalog" rests on the committer's word and no later + reader can check which unit generated the snapshot. + + The record holds the firmware fields of the `Version` reply and leaves out + the serial number, MAC address and custom name. Those identify an owner's + unit and say nothing about the firmware. + """ + snapshot, _, _ = payload + relative = next(r for s, r, _ in PAYLOADS if s == snapshot) + record = (REPO / relative).with_suffix(".provenance.json") + assert record.exists(), ( + f"{record.relative_to(REPO)} is missing. A payload with no provenance " + f"record cannot be checked against the firmware it claims to be from.") + data = json.loads(record.read_text(encoding="utf-8")) + reply = data["version_reply"] + assert reply["zenos_git_hash"] == _snapshots.snapshot_version(snapshot) + assert reply["device_type"] and reply["app_fw_version"] + for owners in ("device_serial_number", "mac_address", "custom_name"): + assert owners not in reply, ( + f"{owners} identifies a unit's owner, not its firmware; " + f"it does not belong in a committed record") From 4330af00c0219e5fc0eb469223623f48f8fcd7ff Mon Sep 17 00:00:00 2001 From: Jonathan Stokes Date: Tue, 22 Sep 2026 15:57:03 -0500 Subject: [PATCH 05/14] Third triage: make the caching claim true, and hold the record's own numbers The comment explaining why this file borrows `test_generators._load` said the shared loader caches. It does not: it assigns `sys.modules[name]` and then execs unconditionally, so three parametrized cases built three modules and left six `sys.path` entries behind for every later test module. Measured, not assumed. The borrowing is now wrapped in `functools.cache`, so the comment describes what happens and the entries stop accumulating. The provenance record stated the payload's size and digest and nothing checked either. Re-reading the catalog from the same unit gives a payload that parses identically, so every generator comparison would still pass while both numbers went stale in silence - the failure this file's own docstring warns about. Both are now asserted against the file beside them. This is not comparing two payloads by hash, which ADR-0022 forbids; it is checking that a record describes its neighbour. The privacy guard read only `version_reply`'s keys, so a serial moved to the top level or pasted into a comment would have passed. It scans the document. Also from the third pass: The note in `architecture.md` sat inside the list headed "On the unit it covers" while describing how to rebuild with no unit attached. It now stands after the list, and carries the command the pull request claimed it had. The fixture returns its row's path, so the failure message prints the payload that actually failed rather than a name built from the snapshot, and the provenance test stops re-looking-up what the fixture already knew. `comms_version` was excluded from the record for the stated reason that it identifies a unit. It does not; it is a protocol version, and a `bytes` field with no faithful JSON spelling. Both reasons are now given correctly. ADR-0022 gains the `Open Questions` section the format requires, holding the one-unit inference and the question of whether a second profile must commit its payload. The STEERING entry names `.gitattributes` and says `domain-model.md` was left alone on purpose. Dropped: the unused `importlib.util` import. Co-Authored-By: Claude Opus 5 --- docs/ADR.md | 3 ++ docs/STEERING.md | 14 ++++---- docs/architecture.md | 17 +++++++--- tests/test_catalog_payload.py | 61 ++++++++++++++++++++++++----------- 4 files changed, 65 insertions(+), 30 deletions(-) diff --git a/docs/ADR.md b/docs/ADR.md index 3b4cd260..8493ffa3 100644 --- a/docs/ADR.md +++ b/docs/ADR.md @@ -413,6 +413,9 @@ Records are append-only once `Decided` and built upon: a shipped decision is nev - **Rationale:** The generated catalog files are already committed rather than built at install time (ADR-0001 makes the same trade for the protobuf bindings). Committing the output while leaving the input on one person's disk is the half of that argument which does not hold: a generated file whose source nobody else has is only nominally regenerable. This closes it. The test is the part that matters. A saved input nothing reads rots silently, and the offline suite would pass identically if the payload were truncated or from the wrong firmware. Holding the payload to the snapshot it generates turns the file from documentation into a check. This does not weaken ADR-0020 or replace the hardware check. `tests/hardware/test_generated_constants.py` asks whether the snapshot still matches the **unit**, which only a unit can answer. This asks whether the snapshot still matches its own **recorded input**, which is what makes regeneration reproducible off the unit. Both are needed and they fail for different reasons. +- **Open Questions:** + - Whether a snapshot really does not vary with what a unit owns. The one unit that has produced a payload owns no plugin content, so the inference runs one way: the catalog lists content the unit does not have. Whether a unit that has bought an Archetype publishes anything different - a changed attribute, an extra model, a different `sku` - is unmeasured, and a payload from such a unit would settle it in one read. Until then `docs/protocol.md`'s `sku`/`plugin_id` row is the description of the attributes, and the count of 90 belongs with it rather than being measured again here. + - Whether a second profile should be required to commit its payload rather than merely invited to. Today `PAYLOADS` covers what it lists and nothing forces a new snapshot to join, so a profile can land regenerable only on its own unit, which is the state this record exists to end. Left open because no second profile has landed yet, and a rule written for a case nobody has met tends to be the wrong rule. - **Consequences:** - Regenerating a snapshot no longer needs a unit. A contributor on other firmware can rebuild the 4.0.1 snapshot correctly. - The snapshot and its input are reviewed together, and CI catches them parting company. diff --git a/docs/STEERING.md b/docs/STEERING.md index 514a4b40..236795fc 100644 --- a/docs/STEERING.md +++ b/docs/STEERING.md @@ -236,13 +236,13 @@ behind each one is in the lab repository, ### 2026-09-22 - A snapshot's input is committed beside it (ADR-0022) - **What changed:** the `ModelRepo` payload the 4.0.1 snapshot is generated from - is committed, and a test regenerates each snapshot from its own payload and - compares. Section 2 no longer sends the reader to the lab repository for it. -- **Why:** regenerating needed the one unit on that firmware, so #45 could not - finish its own change. -- **Scope:** `tests/fixtures/catalog/`, new `tests/test_catalog_payload.py`, - `CLAUDE.md`, `ADR.md`, `architecture.md`, sections 2 and 7 here. No library - code, and no generated file changed. + is committed, with a provenance record and a test that regenerates each + snapshot from its own payload. Section 2 corrected. +- **Why:** regenerating needed the one unit on that firmware, which blocked #45. +- **Scope:** `tests/fixtures/catalog/`, `tests/test_catalog_payload.py`, + `.gitattributes`, `CLAUDE.md`, `ADR.md`, `architecture.md`, sections 2 and 7 + here. Left alone on purpose: `domain-model.md`, whose `blob` count ADR-0022 + reconciles. No library code, no generated file. ### 2026-09-21 - The hardware suite puts the edited flag back diff --git a/docs/architecture.md b/docs/architecture.md index 3bc5eab5..28b24010 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -507,11 +507,7 @@ On the unit it covers: 1. **Generate the snapshot.** `scripts/generate_models.py --snapshot coros_x_y_z` and the params and options generators, against the new unit. Bind the three - modules on the new class. Each generator also takes `--payload`, a saved - `ModelRepo` reply, so a snapshot can be rebuilt with no unit attached; - `tests/fixtures/catalog/model_repo_coros_4_0_1.bin` is that reply for 4.0.1. - Save the new profile's payload alongside it. `tests/test_catalog_payload.py` holds - each committed payload to the snapshot it generates. + modules on the new class. 2. **Run the suite.** `pytest tests/hardware --hardware --profile YourClass`. `--profile` connects as that class instead of the one the unit resolves to, so the suite runs on a unit the registry would refuse. The suite connects with @@ -524,6 +520,17 @@ On the unit it covers: differently is written into `protocol.md` next to the existing entry, dated and named, and overridden on the new class. +Only step 1 needs the unit for the catalog. Each generator also takes +`--payload`, a saved `ModelRepo` reply, so a snapshot can be rebuilt afterwards +with nothing attached: + + python scripts/generate_options.py --snapshot coros_4_0_1 \ + --payload tests/fixtures/catalog/model_repo_coros_4_0_1.bin + +Save the new profile's payload beside that one with its provenance record, and +add a row to `PAYLOADS` in `tests/test_catalog_payload.py`, which holds each +committed payload to the snapshot it generates (ADR-0022). + When measuring a new CorOS release, check these in order: 1. **The schema.** Re-recover the `.proto` files from the matching Cortex diff --git a/tests/test_catalog_payload.py b/tests/test_catalog_payload.py index 328bd47b..827d8c94 100644 --- a/tests/test_catalog_payload.py +++ b/tests/test_catalog_payload.py @@ -16,7 +16,8 @@ still matches its own recorded input, which is what makes regeneration reproducible for someone who has no unit. """ -import importlib.util +import functools +import hashlib import json import pathlib import sys @@ -33,8 +34,10 @@ #: Each committed payload, the snapshot package it generates, and that #: catalog's recorded shape as `(models, factory models, factory categories)`. #: A new profile that saves its payload adds a row here, and is then held the -#: same way. The shape lives in the row rather than in the test, so a payload -#: cannot be added and silently go unchecked. +#: same way. The shape lives in the row rather than in the test so that each +#: payload carries its own; it is filled in from the payload being added, so it +#: cannot fail then, and it earns its place later, when a row's file is +#: replaced and the numbers say what moved. PAYLOADS = [ ("coros_4_0_1", "tests/fixtures/catalog/model_repo_coros_4_0_1.bin", (533, 414, 22)), ] @@ -42,11 +45,15 @@ GENERATORS = ("models", "params", "options") -#: `tests/test_generators.py` already loads these, registers them in -#: `sys.modules` and caches them. Reuse it rather than keeping a second copy: -#: each bare exec of a generator inserts the repo root and `scripts/` at -#: `sys.path[0]` again, and those entries outlive the test that made them. -from test_generators import _load as _generator # noqa: E402 +from test_generators import _load # noqa: E402 + +#: `test_generators._load` is the one loader for these scripts, so this file +#: borrows it rather than keeping a second copy. It does NOT cache: it re-execs +#: on every call, and each exec inserts the repo root and `scripts/` at +#: `sys.path[0]` again (`generate_models.py` does two per run). Three +#: parametrized cases would leave six entries behind for every later test +#: module in the session, so the caching is added here. +_generator = functools.cache(_load) @pytest.fixture(scope="module", params=PAYLOADS, ids=[row[0] for row in PAYLOADS]) @@ -54,7 +61,7 @@ def payload(request): snapshot, relative, shape = request.param path = REPO / relative assert path.exists(), f"{relative} is missing; it is the snapshot's input" - return snapshot, catalog.parse_model_repo(path.read_bytes()), shape + return snapshot, relative, catalog.parse_model_repo(path.read_bytes()), shape @pytest.mark.parametrize("name", GENERATORS) @@ -69,7 +76,7 @@ def test_the_payload_still_generates_the_committed_snapshot(payload, name): python scripts/generate_.py --snapshot \\ --payload tests/fixtures/catalog/model_repo_.bin """ - snapshot, parsed, _ = payload + snapshot, relative, parsed, _ = payload generated = _generator(f"generate_{name}").render(parsed, snapshot=snapshot) committed_path = (REPO / "pyquadcortex" / "protocol" / "catalogs" / snapshot / f"{name}.py") @@ -86,8 +93,8 @@ def test_the_payload_still_generates_the_committed_snapshot(payload, name): f" committed: {com[first] if first < len(com) else ''}\n" f" generated: {gen[first] if first < len(gen) else ''}\n" f"Regenerate with `python scripts/generate_{name}.py --snapshot " - f"{snapshot} --payload tests/fixtures/catalog/model_repo_{snapshot}.bin` " - f"and read the diff. Never edit a generated file by hand.") + f"{snapshot} --payload {relative}` and read the diff. " + f"Never edit a generated file by hand.") def test_the_payload_still_has_the_shape_its_row_records(payload): @@ -98,7 +105,7 @@ def test_the_payload_still_has_the_shape_its_row_records(payload): fails the comparison above. What it adds is the failure message. "533 models became 471" names the problem; "first difference at line 812" does not. """ - _, parsed, (models, factory_models, factory_categories) = payload + _, _, parsed, (models, factory_models, factory_categories) = payload factory = [m for m in parsed if m.is_factory] assert (len(parsed), len(factory)) == (models, factory_models) assert len({m.category for m in factory}) == factory_categories @@ -116,17 +123,35 @@ def test_every_payload_records_which_unit_produced_it(payload): the serial number, MAC address and custom name. Those identify an owner's unit and say nothing about the firmware. """ - snapshot, _, _ = payload - relative = next(r for s, r, _ in PAYLOADS if s == snapshot) - record = (REPO / relative).with_suffix(".provenance.json") + snapshot, relative, _, _ = payload + payload_path = REPO / relative + record = payload_path.with_suffix(".provenance.json") assert record.exists(), ( f"{record.relative_to(REPO)} is missing. A payload with no provenance " f"record cannot be checked against the firmware it claims to be from.") - data = json.loads(record.read_text(encoding="utf-8")) + raw = record.read_text(encoding="utf-8") + data = json.loads(raw) reply = data["version_reply"] assert reply["zenos_git_hash"] == _snapshots.snapshot_version(snapshot) assert reply["device_type"] and reply["app_fw_version"] + + # The record also states the size and digest of the file beside it, and a + # record describing some earlier capture is worse than none. Re-reading the + # catalog from the same unit produces a payload that parses identically, so + # every comparison above still passes while these two go stale in silence. + # This is not comparing two payloads by hash, which ADR-0022 forbids; it is + # checking that a record describes the file it sits next to. + blob = payload_path.read_bytes() + assert data["payload_bytes"] == len(blob), ( + f"{record.name} records {data['payload_bytes']} bytes and " + f"{payload_path.name} is {len(blob)}. Update the record with the payload.") + assert data["payload_sha256"] == hashlib.sha256(blob).hexdigest(), ( + f"{record.name}'s digest is not {payload_path.name}'s. The payload was " + f"replaced without its record; regenerate both together.") + + # Scanned over the whole document, not just `version_reply`: a field moved + # to the top level or pasted into a comment would pass a keys-only check. for owners in ("device_serial_number", "mac_address", "custom_name"): - assert owners not in reply, ( + assert owners not in raw, ( f"{owners} identifies a unit's owner, not its firmware; " f"it does not belong in a committed record") From dfec7c0c74b50ca90538b7e7769dc3699e5733d3 Mon Sep 17 00:00:00 2001 From: Jonathan Stokes Date: Tue, 22 Sep 2026 16:10:44 -0500 Subject: [PATCH 06/14] Fourth triage: a correction undone by a revert, and a cache that does nothing Two claims in committed text that the branch contradicts. The `comms_version` correction was made and then destroyed. After mutating the provenance record to prove an assertion bites, the restore was `git checkout -- `, which took the file back to its COMMITTED state and carried the correction away with the mutation. The commit message and the pull request description had already announced it. This is the second time a `git checkout --` restore has silently reverted real work on this branch; the first was `docs/capture.md`. Restores here now come from a copy taken before the mutation, and the correction is asserted on disk rather than assumed from an exit code. `functools.cache` on the borrowed loader was justified by a claim that does not hold. The three parametrized cases ask for three DIFFERENT generators, so every call is a miss and the wrapper changes nothing today: measured, a run of this file adds the same entries with and without it. It begins to matter only when `PAYLOADS` gains a second row. The comment now says that, instead of claiming the accumulation stops. Two smaller corrections in the same comment: all three generators insert two path entries, not `generate_models.py` alone, and this module was itself inserting `scripts/` while complaining about the practice. `_snapshots` now loads through the same loader, so that insert is gone. Also from the fourth pass: `options.py` has a second input. `generate_options` reads `option_readings.json` besides the payload, so a reading row moves the generated file with no payload and no generator change. The test docstring named two causes of failure and ADR-0022 named none; both now say so. ADR-0022 put `Open Questions` after `Rationale`; the format declares it between `Options` and `Rationale`, where all twenty other records that carry it put it. Its open question pointed at a `docs/protocol.md` row for the count of 90, which that row does not carry. Sentence dropped. `architecture.md` said only step 1 needs the unit. Step 2 runs the hardware suite. Co-Authored-By: Claude Opus 5 --- docs/ADR.md | 8 +++---- docs/architecture.md | 2 +- .../model_repo_coros_4_0_1.provenance.json | 8 +++++-- tests/test_catalog_payload.py | 22 ++++++++++--------- 4 files changed, 23 insertions(+), 17 deletions(-) diff --git a/docs/ADR.md b/docs/ADR.md index 8493ffa3..44088638 100644 --- a/docs/ADR.md +++ b/docs/ADR.md @@ -402,7 +402,7 @@ Records are append-only once `Decided` and built upon: a shipped decision is nev - **Status:** Decided (2026-09-22) - **Decision:** The `ModelRepo` reply each snapshot in `pyquadcortex/protocol/catalogs/` was generated from is committed to this repository, under `tests/fixtures/catalog/model_repo_.bin`. `tests/test_catalog_payload.py` regenerates from every payload listed in its `PAYLOADS` table and compares byte for byte, so a snapshot and its recorded input cannot drift apart unnoticed. A snapshot whose payload is not listed is not covered. A profile that saves a payload adds a row to `PAYLOADS` there. The payload is a captured input and is never edited; a snapshot is still produced only by its generator. - **Context:** The three generators in `scripts/` have always accepted `--payload`, but the only 4.0.1 payload lived on the maintainer's disk. Regenerating the 4.0.1 snapshot therefore needed the one unit running that firmware, which is the single input a contributor cannot borrow, share or reconstruct. #45 stalled on exactly this: its parser change makes `options.py` stale, and its author runs CorOS 4.1.0, where generating into the 4.0.1 snapshot would stamp the wrong firmware's data into a file named for 4.0.1. The maintainer could regenerate on request, but that makes every future catalog change wait on one person owning one device. - Measured while writing this record, against the committed payload: 533 models, 414 of them factory across 22 categories, which matches the numbers the generators already recorded. Using main's own generators, the payload reproduces `models.py`, `params.py` and `options.py` byte for byte. The package `__init__.py` is not payload-derived: `scripts/_snapshots.py` builds it from the directory listing, and `tests/test_generators.py` already pins it. + Measured while writing this record, against the committed payload: 533 models, 414 of them factory across 22 categories, which matches the numbers the generators already recorded. Using main's own generators, the payload reproduces `models.py`, `params.py` and `options.py` byte for byte, `options.py` together with the readings in `tests/fixtures/catalog/option_readings.json`, which its generator reads besides the payload. The package `__init__.py` is not payload-derived: `scripts/_snapshots.py` builds it from the directory listing, and `tests/test_generators.py` already pins it. Two properties of the payload decided the shape of this record. It describes every model the firmware knows, including plugin content no licence has been bought for: 90 models carry a `sku` and a `plugin_id`, always together and never one alone, and the unit that produced this payload owns none of them. And each read rotates a per-model `blob` token, so two reads of the same catalog never match byte for byte. There are 351 of these attributes, 13 of them empty strings, which is why `docs/domain-model.md` counts 338 models carrying one and a reader counting attributes finds 351. - **Options:** - **(a) Commit the payload beside the snapshot, held by a test - chosen.** Makes regeneration reproducible for anyone, puts the input under review like any other file, and lets CI catch a snapshot that no longer matches its own input. @@ -410,12 +410,12 @@ Records are append-only once `Decided` and built upon: a shipped decision is nev - **(c) Attach it to the issue or pull request that needs it.** Rejected. It solves one request and leaves the next one asking again, and a comment attachment is not versioned, not reviewable and easily lost. - **(d) The maintainer regenerates on request.** Rejected as the status quo that caused the stall. It makes a device the bottleneck for work that needs no device. - **(e) Commit the extracted `ModelRepo.xml` instead of the payload.** Rejected: the payload is what the unit actually sent, and `parse_model_repo` is the thing under test. Committing a derived form would test the parser against our own extraction rather than against the wire. +- **Open Questions:** + - Whether a snapshot really does not vary with what a unit owns. The one unit that has produced a payload owns no plugin content, so the inference runs one way: the catalog lists content the unit does not have. Whether a unit that has bought an Archetype publishes anything different - a changed attribute, an extra model, a different `sku` - is unmeasured, and a payload from such a unit would settle it in one read. + - Whether a second profile should be required to commit its payload rather than merely invited to. Today `PAYLOADS` covers what it lists and nothing forces a new snapshot to join, so a profile can land regenerable only on its own unit, which is the state this record exists to end. Left open because no second profile has landed yet, and a rule written for a case nobody has met tends to be the wrong rule. - **Rationale:** The generated catalog files are already committed rather than built at install time (ADR-0001 makes the same trade for the protobuf bindings). Committing the output while leaving the input on one person's disk is the half of that argument which does not hold: a generated file whose source nobody else has is only nominally regenerable. This closes it. The test is the part that matters. A saved input nothing reads rots silently, and the offline suite would pass identically if the payload were truncated or from the wrong firmware. Holding the payload to the snapshot it generates turns the file from documentation into a check. This does not weaken ADR-0020 or replace the hardware check. `tests/hardware/test_generated_constants.py` asks whether the snapshot still matches the **unit**, which only a unit can answer. This asks whether the snapshot still matches its own **recorded input**, which is what makes regeneration reproducible off the unit. Both are needed and they fail for different reasons. -- **Open Questions:** - - Whether a snapshot really does not vary with what a unit owns. The one unit that has produced a payload owns no plugin content, so the inference runs one way: the catalog lists content the unit does not have. Whether a unit that has bought an Archetype publishes anything different - a changed attribute, an extra model, a different `sku` - is unmeasured, and a payload from such a unit would settle it in one read. Until then `docs/protocol.md`'s `sku`/`plugin_id` row is the description of the attributes, and the count of 90 belongs with it rather than being measured again here. - - Whether a second profile should be required to commit its payload rather than merely invited to. Today `PAYLOADS` covers what it lists and nothing forces a new snapshot to join, so a profile can land regenerable only on its own unit, which is the state this record exists to end. Left open because no second profile has landed yet, and a rule written for a case nobody has met tends to be the wrong rule. - **Consequences:** - Regenerating a snapshot no longer needs a unit. A contributor on other firmware can rebuild the 4.0.1 snapshot correctly. - The snapshot and its input are reviewed together, and CI catches them parting company. diff --git a/docs/architecture.md b/docs/architecture.md index 28b24010..90367afe 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -520,7 +520,7 @@ On the unit it covers: differently is written into `protocol.md` next to the existing entry, dated and named, and overridden on the new class. -Only step 1 needs the unit for the catalog. Each generator also takes +Step 1 is the only one of these that needs the unit twice. Each generator also takes `--payload`, a saved `ModelRepo` reply, so a snapshot can be rebuilt afterwards with nothing attached: diff --git a/tests/fixtures/catalog/model_repo_coros_4_0_1.provenance.json b/tests/fixtures/catalog/model_repo_coros_4_0_1.provenance.json index 9b9560ac..ff92b5d7 100644 --- a/tests/fixtures/catalog/model_repo_coros_4_0_1.provenance.json +++ b/tests/fixtures/catalog/model_repo_coros_4_0_1.provenance.json @@ -4,8 +4,12 @@ "Version reply from the unit that produced it. The payload itself states", "nothing about its own origin, so without this file nothing can tell which", "firmware generated the snapshot beside it.", - "The serial number, MAC address, custom name and comms_version are left out", - "on purpose. They identify one owner's unit and say nothing about the firmware." + "The serial number, MAC address and custom name are left out on purpose:", + "they identify one owner's unit and say nothing about the firmware, and", + "tests/test_catalog_payload.py holds them out.", + "comms_version is left out for a different reason. It is a protocol version", + "and not an identity, and being a bytes field it has no faithful JSON", + "spelling." ], "captured_utc": "2026-09-22T18:30:21Z", "payload_bytes": 46695, diff --git a/tests/test_catalog_payload.py b/tests/test_catalog_payload.py index 827d8c94..3865b070 100644 --- a/tests/test_catalog_payload.py +++ b/tests/test_catalog_payload.py @@ -20,16 +20,12 @@ import hashlib import json import pathlib -import sys import pytest from pyquadcortex.protocol import catalog REPO = pathlib.Path(__file__).resolve().parents[1] -sys.path.insert(0, str(REPO / "scripts")) - -import _snapshots # noqa: E402 (snapshot_version, so the version is derived not repeated) #: Each committed payload, the snapshot package it generates, and that #: catalog's recorded shape as `(models, factory models, factory categories)`. @@ -49,10 +45,13 @@ #: `test_generators._load` is the one loader for these scripts, so this file #: borrows it rather than keeping a second copy. It does NOT cache: it re-execs -#: on every call, and each exec inserts the repo root and `scripts/` at -#: `sys.path[0]` again (`generate_models.py` does two per run). Three -#: parametrized cases would leave six entries behind for every later test -#: module in the session, so the caching is added here. +#: on every call, and every generator inserts the repo root and `scripts/` at +#: `sys.path[0]` as it runs, two entries each, which nothing removes. +#: +#: The wrapper does nothing today. The three parametrized cases ask for three +#: DIFFERENT generators, so each is a miss and each execs once, which is the +#: minimum. It starts earning its place when `PAYLOADS` gains a second row and +#: the same three generators are asked for again per payload. _generator = functools.cache(_load) @@ -70,7 +69,10 @@ def test_the_payload_still_generates_the_committed_snapshot(payload, name): A failure means the payload and the snapshot have parted company. Either someone edited a generated file by hand, which nothing may do, or a - generator changed its output and the snapshot was not regenerated with it. + generator changed its output and the snapshot was not regenerated with it, + or - for `options.py` alone - a row was added to + `tests/fixtures/catalog/option_readings.json`, which `generate_options` + reads besides the payload. The answer is the same in all three cases. The fix is to run the generator, never to edit the file: python scripts/generate_.py --snapshot \\ @@ -132,7 +134,7 @@ def test_every_payload_records_which_unit_produced_it(payload): raw = record.read_text(encoding="utf-8") data = json.loads(raw) reply = data["version_reply"] - assert reply["zenos_git_hash"] == _snapshots.snapshot_version(snapshot) + assert reply["zenos_git_hash"] == _generator("_snapshots").snapshot_version(snapshot) assert reply["device_type"] and reply["app_fw_version"] # The record also states the size and digest of the file beside it, and a From 2c7462bb733aeafe53288dbaf4860b7b70fbd708 Mon Sep 17 00:00:00 2001 From: Jonathan Stokes Date: Tue, 22 Sep 2026 16:23:47 -0500 Subject: [PATCH 07/14] Fifth triage: ADR-0022 settles with ADR-0015, which it silently contradicted ADR-0015's last consequence says `scales.json` distils its parameters out of a real catalog "because committing `ModelRepo.xml` would republish 556 KB of the vendor's product catalog". That file is this one: gunzip the payload and its single tar member is `ModelRepo.xml`, 556,732 bytes, the same number to the byte. Two records were left that a reader could not both act on, and this branch had spent four passes removing exactly that. ADR-0022 now names the bullet and says why the concern no longer decides. What is committed is the 46,695-byte reply as the unit sent it, compressed in git and never expanded on disk. The repository already publishes this catalog's content in derived form - the committed snapshot is 290 KB of model, parameter and option names generated from this exact file - so the names were already here and the payload adds the structure around them. And it is a functional input held by a test rather than a browsable catalog. What grew is the sdist, by 47 KB. ADR-0015's decision is untouched and stays `Decided`; only that bullet's reasoning is overturned, so this is a named settlement rather than a supersede. It does leave `scales.json`'s reason for existing weaker, which is now an open question on ADR-0022 rather than a silence. Also from the fifth pass: `GENERATORS` was a hand-kept list beside `_snapshots.MODULES`, which is the one list of what a snapshot package holds. It is derived from it, so a fourth generator joins this check by existing. The cache comment enumerated three call sites and there are four; `_snapshots` loads through the same helper. Renamed `_generator` to `_script`, since it stopped being only generators when that call was added. `CLAUDE.md` protected `model_repo_*.bin` while `.gitattributes` marked `*.bin`. One glob now, so a second payload cannot land on one side only. The `architecture.md` sentence is rewritten rather than patched a third time. It said step 1 needs the unit "twice", which was never explained and is not true of step 2, which runs the hardware suite. Co-Authored-By: Claude Opus 5 --- CLAUDE.md | 2 +- docs/ADR.md | 4 ++++ docs/architecture.md | 3 ++- tests/test_catalog_payload.py | 36 ++++++++++++++++++----------------- 4 files changed, 26 insertions(+), 19 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 7d5dce00..2c5be738 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -65,7 +65,7 @@ small documentation fixes. footswitch index and a block's column are different numbers that usually agree. - `import hid` appears once, lazily, inside `session.open_device()`. `tests/test_import_cleanliness.py` proves it. -- Never gitignore, delete or edit `tests/fixtures/catalog/model_repo_*.bin`. +- Never gitignore, delete or edit `tests/fixtures/catalog/*.bin`. Each is the captured input its snapshot is generated from, and deleting one puts regeneration back behind a unit nobody else has. `tests/test_catalog_payload.py` holds each payload to the snapshot it diff --git a/docs/ADR.md b/docs/ADR.md index 44088638..63a6c072 100644 --- a/docs/ADR.md +++ b/docs/ADR.md @@ -413,6 +413,10 @@ Records are append-only once `Decided` and built upon: a shipped decision is nev - **Open Questions:** - Whether a snapshot really does not vary with what a unit owns. The one unit that has produced a payload owns no plugin content, so the inference runs one way: the catalog lists content the unit does not have. Whether a unit that has bought an Archetype publishes anything different - a changed attribute, an extra model, a different `sku` - is unmeasured, and a payload from such a unit would settle it in one read. - Whether a second profile should be required to commit its payload rather than merely invited to. Today `PAYLOADS` covers what it lists and nothing forces a new snapshot to join, so a profile can land regenerable only on its own unit, which is the state this record exists to end. Left open because no second profile has landed yet, and a rule written for a case nobody has met tends to be the wrong rule. + - Whether `tests/fixtures/catalog/scales.json` should still be maintained by hand. ADR-0015 created it so the catalog need not be committed, and the catalog is now committed. It could be derived from the payload, or checked against it. Not decided here: ADR-0015's hardware test already proves it has not drifted, and changing it is a separate piece of work with its own hardware consequence. +- **Settles with ADR-0015:** ADR-0015's last consequence says `tests/fixtures/catalog/scales.json` distils its parameters out of a real catalog "because committing `ModelRepo.xml` would republish 556 KB of the vendor's product catalog". That is this file: gunzip the payload and its one tar member is `ModelRepo.xml`, 556,732 bytes. ADR-0015's decision is untouched and stays `Decided`; this record overturns that one bullet's reasoning, and says why rather than leaving two records a reader cannot both act on. + Three things changed the weight of the concern. What is committed is the 46,695-byte reply as the unit sent it, which stays compressed in git and is never expanded to 556 KB on disk. The repository already publishes this catalog's content in derived form: the committed 4.0.1 snapshot is 290 KB of model names, parameter names and option labels generated from this exact file, so the names were already here and what the payload adds is the structure around them. And the file is a functional input held by a test, not a browsable copy of a product catalog. What has genuinely grown is the sdist, by 47 KB. + `scales.json`'s stated reason for existing is weaker as a result. Whether it should now be derived from the committed payload instead of maintained beside it is a real question and not this record's to answer; it is noted below. - **Rationale:** The generated catalog files are already committed rather than built at install time (ADR-0001 makes the same trade for the protobuf bindings). Committing the output while leaving the input on one person's disk is the half of that argument which does not hold: a generated file whose source nobody else has is only nominally regenerable. This closes it. The test is the part that matters. A saved input nothing reads rots silently, and the offline suite would pass identically if the payload were truncated or from the wrong firmware. Holding the payload to the snapshot it generates turns the file from documentation into a check. This does not weaken ADR-0020 or replace the hardware check. `tests/hardware/test_generated_constants.py` asks whether the snapshot still matches the **unit**, which only a unit can answer. This asks whether the snapshot still matches its own **recorded input**, which is what makes regeneration reproducible off the unit. Both are needed and they fail for different reasons. diff --git a/docs/architecture.md b/docs/architecture.md index 90367afe..7fd10c9e 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -520,7 +520,8 @@ On the unit it covers: differently is written into `protocol.md` next to the existing entry, dated and named, and overridden on the new class. -Step 1 is the only one of these that needs the unit twice. Each generator also takes +Step 1 is the one you repeat. A generator change means regenerating, and without +a saved reply that means borrowing the unit again. Each generator also takes `--payload`, a saved `ModelRepo` reply, so a snapshot can be rebuilt afterwards with nothing attached: diff --git a/tests/test_catalog_payload.py b/tests/test_catalog_payload.py index 3865b070..44b0b63d 100644 --- a/tests/test_catalog_payload.py +++ b/tests/test_catalog_payload.py @@ -27,6 +27,19 @@ REPO = pathlib.Path(__file__).resolve().parents[1] +from test_generators import _load # noqa: E402 + +#: `test_generators._load` is the one loader for these scripts, so this file +#: borrows it rather than keeping a second copy. It does NOT cache: it re-execs +#: on every call, and every generator inserts the repo root and `scripts/` at +#: `sys.path[0]` as it runs, two entries each, which nothing removes. +#: +#: The wrapper does nothing today. This module asks for four distinct names - +#: three generators and `_snapshots` - so every call is a miss and each execs +#: once, which is the minimum. It starts earning its place when `PAYLOADS` +#: gains a second row and the same names are asked for again per payload. +_script = functools.cache(_load) + #: Each committed payload, the snapshot package it generates, and that #: catalog's recorded shape as `(models, factory models, factory categories)`. #: A new profile that saves its payload adds a row here, and is then held the @@ -38,21 +51,10 @@ ("coros_4_0_1", "tests/fixtures/catalog/model_repo_coros_4_0_1.bin", (533, 414, 22)), ] -GENERATORS = ("models", "params", "options") - - -from test_generators import _load # noqa: E402 - -#: `test_generators._load` is the one loader for these scripts, so this file -#: borrows it rather than keeping a second copy. It does NOT cache: it re-execs -#: on every call, and every generator inserts the repo root and `scripts/` at -#: `sys.path[0]` as it runs, two entries each, which nothing removes. -#: -#: The wrapper does nothing today. The three parametrized cases ask for three -#: DIFFERENT generators, so each is a miss and each execs once, which is the -#: minimum. It starts earning its place when `PAYLOADS` gains a second row and -#: the same three generators are asked for again per payload. -_generator = functools.cache(_load) +#: Taken from `_snapshots.MODULES`, the one list of what a snapshot package +#: holds, so a fourth generator joins this check by existing rather than by +#: someone remembering to add it here. +GENERATORS = _script("_snapshots").MODULES @pytest.fixture(scope="module", params=PAYLOADS, ids=[row[0] for row in PAYLOADS]) @@ -79,7 +81,7 @@ def test_the_payload_still_generates_the_committed_snapshot(payload, name): --payload tests/fixtures/catalog/model_repo_.bin """ snapshot, relative, parsed, _ = payload - generated = _generator(f"generate_{name}").render(parsed, snapshot=snapshot) + generated = _script(f"generate_{name}").render(parsed, snapshot=snapshot) committed_path = (REPO / "pyquadcortex" / "protocol" / "catalogs" / snapshot / f"{name}.py") committed = committed_path.read_text(encoding="utf-8") @@ -134,7 +136,7 @@ def test_every_payload_records_which_unit_produced_it(payload): raw = record.read_text(encoding="utf-8") data = json.loads(raw) reply = data["version_reply"] - assert reply["zenos_git_hash"] == _generator("_snapshots").snapshot_version(snapshot) + assert reply["zenos_git_hash"] == _script("_snapshots").snapshot_version(snapshot) assert reply["device_type"] and reply["app_fw_version"] # The record also states the size and digest of the file beside it, and a From 0711a019d3048644869173b91ef421c83e7559f6 Mon Sep 17 00:00:00 2001 From: Jonathan Stokes Date: Tue, 22 Sep 2026 16:38:24 -0500 Subject: [PATCH 08/14] Sixth triage: the ADR-0015 settlement argued from a claim that is false The settlement written last pass said the repository already publishes this catalog's content, "so the names were already here and what the payload adds is the structure around them". That is the half of the argument doing the persuading, and it is wrong. `models.py` and `params.py` emit factory content only, and say so. Measured against main: 77 of the 119 non-factory model names appear nowhere else in the repository - Gojira, Cory Wong, Nolly, Plini, SLO-100, Fortin, Parallax - and 161 parameter names exist only on non-factory models. Those are exactly the licence-gated families ADR-0015 was weighing. Worse, the record's own Context bullet says the payload carries plugin content no licence has been bought for, twelve lines above. It contradicted itself and the false half was the persuasive one. Even for factory content the claim overreached: the snapshot spells a model as the constant `N810_AMPED_VT_ALN_70S_M` where the payload carries `810 Amped VT Aln 70s (M)` verbatim, so 137 factory names are absent from main as written too. The argument is deleted rather than reworded. The settlement now states the cost: this does republish content the repository did not carry, and the decision accepts it. What changed the weight of ADR-0015's concern is size and purpose - 46,695 bytes that stay compressed against the 556 KB of XML it was weighing, a functional input held by a test - set against a snapshot nobody but the maintainer can regenerate. It is a trade, and the bullet now says so instead of dissolving it. `Settles with: ADR-NNNN` was a field the Format section did not define. It is defined, beside `Supersedes:`, for the case where a record leaves a decision standing and overturns one consequence's reasoning. Also from the sixth pass: The cache comment was rewritten false by the commit that rewrote it. Deriving `GENERATORS` from `_snapshots` added a fifth call over four names, so the wrapper now saves exactly one exec rather than none. Measured, then written. `CLAUDE.md` protects `tests/fixtures/catalog/*.bin` and claims this file holds each one, while only `PAYLOADS` rows were held. A payload committed without a row was protected by the rule and checked by nothing. `test_every_committed_payload_has_a_row` closes that. The sdist consequence counted the payload and not the provenance record beside it. The measured increase is 48,757 bytes. Corrected: "a fourth generator joins by existing" - it joins by being added to `_snapshots.MODULES`, which is still a list someone keeps, just the only one. Co-Authored-By: Claude Opus 5 --- docs/ADR.md | 11 ++++++----- tests/test_catalog_payload.py | 34 ++++++++++++++++++++++++++-------- 2 files changed, 32 insertions(+), 13 deletions(-) diff --git a/docs/ADR.md b/docs/ADR.md index 63a6c072..4a868cab 100644 --- a/docs/ADR.md +++ b/docs/ADR.md @@ -6,7 +6,7 @@ Architectural decisions for this repository are captured in this file, appended ## Format -Each ADR has: ID, Title, Status, Decision, Context, Options, Open Questions, Rationale, Consequences. A `Supersedes: ADR-NNNN` line appears only when the record replaces a prior decision. +Each ADR has: ID, Title, Status, Decision, Context, Options, Open Questions, Rationale, Consequences. A `Supersedes: ADR-NNNN` line appears only when the record replaces a prior decision. A `Settles with: ADR-NNNN` line appears when a record leaves an earlier decision standing but overturns the reasoning of one of its consequences, which `Supersedes` would overstate. **Status** is one of `Proposed`, `Under Discussion`, `Decided`, `Superseded`, `Rejected`, optionally annotated: e.g. `Decided (confirmed 2026-08-03)` or `Superseded by ADR-NNNN (2026-08-03)`. @@ -414,16 +414,17 @@ Records are append-only once `Decided` and built upon: a shipped decision is nev - Whether a snapshot really does not vary with what a unit owns. The one unit that has produced a payload owns no plugin content, so the inference runs one way: the catalog lists content the unit does not have. Whether a unit that has bought an Archetype publishes anything different - a changed attribute, an extra model, a different `sku` - is unmeasured, and a payload from such a unit would settle it in one read. - Whether a second profile should be required to commit its payload rather than merely invited to. Today `PAYLOADS` covers what it lists and nothing forces a new snapshot to join, so a profile can land regenerable only on its own unit, which is the state this record exists to end. Left open because no second profile has landed yet, and a rule written for a case nobody has met tends to be the wrong rule. - Whether `tests/fixtures/catalog/scales.json` should still be maintained by hand. ADR-0015 created it so the catalog need not be committed, and the catalog is now committed. It could be derived from the payload, or checked against it. Not decided here: ADR-0015's hardware test already proves it has not drifted, and changing it is a separate piece of work with its own hardware consequence. -- **Settles with ADR-0015:** ADR-0015's last consequence says `tests/fixtures/catalog/scales.json` distils its parameters out of a real catalog "because committing `ModelRepo.xml` would republish 556 KB of the vendor's product catalog". That is this file: gunzip the payload and its one tar member is `ModelRepo.xml`, 556,732 bytes. ADR-0015's decision is untouched and stays `Decided`; this record overturns that one bullet's reasoning, and says why rather than leaving two records a reader cannot both act on. - Three things changed the weight of the concern. What is committed is the 46,695-byte reply as the unit sent it, which stays compressed in git and is never expanded to 556 KB on disk. The repository already publishes this catalog's content in derived form: the committed 4.0.1 snapshot is 290 KB of model names, parameter names and option labels generated from this exact file, so the names were already here and what the payload adds is the structure around them. And the file is a functional input held by a test, not a browsable copy of a product catalog. What has genuinely grown is the sdist, by 47 KB. - `scales.json`'s stated reason for existing is weaker as a result. Whether it should now be derived from the committed payload instead of maintained beside it is a real question and not this record's to answer; it is noted below. +- **Settles with: ADR-0015.** Its last consequence says `tests/fixtures/catalog/scales.json` distils its parameters out of a real catalog "because committing `ModelRepo.xml` would republish 556 KB of the vendor's product catalog". That is this file: gunzip the payload and its one tar member is `ModelRepo.xml`, 556,732 bytes. ADR-0015's decision stands and its status is unchanged; this record overturns that one bullet's reasoning, and says so rather than leaving two records a reader cannot both act on. + **This does republish content the repository did not carry, and the decision accepts that rather than denying it.** Measured against main: of the 533 models, 77 non-factory names appear nowhere else in the repository - the Gojira, Cory Wong, Nolly, Plini, `SLO-100`, Fortin and Parallax families - because `models.py` and `params.py` emit factory content only. 161 parameter names exist only on non-factory models. The generated snapshot also spells a factory model as the constant `N810_AMPED_VT_ALN_70S_M`, where the payload carries `810 Amped VT Aln 70s (M)` verbatim, so even for factory content the payload publishes a form the repository did not hold. + What changed the weight of the concern is size and purpose, not content. ADR-0015 was weighing 556 KB of XML; what is committed is the 46,695-byte reply as the unit sent it, which stays compressed in git and is never expanded on disk, and the distributed sdist grows by 48,757 bytes including the provenance record. It is a functional input, held by a test and read by three generators, rather than a copy of a product catalog for its own sake. Set against a snapshot nobody but the maintainer can regenerate, which is the state this record exists to end, that trade is worth making. It is a trade, and this bullet is here so the next reader weighs it rather than inherits it. + `scales.json`'s stated reason for existing is weaker as a result, which is noted as an open question above. - **Rationale:** The generated catalog files are already committed rather than built at install time (ADR-0001 makes the same trade for the protobuf bindings). Committing the output while leaving the input on one person's disk is the half of that argument which does not hold: a generated file whose source nobody else has is only nominally regenerable. This closes it. The test is the part that matters. A saved input nothing reads rots silently, and the offline suite would pass identically if the payload were truncated or from the wrong firmware. Holding the payload to the snapshot it generates turns the file from documentation into a check. This does not weaken ADR-0020 or replace the hardware check. `tests/hardware/test_generated_constants.py` asks whether the snapshot still matches the **unit**, which only a unit can answer. This asks whether the snapshot still matches its own **recorded input**, which is what makes regeneration reproducible off the unit. Both are needed and they fail for different reasons. - **Consequences:** - Regenerating a snapshot no longer needs a unit. A contributor on other firmware can rebuild the 4.0.1 snapshot correctly. - The snapshot and its input are reviewed together, and CI catches them parting company. - - A payload ships in the sdist, because `pyproject.toml` includes `/tests` wholesale. It is not in the wheel. 47KB, already gzipped. + - A payload and its provenance record ship in the sdist, because `pyproject.toml` includes `/tests` wholesale. Neither is in the wheel. The measured increase is 48,757 bytes; the payload is already gzipped and does not compress further. - A new profile that wants the same guarantee saves its payload and adds a row to `PAYLOADS`. Nothing forces it to, so a profile with no committed payload stays regenerable only on its own unit. - A payload carries no statement of its own provenance: the XML root has no attributes and the tar member has no metadata. `model_repo_.provenance.json` records the identifying fields of the `Version` reply beside it, minus the serial number, MAC address and custom name, which are the owner's and not the firmware's. - Payload bytes are not reproducible between reads and must never be compared by hash; compare parsed catalogs. The one recorded comparison is the maintainer's, across reads on 2026-07-26 and 2026-09-22, identical once the `blob` attributes are blanked. The earlier payload is not committed, so that comparison cannot be repeated from this repository. diff --git a/tests/test_catalog_payload.py b/tests/test_catalog_payload.py index 44b0b63d..21f162cc 100644 --- a/tests/test_catalog_payload.py +++ b/tests/test_catalog_payload.py @@ -34,10 +34,10 @@ #: on every call, and every generator inserts the repo root and `scripts/` at #: `sys.path[0]` as it runs, two entries each, which nothing removes. #: -#: The wrapper does nothing today. This module asks for four distinct names - -#: three generators and `_snapshots` - so every call is a miss and each execs -#: once, which is the minimum. It starts earning its place when `PAYLOADS` -#: gains a second row and the same names are asked for again per payload. +#: The wrapper saves exactly one exec today. This module makes five calls over +#: four distinct names: the three generators once each, and `_snapshots` twice, +#: for `GENERATORS` below and again in the provenance test. It earns more as +#: `PAYLOADS` grows, because every row asks the same names again. _script = functools.cache(_load) #: Each committed payload, the snapshot package it generates, and that @@ -51,9 +51,10 @@ ("coros_4_0_1", "tests/fixtures/catalog/model_repo_coros_4_0_1.bin", (533, 414, 22)), ] -#: Taken from `_snapshots.MODULES`, the one list of what a snapshot package -#: holds, so a fourth generator joins this check by existing rather than by -#: someone remembering to add it here. +#: Taken from `_snapshots.MODULES`, which is the list the snapshot package's +#: own `__init__` is built from and `tests/test_generators.py` pins. A fourth +#: generator still has to be added there, but only there, instead of here as +#: well. GENERATORS = _script("_snapshots").MODULES @@ -101,6 +102,23 @@ def test_the_payload_still_generates_the_committed_snapshot(payload, name): f"Never edit a generated file by hand.") +def test_every_committed_payload_has_a_row(): + """`PAYLOADS` covers every payload in the fixture directory. + + `CLAUDE.md` protects `tests/fixtures/catalog/*.bin` and says this file holds + each one to the snapshot it generates. That is only true while the two + agree: a payload committed with no row here is checked by nothing, while the + rule says it is covered. This is the assertion that keeps the sentence true. + """ + directory = REPO / "tests" / "fixtures" / "catalog" + committed = {p.name for p in directory.glob("*.bin")} + listed = {(REPO / relative).name for _, relative, _ in PAYLOADS} + assert committed == listed, ( + f"payloads with no PAYLOADS row: {sorted(committed - listed)}; " + f"rows with no payload: {sorted(listed - committed)}. Add the row, or " + f"the file is protected by CLAUDE.md and checked by nothing.") + + def test_the_payload_still_has_the_shape_its_row_records(payload): """A named shape, so a swapped payload says what changed and not just where. @@ -129,7 +147,7 @@ def test_every_payload_records_which_unit_produced_it(payload): """ snapshot, relative, _, _ = payload payload_path = REPO / relative - record = payload_path.with_suffix(".provenance.json") + record = payload_path.with_name(payload_path.stem + ".provenance.json") assert record.exists(), ( f"{record.relative_to(REPO)} is missing. A payload with no provenance " f"record cannot be checked against the firmware it claims to be from.") From 3b7d435e645facff1dc2ae5a1eef8d43473fa446 Mon Sep 17 00:00:00 2001 From: Jonathan Stokes Date: Tue, 22 Sep 2026 16:52:35 -0500 Subject: [PATCH 09/14] Seventh triage: every number in the settlement, measured this time Two of these were introduced by the sixth pass's own fix, which is the point. The sdist figure of 48,757 bytes reproduces nothing. Built with the project's own backend: main is 771,392 bytes and this branch is 824,266, so the pull request adds 52,874. The Settles-with bullet claimed the distributed sdist grew by 48,757 "including the provenance record", and it does not. Both places now carry measured numbers, and the two files' own sizes are given as sizes rather than as a delta they are not. The one factory example was the single factory name main already carries verbatim. `810 Amped VT Aln 70s (M)` is the worked example in `generate_models._constant_name`'s docstring, so the sentence it was supporting had a counterexample for its evidence. The example is now `110 US PRN Brown FatJ 10s (M)`, which is genuinely absent, and the 137 of 397 the commit message had and the record dropped is back in the record. "161 parameter names" sat under "Measured against main" and was not measured against main: 64 of the 161 appear there verbatim, so the number supporting that sentence is 97. The 161 is a payload-internal fact and has been removed rather than relabelled. The family list read as exhaustive and covers 65 of the 77. The other 12 are internal and diagnostic - `ZenLink*`, `2-Track Looper`, the PCOM defaults, Nameless - not licence-gated content, so the split is stated. Also from the seventh pass: ADR-0015 says `scales.json` distils "the parameters under test" out of a real catalog. The paraphrase dropped those words, which are the ones explaining why that file is small. Quoted now. The coverage test compared basenames, so a row pointing outside the protected directory could satisfy it while the file inside went unchecked. It compares repo-relative paths. STEERING said this repository carries the payload "each" snapshot is generated from. One snapshot exists and nothing forces a second to commit one, so the sentence would have gone stale on the next profile. `_snapshots.MODULES` is half of what the package `__init__` is built from; `EXPORTS` is the other half. Co-Authored-By: Claude Opus 5 --- docs/ADR.md | 8 ++++---- docs/STEERING.md | 2 +- tests/test_catalog_payload.py | 12 ++++++------ 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/ADR.md b/docs/ADR.md index 4a868cab..4e299885 100644 --- a/docs/ADR.md +++ b/docs/ADR.md @@ -414,9 +414,9 @@ Records are append-only once `Decided` and built upon: a shipped decision is nev - Whether a snapshot really does not vary with what a unit owns. The one unit that has produced a payload owns no plugin content, so the inference runs one way: the catalog lists content the unit does not have. Whether a unit that has bought an Archetype publishes anything different - a changed attribute, an extra model, a different `sku` - is unmeasured, and a payload from such a unit would settle it in one read. - Whether a second profile should be required to commit its payload rather than merely invited to. Today `PAYLOADS` covers what it lists and nothing forces a new snapshot to join, so a profile can land regenerable only on its own unit, which is the state this record exists to end. Left open because no second profile has landed yet, and a rule written for a case nobody has met tends to be the wrong rule. - Whether `tests/fixtures/catalog/scales.json` should still be maintained by hand. ADR-0015 created it so the catalog need not be committed, and the catalog is now committed. It could be derived from the payload, or checked against it. Not decided here: ADR-0015's hardware test already proves it has not drifted, and changing it is a separate piece of work with its own hardware consequence. -- **Settles with: ADR-0015.** Its last consequence says `tests/fixtures/catalog/scales.json` distils its parameters out of a real catalog "because committing `ModelRepo.xml` would republish 556 KB of the vendor's product catalog". That is this file: gunzip the payload and its one tar member is `ModelRepo.xml`, 556,732 bytes. ADR-0015's decision stands and its status is unchanged; this record overturns that one bullet's reasoning, and says so rather than leaving two records a reader cannot both act on. - **This does republish content the repository did not carry, and the decision accepts that rather than denying it.** Measured against main: of the 533 models, 77 non-factory names appear nowhere else in the repository - the Gojira, Cory Wong, Nolly, Plini, `SLO-100`, Fortin and Parallax families - because `models.py` and `params.py` emit factory content only. 161 parameter names exist only on non-factory models. The generated snapshot also spells a factory model as the constant `N810_AMPED_VT_ALN_70S_M`, where the payload carries `810 Amped VT Aln 70s (M)` verbatim, so even for factory content the payload publishes a form the repository did not hold. - What changed the weight of the concern is size and purpose, not content. ADR-0015 was weighing 556 KB of XML; what is committed is the 46,695-byte reply as the unit sent it, which stays compressed in git and is never expanded on disk, and the distributed sdist grows by 48,757 bytes including the provenance record. It is a functional input, held by a test and read by three generators, rather than a copy of a product catalog for its own sake. Set against a snapshot nobody but the maintainer can regenerate, which is the state this record exists to end, that trade is worth making. It is a trade, and this bullet is here so the next reader weighs it rather than inherits it. +- **Settles with: ADR-0015.** Its last consequence says `tests/fixtures/catalog/scales.json` distils "the parameters under test" out of a real catalog "because committing `ModelRepo.xml` would republish 556 KB of the vendor's product catalog". That is this file: gunzip the payload and its one tar member is `ModelRepo.xml`, 556,732 bytes. ADR-0015's decision stands and its status is unchanged; this record overturns that one bullet's reasoning, and says so rather than leaving two records a reader cannot both act on. + **This does republish content the repository did not carry, and the decision accepts that rather than denying it.** `models.py` and `params.py` emit factory content only, and say so. Measured against main: 77 of the 119 non-factory model names appear nowhere else in the repository, 65 of them from the `Gojira`, `Cory Wong`, `Nolly`, `Plini`, `SLO-100`, `Fortin` and `Parallax` families and the other 12 internal or diagnostic, and 97 parameter names carried only by non-factory models are likewise absent. Those families are the licence-gated content ADR-0015 was weighing. Even for factory content the payload publishes a form this repository did not hold: it carries the drawn name `110 US PRN Brown FatJ 10s (M)`, where the snapshot emits constants, and 137 of the 397 distinct factory names appear nowhere on main as the payload spells them. + What changed the weight of the concern is size and purpose, not content. ADR-0015 was weighing 556 KB of XML; what is committed is the 46,695-byte reply as the unit sent it, which stays compressed in git and is never expanded on disk. It is a functional input, read by three generators and held by a test, rather than a copy of a product catalog for its own sake. Set against a snapshot nobody but the maintainer can regenerate, which is the state this record exists to end, that trade is worth making. It is a trade, and this bullet is here so the next reader weighs it rather than inherits it. `scales.json`'s stated reason for existing is weaker as a result, which is noted as an open question above. - **Rationale:** The generated catalog files are already committed rather than built at install time (ADR-0001 makes the same trade for the protobuf bindings). Committing the output while leaving the input on one person's disk is the half of that argument which does not hold: a generated file whose source nobody else has is only nominally regenerable. This closes it. The test is the part that matters. A saved input nothing reads rots silently, and the offline suite would pass identically if the payload were truncated or from the wrong firmware. Holding the payload to the snapshot it generates turns the file from documentation into a check. @@ -424,7 +424,7 @@ Records are append-only once `Decided` and built upon: a shipped decision is nev - **Consequences:** - Regenerating a snapshot no longer needs a unit. A contributor on other firmware can rebuild the 4.0.1 snapshot correctly. - The snapshot and its input are reviewed together, and CI catches them parting company. - - A payload and its provenance record ship in the sdist, because `pyproject.toml` includes `/tests` wholesale. Neither is in the wheel. The measured increase is 48,757 bytes; the payload is already gzipped and does not compress further. + - A payload and its provenance record ship in the sdist, because `pyproject.toml` includes `/tests` wholesale. Neither is in the wheel. The two files are 46,695 and 1,552 bytes, and the payload is already gzipped so it does not compress further. Built with the project's own backend, this record's pull request takes the sdist from 771,392 to 824,266 bytes, 52,874 of which is the fixtures and the test module together. - A new profile that wants the same guarantee saves its payload and adds a row to `PAYLOADS`. Nothing forces it to, so a profile with no committed payload stays regenerable only on its own unit. - A payload carries no statement of its own provenance: the XML root has no attributes and the tar member has no metadata. `model_repo_.provenance.json` records the identifying fields of the `Version` reply beside it, minus the serial number, MAC address and custom name, which are the owner's and not the firmware's. - Payload bytes are not reproducible between reads and must never be compared by hash; compare parsed catalogs. The one recorded comparison is the maintainer's, across reads on 2026-07-26 and 2026-09-22, identical once the `blob` attributes are blanked. The earlier payload is not committed, so that comparison cannot be repeated from this repository. diff --git a/docs/STEERING.md b/docs/STEERING.md index 236795fc..110e7d4e 100644 --- a/docs/STEERING.md +++ b/docs/STEERING.md @@ -47,7 +47,7 @@ generated bindings in `pyquadcortex/protocol/proto/`), the recovered schema in - **The lab repository.** Planning material, raw USB captures and the narrative history behind the documents here live in the private `quad-cortex` repository. This repository carries the library, its engineering documents, - and the `ModelRepo` payload each catalog snapshot is generated from + and the `ModelRepo` payloads its catalog snapshots are generated from (`tests/fixtures/catalog/`, ADR-0022). ## 3. Architecture Overview diff --git a/tests/test_catalog_payload.py b/tests/test_catalog_payload.py index 21f162cc..6ffbd609 100644 --- a/tests/test_catalog_payload.py +++ b/tests/test_catalog_payload.py @@ -51,10 +51,10 @@ ("coros_4_0_1", "tests/fixtures/catalog/model_repo_coros_4_0_1.bin", (533, 414, 22)), ] -#: Taken from `_snapshots.MODULES`, which is the list the snapshot package's -#: own `__init__` is built from and `tests/test_generators.py` pins. A fourth -#: generator still has to be added there, but only there, instead of here as -#: well. +#: Taken from `_snapshots.MODULES`, which with `EXPORTS` beside it is what the +#: snapshot package's own `__init__` is built from, and what +#: `tests/test_generators.py` pins. A fourth generator still has to be added +#: there, but only there, instead of here as well. GENERATORS = _script("_snapshots").MODULES @@ -111,8 +111,8 @@ def test_every_committed_payload_has_a_row(): rule says it is covered. This is the assertion that keeps the sentence true. """ directory = REPO / "tests" / "fixtures" / "catalog" - committed = {p.name for p in directory.glob("*.bin")} - listed = {(REPO / relative).name for _, relative, _ in PAYLOADS} + committed = {p.relative_to(REPO).as_posix() for p in directory.glob("*.bin")} + listed = {relative for _, relative, _ in PAYLOADS} assert committed == listed, ( f"payloads with no PAYLOADS row: {sorted(committed - listed)}; " f"rows with no payload: {sorted(listed - committed)}. Add the row, or " From a8a632560ad441c1c2184c3d122a7e8449ba5224 Mon Sep 17 00:00:00 2001 From: Jonathan Stokes Date: Tue, 22 Sep 2026 17:10:22 -0500 Subject: [PATCH 10/14] Eighth triage: the shape test is a guard, not a courtesy The docstring said it "catches nothing the byte-for-byte test misses". It catches the one thing that test cannot see, and telling a future reader otherwise invites its deletion. The snapshot holds factory content only, by design. So a model this repository generates no constants for can join the catalog without moving a generated byte. Measured: one extra model carrying a `sku` and a `plugin_id`, whose only parameter is a float and which therefore joins no option list, leaves `models.py`, `params.py` and `options.py` byte for byte identical. The model count is the only thing that moves. That case is ADR-0022's own first open question - whether a unit that has bought an Archetype publishes anything the maintainer's does not - so this assertion is its guard. The settlement bullet put five licence-gated models in the harmless pile. Of the 77 absent non-factory names, 70 carry a `sku` and a `plugin_id` and 7 do not; the text said 65 from seven families and "the other 12 internal or diagnostic". The three `Nameless` models are drawn Archetype content from an eighth family the list omitted, and two hidden PCOM cab defaults are licensed too. This is the bullet whose job is to state the republication cost rather than deny it, so understating it by five is the specific failure it exists to avoid. The split is now 70 and 7, both named. The sdist byte count is removed rather than re-measured. It was stale again: the previous commit added 37 bytes to the test module after the figure was taken, so 824,266 described the commit before it. Only `/tests` is in the sdist's `include`, so the number moves whenever a test changes and never when this record does - a committed figure goes stale within a commit or two by construction, which it did twice. The file sizes are stable facts and stay; the growth is given as roughly 52 KB. Also: the provenance record explains `comms_version`'s omission and not `cortex_control_version`'s. Both are covered now, for their different reasons. The `test_generators` import no longer needs its `noqa`. Co-Authored-By: Claude Opus 5 --- docs/ADR.md | 4 +-- .../model_repo_coros_4_0_1.provenance.json | 4 ++- tests/test_catalog_payload.py | 28 +++++++++++++------ 3 files changed, 25 insertions(+), 11 deletions(-) diff --git a/docs/ADR.md b/docs/ADR.md index 4e299885..b35b6cb2 100644 --- a/docs/ADR.md +++ b/docs/ADR.md @@ -415,7 +415,7 @@ Records are append-only once `Decided` and built upon: a shipped decision is nev - Whether a second profile should be required to commit its payload rather than merely invited to. Today `PAYLOADS` covers what it lists and nothing forces a new snapshot to join, so a profile can land regenerable only on its own unit, which is the state this record exists to end. Left open because no second profile has landed yet, and a rule written for a case nobody has met tends to be the wrong rule. - Whether `tests/fixtures/catalog/scales.json` should still be maintained by hand. ADR-0015 created it so the catalog need not be committed, and the catalog is now committed. It could be derived from the payload, or checked against it. Not decided here: ADR-0015's hardware test already proves it has not drifted, and changing it is a separate piece of work with its own hardware consequence. - **Settles with: ADR-0015.** Its last consequence says `tests/fixtures/catalog/scales.json` distils "the parameters under test" out of a real catalog "because committing `ModelRepo.xml` would republish 556 KB of the vendor's product catalog". That is this file: gunzip the payload and its one tar member is `ModelRepo.xml`, 556,732 bytes. ADR-0015's decision stands and its status is unchanged; this record overturns that one bullet's reasoning, and says so rather than leaving two records a reader cannot both act on. - **This does republish content the repository did not carry, and the decision accepts that rather than denying it.** `models.py` and `params.py` emit factory content only, and say so. Measured against main: 77 of the 119 non-factory model names appear nowhere else in the repository, 65 of them from the `Gojira`, `Cory Wong`, `Nolly`, `Plini`, `SLO-100`, `Fortin` and `Parallax` families and the other 12 internal or diagnostic, and 97 parameter names carried only by non-factory models are likewise absent. Those families are the licence-gated content ADR-0015 was weighing. Even for factory content the payload publishes a form this repository did not hold: it carries the drawn name `110 US PRN Brown FatJ 10s (M)`, where the snapshot emits constants, and 137 of the 397 distinct factory names appear nowhere on main as the payload spells them. + **This does republish content the repository did not carry, and the decision accepts that rather than denying it.** `models.py` and `params.py` emit factory content only, and say so. Measured against main: 77 of the 119 non-factory model names appear nowhere else in the repository, and 97 parameter names carried only by non-factory models are likewise absent. 70 of those 77 carry a `sku` and a `plugin_id`, which is the licence-gated content ADR-0015 was weighing: the `Gojira`, `Cory Wong`, `Nolly`, `Plini`, `SLO-100`, `Fortin`, `Parallax` and `Nameless` families, and two hidden PCOM cab defaults. The remaining 7 are internal or diagnostic - the four `ZenLink` models, a self-test, a PCOM tape delay and the `2-Track Looper`. Even for factory content the payload publishes a form this repository did not hold: it carries the drawn name `110 US PRN Brown FatJ 10s (M)`, where the snapshot emits constants, and 137 of the 397 distinct factory names appear nowhere on main as the payload spells them. What changed the weight of the concern is size and purpose, not content. ADR-0015 was weighing 556 KB of XML; what is committed is the 46,695-byte reply as the unit sent it, which stays compressed in git and is never expanded on disk. It is a functional input, read by three generators and held by a test, rather than a copy of a product catalog for its own sake. Set against a snapshot nobody but the maintainer can regenerate, which is the state this record exists to end, that trade is worth making. It is a trade, and this bullet is here so the next reader weighs it rather than inherits it. `scales.json`'s stated reason for existing is weaker as a result, which is noted as an open question above. - **Rationale:** The generated catalog files are already committed rather than built at install time (ADR-0001 makes the same trade for the protobuf bindings). Committing the output while leaving the input on one person's disk is the half of that argument which does not hold: a generated file whose source nobody else has is only nominally regenerable. This closes it. @@ -424,7 +424,7 @@ Records are append-only once `Decided` and built upon: a shipped decision is nev - **Consequences:** - Regenerating a snapshot no longer needs a unit. A contributor on other firmware can rebuild the 4.0.1 snapshot correctly. - The snapshot and its input are reviewed together, and CI catches them parting company. - - A payload and its provenance record ship in the sdist, because `pyproject.toml` includes `/tests` wholesale. Neither is in the wheel. The two files are 46,695 and 1,552 bytes, and the payload is already gzipped so it does not compress further. Built with the project's own backend, this record's pull request takes the sdist from 771,392 to 824,266 bytes, 52,874 of which is the fixtures and the test module together. + - A payload and its provenance record ship in the sdist, because `pyproject.toml` includes `/tests` wholesale. Neither is in the wheel. The payload is 46,695 bytes and its record 1,552, and the payload is already gzipped so it does not compress further; the sdist grows by roughly 52 KB. No exact figure is recorded, deliberately. Only `/tests` is in the sdist's `include`, so the number moves whenever any test changes and not when this record does, which makes a committed byte count stale within a commit or two of being written. It was, twice. - A new profile that wants the same guarantee saves its payload and adds a row to `PAYLOADS`. Nothing forces it to, so a profile with no committed payload stays regenerable only on its own unit. - A payload carries no statement of its own provenance: the XML root has no attributes and the tar member has no metadata. `model_repo_.provenance.json` records the identifying fields of the `Version` reply beside it, minus the serial number, MAC address and custom name, which are the owner's and not the firmware's. - Payload bytes are not reproducible between reads and must never be compared by hash; compare parsed catalogs. The one recorded comparison is the maintainer's, across reads on 2026-07-26 and 2026-09-22, identical once the `blob` attributes are blanked. The earlier payload is not committed, so that comparison cannot be repeated from this repository. diff --git a/tests/fixtures/catalog/model_repo_coros_4_0_1.provenance.json b/tests/fixtures/catalog/model_repo_coros_4_0_1.provenance.json index ff92b5d7..c0169fe3 100644 --- a/tests/fixtures/catalog/model_repo_coros_4_0_1.provenance.json +++ b/tests/fixtures/catalog/model_repo_coros_4_0_1.provenance.json @@ -9,7 +9,9 @@ "tests/test_catalog_payload.py holds them out.", "comms_version is left out for a different reason. It is a protocol version", "and not an identity, and being a bytes field it has no faithful JSON", - "spelling." + "spelling. cortex_control_version and cortex_control_version_valid are left", + "out because they describe the host application that asked, not the unit", + "that answered." ], "captured_utc": "2026-09-22T18:30:21Z", "payload_bytes": 46695, diff --git a/tests/test_catalog_payload.py b/tests/test_catalog_payload.py index 6ffbd609..a54e8ec4 100644 --- a/tests/test_catalog_payload.py +++ b/tests/test_catalog_payload.py @@ -24,11 +24,10 @@ import pytest from pyquadcortex.protocol import catalog +from test_generators import _load REPO = pathlib.Path(__file__).resolve().parents[1] -from test_generators import _load # noqa: E402 - #: `test_generators._load` is the one loader for these scripts, so this file #: borrows it rather than keeping a second copy. It does NOT cache: it re-execs #: on every call, and every generator inserts the repo root and `scripts/` at @@ -120,12 +119,25 @@ def test_every_committed_payload_has_a_row(): def test_the_payload_still_has_the_shape_its_row_records(payload): - """A named shape, so a swapped payload says what changed and not just where. - - This catches nothing the byte-for-byte test misses: a truncated payload - raises while the fixture parses it, and a different unit's reply already - fails the comparison above. What it adds is the failure message. "533 models - became 471" names the problem; "first difference at line 812" does not. + """The shape its row records, which is the one thing the comparison misses. + + Nearly everything is caught above: a truncated payload raises while the + fixture parses it, and another unit's catalog fails the byte-for-byte + comparison. One thing is not. The snapshot holds FACTORY content only, by + design and by its own docstrings, so a model this repository generates no + constants for can appear in the catalog without moving a single generated + byte. + + Measured, not supposed: adding one model that carries a `sku` and a + `plugin_id`, whose only parameter is a float and which therefore joins no + option list, leaves `models.py`, `params.py` and `options.py` byte for byte + identical. The model count is the only thing that moves. + + That case is ADR-0022's first open question - whether a unit that has + bought an Archetype publishes anything the maintainer's unit does not - so + this assertion is the guard for it rather than a nicer error message. It is + also a nicer error message: "533 models became 534" names the problem where + "first difference at line 812" would not. """ _, _, parsed, (models, factory_models, factory_categories) = payload factory = [m for m in parsed if m.is_factory] From 866f1cbe94ea83c52e95b11558013e41901c025a Mon Sep 17 00:00:00 2001 From: Jonathan Stokes Date: Tue, 22 Sep 2026 17:24:50 -0500 Subject: [PATCH 11/14] Ninth triage: stop recording numbers that a later commit invalidates The provenance record's size was given as 1,552 bytes. The commit that wrote that sentence is the commit that made it 1,718, by adding three lines to the record and then rewriting the same bullet without re-reading the file. That is the ninth instance of one failure, and the third produced by the commit fixing the previous instance, so the fix this time is structural rather than arithmetic: the bullet now records one size, the payload's 46,695 bytes, which `tests/test_catalog_payload.py` pins against the file. Every other figure is gone. A number no test holds is a number that goes stale silently, and this record has now proved that twice about the sdist and once about itself. "Only `/tests` is in the sdist's `include`" is false. There are eight entries: the package, the tests, the scripts, the examples, the proto schema, the README, the changelog and the licence. The conclusion drawn from it survives and is stronger than was claimed - the figure moves on almost any change to the repository - and `docs/` is not in the sdist at all, so a change to this record never moves it. The provenance record explained the absence of `cortex_control_version` and `cortex_control_version_valid` as a choice about what belongs in the file. It was not a choice. The unit's reply does not carry either: the first is what the host announces TO the unit, and the second comes back in a later message of its own, at +0.73 s, both recorded in `docs/protocol.md`. Stating a judgement where the fact is "the wire does not carry it" is the distinction `docs/writing.md` draws, and the `comms_version` clause beside it, which is a real exclusion, is now marked as one. The `PAYLOADS` comment still introduced the shape row as diagnostics, written before the eighth pass established it as the guard for ADR-0022's first open question. It points at the test that explains it. Co-Authored-By: Claude Opus 5 --- docs/ADR.md | 2 +- .../catalog/model_repo_coros_4_0_1.provenance.json | 12 +++++++----- tests/test_catalog_payload.py | 7 ++++--- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/docs/ADR.md b/docs/ADR.md index b35b6cb2..9836974b 100644 --- a/docs/ADR.md +++ b/docs/ADR.md @@ -424,7 +424,7 @@ Records are append-only once `Decided` and built upon: a shipped decision is nev - **Consequences:** - Regenerating a snapshot no longer needs a unit. A contributor on other firmware can rebuild the 4.0.1 snapshot correctly. - The snapshot and its input are reviewed together, and CI catches them parting company. - - A payload and its provenance record ship in the sdist, because `pyproject.toml` includes `/tests` wholesale. Neither is in the wheel. The payload is 46,695 bytes and its record 1,552, and the payload is already gzipped so it does not compress further; the sdist grows by roughly 52 KB. No exact figure is recorded, deliberately. Only `/tests` is in the sdist's `include`, so the number moves whenever any test changes and not when this record does, which makes a committed byte count stale within a commit or two of being written. It was, twice. + - A payload and its provenance record ship in the sdist, because `pyproject.toml` includes `/tests`. Neither is in the wheel. The payload is 46,695 bytes, which `tests/test_catalog_payload.py` pins against the file, and it is already gzipped so it does not compress further. The two together add about 50 KB. No exact figure is recorded here, deliberately: the sdist's `include` covers the package, the tests, the scripts, the examples, the proto schema and three files at the root, so the number moves on almost any change to the repository, while `docs/` is not in the sdist at all and a change to this record never moves it. A byte count written here went stale twice, each time in the commit that was correcting the previous one, which is the argument for recording the one size a test holds and no others. - A new profile that wants the same guarantee saves its payload and adds a row to `PAYLOADS`. Nothing forces it to, so a profile with no committed payload stays regenerable only on its own unit. - A payload carries no statement of its own provenance: the XML root has no attributes and the tar member has no metadata. `model_repo_.provenance.json` records the identifying fields of the `Version` reply beside it, minus the serial number, MAC address and custom name, which are the owner's and not the firmware's. - Payload bytes are not reproducible between reads and must never be compared by hash; compare parsed catalogs. The one recorded comparison is the maintainer's, across reads on 2026-07-26 and 2026-09-22, identical once the `blob` attributes are blanked. The earlier payload is not committed, so that comparison cannot be repeated from this repository. diff --git a/tests/fixtures/catalog/model_repo_coros_4_0_1.provenance.json b/tests/fixtures/catalog/model_repo_coros_4_0_1.provenance.json index c0169fe3..de312094 100644 --- a/tests/fixtures/catalog/model_repo_coros_4_0_1.provenance.json +++ b/tests/fixtures/catalog/model_repo_coros_4_0_1.provenance.json @@ -7,11 +7,13 @@ "The serial number, MAC address and custom name are left out on purpose:", "they identify one owner's unit and say nothing about the firmware, and", "tests/test_catalog_payload.py holds them out.", - "comms_version is left out for a different reason. It is a protocol version", - "and not an identity, and being a bytes field it has no faithful JSON", - "spelling. cortex_control_version and cortex_control_version_valid are left", - "out because they describe the host application that asked, not the unit", - "that answered." + "comms_version is in the reply and is left out for a different reason: it is", + "a protocol version rather than an identity, and being a bytes field it has", + "no faithful JSON spelling.", + "cortex_control_version and cortex_control_version_valid are absent because", + "the unit's reply does not carry them, not because they were dropped. The", + "first is what the host announces TO the unit; the second comes back in a", + "later message of its own. See docs/protocol.md, the connect handshake." ], "captured_utc": "2026-09-22T18:30:21Z", "payload_bytes": 46695, diff --git a/tests/test_catalog_payload.py b/tests/test_catalog_payload.py index a54e8ec4..f6b733e4 100644 --- a/tests/test_catalog_payload.py +++ b/tests/test_catalog_payload.py @@ -43,9 +43,10 @@ #: catalog's recorded shape as `(models, factory models, factory categories)`. #: A new profile that saves its payload adds a row here, and is then held the #: same way. The shape lives in the row rather than in the test so that each -#: payload carries its own; it is filled in from the payload being added, so it -#: cannot fail then, and it earns its place later, when a row's file is -#: replaced and the numbers say what moved. +#: payload carries its own. It is filled in from the payload being added, so it +#: cannot fail then; it earns its place later, as the only thing that notices a +#: model the snapshot generates no constants for. See +#: `test_the_payload_still_has_the_shape_its_row_records`. PAYLOADS = [ ("coros_4_0_1", "tests/fixtures/catalog/model_repo_coros_4_0_1.bin", (533, 414, 22)), ] From 176f323d864b3fa9687219eb1183ee97af021979 Mon Sep 17 00:00:00 2001 From: Jonathan Stokes Date: Tue, 22 Sep 2026 17:38:52 -0500 Subject: [PATCH 12/14] Tenth triage: a hardware test's reason, which this branch made false `tests/hardware/test_option_structure_on_unit.py` justifies itself with "Nothing offline can do it: the whole `ModelRepo.xml` is not committed". After this branch it is committed, inside the payload, and every attribute that test reads comes out of `parse_model_repo`. The file is not in the diff, so this is text the change invalidates at a distance - the same failure class as the nine passes before it, in the one place none of them had looked. The test still earns its place, for a different reason: an offline count is a count against the committed capture, and what these numbers need checking against is the catalog the connected unit is running. That is what the docstring now says. Its three neighbours were checked and are still true. They justify themselves by drift against the unit rather than by the catalog being unavailable, so the payload does not touch them. Also from the tenth pass: ADR-0022 said it records "the one size a test holds and no others". It also records 556,732 bytes for `ModelRepo.xml`, quoted from ADR-0015's reasoning and derivable from the committed payload. The claim is scoped to the bullet it is true of, and the second number is named. The byte-for-byte failure message printed nothing useful when the only difference was past `splitlines()` - both sides report end of file. Unreachable today, since all three generators end with a newline, and now guarded. `docs/protocol.md` describes this payload and could not point at an example. It can. Co-Authored-By: Claude Opus 5 --- docs/ADR.md | 2 +- docs/protocol.md | 4 +++- tests/hardware/test_option_structure_on_unit.py | 10 ++++++---- tests/test_catalog_payload.py | 5 +++++ 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/docs/ADR.md b/docs/ADR.md index 9836974b..b8352de8 100644 --- a/docs/ADR.md +++ b/docs/ADR.md @@ -424,7 +424,7 @@ Records are append-only once `Decided` and built upon: a shipped decision is nev - **Consequences:** - Regenerating a snapshot no longer needs a unit. A contributor on other firmware can rebuild the 4.0.1 snapshot correctly. - The snapshot and its input are reviewed together, and CI catches them parting company. - - A payload and its provenance record ship in the sdist, because `pyproject.toml` includes `/tests`. Neither is in the wheel. The payload is 46,695 bytes, which `tests/test_catalog_payload.py` pins against the file, and it is already gzipped so it does not compress further. The two together add about 50 KB. No exact figure is recorded here, deliberately: the sdist's `include` covers the package, the tests, the scripts, the examples, the proto schema and three files at the root, so the number moves on almost any change to the repository, while `docs/` is not in the sdist at all and a change to this record never moves it. A byte count written here went stale twice, each time in the commit that was correcting the previous one, which is the argument for recording the one size a test holds and no others. + - A payload and its provenance record ship in the sdist, because `pyproject.toml` includes `/tests`. Neither is in the wheel. The payload is 46,695 bytes, which `tests/test_catalog_payload.py` pins against the file, and it is already gzipped so it does not compress further. The two together add about 50 KB. No exact figure is recorded here, deliberately: the sdist's `include` covers the package, the tests, the scripts, the examples, the proto schema and three files at the root, so the number moves on almost any change to the repository, while `docs/` is not in the sdist at all and a change to this record never moves it. A byte count written here went stale twice, each time in the commit that was correcting the previous one, which is the argument for recording here only the size a test holds. The 556,732 above is the other number this record carries, quoted from ADR-0015's own reasoning and derivable from the committed payload. - A new profile that wants the same guarantee saves its payload and adds a row to `PAYLOADS`. Nothing forces it to, so a profile with no committed payload stays regenerable only on its own unit. - A payload carries no statement of its own provenance: the XML root has no attributes and the tar member has no metadata. `model_repo_.provenance.json` records the identifying fields of the `Version` reply beside it, minus the serial number, MAC address and custom name, which are the owner's and not the firmware's. - Payload bytes are not reproducible between reads and must never be compared by hash; compare parsed catalogs. The one recorded comparison is the maintainer's, across reads on 2026-07-26 and 2026-09-22, identical once the `blob` attributes are blanked. The earlier payload is not committed, so that comparison cannot be repeated from this repository. diff --git a/docs/protocol.md b/docs/protocol.md index 1b92e1f5..4d23749b 100644 --- a/docs/protocol.md +++ b/docs/protocol.md @@ -1962,7 +1962,9 @@ Named forms live in `pyquadcortex/protocol/enums.py` (`Input`, `Output`, `ModelRepo` is read during the connect burst as a readiness gate, and its payload is the unit's whole block catalog: gzip(tar(`ModelRepo.xml`)), about 46 KB -compressed and 557 KB expanded. Cortex Control reads it as the third message +compressed and 557 KB expanded. One such reply is committed, read from the 4.0.1 +unit on 2026-09-22: `tests/fixtures/catalog/model_repo_coros_4_0_1.bin`, with its +firmware recorded beside it (ADR-0022). Cortex Control reads it as the third message type of every session, after `ResetCommsBuffers` and `Version`, and the reply lands about 1.2 s after the session's first message in all three lab captures. diff --git a/tests/hardware/test_option_structure_on_unit.py b/tests/hardware/test_option_structure_on_unit.py index 6d091056..c5534e96 100644 --- a/tests/hardware/test_option_structure_on_unit.py +++ b/tests/hardware/test_option_structure_on_unit.py @@ -188,10 +188,12 @@ def test_the_displayPos_counts_the_docs_quote_still_hold(live_catalog): this change each found a number wrong somewhere, which is the argument for putting these under a test rather than in prose alone. - Nothing offline can do it: the whole `ModelRepo.xml` is not committed, and - `tests/fixtures/catalog/scales.json` carries raw attributes for only a few - dozen parameters. So it happens here, against the catalog the unit is - actually running. A failure is a finding about the device, and it means the + Offline can only do it against a snapshot. Since ADR-0022 the 4.0.1 payload + IS committed, at `tests/fixtures/catalog/model_repo_coros_4_0_1.bin`, so a + count can be taken without a unit - but it is a count against that capture, + not against the catalog this unit is running, and a unit whose content has + moved is exactly what these numbers need checking against. So it happens + here, against the catalog the unit is actually running. A failure is a finding about the device, and it means the numbers in `CLAUDE.md`, `docs/STEERING.md`, `docs/domain-model.md` and `changelog.md` need re-deriving before anything else is trusted. """ diff --git a/tests/test_catalog_payload.py b/tests/test_catalog_payload.py index f6b733e4..1758c913 100644 --- a/tests/test_catalog_payload.py +++ b/tests/test_catalog_payload.py @@ -92,6 +92,11 @@ def test_the_payload_still_generates_the_committed_snapshot(payload, name): gen, com = generated.splitlines(), committed.splitlines() first = next((i for i, (a, b) in enumerate(zip(gen, com)) if a != b), min(len(gen), len(com))) + if gen == com: # identical lines, so it is the tail + pytest.fail( + f"{snapshot}/{name}.py has the same lines as the payload generates " + f"but not the same bytes: {len(committed)} committed against " + f"{len(generated)} generated. Suspect the trailing newline.") pytest.fail( f"{snapshot}/{name}.py no longer matches what the committed payload " f"generates. First difference at line {first + 1}:\n" From 98de622174d5ee5a4fd57776560d100177256b27 Mon Sep 17 00:00:00 2001 From: Jonathan Stokes Date: Tue, 22 Sep 2026 17:54:37 -0500 Subject: [PATCH 13/14] Eleventh triage: three more places that gave the catalog's absence as a reason The tenth pass found one file outside the diff whose reasoning this branch invalidates. Looking properly, there are four. `scripts/extract_scale_fixture.py` carries ADR-0015's argument in full: the obvious way to get real numbers, "committing `ModelRepo.xml`", "would republish 556 KB of the vendor's product catalog". That is the bullet ADR-0022's `Settles with` section exists to retire, restated in `scripts/`, and `tests/test_scales.py` sends readers to it for the reason. The docstring now says the payload is committed and that what remains is the narrower point: the fixture is the data under test. Whether it should be derived from the payload instead is already ADR-0022's third open question. `tests/hardware/test_generated_constants.py` said "nothing offline can notice - the generated file is its own yardstick". It has a yardstick now, and this is the test ADR-0022 names when arguing the two checks are complementary. The clause is true for the reason that matters and false as written: the offline check holds the snapshot against a capture, so the two agree while the unit moves on. That is what it says. `tests/hardware/test_scales_on_unit.py` drew the same analogy and inherits the same correction. Also: ADR-0022 said the payload "is 46,695 bytes, which `tests/test_catalog_payload.py` pins against the file". The test pins the provenance record against the file, not this record's copy of the number, which was a third unpinned copy of exactly the kind the same bullet argues against. It gives the size as about 46 KB and points at the record. The STEERING scope line named eight of the ten changed paths. The trailing-newline guard called character counts bytes, and two generated files are not ASCII. Co-Authored-By: Claude Opus 5 --- docs/ADR.md | 2 +- docs/STEERING.md | 13 +++++++------ scripts/extract_scale_fixture.py | 13 ++++++++----- tests/hardware/test_generated_constants.py | 7 +++++-- tests/hardware/test_option_structure_on_unit.py | 11 ++++++----- tests/hardware/test_scales_on_unit.py | 7 +++++-- tests/test_catalog_payload.py | 8 +++++--- 7 files changed, 37 insertions(+), 24 deletions(-) diff --git a/docs/ADR.md b/docs/ADR.md index b8352de8..e6b05a80 100644 --- a/docs/ADR.md +++ b/docs/ADR.md @@ -424,7 +424,7 @@ Records are append-only once `Decided` and built upon: a shipped decision is nev - **Consequences:** - Regenerating a snapshot no longer needs a unit. A contributor on other firmware can rebuild the 4.0.1 snapshot correctly. - The snapshot and its input are reviewed together, and CI catches them parting company. - - A payload and its provenance record ship in the sdist, because `pyproject.toml` includes `/tests`. Neither is in the wheel. The payload is 46,695 bytes, which `tests/test_catalog_payload.py` pins against the file, and it is already gzipped so it does not compress further. The two together add about 50 KB. No exact figure is recorded here, deliberately: the sdist's `include` covers the package, the tests, the scripts, the examples, the proto schema and three files at the root, so the number moves on almost any change to the repository, while `docs/` is not in the sdist at all and a change to this record never moves it. A byte count written here went stale twice, each time in the commit that was correcting the previous one, which is the argument for recording here only the size a test holds. The 556,732 above is the other number this record carries, quoted from ADR-0015's own reasoning and derivable from the committed payload. + - A payload and its provenance record ship in the sdist, because `pyproject.toml` includes `/tests`. Neither is in the wheel. The payload is about 46 KB; its exact size is recorded beside it in the provenance record, which `tests/test_catalog_payload.py` pins against the file, and it is already gzipped so it does not compress further. The two together add about 50 KB. No exact figure is recorded here, deliberately: the sdist's `include` covers the package, the tests, the scripts, the examples, the proto schema and three files at the root, so the number moves on almost any change to the repository, while `docs/` is not in the sdist at all and a change to this record never moves it. A byte count written here went stale twice, each time in the commit that was correcting the previous one, which is the argument for recording here only the size a test holds. The 556,732 above is the other number this record carries, quoted from ADR-0015's own reasoning and derivable from the committed payload. - A new profile that wants the same guarantee saves its payload and adds a row to `PAYLOADS`. Nothing forces it to, so a profile with no committed payload stays regenerable only on its own unit. - A payload carries no statement of its own provenance: the XML root has no attributes and the tar member has no metadata. `model_repo_.provenance.json` records the identifying fields of the `Version` reply beside it, minus the serial number, MAC address and custom name, which are the owner's and not the firmware's. - Payload bytes are not reproducible between reads and must never be compared by hash; compare parsed catalogs. The one recorded comparison is the maintainer's, across reads on 2026-07-26 and 2026-09-22, identical once the `blob` attributes are blanked. The earlier payload is not committed, so that comparison cannot be repeated from this repository. diff --git a/docs/STEERING.md b/docs/STEERING.md index 110e7d4e..ec34ba46 100644 --- a/docs/STEERING.md +++ b/docs/STEERING.md @@ -236,13 +236,14 @@ behind each one is in the lab repository, ### 2026-09-22 - A snapshot's input is committed beside it (ADR-0022) - **What changed:** the `ModelRepo` payload the 4.0.1 snapshot is generated from - is committed, with a provenance record and a test that regenerates each - snapshot from its own payload. Section 2 corrected. -- **Why:** regenerating needed the one unit on that firmware, which blocked #45. + is committed, with a provenance record and a test regenerating each snapshot + from its own payload. Section 2 corrected. +- **Why:** regenerating needed the one unit on that firmware, blocking #45. - **Scope:** `tests/fixtures/catalog/`, `tests/test_catalog_payload.py`, - `.gitattributes`, `CLAUDE.md`, `ADR.md`, `architecture.md`, sections 2 and 7 - here. Left alone on purpose: `domain-model.md`, whose `blob` count ADR-0022 - reconciles. No library code, no generated file. + `.gitattributes`, `CLAUDE.md`, `ADR.md`, `architecture.md`, `protocol.md`, + sections 2 and 7 here, and docstrings in `extract_scale_fixture.py` and three + hardware tests that named the catalog's absence. Left alone: `domain-model.md`. + No library code, no generated file. ### 2026-09-21 - The hardware suite puts the edited flag back diff --git a/scripts/extract_scale_fixture.py b/scripts/extract_scale_fixture.py index 5b06e8c2..cb69d0f6 100644 --- a/scripts/extract_scale_fixture.py +++ b/scripts/extract_scale_fixture.py @@ -4,11 +4,14 @@ python scripts/extract_scale_fixture.py --payload model_repo_payload.bin The offline suite has to prove that the device's own catalog reproduces every -reading taken off the unit's screen. That needs real numbers, and the obvious -way to get them - committing ``ModelRepo.xml`` - would republish 556 KB of the -vendor's product catalog: every model name, every impulse-response name, every -knob. ``tests/test_catalog.py`` has said "ships no vendor data" since it was -written, and this keeps that true. +reading taken off the unit's screen. That needs real numbers. Committing the +catalog whole was once the thing this script existed to avoid; since ADR-0022 +the 4.0.1 payload IS committed, at +``tests/fixtures/catalog/model_repo_coros_4_0_1.bin``, so that is no longer the +reason. What remains is that the fixture is the data under test, read by tests +that assert on a few dozen parameters and nothing else. Whether it should now +be derived from the committed payload rather than distilled by hand is +ADR-0022's third open question. So the fixture holds only the parameters the tests actually assert on: for each, its bounds, its taper and its floor. That is the data under test and nothing diff --git a/tests/hardware/test_generated_constants.py b/tests/hardware/test_generated_constants.py index b49975bd..fa272834 100644 --- a/tests/hardware/test_generated_constants.py +++ b/tests/hardware/test_generated_constants.py @@ -2,8 +2,11 @@ `models.py` and `params.py` are generated from a device's ModelRepo and then COMMITTED, so they are a snapshot. A firmware or content update can renumber a -parameter or add a model, and nothing offline can notice - the generated file is -its own yardstick. This regenerates from the connected unit and compares. +parameter or add a model, and nothing offline can notice: since ADR-0022 +`tests/test_catalog_payload.py` holds the snapshot against the payload it was +generated from, but that payload is a capture of one moment, so the two move +together and agree while the unit has moved on. This regenerates from the +connected unit and compares. Which snapshot it compares against comes from the CONNECTED PROFILE (ADR-0020) rather than from a fixed path, so a unit on some other firmware is held against diff --git a/tests/hardware/test_option_structure_on_unit.py b/tests/hardware/test_option_structure_on_unit.py index c5534e96..40f3bfd7 100644 --- a/tests/hardware/test_option_structure_on_unit.py +++ b/tests/hardware/test_option_structure_on_unit.py @@ -191,11 +191,12 @@ def test_the_displayPos_counts_the_docs_quote_still_hold(live_catalog): Offline can only do it against a snapshot. Since ADR-0022 the 4.0.1 payload IS committed, at `tests/fixtures/catalog/model_repo_coros_4_0_1.bin`, so a count can be taken without a unit - but it is a count against that capture, - not against the catalog this unit is running, and a unit whose content has - moved is exactly what these numbers need checking against. So it happens - here, against the catalog the unit is actually running. A failure is a finding about the device, and it means the - numbers in `CLAUDE.md`, `docs/STEERING.md`, `docs/domain-model.md` and - `changelog.md` need re-deriving before anything else is trusted. + not against the catalog this unit is running, and a unit whose content + has moved is exactly what these numbers need checking against. So it happens + here, against the catalog the unit is actually running. A failure is a + finding about the device, and it means the numbers in `CLAUDE.md`, + `docs/STEERING.md`, `docs/domain-model.md` and `changelog.md` need + re-deriving before anything else is trusted. """ placeable = [m for m in live_catalog if not (m.hidden or m.internal or m.category_hidden)] diff --git a/tests/hardware/test_scales_on_unit.py b/tests/hardware/test_scales_on_unit.py index d556cd4c..f43ad155 100644 --- a/tests/hardware/test_scales_on_unit.py +++ b/tests/hardware/test_scales_on_unit.py @@ -2,8 +2,11 @@ `tests/fixtures/catalog/scales.json` holds the bounds, taper and floor of every parameter the offline scale tests assert on. It is distilled from a device -rather than committed whole, so like the generated constants it is a snapshot -and nothing offline can notice it going stale. +rather than committed whole, so like the generated constants it is a snapshot, +and no offline check can notice the UNIT moving away from it. Since ADR-0022 it +could at least be checked against the committed payload, which is that record's +third open question; either way only a unit can say the catalog still reads +this way. A failure here means the fixture is out of date. Regenerate and READ the diff: diff --git a/tests/test_catalog_payload.py b/tests/test_catalog_payload.py index 1758c913..d83e4c46 100644 --- a/tests/test_catalog_payload.py +++ b/tests/test_catalog_payload.py @@ -48,7 +48,9 @@ #: model the snapshot generates no constants for. See #: `test_the_payload_still_has_the_shape_its_row_records`. PAYLOADS = [ - ("coros_4_0_1", "tests/fixtures/catalog/model_repo_coros_4_0_1.bin", (533, 414, 22)), + ("coros_4_0_1", + "tests/fixtures/catalog/model_repo_coros_4_0_1.bin", + (533, 414, 22)), ] #: Taken from `_snapshots.MODULES`, which with `EXPORTS` beside it is what the @@ -95,8 +97,8 @@ def test_the_payload_still_generates_the_committed_snapshot(payload, name): if gen == com: # identical lines, so it is the tail pytest.fail( f"{snapshot}/{name}.py has the same lines as the payload generates " - f"but not the same bytes: {len(committed)} committed against " - f"{len(generated)} generated. Suspect the trailing newline.") + f"but not the same text: {len(committed)} characters committed " + f"against {len(generated)} generated. Suspect the trailing newline.") pytest.fail( f"{snapshot}/{name}.py no longer matches what the committed payload " f"generates. First difference at line {first + 1}:\n" From 04b1a3f56fd04f30c66f269b652c52012354866b Mon Sep 17 00:00:00 2001 From: Jonathan Stokes Date: Tue, 22 Sep 2026 18:07:16 -0500 Subject: [PATCH 14/14] Twelfth triage: the fifth file of the same class, and the command to type `tests/hardware/test_option_audit_on_unit.py` gave the catalog's absence as its reason in two places, the same as the four already corrected. Its first is a direct analogy to `test_generated_constants.py`, whose docstring this branch changed to say the opposite. Its second says nothing offline can see the `hidden` counts go stale; both can now be counted from the committed payload - they are `true` 649 and `atma` 1 - and nothing does. Both sentences were literally true and neither was the reason that holds, which is that a count against a capture cannot see this unit's catalog move. The four usage headers that show `--payload` named a file that does not exist, `model_repo_payload.bin`. They name the committed one. `docs/architecture.md` already did; these are where someone actually types the command. Checked after the edit: all three generators still reproduce the committed snapshot byte for byte from the committed payload. Two findings from this pass are not acted on, and why: `pyquadcortex/protocol/catalogs/coros_4_0_1/__init__.py` says a snapshot is "generated by the scripts in `scripts/` from a connected unit", which is now one of two routes. It is a generated file, so correcting it means editing `scripts/_snapshots.py`, regenerating, and moving the pin in `tests/test_generators.py`. That is a real change to the generator for a mild staleness, and it is better made deliberately than as the twelfth item of a review round. `tests/test_catalog.py`'s "ships no vendor data" is true as scoped to the tests it describes. It reads wider than it is now that `extract_scale_fixture.py` no longer cites it as a repository-wide promise, but rewriting it is a question about that test's own claim rather than about this branch. Co-Authored-By: Claude Opus 5 --- scripts/generate_models.py | 2 +- scripts/generate_options.py | 2 +- scripts/generate_params.py | 2 +- tests/hardware/test_option_audit_on_unit.py | 10 ++++++---- tests/hardware/test_scales_on_unit.py | 3 ++- 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/scripts/generate_models.py b/scripts/generate_models.py index b7e330a1..e463dd52 100644 --- a/scripts/generate_models.py +++ b/scripts/generate_models.py @@ -18,7 +18,7 @@ # from a saved payload, for reproducible regeneration python scripts/generate_models.py --snapshot coros_4_1_0 \ - --payload model_repo_payload.bin + --payload tests/fixtures/catalog/model_repo_coros_4_0_1.bin Only identifiers and integers are emitted - no descriptions and no "Based on" attribution text. diff --git a/scripts/generate_options.py b/scripts/generate_options.py index 5bb3de25..623e83b9 100644 --- a/scripts/generate_options.py +++ b/scripts/generate_options.py @@ -14,7 +14,7 @@ python scripts/generate_options.py --snapshot coros_4_1_0 python scripts/generate_options.py --snapshot coros_4_1_0 \ - --payload model_repo_payload.bin + --payload tests/fixtures/catalog/model_repo_coros_4_0_1.bin Four decisions this generator makes: diff --git a/scripts/generate_params.py b/scripts/generate_params.py index d988bdf3..690592be 100644 --- a/scripts/generate_params.py +++ b/scripts/generate_params.py @@ -15,7 +15,7 @@ # from a saved payload, for reproducible regeneration python scripts/generate_params.py --snapshot coros_4_1_0 \ - --payload model_repo_payload.bin + --payload tests/fixtures/catalog/model_repo_coros_4_0_1.bin Three things this generator knows that the catalog does not: diff --git a/tests/hardware/test_option_audit_on_unit.py b/tests/hardware/test_option_audit_on_unit.py index c21e84ea..e94c5431 100644 --- a/tests/hardware/test_option_audit_on_unit.py +++ b/tests/hardware/test_option_audit_on_unit.py @@ -2,8 +2,8 @@ `tests/fixtures/catalog/option_readings.json` holds what a human read off the screen, and `options.OPTION_AUDIT` stamps each list from it. Both are pinned to -a SNAPSHOT of the catalog, and like the generated constants nothing offline can -notice that snapshot going stale - a firmware that renames an option would leave +a SNAPSHOT of the catalog, and like the generated constants no offline check can +notice the UNIT moving away from it - a firmware that renames an option would leave every offline test green while the library published a word the unit no longer uses, now with "audited" beside it, which is worse than never having checked. @@ -157,8 +157,10 @@ def test_the_hidden_attribute_is_still_shaped_the_way_it_was_counted(live_xml): block's `MOMENTARY` switch, which is the whole evidence that the catalog names the MODEL a parameter is hidden on, and a second independent sign that ATMA is the Mini. Both live in a docstring and in `docs/domain-model.md`, - and the parser turns the attribute into a bool, so nothing offline can see - either number go stale. + and the parser turns the attribute into a bool. Since ADR-0022 both counts + can be taken offline from the committed payload, and nothing takes them; + either way a count against that capture cannot see this unit's own catalog + move. A failure here is a finding about the device. If `atma` has spread to more parameters, `Parameter.hidden` answering only for a Quad Cortex matters more diff --git a/tests/hardware/test_scales_on_unit.py b/tests/hardware/test_scales_on_unit.py index f43ad155..0d56c367 100644 --- a/tests/hardware/test_scales_on_unit.py +++ b/tests/hardware/test_scales_on_unit.py @@ -10,7 +10,8 @@ A failure here means the fixture is out of date. Regenerate and READ the diff: - python scripts/extract_scale_fixture.py --payload + python scripts/extract_scale_fixture.py \ + --payload tests/fixtures/catalog/model_repo_coros_4_0_1.bin A changed bound or taper is a real protocol change and belongs in `docs/protocol.md` alongside the readings it invalidates.