chore(memory): V1-2.2 checkpoint, evidence, BDR-086, LRN-097/098, TODO
This commit is contained in:
1 parent
ca31b787b6
commit
17d919971e
8 files changed
+213
-4
No files matched your search
@@ -0,0 +1,70 @@
|
||||
# Contract: V1-2.2 core (verdict, PreviewSheet, edit primitives, SVG cleaning)
|
||||
|
||||
Source of truth: `docs/development/V1-2_ANATOMICAL_SHEETS.md` (the "V1-2 contract"), §16.3 for the
|
||||
step, with the sections it cites. Owner brief 2026-10-29 « Autorisation de démarrer V1-2.2 ». Base
|
||||
commit `ac71c5b` (V1-2.1 verified by the owner). Diff under review: `ac71c5b..HEAD` on
|
||||
`feature/v1-2-anatomical-sheets`.
|
||||
|
||||
## Scope (§16.3)
|
||||
|
||||
1. The verdict function: strict parse, issues, caps, drawings, fingerprint, completeness, groups,
|
||||
digests, removal groups, change list (§6.3, §6.4, §6.5, §6.6, §6.7).
|
||||
2. `PreviewSheet` as the catalogue, preview and editor handle, with `view.canvas` on it (§8.1, §10).
|
||||
3. `sheet.edit` primitives with the status rules of §6.6; `dependents` (§8.1).
|
||||
4. SVG classification and cleaning (§9.2).
|
||||
5. Application changes limited to the wasm facade and the ts-rs types; no SQL change; no screen.
|
||||
|
||||
## Acceptance criteria (§16.3, §15 « Core »)
|
||||
|
||||
- A1 Hash and fingerprint mismatches refused by `PreviewSheet`.
|
||||
- A2 The equine draft previews with the same index and fingerprint as from the bundle.
|
||||
- A3 An invalid draft draws with its issues.
|
||||
- A4 A document replacement redraws without re-reading the drawings.
|
||||
- A5 The groups of a derived version that deletes a zone include its removal group.
|
||||
- A6 Vector-tool exports cleaned and hostile files refused (see owner decision D1 below).
|
||||
- A7 Every edit primitive outputs a strictly parseable document, keeps existing keys and applies the
|
||||
status rules (property tests).
|
||||
- A8 Groups, digests and removal groups; the change list; the verdict function tested.
|
||||
- A9 SVG classification and cleaning tested on committed vector-tool exports and the hostile corpus;
|
||||
the cleaning fixpoint proven by a property test.
|
||||
- A10 Caps fixtures at cap − 1, cap, cap + 1 and with astral characters.
|
||||
- A11 The document size computed in the measure of §12.2 (`octet_length(content::text)`, the jsonb
|
||||
text form, never `JSON.stringify`), reusing the pgTAP 017 vectors.
|
||||
- A12 Wasm facade and ts-rs types; the N-1 reader untouched; the frozen oracles green.
|
||||
- A13 None of the protected readers is modified: `crates/core/src/domain/{archive/read,report/rebase,
|
||||
report/read,session}.rs`, `crates/core/src/pdf/{read,json_js,import}.rs`, the frozen
|
||||
`packages/core-wasm/tests/n-1` copies. Any change there is a deviation.
|
||||
- A14 The verdict is never computed or accepted from a page (O15): no RPC or browser path makes a
|
||||
verdict authoritative.
|
||||
- A15 Verdict shape compatible with what the M5 SQL (`supabase/migrations/20261028110000_sheet_review_workflow.sql`)
|
||||
reads: `verdict->'groups'` items `{key, digest, coverable}`, `verdict->'drawings'` items
|
||||
`{asset_id, sha256}`, `verdict->>'fingerprint'`.
|
||||
- A16 No DEV operation, no SQL migration, no merge, no change outside the scope above beyond the
|
||||
documents that record it.
|
||||
|
||||
## Owner decisions taken during the step (2026-10-29, contract §17.4)
|
||||
|
||||
- D1 The editors' exports (Inkscape, Illustrator, Figma, Affinity) are supplied by the owner later,
|
||||
under `crates/core/tests/fixtures/svg/exports/owner/`; the exports of tools installed on the
|
||||
development machine (cairo, ImageMagick) are committed meanwhile. A6 is therefore partially met
|
||||
until the owner's files arrive; the report must say so.
|
||||
- D2 A document that does not read strictly fails as `verification.integrity.document` (§6.5); the
|
||||
19 rule errors are `verification.validation.rules`.
|
||||
- D3 `PreviewSheet` of a draft reports caps excess and missing drawings; a published or deprecated
|
||||
version refuses them (`caps`, `drawing_missing`); hash mismatch and an unreadable document refuse
|
||||
every mode.
|
||||
|
||||
## Where to look
|
||||
|
||||
- Core: `crates/core/src/domain/sheet/{size,keys,caps,review,report,verdict,preview,edit}.rs`,
|
||||
`crates/core/src/anatomy/svg/{clean,sanitize,mod}.rs`, `crates/core/src/{ops,facade}.rs`.
|
||||
- Wasm: `crates/wasm/src/lib.rs`; `packages/core-wasm/{src,types,tests/preview.test.ts}`.
|
||||
- Tests: `crates/core/tests/{sheet_size,sheet_review,sheet_verdict,sheet_preview,sheet_edit,svg_clean}.rs`,
|
||||
oracle `crates/core/tests/oracles/v1-2-2/`, fixtures `crates/core/tests/fixtures/svg/exports/`.
|
||||
- Records: `docs/development/RUST.md` §12, the contract's §6.7, §9.2, §10, §17.4.
|
||||
|
||||
## Commands
|
||||
|
||||
- `pnpm rust:check` (fmt, clippy, all core feature suites, ts-rs export, cargo deny).
|
||||
- `pnpm wasm:build` then `pnpm --filter @faunosteo/core-wasm test:run` (the size budget is 600 000 B).
|
||||
- `cargo test -p faunosteo-core --test sheet_verdict` (and the other five suites).
|
||||
Reference in new issue
Block a user