docs(docs): R5.6 M1 corrected, final rehearsal results, audits, memory
This commit is contained in:
1 parent
baff88280f
commit
59521dc195
5 files changed
+191
No files matched your search
@@ -3590,3 +3590,48 @@ an alias. Not applied: awaiting the owner. LOW kept: `"fingerprint": null` and a
|
||||
(no privilege), public mutable `reference`/`fingerprint_verified` fields, a draft-allowed validation warning
|
||||
would make a `v1` bundle unloadable, `canonical_json` recursion unbounded (trusted input today), stale
|
||||
comments on `pnpm import:equine` in `scripts/import-equine.sh` and CLAUDE.md.
|
||||
|
||||
### 11.21 R5.6 M1 corrected, full rehearsal repeated (2026-10-25)
|
||||
|
||||
Owner brief « R5.6 : autorisation de correction M1, nouvelle répétition obligatoire ». Supersedes the M1
|
||||
mechanism of §11.20: `input.rs` `keep_the_report_stamp` is gone and `pdf/write/input.rs` is unchanged
|
||||
from 943a25a (strict equality). Final patch `.claude/tasks/plans/r5-6-switch.patch` (30 files, baff882),
|
||||
rehearsed in a fresh detached worktree of 8e77e37.
|
||||
|
||||
**Cause of the defect.** The export only sees the snapshot (`ExportInput`), never the loaded sheet, so
|
||||
it could not know whether the sheet's `v1` value had been verified; it granted the registered pair on the
|
||||
value the snapshot claimed (verifier probe: a v0 sheet carrying the canonical value exported an old
|
||||
report).
|
||||
|
||||
**Fix.** The decision is taken where the loaded sheet is known: `domain/archive/snapshot_rules.rs`
|
||||
`build_sheet_snapshot` (behind `archive.snapshot`) keeps the report's historical stamp only when
|
||||
`LoadedSheet::recognises_historical_stamp` holds: the loader verified a `v1` block (private
|
||||
`verified_fingerprint`, set only by `from_bundle`), that value still equals the reference, the registry
|
||||
binds the stamp to it for this sheet id (one direction), and the current document recomputes to it at
|
||||
the moment of the decision (so a mutated pub `document` or `reference` loses the privilege). The rebase
|
||||
and `report-compare` use the same predicate; the export refuses any report whose stamp differs from the
|
||||
snapshot's. `"fingerprint": null` and malformed blocks are refused (`present_block`); a `v1` fingerprint
|
||||
refuses integrity errors and accepts draft warnings (`is_publishable`: the two warning rules are
|
||||
allowed in a draft and never block publication; a warnings-only `v1` sheet loads); `canonical_json` is
|
||||
bounded at 128 levels (`CanonicalError::TooDeep`, serde_json's parse limit). Public API: the patch's own
|
||||
pub field `fingerprint_verified` becomes the method `is_fingerprint_verified()`; no released or wasm API
|
||||
changes.
|
||||
|
||||
**Gates on the exact final state.** `pnpm rust:check` green; `pnpm check:all` green 01:53:59; `--check`
|
||||
0 differences; the Rust `--out` equals the switched seed for `sheet-ref.json` and
|
||||
`report-migration-map.json` and leaves `document.json`, `horse.svg` and `equine_draft.sql` byte-identical.
|
||||
`r5_6_switch` 14 (direct export API: unverified v0 refused, mutated document or reference refused,
|
||||
another sheet id refused, contradicting `v1` content refused at load, `null` and malformed blocks refused,
|
||||
warnings-only `v1` loads, the earlier scenarios), `sheet_fingerprint` 11 (depth 128/129), vitest
|
||||
`r5-6.n-1` 2 (snapshot from the core's `archive.snapshot`; the v0 counterpart refused), app goldens and R4
|
||||
digests byte for byte. Security PASS, LOW only (`.claude/audits/2026-10-25-rust-r5-6-final-security.md`);
|
||||
fresh verifier CONFORME 8/8 with its own direct-API probe (`.claude/audits/2026-10-25-rust-r5-6-final-verify.md`).
|
||||
Wasm: 1,532,324 B raw / 518,018 B gzip before, 1,575,574 / 531,715 after (+43 KB raw, +13.7 KB gzip: `sha2`,
|
||||
the canonicaliser, the load check); no wasm size budget is defined in the repository.
|
||||
|
||||
Residual, not changed after the last gate: `equivalence` is public and grants from the registry alone (its
|
||||
only caller is the proof predicate; make it crate-private at activation); stale comments in
|
||||
`fingerprint.rs` (lines 6, 15, 246-247: "zero integrity issue", "will declare"); a page script can still
|
||||
hand the export a self-consistent report and snapshot (no equivalence results, every reader decides again);
|
||||
the rebase's exact-equality branch has no sheet-id check (since R2); `r5_6_switch` writes its re-export under
|
||||
`<repo>/target/tmp` regardless of `CARGO_TARGET_DIR`.
|
||||
Reference in new issue
Block a user