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

+9 -1
View File
@@ -349,7 +349,15 @@ feat/findings-tree-v2 merged (FindingsTreePicker tracked in HEAD); all work belo
- [x] gates: security PASS (1 MEDIUM, 6 LOW), verifier ECARTS(3) = export grants alias without fingerprint_verified (fix needs snapshot_rules.rs, outside scope) → checkpoint, STOP, owner decision
- [x] R5.6 M1 correction + full rehearsal (owner 2026-10-25; snapshot_rules.rs authorised): recognises_historical_stamp, null block refused, warnings allowed, depth 128; fresh worktree r56final: rust:check + check:all 01:53:59 green; security PASS (LOW); verifier CONFORME 8/8 → checkpoint, STOP (activation on signal)
- [x] R5.6 D-R5 switch ACTIVE (owner go 2026-10-25, commit 9e87016): seed sheet-ref 03e7f6ab + migration map 0e991bc2 only, --check 0 diff, rust:check + check:all green, security PASS LOW, verifier ECARTS(1)=S7 wording → Clarification; BDR-070; rollback not transparent for post-switch reports (settle before user release) → checkpoint, STOP, no merge, no R5.7
- [ ] 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
- [ ] 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 (owner go 2026-10-25 « Validation R5.6 et autorisation R5.7 »: rollback limit accepted on the branch, no intermediate release; plan `.claude/tasks/plans/2026-10-25-rust-r5-7-cleanup.md`, contract `.claude/tasks/contracts/2026-10-25-rust-r5-7-cleanup.md`; stop at the checkpoint, no merge)
- [x] R5.7a census + matrices (LEDGER 407: 256 ported, 149 replaced, 2 deleted, 0 gap; FILES 112), 15 anatomy + 1 domain uncovered contracts ported first (+19 Rust tests, curation_leaves.rs new)
- [x] R5.7b `report-v2.*.json` → `crates/core/tests/fixtures/` (sha256 kept), Rust readers repointed
- [x] R5.7c deletion (anatomy, domain, TS upload script, legacy scripts, Dockerfile lines, lockfile by `pnpm install`)
- [x] R5.7d census tests (r4 xmldom inverted + non-vacuity, R5 census, ESLint ban)
- [x] R5.7e historical reproducibility documented and rehearsed (59521dc: git status clean, 144+262; 756b7ef: 2 files, 144+263) in a detached worktree
- [x] R5.7f docs (CLAUDE.md, WORKSPACE, packages/README, README, RUST.md §11.23, CHANGELOG, sheet model, SUPABASE, TEST_STRATEGY, PDF-FORMAT)
- [ ] R5.7g checks (frozen install, rust:check, check:all green 03:58:13, --check 0 diff, TS 943→546, Rust 364→383) + fresh security + fresh verifier → checkpoint, STOP
- [ ] owner action (non-blocking): `packages/{anatomy,domain}/node_modules` leftovers (git-ignored pnpm symlinks; recursive delete refused to Claude) → `rm -r packages/anatomy/node_modules packages/domain/node_modules && rmdir packages/anatomy packages/domain`
- [ ] DEV hardening (owner 2026-10-24, risk accepted temporarily, not scheduled): Supabase on CLI demo keys + 54321 LAN-open (rootless, UFW allow incoming, no 54321 rule) → own JWT secret/signing keys via env() or narrower 54321 rule before any untrusted device or user (ENVIRONMENTS.md §3.6); never these keys in production; `confirm_sheet_asset_upload` object check before public exposure
- [ ] separate chore (D-R7): form constraints module + PGlite `pg_constraint`/config.toml parity test
- [ ] Release 0.2.0 (branch release/0.2.0 = Steps 3–6, version.txt + package versions 0.2.0, CHANGELOG [0.2.0] 2026-10-11): deploy-trigger check done 2026-10-12 (CI = branches main/develop only, no tag trigger, no deploy job, docker job builds `faunosteo:ci` locally; hooks push only; DEPLOY.md deploy = manual on the VPS). Default 0.2.0 build carries NO sheet (SHEET_BUNDLE=none) → the live local tool must not be redeployed from main without `--build-arg SHEET_BUNDLE=draft`. Finish via /release-candidate (finish + tag span, tag push on explicit go); CHANGELOG back-merge conflict expected (Unreleased Step 7 above [0.2.0]). Awaiting the user's go.
@@ -0,0 +1,50 @@
# CONTRACT: R5.7 consumer census and deletion of `packages/anatomy` and `packages/domain`, owner brief 2026-10-25 « Validation R5.6 et autorisation R5.7 »
- branch `feature/rust-r5-pipeline-core`, base 756b7ef (R5.6 active since 9e87016)
- plan `.claude/tasks/plans/2026-10-25-rust-r5-7-cleanup.md`
## Clauses
C1. **Census.** Every consumer of `packages/anatomy` and `packages/domain` outside them is listed (runtime and type
imports, fixtures read by Rust, TS tests, oracles and goldens, pnpm scripts, build dependencies, seed scripts, docs,
dev and check tools, historical references). Nothing still required by an active feature is deleted.
C2. **Matrices.** `crates/core/tests/curation/FILES.tsv` names every deleted tracked file with its Rust counterpart or the
reason it goes; `crates/core/tests/curation/LEDGER.tsv` has one row per TS case of both packages at 756b7ef (407), with the
case's contract, old location, equivalent after the deletion, status ported / replaced / kept / deleted (with the
justification), and the historical reference kept. No row is a gap: a contract still relevant and uncovered is ported first.
C3. **Fixtures.** `report-v2.full.json` and `report-v2.minimal.json` move under `crates/core/tests/fixtures/` with their bytes
unchanged (sha256 before = after, recorded); the Rust readers use the new place. No oracle, golden, frozen digest, migration
data, N-1 reader or reference PDF is changed, regenerated or removed; a moved reference file keeps its sha256.
C4. **Active checks preserved.** The contracts the brief §5 lists stay covered by tests that run in `pnpm rust:check` or
`pnpm check:all` (sheet model validation, reference integrity, deterministic UUIDs, legacy catalog conversion, changeset
application, migration map, statistics, seed SQL, SVG rendering, RFC 8785, historical aliases, PDF import and export, old
archive compatibility); the application and interface suites keep passing; test counts before and after are measured and
documented.
C5. **Historical reproducibility.** The documentation names the reference commits of the TypeScript pipeline, the versions
(Node, pnpm, dependencies), the historical generation and comparison commands, the isolated-worktree procedure and the expected
sha256 of the artifacts; the procedure is rehearsed once; the old engine is not reintroduced in the current tree.
C6. **Dependencies and scripts.** The two packages' own dependencies leave the lockfile through `pnpm install`; `@xmldom/xmldom`
and `tsx` are gone; root `prettier` stays (used by `pnpm format` and `db:types`); `pnpm import:equine` stays the Rust pipeline;
`import:equine:legacy` and `assets:upload:legacy` are removed; no other dependency changes major version; the lockfile installs
with `--frozen-lockfile`.
C7. **Census tests.** `r4.census.test.ts` proves xmldom and the TS engines are no active dependency, and cannot pass on a
lockfile or tree that reintroduces them (a non-vacuity check); a census proves no production path (app, glue, supabase package,
Dockerfile, Vite/TS config) imports a deleted engine, and that the two matrices agree with the tree.
C8. **Docs.** CLAUDE.md, WORKSPACE.md, packages/README.md, RUST.md §11, CHANGELOG, TODO, the curation commands and the test
registers are updated; the seed SQL header is kept (frozen bytes) and explained beside it; audits are append-only; the brief §10
follow-ups stay tracked (rollback limit, DEV hardening, migration-map cascade debt, direct export API trust boundary, SQL checks
before public exposure, accepted LOW items).
C9. **Checks.** `pnpm install --frozen-lockfile`, `pnpm rust:check`, `pnpm check:all`, `pnpm import:equine --check` (0
difference), the RFC 8785, alias and archive suites, PDF and `report:compare`, the N-1 reader, the moved fixtures, the sheet and
seed integrity suites, and the absence of any import of the deleted packages, all green on the final state.
C10. **Limits.** Branch only; no merge, no release, no deploy, no Supabase DEV data change, no migration, no new feature; no
seed byte changed.
@@ -0,0 +1,43 @@
# PLAN: Rust R5.7, consumer census, `packages/anatomy` and `packages/domain` deleted, guarantees kept
- date: 2026-10-25 | branch `feature/rust-r5-pipeline-core` at 756b7ef (R5.6 active, 9e87016)
- spec: owner brief 2026-10-25 « Validation R5.6 et autorisation R5.7 » (§1 to §13); plan R5 §B.5 row R5.7 and §B.6
(`.claude/tasks/plans/2026-10-22-rust-r5-pipeline-core.md`); RUST.md §11; BDR-068, BDR-070
- contract: `.claude/tasks/contracts/2026-10-25-rust-r5-7-cleanup.md`
- limits: no merge, no 0.2.0, no deploy, no Supabase DEV data, no migration, no SaaS feature, no oracle regenerated,
no seed byte changed, no major version bump; stop at the checkpoint (brief §12)
## Facts at the start (756b7ef)
- TS cases to retire: anatomy 144 in 22 files, domain 263 in 13 files (vitest JSON, all green).
- Consumers outside the two packages: anatomy → root script `import:equine:legacy`, Dockerfile COPY, docs, Rust
module comments; domain → anatomy, Dockerfile COPY, the Rust suites reading
`packages/domain/tests/fixtures/report-v2.{full,minimal}.json` (`report_rules`, `archive_rules`), the app ESLint ban,
`r4.census.test.ts` (xmldom pinned under anatomy), docs, SQL migration comments (frozen, never edited).
- `packages/supabase/scripts/upload-sheet-assets.ts` (`assets:upload:legacy`): TS upload tool, replaced by the Rust bin
at R5.5 (owner e2e PASS 11/11).
- Root `prettier` stays (`pnpm format`, `db:types`, `db:types:check`); `tsx` only under anatomy; `@xmldom/xmldom`
only under anatomy.
- The `report-v2.*.json` fixtures of domain are byte-identical to the app's copies (sha256 e96b0882…, ba79698c…).
- Seed SQL header names `packages/anatomy`: frozen bytes (sha c5a24312…), kept, documented beside.
## Subtasks
1. Census + matrices: tests ledger `crates/core/tests/curation/LEDGER.tsv` (407 rows: ported / replaced / kept /
deleted, target, oracle, note), files matrix `crates/core/tests/curation/FILES.tsv` (every deleted file → its Rust
counterpart or reason). GAPs found by the mapping are ported before any deletion.
2. Fixtures: `report-v2.{full,minimal}.json` → `crates/core/tests/fixtures/`, `git mv`, sha256 before = after; Rust
readers repointed.
3. Ports of uncovered contracts (from the mapping), on frozen oracles, in Rust or durable vitest.
4. Deletion: `packages/anatomy`, `packages/domain`, TS upload script + `assets:upload:legacy`,
`import:equine:legacy`, Dockerfile COPY lines, lockfile by `pnpm install`; Rust module comments that cite deleted
paths point at the reference commit.
5. Census tests: `r4.census` xmldom assertion turned into "no importer, no package resolves xmldom", with a non-vacuity
check; new R5 census (packages gone, no production path imports a TS engine, ledger and files matrix consistent with
the tree); app ESLint ban extended to `@faunosteo/anatomy` and xmldom.
6. Historical reproducibility: reference commits, versions, commands, isolated-worktree procedure, expected sha256 of the
18 files; rehearsed once in a detached worktree.
7. Docs: CLAUDE.md, WORKSPACE.md, packages/README.md, README.md, RUST.md §11.23, CHANGELOG, ANATOMICAL_SHEET_MODEL.md,
SUPABASE.md, TEST_STRATEGY.md, PDF-FORMAT.md (xmldom line stale), ANNOTATION-RENDERING.md; follow-ups kept (brief §10).
8. Checks: frozen-lockfile install, rust:check, check:all, `import:equine --check`, targeted suites, census, counts.
9. Gates: fresh security audit, fresh verifier on the contract; memory; checkpoint, STOP.