docs(docs): R5.6 rehearsal results, TODO, journal

This commit is contained in:
bchanot committed 2026-10-25 00:58:11 +02:00
1 parent 82e2e43ba3
commit 6ade9176d9
3 files changed
+56

No files matched your search

+46
View File
@@ -3527,3 +3527,49 @@ sheets carry none); refusing it at the switch means giving every test sheet a bl
(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.
### 11.20 R5.6 rehearsed in isolation on the switched seed (2026-10-25)
Owner brief « Validation de la préparation R5.6 et corrections préalables à la bascule ». Contract
`.claude/tasks/contracts/2026-10-25-rust-r5-6-rehearsal.md`. The final patch `.claude/tasks/plans/r5-6-switch.patch`
(28 files) was applied, with the seed switched, in a detached worktree of 943a25a under the session
scratchpad; the branch's own state stays inactive (seed `27c7…`, nothing active).
**M1, option 1.** `pdf/write/input.rs` `keep_the_report_stamp`: after `assert_exportable`, an old report on
the registered historical value of the same sheet, exported against the canonical value, archives a
snapshot carrying the report's own stamp; a new report keeps the canonical value. The equivalence is one
way (`equivalence(sheet, stamped, current)`: an old stamp against the canonical value, never the
reverse) and needs the loaded sheet's `fingerprint_verified` (set only when a `v1` block was checked
against the registry and its value recomputed from the document at load, `loaded.rs`
`check_reference`; hashing is no longer feature-gated, the wasm module carries `sha2`). `archive/read.rs`
stays strictly equal: the M1 envelope holds one value, so no archive check is loosened.
**v0 and v1.** No block: a historical reference, loaded as before, unverified, no alias privilege, never
`v1` (even with the canonical value: an old stamp then rebases). A block: known keys only, `v1`, 64
lowercase hex, never an alias value, aliases only from the registry for that sheet and value, value
recomputed from the document; any contradiction is `invalid_sheet`.
**Original contexts kept, new behaviour tested apart.** The pre-switch `sheet-ref.json` and migration
map are frozen under `crates/core/tests/fixtures/r5-6/pre-switch` and proven the TypeScript's files
against the R5.1 ledger. O7 (`pdf_import`), O10 (`pdf_compare`), the R2 Zod oracle (`r2-oracles`), the R5.1
ledger (`r5.pipeline-oracles`), the TypeScript golden (`seed.golden`) and the app goldens (v2 reports taken
as migrated before the switch) run in that context, unchanged. Declared rule `R5.6-fingerprint-v1`: in
the two files only the fingerprint moves from alias to canonical value and `sheet-ref.json` gains the
block (`curation_draft`, byte-exact through the generator's formatter); `report-compare` prints the alias
line, status kept, both raw values, only for a report read as is (77 O10 rows; a migrated v2 report
carries the canonical value and keeps the plain line); a report on another document still prints `!!`.
**Results on the switched state.** `pnpm rust:check` green; `pnpm check:all` green 00:56:22; `--check`
0 differences on 18 files. Suites: `r5_6_switch` 8 (the owner's nine scenarios: old PDF import, no
rebase, coherent re-export, current reader, pre-switch bundle, labels/views/annotations/branding kept,
new report canonical, forged and case-changed stamps, mixed envelope still rejected, real content change
rebases, load refusals), `sheet_fingerprint` 10 (census pinned: 147 attachments, 124 stamps, 123 alias),
vitest `r5-6.n-1` (the frozen N-1 scanner and Zod readers keep the re-exported snapshot and its
content) and app `r5-6.switch` (2). The app goldens and R4 digests are reproduced byte for byte by
re-exporting the historical reports on the switched sheet. Rollback: the pre-switch build's own
`report-compare` (this branch, unpatched) reads the re-exported PDF with the snapshot kept, matching the
bundled sheet. Generators: the Rust `--out` gives exactly the two switched files; the TypeScript
generator (`import:equine:legacy`) still writes the pre-switch files (`seed.golden`).
Not done: the patch is not applied to the branch; `pnpm format` must never run over `.claude/` (it
rewrote the append-only audits in the worktree, reverted there).