docs(docs): R5.7 census, ledger, reproducibility, RUST.md 11.23

CLAUDE.md, WORKSPACE, packages/README, README, sheet model, SUPABASE, TEST_STRATEGY,
PDF-FORMAT and ANNOTATION-RENDERING follow the deletion; RUST.md 11.23 records the census,
counts, the historical TS replay procedure and hashes; CHANGELOG, TODO, R5.7 plan and
contract.
This commit is contained in:
bchanot committed 2026-10-25 04:00:15 +01:00
1 parent 1b359598ab
commit 4e0a6c04d6
14 files changed
+301 -56

No files matched your search

+6 -6
View File
@@ -15,7 +15,7 @@ Out of scope here: the legacy importer and the official equine draft
| Layer | Where | Role |
| ------------------- | ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| Canonical document | `packages/domain/src/anatomical-sheet/` (Zod) | The sheet content: views, annotations, finding tree, vertebral regions, translations. Self-describing (`schema_version`). |
| Canonical document | `crates/core/src/domain/sheet/` (Rust; Zod until R5.7) | The sheet content: views, annotations, finding tree, vertebral regions, translations. Self-describing (`schema_version`). |
| Relational identity | `supabase/migrations/20261008110000_anatomical_sheets.sql` | Who owns the sheet, visibility, versions and their status, provenance of copies, assets, audit. |
The database stores the document as JSONB in
@@ -276,7 +276,7 @@ with the community step (§17.4).
| Criterion | Where it is proven |
| ------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------- |
| A sheet with several views and annotations explicitly linked to findings | `packages/domain/tests/fixtures/horse-slice.ts` (2 views, trigger, spine region, bilateral joint, 3 finding kinds); schema + integrity tests |
| A sheet with several views and annotations explicitly linked to findings | `crates/core/tests/fixtures/horse-slice.json` (from `horse-slice.ts`, deleted at R5.7; 2 views, trigger, spine region, bilateral joint, 3 finding kinds); schema + integrity tests |
| Ids stable under translation | test: renaming every label leaves ids, references and `validateSheetDocument` output unchanged |
| Published versions immutable | pgTAP: UPDATE of content / status / number on a published row → `42501` for the table owner; zero rows touched through the API role |
| New version leaves old ones intact | pgTAP: v2 draft then publish; v1 row byte-identical, `current_version_id` moves |
@@ -304,8 +304,8 @@ the decision lands; only the naming one is implemented in this document.
## 6. Official equine sheet: import (Step 4b) and curation (Step 4c)
A deterministic pipeline (since R5.6 the Rust one, `pnpm import:equine --check | --out <dir>`,
`crates/core` feature `curation`; the TypeScript original in `packages/anatomy` stays as
`pnpm import:equine:legacy` until R5.7) reads the historical files kept under
`crates/core` feature `curation`; the TypeScript original `packages/anatomy` was deleted at
R5.7, replayable from a historical revision, `docs/development/RUST.md` §11.23) reads the historical files kept under
`supabase/seed/anatomical-sheets/equine/legacy-sources/` (`Horse.svg`,
`Horse_head.svg`, `pathologies.json`, `vertebrae.ts`, never edited), then the
authored curation files, and writes under
@@ -317,7 +317,7 @@ authored curation files, and writes under
| `curation/` | authored, committed | `references.json` (the references registry) and `changes.json` (the changeset) |
| `draft/` | generated working revision | curated `document.json`, `assets.json` + `assets/horse.svg`, `sheet-ref.json` (sheet id, null version id, the `sha256-rfc8785-validated-v1` fingerprint of the document and its `fingerprint` block, RUST.md §11.22), `report-migration-map.json` (legacy ids and finding paths → the draft, for Report v2 imports), `CHANGELOG.md`, `REVIEW-REPORT.md`, `review/annotations-<view>.svg` (before/after drawing per view), `review/app-<view>.svg` (the application's own rendering), `equine_draft.sql` |
Changeset (`packages/anatomy/src/curation/schema.ts`): each change has an
Changeset (`crates/core/src/curation/draft/schema.rs`): each change has an
id `CHG-nnn`, a level (A demonstrated error, B supported improvement, C
uncertain: a `question` is then required), a kind (correction,
terminology, translation, restructure, enrichment, reference, geometry,
@@ -396,7 +396,7 @@ applier's rename, move and removal records over every node of the legacy
baseline (792 nodes: 571 identical, 180 renamed or moved, 7 re-homed under
another category when the match is unique, 34 removed = `null`), maps the 27
legacy `data-anno-id` to annotation ids with the legacy names, and the `head`
detail key to the view. `migrateReportV2ToV3` (packages/domain) reads it; a
detail key to the view. `migrate_report_v2_to_v3` (`crates/core/src/domain/report/read.rs`) reads it; a
report keeps what the map cannot place, flagged `unresolved`.
Annotation colour (Step 5, additive, schema_version stays 2): `annotations[].color`