chore(memory): R5.4 plan and contract
This commit is contained in:
1 parent
0a78492d64
commit
43ce28a79b
2 files changed
+58
-1
No files matched your search
@@ -320,7 +320,12 @@ feat/findings-tree-v2 merged (FindingsTreePicker tracked in HEAD); all work belo
|
||||
- [ ] debt (owner 2026-10-23, after R5): migration map replays cascade records by their op (`applyRecord` / `apply_record`): a view, zone, region, category or cited-reference rename corrupts the map; fix both sides as a declared change before any changeset uses such a rename (RUST.md §11.12)
|
||||
- [ ] OWNER DECISION (found 2026-10-23 by the R5.3 final verifier): serde derives of the R2 contracts read a struct from an array and a unit enum from a one-key map, where Zod refused; likely reachable by the gated readers of imported PDFs (`archive/read.rs`, `report/read.rs`, `pdf/import.rs`); probe the readers, then a per-file go for a strict deserialisation (RUST.md §11.13)
|
||||
- [ ] chore (pre-existing, security gates R5.3): `clippy.toml` disallowed list misses `fs::create_dir*`, `OpenOptions::open`, `read_dir`, `canonicalize`, `remove_*`, `env::current_dir`, `env::args_os`, `process::Command`; extend so the core's no-I/O rule is enforced, not only observed
|
||||
- [ ] R5.4 review overlays + app drawings on the R3 layer/compose (parsed trees), CHANGELOG + REVIEW-REPORT
|
||||
- [ ] R5.4 review overlays + app drawings, CHANGELOG + REVIEW-REPORT, --check over the whole draft (owner go 2026-10-23, conditional on the R5.3 final checks: met on c6e0d85; contract `.claude/tasks/contracts/2026-10-23-rust-r5-review.md`; stop at the checkpoint, no R5.5)
|
||||
- [ ] R5.4a `draft/{labels,changelog,review_report}.rs` + `stats::stat_rows`: CHANGELOG and REVIEW-REPORT raw text = ledger pre-Prettier digests, formatted text byte-exact (`markdown::format_markdown`); compactValue on UTF-16 units
|
||||
- [ ] R5.4b `draft/{overlay,app_review}.rs` on the core tree (`read_svg`, frozen horse.svg, prolog kept verbatim): review overlays and app drawings; bytes vs xmldom where reproducible, parsed trees otherwise; the R3 trigger-name decision declared for app-main
|
||||
- [ ] R5.4c `render_draft_artifacts` complete (TS order); `import-equine --check` covers the 12 draft files with explicit criteria (bytes; declared tree rule), PENDING list and `shortcut:` removed; fails on any missing or unauthorised difference
|
||||
- [ ] R5.4d proofs: `tests/curation_review.rs` (the 6 files, ledger digests, determinism); TS generator `r5.review-synthetic-oracles.test.ts` → `oracles/r5/review-synthetic.json` (changelog raw + formatted, review report, overlays, app drawings on mini-sheet cases: Unicode, pipes, newlines, long values, emoji refused, every status); R5.3 LOW carry-over (destination identity, cite membership, unreadable-seed message, stale comment, doc nits)
|
||||
- [ ] R5.4e gates: rust:check, check:all, security auditor, fresh verifier; docs RUST.md §11.14-11.15, CHANGELOG, CLAUDE.md; memory → checkpoint report, STOP before R5.5
|
||||
- [ ] R5.5 `upload-sheet-assets` bin + runbook (local stack run)
|
||||
- [ ] R5.6 D-R5 switch (convention, aliases, membership test in gated readers with per-file go, seed regenerated once by the Rust tool, `.prettierignore`, CHANGELOG)
|
||||
- [ ] R5.7 consumer census, domain fixtures moved, packages deleted, xmldom + prettier out of the lockfile, docs, ledger; `pnpm check:all`; merge only on the owner's signal
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
# CONTRACT: Rust R5.4, the review files of the draft (review drawings, CHANGELOG, REVIEW-REPORT) and the whole-draft `--check`
|
||||
|
||||
- date: 2026-10-23 | branch `feature/rust-r5-pipeline-core` | plan `.claude/tasks/plans/2026-10-22-rust-r5-pipeline-core.md` §B.5 row R5.4
|
||||
- brief: owner 2026-10-23 « Validation R5.3 et autorisation conditionnelle R5.4 » §4 to §9 (conditions §1 met: R5.3 verifier CONFORME 13/13 on c6e0d85)
|
||||
- predecessor: `.claude/tasks/contracts/2026-10-22-rust-r5-draft.md` (R5.3)
|
||||
|
||||
## Scope
|
||||
|
||||
Port `packages/anatomy/src/curation/{labels,changelog,review-report,overlay,app-review}.ts` and `stats.ts` `statRows` into
|
||||
`crates/core/src/curation/draft/**` (feature `curation`), complete `render_draft_artifacts`, and make `import-equine --check`
|
||||
compare the whole generated draft. Out of scope: the fingerprint convention (R5.6), the upload tool (R5.5), any change to
|
||||
the seed, to `horse.svg`, to an oracle or golden, to a gated reader, to `packages/anatomy` or `packages/domain` sources.
|
||||
|
||||
## Clauses
|
||||
|
||||
C1. **No I/O in the core.** The new modules take values and texts; only `bin/import_equine.rs` touches the file system.
|
||||
|
||||
C2. **Markdown byte parity.** `CHANGELOG.md` and `REVIEW-REPORT.md` produced by the core equal the committed files byte for
|
||||
byte; the raw texts (before the table alignment) equal the ledger's pre-Prettier digests of `oracles/r5/pipeline.json`.
|
||||
Changes, categories, references, statistics, line order, Unicode, escapes (`\|`, newlines in cells) and the 120-unit
|
||||
`compactValue` cut (UTF-16 units, `…`) as the TypeScript.
|
||||
|
||||
C3. **SVG drawings.** `review/annotations-{main,head}.svg` and `review/app-{main,head}.svg` are built on the core's tree from
|
||||
the frozen `draft/assets/horse.svg` read by the core's one SVG reader (nothing removed), never re-cleaned; the prolog of
|
||||
the source is kept verbatim. Each file is compared with the committed xmldom file byte for byte; where bytes differ, the
|
||||
parsed trees are compared (element names, namespaces, attributes and values, text, element order) and every difference is
|
||||
declared. The R3 owner decision (2026-10-15, a trigger without its own name carries the opened view's name per language)
|
||||
is the one expected difference, on `app-main.svg`; any graphic difference is listed for the owner's validation.
|
||||
|
||||
C4. **Whole-draft `--check`.** `import-equine --check` compares every file of `draft/` (12) and `legacy-import/` (6) with
|
||||
explicit criteria: byte identity; for a file with a declared tree rule, tree equality after that rule; it exits non-zero
|
||||
when a file is missing, not produced, or differs without an authorised rule. The `PENDING_R5_4` list and its `shortcut:`
|
||||
comment are gone. `--out` writes the 18 files (6 + 12) with the R5.3 protections.
|
||||
|
||||
C5. **Differential.** A TypeScript generator (`packages/anatomy/tests/r5.review-synthetic-oracles.test.ts`,
|
||||
`MAKE_R5_ORACLES=1` → `crates/core/tests/oracles/r5/review-synthetic.json`) freezes, on mini-sheet cases, the raw and
|
||||
formatted CHANGELOG, the raw and formatted REVIEW-REPORT, the review overlays and the app drawings; the Rust suite
|
||||
reproduces each one (Markdown byte for byte; SVG as C3) or refuses as the declared refusal (emoji width).
|
||||
|
||||
C6. **Determinism.** Two runs give the same bytes for every file.
|
||||
|
||||
C7. **Frozen references untouched.** No change under `supabase/seed/**`, `apps/app/tests/fixtures/**`,
|
||||
`packages/core-wasm/tests/n-1/**`, `crates/core/src/domain/**`, `crates/core/src/pdf/**`, `crates/core/tests/oracles/**`
|
||||
(except the new `review-synthetic.json`); `documentSha256` stays `27c7383c…2660`; `horse.svg` bytes unchanged.
|
||||
|
||||
C8. **R5.3 protections kept and LOW carry-over.** Strict changesets, path and symlink protections, no overwrite or delete,
|
||||
depth and resource bounds, R2 integrity gate unchanged; carried from the R5.3 final gate: the destination folder itself
|
||||
identity-checked, cite membership hashed, a failed seed walk named as such, the stale test comment, the R5.3 doc nits.
|
||||
|
||||
C9. **Gates.** `pnpm rust:check` and `pnpm check:all` green; security auditor PASS on the diff; this contract CONFORME by a
|
||||
fresh verifier; RUST.md §11.14 (R5.4) and §11.15 (checkpoint), CHANGELOG, CLAUDE.md. No merge, no R5.5, no fingerprint
|
||||
switch, no release, no deploy.
|
||||
Reference in new issue
Block a user