fix(domain): R5.6 prep gates, strict declared block, patch builds, docs corrected

v1 refuses a non-hex or historical value (NotCanonical); the switch patch now builds
report-compare and refuses unknown block keys; RUST.md 11.19 states the measured
rehearsal (4 + 3 expected failures) instead of a green claim.
This commit is contained in:
bchanot committed 2026-10-24 14:57:44 +02:00
1 parent 3b9a395d43
commit 943a25a98f
10 files changed
+280 -18

No files matched your search

+30 -6
View File
@@ -3486,8 +3486,14 @@ needs no own change, it goes through the rebase), the generator stamping `sheet_
descriptive block, the sheet load refusing a block that contradicts the registry (`loaded.rs`, `facade.rs`:
`invalid_sheet`), `.prettierignore` on `legacy-import/` and `draft/`, and the rehearsal suite
`fingerprint_consumers` (3: alias not rebased and stamp kept, real change and forged value rebased, archive pair
kept and forged pair rejected). Rehearsal with the patch applied: `pnpm rust:check` green, `pnpm check:all` green
14:32:05, then the files restored.
kept and forged pair rejected). Rehearsal, corrected by the fresh verifier: `pnpm rust:check` and `pnpm check:all`
(14:32:05) were green with the five consumers wired only, before the generator, load and `report-compare` parts
were added. With the whole patch on the current seed: the `cli`, `fingerprint` and default suites are green, 4 tests
of `curation` fail (below). With the seed switched as well (verifier's simulation in a scratch copy), 3 more fail:
the 2 `fingerprint_consumers` cases whose precondition reads the seed as `27c7…`, and `pdf_import`
`o7_locate_and_read_match_the_typescript`, whose frozen R4 oracle records the stamp of migrated v2 reports
(`scan.report-v2-{full,minimal}.pdf`), which follows the migration map to `12d7…`. Neither suite has run
end to end on a switched seed yet.
**Seed at the switch (measured with the patch, written to a scratch folder, never to the seed):**
@@ -3497,9 +3503,27 @@ kept and forged pair rejected). Rehearsal with the patch applied: `pnpm rust:che
| `draft/report-migration-map.json` | sha256 `4139c51d…fce9`, `sheet.documentSha256` `27c7…` | sha256 `0e991bc2…2db`, `12d7…` | a migrated v2 report is stamped with the current value | same | `git revert` |
| the 16 other files | unchanged | unchanged (`document.json`, `horse.svg`, `equine_draft.sql` compared byte for byte) | no content change | `--check` | n/a |
Found by the rehearsal, to settle in the switch: four suites fail with the generator switched. Two expect it
To settle in the switch: four tests in two suites fail with the generator switched. Two expect it
(`curation_draft`: the draft files byte for byte against the TypeScript ledger, and the historical fingerprint
test): at the switch they compare the two files under a declared rule (the fingerprint field and block only),
the oracles untouched. Two are an order defect of the rehearsal (`curation_review`, drawings bound tests): the
fingerprint validates the document before the drawings' resource bound applies; the switch computes it after
that bound.
the oracles untouched. Two in `curation_review`: `review_drawings_past_their_bound_are_refused_before_rendering`
needs the fingerprint after the drawings bound (order); `the_drawings_projection_bounds_what_is_written` builds a
draft with every annotation removed, an invalid document that now has no fingerprint, so its fixture has to stay
valid (reordering does not fix it). The O7 oracle and the switched-seed preconditions take a declared rule too.
Gates on 3b9a395: `pnpm check:all` green 14:41:00; security PASS, 2 MEDIUM, 9 LOW
(`.claude/audits/2026-10-24-rust-r5-6-prep-security.md`); fresh verifier ECARTS(2)
(`.claude/audits/2026-10-24-rust-r5-6-prep-verify.md`): the patch broke the `report-compare` build (fixed in the
patch) and these docs claimed a green rehearsal (corrected above). Fixed after: the declared block is strict
(unknown keys refused), and `v1` refuses a value that is not 64 lowercase hex or that is itself a registered
alias (`AliasRefusal::NotCanonical`, test). Open for the owner, MEDIUM M1: on the alias path the report keeps
`27c7…` while a new export's snapshot takes `12d7…` from the loaded sheet; the frozen N-1 reader, a rollback build
and any pre-switch build compare the two strictly and would drop that envelope's snapshot (`sheet_mismatch`; the
report is kept, the archived labels lost), and the registry entry could then never be removed. Remedies: the
export writes the snapshot reference with the report's own stamp on an alias match (recommended: every reader
then sees one value, nothing rewritten), or the report is re-stamped at the rebase, or accepted with an N-1 test.
Open, M2 remainder: a `sheet-ref.json` without a block still loads unchecked (pre-switch bundles and the test
sheets carry none); refusing it at the switch means giving every test sheet a block. Also: the census asserts floors
(over 50 attachments, over 30 alias stamps), not the exact 147/124/123; 11 of the RFC's 24 appendix numbers are not
in the V8 oracle (they print right in a probe, unpinned); the `report-compare` alias line drops the draft/published
status the plain line shows.