chore(docs): R5.6 rehearsal contract and final switch patch (inactive)

This commit is contained in:
bchanot committed 2026-10-25 00:57:45 +02:00
1 parent 943a25a98f
commit 82e2e43ba3
2 files changed
+2428 -119

No files matched your search

@@ -0,0 +1,40 @@
# CONTRACT: R5.6 switch rehearsal (isolated), owner brief 2026-10-24 « Validation de la préparation R5.6 et corrections préalables à la bascule »
- branch `feature/rust-r5-pipeline-core` at 943a25a (official state, inactive); patch `.claude/tasks/plans/r5-6-switch.patch`
- rehearsal: detached worktree `/tmp/claude-1000/-home-bchanot-Documents-faunosteo/3571c861-cd6e-4751-a25e-c26da95beb85/scratchpad/r56wt` = 943a25a + the patch, seed switched there only
## Clauses
S1. **M1 option 1.** On export, an old report whose stamp is the registered historical value of the same sheet, against the
sheet's verified canonical value, archives a snapshot carrying the report's own stamp; only for the registered pair of the
same sheet id, with the loaded sheet's `v1` value recomputed from its document at load; never from an archive's alias list; a
new report keeps the canonical value. Tests cover the owner's 9 scenarios (old PDF import, no rebase, re-export coherent,
current reader, frozen N-1 reader, labels/views/annotations/branding preserved, rollback reader, forged/unknown refused, real
change rebases), not only hash equality.
S2. **Scope.** Rust changes only in `report/rebase.rs`, `archive/read.rs` (unchanged allowed), `session.rs`,
`pdf/write/input.rs`, `pdf/compare/lines.rs`, `sheet/loaded.rs`, `facade.rs`, `bin/report_compare.rs`, plus the
`sheet/fingerprint.rs` module, the generator (`curation/draft/pipeline.rs`), Cargo/tests/scripts; archive and envelope checks not
loosened; public errors kept where possible; N-1 readers untouched.
S3. **v0/v1 loading.** A reference without a block is historical (v0): loads as before, unverified, no alias privilege, never
`v1`. A present block is strict (known keys, `v1` convention, 64 lowercase hex, not an alias value, aliases only from the
registry for this sheet and value, value recomputed from the document); any contradiction refused.
S4. **Artifacts and oracles.** In the switched seed only `sheet-ref.json` and `report-migration-map.json` differ; their value
and block are consistent with `v1`; `document.json`, `horse.svg`, `equine_draft.sql` byte-identical; no R2-R5 oracle or golden
changed; O7, O10, the R2 Zod oracle, the R5.1 ledger and the app goldens run in their original (pre-switch) context, with a
separate test of the post-switch behaviour; every declared difference targeted, tested, unable to hide an anatomical change.
S5. **report:compare.** The alias line keeps the draft/published status and prints both raw values; other differences still
reported.
S6. **Generators.** `pnpm import:equine` → the Rust pipeline; `import:equine:legacy` → the TypeScript one; historical tests use
the generator they refer to.
S7. **Isolation.** The official branch state stays inactive (seed `27c7…`, no new convention active), no DB/Supabase mutation,
no oracle regenerated, nothing deleted.
S8. **Gates on the switched state.** `pnpm rust:check`, `pnpm check:all`, RFC 8785, Node differential, alias security, the five
consumers + load checks, authentic archive parity, N-1 on re-exported archives, snapshot-bearing reports, real-change rebase,
the two generated artifacts; security audit; fresh verifier.
File diff suppressed because it is too large. Load diff