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:
1 parent
1b359598ab
commit
4e0a6c04d6
14 files changed
+301
-56
No files matched your search
@@ -3682,3 +3682,141 @@ anatomy 15. Security PASS, LOW only (`.claude/audits/2026-10-25-rust-r5-6-active
|
||||
authorised, settled by the contract Clarification of 2026-10-25
|
||||
(`.claude/audits/2026-10-25-rust-r5-6-active-verify.md`). Wasm 531,715 B gzip (518,018 before the switch,
|
||||
+13.7 KB), under the earlier 600 KB reference mark; no budget added.
|
||||
|
||||
### 11.23 R5.7: consumer census, `packages/anatomy` and `packages/domain` deleted (2026-10-25)
|
||||
|
||||
Owner brief « Validation R5.6 et autorisation R5.7 ». Plan `.claude/tasks/plans/2026-10-25-rust-r5-7-cleanup.md`,
|
||||
contract `.claude/tasks/contracts/2026-10-25-rust-r5-7-cleanup.md`. Base 756b7ef (R5.6 active).
|
||||
|
||||
**Census (before any deletion).** Outside the two packages: `packages/anatomy` was reached by the root script
|
||||
`import:equine:legacy`, the Dockerfile (`COPY packages/anatomy/package.json`), the workspace (`pnpm -r test:run` ran its 144
|
||||
cases inside `pnpm check`), `r4.census.test.ts` (xmldom pinned under it), the SQL seed header (text) and docs and Rust module
|
||||
comments (text). `packages/domain` was reached by `packages/anatomy` (5 runtime symbols), the Dockerfile, the Rust suites
|
||||
`report_rules` and `archive_rules` (they read `packages/domain/tests/fixtures/report-v2.{full,minimal}.json` from disk), the
|
||||
app ESLint ban (a closed door), docs and three SQL migration comments (applied migrations, never edited). No application,
|
||||
glue or Supabase-package source imported either (grep + `r4.census`). `packages/domain/src` is byte-identical to the frozen
|
||||
N-1 copy `packages/core-wasm/tests/n-1/domain` (`diff -r`), which stays. `packages/supabase/scripts/upload-sheet-assets.ts`
|
||||
(`assets:upload:legacy`) was the TS upload tool replaced at R5.5.
|
||||
|
||||
**Matrices.** `crates/core/tests/curation/FILES.tsv`: the 112 tracked files that left (110 deleted, the 2 fixtures moved),
|
||||
each with its Rust counterpart (55 ported, 48 replaced, 9 package tooling or test helpers deleted). `crates/core/tests/curation/LEDGER.tsv`:
|
||||
one row per TS case at 756b7ef (anatomy 144 in 22 files, domain 263 in 13), with its contract, status, target, oracle and
|
||||
note: 256 ported, 149 replaced (frozen oracle, byte-exact committed seed, golden), 2 deleted (`never mutates its inputs`: the
|
||||
Rust applier takes `&Value`, no aliasing hazard; `r2-horse-slice`: it wrote the JSON fixture from the `.ts` one, the JSON is
|
||||
the source now), 0 uncovered. The 64 domain rows of `archive.branding-labels` re-registered by two other files are listed
|
||||
as such. Mapping by two read-only analyses, every target checked against `cargo test -- --list` (154 cargo targets, 0
|
||||
missing) and by `apps/app/tests/unit/r5.census.test.ts` on every run.
|
||||
|
||||
**Contracts ported first** (the mapping found 15 anatomy cases whose contract only the TypeScript checked, and one partial
|
||||
domain oracle): `curation_leaves.rs` (new, 8 tests: the 612 leaves 442/141/29, leaves land on leaves, FR and EN snapshots and
|
||||
the vet flag per finding, the 29 removed with their legacy path, the 141 moves split 134/7 inside their zone, v3 re-read
|
||||
stable, the 26 observable legacy ids on the right view with their names, C7 kept on a defined region); `curation_draft` (+7:
|
||||
a cite of a reference the same change added, the view box read and `1 2 3` refused, the map following a move through a
|
||||
just-renamed path, `CHG-000` reserved, the dollar-quote tag refused, the 16 rows of the R5.1 ledger equal to the committed
|
||||
files with the pre-switch substitution, the two generated folders holding exactly the ledger's files plus the byte copies);
|
||||
`curation_format` (+1: `inferRegionCode`, the 12 rows of `js-semantics.json` no Rust test read, and the TS cases);
|
||||
`curation_review` (+1: an annotation dropped by a change drawn `removed`); `anatomy_compose` (+1: the halo filter never
|
||||
duplicated on a root that holds it); `report_contract` (+1: `migration-map.draft.json` read entry by entry as Zod read it,
|
||||
27 annotations, 792 paths, 34 nulls, the committed map differing only by its fingerprint). Partial points kept as notes in
|
||||
the ledger (no business contract lost): the empty document's `view_box: null` literal, two relabel assertions, the
|
||||
`snapshotIndexSource` and `buildSheetIndex` TS-only adapters, JS identity probes.
|
||||
|
||||
**Fixtures.** `report-v2.full.json` (`e96b0882…729c`) and `report-v2.minimal.json` (`ba79698c…dfe7`) moved by `git mv` to
|
||||
`crates/core/tests/fixtures/`, sha256 equal before and after (also asserted by `r5.census`); identical to the app's copies
|
||||
under `apps/app/tests/fixtures/`, which stay. Kept untouched: the R2 oracles (`oracles/*.json`, `characterisation.json`,
|
||||
`verdicts.json`), R3 (`oracles/r3`), R4 (`oracles/r4`, `pdf/LEDGER.tsv`, the app goldens and `goldens/r4` digests), R5
|
||||
(`oracles/r5`, 13 files), the pre-switch seed copies (`fixtures/r5-6/pre-switch`), `fixtures/horse-slice.json`, the
|
||||
conformance fixtures, every reference PDF, the migration data, the N-1 readers. The generators that wrote them left with the
|
||||
packages; an oracle is never regenerated.
|
||||
|
||||
**Deleted.** `packages/anatomy`, `packages/domain`, `packages/supabase/scripts/upload-sheet-assets.ts`, the scripts
|
||||
`import:equine:legacy` and `assets:upload:legacy`, the two Dockerfile `COPY` lines. Lockfile through `pnpm install --offline`
|
||||
then `--fix-lockfile`: 69 lines removed, `@xmldom/xmldom` 0.9.12 gone, the two importers gone; `tsx` 4.23.15 is declared by
|
||||
no package and stays resolved only as vite's optional peer, marked `optional: true` (`pnpm dedupe --check` clean: removing
|
||||
it would take a hand edit); no other version moved; `--frozen-lockfile` installs. Root Prettier stays (`pnpm format`,
|
||||
`db:types`, `db:types:check`). Left on disk, git-ignored: `packages/{anatomy,domain}/node_modules` (pnpm symlinks; the
|
||||
recursive delete was refused to Claude by the permission layer, owner action as for `packages/pdf`).
|
||||
|
||||
**Census tests.** `r4.census.test.ts`: xmldom, the TS domain and the pipeline package banned from the app and glue sources
|
||||
and manifests; the lockfile holds no `@xmldom/xmldom` and no `packages/{anatomy,domain}` importer, with a non-vacuity check
|
||||
(the importer split finds `.`, `apps/app`, `packages/core-wasm`). `r5.census.test.ts` (10 cases): the packages and the TS
|
||||
upload script absent; no manifest declares them, xmldom or tsx, no `:legacy` script, `import:equine` and `assets:upload` run
|
||||
the Rust binaries; the lockfile importers equal the manifests on disk (non-vacuity) and resolve none of them; no app, Vite,
|
||||
glue or Supabase-package source imports them (non-vacuity: `@faunosteo/core-wasm` is found); the Dockerfile copies only
|
||||
existing manifests; the ESLint ban names `@faunosteo/domain`, `@faunosteo/anatomy`, `@xmldom/xmldom`; every `FILES.tsv` row
|
||||
absent with its counterpart present; every `LEDGER.tsv` row absent, 407 = 144 + 263, valid status, each cargo target a `fn`
|
||||
of its test file, each oracle file present; the moved fixtures' sha256; the oracles, pre-switch copies and N-1 readers present.
|
||||
|
||||
**Test counts.** Before (756b7ef, vitest JSON): TypeScript 943 (app 436, core-wasm 60, supabase 40, anatomy 144, domain 263);
|
||||
Rust core 364 (features `cli,upload`) + worker 33. After: TypeScript 546 (app 446 = 436 + the 10 R5 census cases, core-wasm 60,
|
||||
supabase 40); Rust core 383 (+19 ports) + worker 33. The 407 deleted cases are covered as the ledger says.
|
||||
|
||||
**Historical reproducibility (rehearsed 2026-10-25, detached worktree under the session scratchpad).**
|
||||
|
||||
| | |
|
||||
|---|---|
|
||||
| Last commit where the TypeScript pipeline was the official seed writer | `59521dc1953e6005045ca5b39434de6377033237` (`pnpm import:equine` = TS) |
|
||||
| Last commit holding the TypeScript pipeline | `756b7ef34d9cac9cfcb8288fecbf07599837a5ba` (`pnpm import:equine:legacy`) |
|
||||
| Tooling | Node 24 (rehearsed on v24.21.0), pnpm 10.13.1 (corepack), lockfile sha256 `a8611f22…1334` (same at both commits) |
|
||||
| Dependencies resolved | zod 3.25.76, @xmldom/xmldom 0.9.12, prettier 3.8.3, tsx 4.23.15, typescript 5.9.3, vitest 3.2.7, eslint 9.39.4, @types/node 20.19.41 |
|
||||
|
||||
```bash
|
||||
git worktree add --detach <empty scratch dir> 59521dc
|
||||
cd <that dir> && corepack pnpm install --frozen-lockfile --offline # or without --offline
|
||||
corepack pnpm import:equine # TS writer: rewrites the two seed folders of this worktree only
|
||||
git status --porcelain # empty: the TS reproduces the committed seed byte for byte
|
||||
corepack pnpm --filter @faunosteo/anatomy --filter @faunosteo/domain test:run # 144 + 262 green
|
||||
# at 756b7ef: corepack pnpm import:equine:legacy → exactly draft/sheet-ref.json and draft/report-migration-map.json
|
||||
# differ (pre-switch values, equal to crates/core/tests/fixtures/r5-6/pre-switch); run the suites on a clean tree
|
||||
# (they read the committed seed): 144 + 263 green
|
||||
```
|
||||
|
||||
Rehearsal results: at 59521dc `git status` empty after the run, 144 + 262 green; at 756b7ef the two files only, at
|
||||
`2c0716f1…b285` and `4139c51d…fce9`, and 144 + 263 green on the clean tree (one run of the suites over the tree the generator
|
||||
had just rewritten failed `r2-oracles` "committed migration map after R5.6", as it should).
|
||||
|
||||
Expected sha256 of the TypeScript output (the committed seed except the two R5.6 files; the 16 text rows are also
|
||||
`oracles/r5/pipeline.json` `artifacts`, asserted by `curation_draft`):
|
||||
|
||||
| File (under `supabase/seed/anatomical-sheets/equine/`) | sha256 |
|
||||
|---|---|
|
||||
| `draft/assets/horse.svg` | `0ea5202fa3b95bac167b87c12ee969ab0272e085b60c2d34dbca6202c5f08541` |
|
||||
| `draft/assets.json` | `c490dc758b330f372548a595826e2d4de73dcb935af1e39cb4883d5b31927cf5` |
|
||||
| `draft/CHANGELOG.md` | `48c010c8c8010f81d201005b485ecfe01e0b8c8ea76b944d220bcf2174d8b6c7` |
|
||||
| `draft/document.json` | `27c7383c445c73dc2001ebf4794a3ea63d416910bbbaa0d7848dd720de7c2660` |
|
||||
| `draft/equine_draft.sql` | `c5a24312c6a77cdd7e545dc34ebee377abd1ef9f9868fbffedbd6c21f53bed1e` |
|
||||
| `draft/report-migration-map.json` | `4139c51d3acd69ba9ca0ee6bb7bd7ebe7be4eb818e330ff278b37e1d04b7fce9` |
|
||||
| `draft/review/annotations-head.svg` | `2d6858a1891cdae36ffd364b30bc7586bcfcc1ea76a79ac0cda99497a21672e6` |
|
||||
| `draft/review/annotations-main.svg` | `1fd2e385468b1013ccd34f03ddf2ad80a7755f8d6b9071514e48aafa0e7bd4e4` |
|
||||
| `draft/review/app-head.svg` | `8d33077cdc87d2b979a58d75e271102fb9b18fcc2fa93ebd97758672f5eb3e80` |
|
||||
| `draft/review/app-main.svg` | `985a043aa1871b58ceec1f96e4fc4c6edd02e05bdb82694787a5c4ea5d6f81d5` |
|
||||
| `draft/REVIEW-REPORT.md` | `fbdaa58db0dbc092b7a0cd039804e1879f1351669abf7c6d0a0cf1189f0c8bfb` |
|
||||
| `draft/sheet-ref.json` | `2c0716f1536e4182cde9ffb0f183c7255d1ad6a1fc754d72011ff8090304b285` |
|
||||
| `legacy-import/assets/Horse_head.svg` | `9c03b98c0e55e3f684ce314b88dab2a0e11f488af6cc9140d61e1b2d5f9cb94c` |
|
||||
| `legacy-import/assets/Horse.svg` | `5fe3819c8bf07f18fcc51f40f3d06b1bc82e6202a62afa003e8639867b5b212d` |
|
||||
| `legacy-import/assets.json` | `109b0e7b8a03d398ea89ef278021f73d4f387992bbfdb2196c9cb7bec4232f2f` |
|
||||
| `legacy-import/document.json` | `91e459f4c0ac8043831242c9fccde01f75f1023464db909f1c29571aa8a414c2` |
|
||||
| `legacy-import/IMPORT-REPORT.md` | `7233bca100c8c1acc6e16310acd9e3e241e6760ab73855dcbf3a2bb92282d240` |
|
||||
| `legacy-import/legacy-id-map.json` | `4ec2b4e3a0ee7d901145ce45f9cc240d28e30997155a51c6d53ea1c1a36667b7` |
|
||||
|
||||
The old engine is not reintroduced in the tree; no third engine is kept.
|
||||
|
||||
**Seed SQL header.** `equine_draft.sql` line 2 still reads "Generated by `pnpm import:equine` (packages/anatomy)". Changing it
|
||||
would change the frozen seed bytes (`c5a24312…ed1e`, ledger row): kept, explained in `curation/draft/seed.rs` beside the
|
||||
emitted text and here. The generator is the Rust module since R5.6.
|
||||
|
||||
**Rust pipeline parity.** `pnpm import:equine --check`: legacy-import 6 files, draft 12 files, 0 differences (app-main under
|
||||
the declared R3 trigger-name rule).
|
||||
|
||||
**Checks on the final state.** `pnpm install --frozen-lockfile` ok; `pnpm rust:check` green; `pnpm check:all` green 03:58:13
|
||||
(advisories ok, wasm, `pnpm check`, app image, worker sandbox tests and runtime image); RFC 8785 and alias (`sheet_fingerprint`
|
||||
11, `r5_6_switch` 14), archives (`archive_rules` 38, `report_rules` 17 on the moved fixtures), PDF (`pdf_*`, `pdf_compare` 16),
|
||||
the N-1 suites (`n-1.reader`, `r5-6.n-1`, `n-1.scanner`), seed and sheet integrity (`curation_*`, `sheet_rules`,
|
||||
`sheet_conformance`), the census suites.
|
||||
|
||||
**Follow-ups kept (brief §10, unchanged by R5.7).** The rollback limit of reports written after R5.6 (a build that can roll
|
||||
back must recognise both conventions before any public exposure; tested by `r5_6_switch`); DEV Supabase hardening
|
||||
(ENVIRONMENTS.md §3.6); the migration-map cascade debt (§11.12); the direct export API trust boundary (§11.22); the SQL
|
||||
checks before public exposure (`confirm_sheet_asset_upload`); the accepted LOW items of §11.16 to §11.22. Once the generators
|
||||
are gone, a change of `curation/changes.json` cannot re-freeze `pipeline.json` or the synthetic oracles: the Rust tests that
|
||||
pin the real draft (46 changes, 825 records, the 612 fates, the fingerprints) then need an owner decision on a new baseline.
|
||||
Reference in new issue
Block a user