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
@@ -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`
|
||||
|
||||
@@ -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.
|
||||
@@ -155,8 +155,8 @@ UTF-8, 3 network. The DEV address counts only if it is an address of this
|
||||
machine. The key is
|
||||
never printed and goes through no proxy. `pnpm e2e:sheet-assets` runs the
|
||||
whole behaviour against the local stack (upload, rerun, anon and wrong key,
|
||||
refused destinations, unreachable port). The TypeScript tool stays as
|
||||
`pnpm --filter @faunosteo/supabase assets:upload:legacy` until the R5.7 census.
|
||||
refused destinations, unreachable port). The TypeScript tool
|
||||
(`packages/supabase/scripts/upload-sheet-assets.ts`) was deleted at R5.7 (RUST.md §11.23).
|
||||
|
||||
### 3.2 Files worker (Storage, Step 8)
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ Status: Step 0 deliverable, 2026-10-08. Current state: 32 files under
|
||||
| SQL/TS contract | generated types diff check | CI | every PR touching `supabase/` |
|
||||
| Rust core and facade | `cargo test` (unit + fixture tests reading the repository JSON in place), `clippy -D warnings`, `cargo deny`; ts-rs types drift check | `crates/*`, `pnpm rust:check` (native, `scripts/rust-check.sh`; same file in the builder image), `pnpm check:all` | before every Rust commit and every merge; CI job `rust` prepared, no runner yet |
|
||||
| Rust/TS contract | vitest on the built module: byte equality with `JSON.stringify(…, null, 2)` on the real documents, ts-rs types against the Zod output types, the runtime (lazy load, trap → poison → offline re-instantiation, handle rebuild, cap, retry), panic and stack traps on `pkg-proofs`, served size budget and measurements | `packages/core-wasm/tests` (refused, never skipped, when `pkg/` or `pkg-proofs/` is missing or stale) | `pnpm check:all` (after the native `wasm:build`); CI `check` prepared |
|
||||
| Freeze-then-switch oracles (R2) | outputs of the TypeScript frozen before the switch and checked by cargo: Zod output of the reference documents (byte-equal), 84 report / archive cases, 765 Zod verdicts, 49 editor cases, 26 sheet conformance fixtures (also inlined into the generated pgTAP `011`, drift-checked), the three archive envelopes (deep-equal through the app path) | `crates/core/tests/{oracles,conformance,fixtures}`, generators in `packages/domain/tests/r2-*.test.ts` and `apps/app/tests/unit/archive.envelopes.test.ts` (`MAKE_R2_ORACLES` / `MAKE_R2_FREEZE`, never regenerated without an owner decision) | every Rust commit (`pnpm rust:check`), `pnpm check:all` |
|
||||
| Freeze-then-switch oracles (R2) | outputs of the TypeScript frozen before the switch and checked by cargo: Zod output of the reference documents (byte-equal), 85 report / archive cases, 765 Zod verdicts, 49 editor cases, 26 sheet conformance fixtures (also inlined into the generated pgTAP `011`, drift-checked), the three archive envelopes (deep-equal through the app path) | `crates/core/tests/{oracles,conformance,fixtures}`, generators `packages/domain/tests/r2-*.test.ts` (deleted at R5.7, at 756b7ef; the oracles stay) and `apps/app/tests/unit/archive.envelopes.test.ts` (`MAKE_R2_ORACLES` / `MAKE_R2_FREEZE`, never regenerated without an owner decision) | every Rust commit (`pnpm rust:check`), `pnpm check:all` |
|
||||
| N-1 reader (permanent) | every draft and archive the core-fed application writes parses with the Zod schemas of the last TypeScript build (`packages/core-wasm/tests/n-1`, develop 1a7ee7d) | `apps/app/tests/unit/n-1.reader.test.ts`, `archive.envelopes.test.ts` | every commit (`pnpm test:run`) |
|
||||
| CSP on the image (R2) | the real app image behind the DEPLOY.md CSP in headless Chromium: with `'wasm-unsafe-eval'` the core runs the editor path, without it the degraded state and an untouched draft; no module request on `/login`, `/app/account`, `/` | `docker/csp-proof/app-image.sh` | before a merge touching the core loading or the image; manual (needs Chromium) |
|
||||
| Worker sandbox | integration tests against the musl binary that ships: fixture corpus through the full sandbox, refusals, SIGSYS on a denied syscall, output cap, `RLIMIT_AS` abort, `RLIMIT_CPU`, deadline; seccomp allowlist derived by `strace` and compared | `crates/worker/tests/sandbox.rs`, Dockerfile stage `test` (`pnpm worker:test`, Docker only, never native) | every `crates/worker` commit, `pnpm check:all`; CI `docker` job prepared |
|
||||
|
||||
@@ -13,8 +13,9 @@ faunosteo/
|
||||
│ ├─ src/ public/ tests/ scripts/ index.html
|
||||
│ ├─ vite.config.ts vitest.config.ts tsconfig*.json eslint.config.js
|
||||
│ └─ package.json app dependencies and scripts
|
||||
├─ packages/domain/ @faunosteo/domain: canonical anatomical sheet document (Zod) + integrity rules
|
||||
├─ packages/core-wasm/ @faunosteo/core-wasm: the Rust core in the browser (runtime, ts-rs types, frozen N-1 reader)
|
||||
├─ packages/supabase/ @faunosteo/supabase: typed client, generated types, PGlite SQL tests
|
||||
├─ crates/ Rust workspace: core (contracts, rules, SVG, PDF, anatomical pipeline), wasm, worker
|
||||
├─ supabase/ Supabase CLI config, migrations, seed, pgTAP tests (docs/development/SUPABASE.md)
|
||||
├─ docker/ nginx.conf, entrypoint.sh (unchanged)
|
||||
├─ docs/ conventions, audit, development plan
|
||||
@@ -35,7 +36,7 @@ Future units, created only by the step that needs them:
|
||||
|---|---|---|
|
||||
| `apps/public-web` | SSR public site (landing, practitioner profiles, search) | plan Step 22 |
|
||||
| `crates/worker` | Rust job runner (avatars at R1, then emails, expiry, calendar sync, imports) — created at R0, replaces the planned `apps/worker` | R0 (2026-10-12) |
|
||||
| `packages/*` | shared domain, anatomy, core-wasm, supabase (i18n, config, ui planned; `pdf` deleted at R4.8) | see `packages/README.md` |
|
||||
| `packages/*` | core-wasm, supabase (i18n, config, ui planned; `pdf` deleted at R4.8, `domain` and `anatomy` at R5.7) | see `packages/README.md` |
|
||||
|
||||
Rust workspace (plan R0, `docs/development/RUST.md`): `Cargo.toml` at the
|
||||
root with `crates/core` (library), `crates/wasm` (browser facade, built into
|
||||
@@ -111,7 +112,8 @@ Package-scoped: `pnpm --filter @faunosteo/app <script>`.
|
||||
`tsconfig.json` (no root tsconfig), tests under `tests/` (apps and packages
|
||||
alike), `vitest` in `node` environment for packages.
|
||||
- Dependencies are declared where they are used (`apps/app/package.json`);
|
||||
the root holds only repository tooling (Prettier, pnpm).
|
||||
the root holds only repository tooling (Prettier for `pnpm format` and
|
||||
`db:types`, pnpm, the Supabase CLI).
|
||||
- Build scripts of dependencies run only for packages listed in
|
||||
`pnpm-workspace.yaml` `onlyBuiltDependencies`.
|
||||
- Commit scopes gain `app`, `workspace`, `ci` (see CLAUDE.md).
|
||||
|
||||
Reference in new issue
Block a user