fix(domain): refuse three non-canonical v3 shapes, R5.5 LOW fixes, R5.6 plan

check_v3_shape at read_report_document v3 and parse_envelope (sheet, practitioner
as non-objects, severity as non-string); Protocol errors final; DEV address must be
an own unicast address. SQL confirm function and DEV keys characterised, no change.
This commit is contained in:
bchanot committed 2026-10-24 03:34:38 +02:00
1 parent 13db5539a3
commit d502dfa923
11 files changed
+369 -37

No files matched your search

@@ -0,0 +1,33 @@
# CONTRACT: R5.5 closing corrections and R5.6 preparation
- date: 2026-10-24 | branch `feature/rust-r5-pipeline-core` | base dead546..13db553 (R5.5 checkpoint)
- brief: owner 2026-10-24 « Clôture R5.5, corrections ciblées et préparation R5.6 » §1 to §9
## Clauses
K1. **Owner result recorded.** RUST.md §11.18, TODO, journal and registries record `pnpm e2e:sheet-assets` PASS (11 checks) as
the owner's manual run, distinct from the simulated suite; no new measurement invented, no rerun with the service key, no secret
in any file or commit.
K2. **Retry.** `Protocol` errors are final (no retry); only `Io`, `Timeout`, `HostNotFound`, `ConnectionFailed` and 5xx are
retried; negative test proves one request on a malformed answer.
K3. **DEV address.** The DEV address counts only if it is an own unicast address; a subnet broadcast is refused; tests cover
loopback, the host's unicast and broadcast addresses, a public and a malformed value.
K4. **Serde hardening, three shapes only.** `sheet` and `practitioner` as non-objects and `severity` as a non-string are refused
with `ReadFailure::Invalid` (field named) at the v3 entries `read_report_document` and `parse_envelope`; no other contract,
version or field narrowed or widened; frozen N-1 copies, goldens, fixtures and oracles untouched; every R2-R4, PDF import,
rebase and envelope suite green unchanged.
K5. **SQL characterised, not changed.** No file under `supabase/migrations` or `supabase/tests` changes; RUST.md §11.18 states the
grants, the missing hash/existence check and why it is not exploitable from an API role.
K6. **DEV stack documented, not changed.** ENVIRONMENTS.md §3.6 lists the 54321 checks and the default-key finding; no firewall,
network or Supabase configuration changed.
K7. **R5.6 plan only.** `.claude/tasks/plans/2026-10-24-rust-r5-6-fingerprint-switch.md` covers the owner's 12 points and lists the
open decisions; no fingerprint code, no seed or `sheet-ref.json` change, `documentSha256` stays `27c7383c…2660`.
K8. **Gates.** `pnpm rust:check` and `pnpm check:all` green; security PASS on the diff; fresh verifier on this contract. No merge,
no release, no deploy, no R5.6.