# Journal --- ## 2026-05-18 Scaffolded Osteo Report MVP skeleton from approved design spec. Created 80+ files: schemas, stubs, routes, stores, PDF modules, Docker infra. Moved Horse.svg + Horse_head.svg to public/species/equine/. pnpm install + build + typecheck + tests passing. pnpm 11 used (corepack shim broken on host Node 20.20.0). - MVP scaffold+impl done. Editor flow works. PDF roundtrip green. Real SVG assets in repo. --- ## 2026-05-19 Fixed 3 zone-interaction bugs (b9da4fa). Detail-popup clicks now resolved via detailBones map. Spine zones (data-anno-special="vertebral-precision") auto-open VertebraPicker on click. ObservationCard hides "Vertèbres…" button on non-special zones. Parser reads data-anno-special; convention doc updated. - BLK-003 resolved. LRN-004, LRN-005 captured. 91 tests green, lint clean, build OK. - VertebraPicker preselects region tab inferred from zone label (b3bd75d). +5 tests. - Hotfix: detailBones now accumulate across popup opens; merged allBones passed to ObservationList so detail-popup zone labels survive after modal close. - PDF rendering bugfix: titles cleared the header rule, zone-line wrap respects following blocks, non-selected zones hidden + data-anno-* stripped before raster, main SVG skipped when every zone lives in details. BLK-004, LRN-006, LRN-007 captured. - PDF styling pass: eyebrow + Times 22 title + 2pt accent rule + uppercase accent section labels + color-coded severity pill (sage/amber/red). Eyebrow/title baseline gap raised to 27pt after first attempt still overlapped. BDR-008, LRN-008 captured. - Commits this session: b9da4fa..d7ea99e (10 commits — bugfix + feat + hotfix + PDF styling). --- ## 2026-05-19 (session 2) feat(editor): home-nav (back btn + clickable Brand link to "/") + "Modifier les infos" dialog reusing PractitionerForm/AnimalForm via draft-copy with save/cancel. 3 store setters (setPractitioner/setAnimal/setOwner), 4 setter tests. Cache re-synced on save. 100/100 tests, lint 0, typecheck clean. - hotfix(pdf): multi-SVG observation page packed into 2-col grid; pre-rasterize → measure aspect → reserve text-area height → cell budget per row; single-SVG keeps full width; floor prevents zero-cells. Text sections now always visible. LRN-009 captured. - hotfix(editor): zone-highlight scoped to active obs only (collapsed obs no longer leave faint 'linked'/'multi' tints). AnatomyCanvas re-paints highlights after async SVG mount so DetailModal popup zones color correctly. NewReportRoute header harmonized with editor — back btn + clickable Brand left-aligned. 3 files (hotfix cap +1, accepted). LRN-010 captured. - domain pivot decided: flat Pathology[] → hierarchical findings tree per zone, path+snapshot serialization, FR/EN bilingual site+PDF. ReportSchema bumps v1→v2 (no retro-compat, no prod PDFs). Sample 3-zone JSON v1.1 dropped at src/domain/species/equine/pathologies.json — inert (loader not migrated). TODO rewritten as B0..B5 + C ship gate, ~23h dev. - NEXT SESSION: run /ship-feature on B0 (findings Zod schema + JSON loader) + B1 (ReportSchema v2 + observation.findings) + B2 (FindingsTreePicker replacing flat PathologyPicker). I18N (B3) deferred to separate feature. Reconcile JSON species.id (currently "equin") vs registry species.id ("equine") before parse — pick one. --- ## 2026-05-20 Bundled B0+B1+B2 shipped on feat/findings-tree-v2. 3 atomic commits. - B0 (f80e161): findings.ts Zod schema (recursive z.lazy + explicit ZodType), SpeciesFindingsSchema.parse(JSON) at boot, manifest swaps pathologies→findings, JSON species.id "equin"→"equine", new species.equineFindings test (5). - B1 (d08d773): ObservationSchema.findings + freeTextFindings, ReportSchema.version 1→2, store emptyObservation+initReport updated, PDF import detects v1 via IncompatibleReportVersionError + ImportError wraps message (FR), pathology.ts schema + test deleted. - B2 (b67f4cd): FindingsTreePicker (breadcrumb, drill, leaf toggle, retour, vet-referral ⚠, description_fr), ObservationCard renders one picker per zone with catalog, FreeTextPathologyInput renamed FreeTextFindingInput, scope_disclaimer modal once/session via osteo:disclaimer-shown sessionStorage flag, PDF observationPage renders findings via labelFrSnapshot with ⚠ prefix on vet-referral. B5 folded in: Toast + ZoneTooltip stubs deleted, CLAUDE.md folder map refreshed. - 107/107 tests green, lint 0 warn, typecheck clean, vite build OK (882KB main + 15KB lazy pathologies chunk). - BDR-009 (snake_case JSON fields preserved in TS), LRN-011 (Zod recursive via z.lazy + explicit ZodType), LRN-012 (sessionStorage flag pattern for once-per-session UX modals) to capitalize. - NEXT: push branch + PR. After merge: B3 (i18n FR/EN) + B4 (PDF observationPage polish for vet-referral) + C (full horse.json + QA + deploy). --- ## 2026-05-20 (session 3 — B3 shipped) B3 (i18n FR/EN site + PDF) shipped on `feat/findings-tree-v2` via /ship-feature. 5 new commits: - 0a05c47 docs(plan): B3 i18n FR/EN implementation plan - a570475 feat(i18n): localeStore + persist - 359104c feat(i18n): fr/en dicts + useT hook (~90 keys each, parity-tested) - d602726 feat(i18n): migrate site + PDF to locale-aware (25 files, +390/-207) - fa3eb51 test(pdf): roundtrip per locale (3 cases) - (post-review fix) typed ImportError discriminant for localized PDF import errors - 154/154 tests pass, lint clean, typecheck clean, build OK. - description_fr + scope_disclaimer stay FR-only this iteration (vet-expert authoring needed). - BDR-014 (PDF locale = render preference), BDR-015 (typed ImportError discriminant), LRN-017 (dict parity test), LRN-018 (useT selector+closure), LRN-019 (exhaustive-deps closure trap), EVAL-002 (review caught FR leak in PDF import) captured. - NEXT: B4 (PDF observationPage vet-referral polish), C (full horse.json + QA + Scaleway deploy). description_fr/_en EN copy when vet expert provides. --- ## 2026-05-21 User dropped catalog v1.2→v2.0 in place. pathologies.json now schema_version "2.0", 26 zones (was 3), 792 nodes, 612 leaves, 41 vet-referral leaves. Generic vet description_fr purged on 25 leaves; 16 kept with clinical differential. - Zero code change needed: `findings.ts` Zod schema already optional description_fr + boolean requires_vet_referral since B0. FindingsTreePicker + PDF already read boolean (no textual fallback). 154/154 tests stay green, typecheck clean. - One case mismatch noted then fixed by user: SVG Horse_head.svg `data-anno-name-fr="hyoïde"`→`"Hyoïde"`. JSON ↔ SVG strict equality now holds for all 26 zones (diff empty). Fuzzy matcher (lib/zoneMatch.ts) no longer needed for this pair but kept as safety net. - BDR-016 (v2.0 catalog adoption), LRN-020 (forward-compat schema absorbed change), BLK-002 resolved capitalized. - TODO Phase C item 1 "Author full horse.json" → done. B4 still has scope_disclaimer footer decision open. - NEXT: B4 disclaimer footer call + C QA + Scaleway deploy. - hotfix(pdf): PDF export crashed `WinAnsi cannot encode "⚠"` on any obs carrying a requires_vet_referral leaf — StandardFonts.Helvetica is WinAnsi-only. Swapped `⚠ ` PDF marker → `(!) ` (UI keeps ⚠). Regression test added on `widthOfTextAtSize` + prefixed label. LRN-021, EVAL-003 captured. 155/155 green. Follow-up: migrate PDF body to embedded TTF (Inter/Fraunces per CLAUDE.md spec) so future non-Latin-1 glyphs work. - chore: rename project `osteo-report` → `zoosteo` → `faunosteo` (Gitea repo moved). 15 files: repo URLs (CHANGELOG, DEPLOY, package.json), brand strings (env.ts DEFAULTS, entrypoint.sh fallbacks, i18n fr/en, pdf attachment metadata, index.html title, Brand test, scaffold banner, README/CLAUDE/CHANGELOG/ADDING-A-SPECIES headings), example URL osteo.example.com → zoosteo.fr in DEPLOY.md. PDF FILENAME `osteo-report.json` + startsWith contract preserved. 155/155 tests green. Commit 7dd4f63 + push. - fix(docker): pin `pnpm@11.1.3` in Dockerfile:7. `corepack prepare pnpm@latest` re-resolved to pnpm >=11.4 on VPS cold build, which needs Node 22.13 → `ERR_UNKNOWN_BUILTIN_MODULE: node:sqlite` on Node 20 image. Commit 7dccde7 + push. BLK-005 + LRN-022 captured. - fix(docker) v2: 11.1.3 pin insufficient — pnpm 11.x ENTIRE LINE imports `node:sqlite` (not just 11.4+). Local dev was misleading because pnpm install never re-ran on host. Downgrade Dockerfile to `pnpm@10.13.1` (last 10.x cached on host, reads lockfile v9 unchanged). Commit 990c8e7 + push. BLK-005 + LRN-022 corrected with iteration log. - chore(docker): pin `container_name: faunosteo-web` in docker-compose.yml — Compose v2 always appends `-1` replica suffix; single-instance service doesn't need scaling. DEPLOY.md log-prune command updated. Commit 7d214ed. - fix(docker): nginx template used bash-style `${PORT:-8080}` but envsubst doesn't support `:-default`. Switched to plain `${PORT}` since entrypoint.sh already exports PORT with default. Commit 0fcc526. - feat(ui): global footer (© year + brand + "Powered by ZenQuality" logo linking to zenquality.fr). New Footer.tsx mounted via flex-column layout in App.tsx so it sticks bottom on every route. Two i18n keys added (footer.all_rights_reserved, footer.powered_by). Commit caac149. - feat(ui): unify header — tagline next to brand on left for every page; LanguageSwitcher far right everywhere; dropped redundant "← Accueil" button on /new + /editor (brand is already a link to /). 3 files. Commit 1b01744 part 1. - fix(editor): scroll(0,0) on mount — long /editor page was landing at bottom on navigation due to browser scroll restoration. Commit 1b01744 part 2. - feat(editor): directional slide+fade between findings-tree levels (motion.ul, key-remount, 180ms). Forward enters from right, back enters from left. AnimatePresence omitted to keep test assertions synchronous. Commit adbab1b. --- ## 2026-05-23 feat(i18n): 8 laterality keys added to fr.ts + en.ts after vertebra section. Dict parity test (i18n.dicts.test.ts) + full suite 163/163 green. Committed `feat(i18n): add laterality translation keys (FR/EN)`. feat(schema): LateralSideSchema (z.enum left/right) + LateralSide type added to observation.ts. ObservationZoneSchema gains optional side field. 6 new tests covering accept/reject paths. Bone.lateral already present from prior anatomy commit. 163/163 green, typecheck clean. --- ## 2026-05-22 (session 2) - feat: locale-aware hover tooltip on anatomy zones (AnatomyCanvas custom floating tooltip, replaces native SVG title). - feat: /editors listing page + footer "Éditeurs" link + "Paws iin Harmony" credit. - feat(i18n): SVG editor header navbar + 58 FR/EN keys; pathology editor header + 76 FR/EN keys. Both editors fully bilingual. - fix(ui): 3 iterations on vertical centering — h-full→flex-1 on route containers (LRN-027). App.tsx main needs flex flex-col for children to grow. - Commits 569e571..89e010c (9 commits). 155/155 tests green throughout. --- ## 2026-05-22 Integrated standalone editor.html (~1630 lines vanilla JS SVG annotation tool) into React app at /svg-editor route. Vanilla JS wrapped in useRef+useEffect — zero behavior loss. CSS restyled to Faunosteo tokens (warm palette, accent vars, serif headings). DOMParser used for safe SVG loading (no innerHTML). Page noindexed via dynamic meta tag. 3 files created (SvgEditorRoute.tsx, svg-editor.css), 1 modified (App.tsx route registration), CLAUDE.md folder structure updated. - 155/155 tests green, typecheck clean, build OK (941KB main). No regressions. - BDR-017 (vanilla wrap decision), LRN-022 (DOMParser SVG loading) captured. - feat(editor): standalone pathology-editor.html — JSON pathology tree editor with SVG zone selection. 1390 lines vanilla JS/CSS, zero deps. Pre-wired species list + manual upload. Fuzzy zone matching ported from zoneMatch.ts. Recursive tree editor: add/edit/delete nodes, sources management, auto ID generation. SVG sanitized (scripts/foreignObject/on* stripped). Export full JSON preserving all zones. public/species/equine/pathologies.json added for HTTP access. Docs synced (CLAUDE.md + README). - BDR-020 (standalone HTML not React route), BDR-021 (inline port of zoneMatch.ts), LRN-025 (importNode XSS), LRN-026 (inline port pattern) captured. --- ## 2026-05-20 (session 2) Iterated on the findings-tree branch — 11 more commits on top of B0+B1+B2. - 1731adf fix(editor): match findings tree to SVG zones via FR label (strict equality, dropped raw-boneId lookup). - 95d746b feat(editor): fuzzy zone matcher (src/lib/zoneMatch.ts) — normalize + Levenshtein, EN-first + FR fallback. 23 new tests. - 34acb0c feat(editor): count badges on intermediate FindingsTreePicker nodes (pathStartsWith + countSelectedUnder). - 93294a4 fix(pdf): buildZoneLabels per-source try/catch + parallel + warn + exported for tests. Fixes raw-boneId fallback when detail SVG fetch fails. - 1e12f22 fix(editor): EditorRoute eagerly preloads every species.details SVG so re-imported PDFs render their pickers immediately. - de40c5f feat(editor+pdf): per-zone PDF sections "CONSTATS — " + dedicated "CONSTATS LIBRES"; ObservationCard accordion (one zone picker open at a time). - add408e feat(pdf): single-SVG observations halved + centered; first halo glow on main-view selections. - 4f8ea9e fix(pdf): bumped halo with stacked feGaussianBlur (stdDeviation 18 + 8) to survive the SVG→canvas→PNG→pdf-lib alpha attenuation. - 700567f feat(pdf): inter-item separator rendered as accent-coloured bold "•" @14pt with per-segment layout instead of plain join (height-estimator updated). - 70b7f20 feat(species): auto-discover species via import.meta.glob default-export contract + `pnpm scaffold:species` Node script + docs refresh. - 70f21cc docs: PATHOLOGIES-FORMAT.md — canonical findings-JSON spec mirroring src/domain/schema/findings.ts. - BDR-012 (auto-discovery import.meta.glob), BDR-013 (fuzzy FR/EN label bridge), LRN-013 (glob+default plugin pattern), LRN-014 (normalize+Levenshtein cross-walk), LRN-015 (per-source try/catch), LRN-016 (pdf-lib subset-font bytes-grep caveat) captured. - Tests 139/139 green, lint 0, typecheck clean, vite build OK throughout. Branch feat/findings-tree-v2 = 15 commits ahead of main, no remote configured (push + PR still pending). - NEXT: push branch + PR; then B3 (i18n FR/EN), B4 (PDF observationPage vet-referral polish), C (full horse.json + QA + Scaleway deploy). --- ## 2026-05-27 feat(editor) 9544924 — cross-region vertebra picks spawn their spine zone. - New src/lib/spineZones.ts: regionFromLabel (moved from VertebraPicker, re-exported for back-compat), findSpineZoneId (region→zone via vertebral-precision + label heuristic), distributeVertebraeToZones (pure, target=replace / others=union / unmapped→target). - EditorRoute onConfirm now distributes instead of dumping all verts on clicked zone. +7 tests (lib.spineZones). - BDR-018 (replace-target/union-others), LRN-028 (drive derived UI via source-of-truth row) captured. - 171/171 green, lint 0, typecheck clean. - Iterated vertebra picker 3x same session. 9544924 additive distribute → 38888cb unified full-spine editor. - collectSpineVertebrae (union all spine zones, clicked first) seeds picker; syncSpineZones authoritative (replace region / prune zero / spawn new); initialRegion beats initial[0] so click opens own tab. - BDR-018 SUPERSEDED by BDR-019. LRN-028 still holds (drive derived UI — highlight+findings — via observation.zones lever). - Wart accepted: prune orphans zone findings (parity w/ ✕ button). All spine-gated (special==='vertebral-precision'). 174/174 green, lint 0, tc clean. --- ## 2026-06-01 feat(ui+pdf): footer partnership credit "Paws iin Harmony" text -> Paws_in_harmony.svg logo (moved to public/, wide 2068x454 wordmark). Site Footer.tsx h-6 mirrors ZenQuality treatment. PDF footer drawFooter gains pawsLogoPng asset; export.ts rasterizes svg via rasterizeSvg (canvg) -> embedPng, text handle "@paws.iin.harmony" kept as fallback when fetch/raster fails. 2 commits (3a67da7 ui, d9cf2fa pdf). 174/174 green, lint 0, tc clean, build OK. --- ## 2026-06-13 fix(editor) 2803cf7 — pathology-editor.html 404 in prod (faunosteo.com/pathology-editor.html). Root cause: file at repo root, Vite bundles only index.html -> never in dist/ -> nginx SPA-fallback -> React "Page introuvable". Worked in `pnpm dev` (serves root files), hid prod gap. Fix: git mv -> public/ (copied verbatim to dist/), href unchanged (public/=web root). Verified via vite preview: /pathology-editor.html=200 text/html. CLAUDE.md + README folder maps synced. LRN-029 captured. Pushed 97f8a92. - Decided NOT to unify pathology-editor with svg-editor React-route pattern. BDR-022: asymmetry intentional (svg reuses app internals, pathology isolated zero-imports + produces prod JSON -> minimal-change zone). Verified editor fetches same prod assets as app (/species/equine/{pathologies.json,Horse.svg,Horse_head.svg}, all in dist/). No code change. --- ## 2026-07-12 /tour full sweep — branch chore/tour-2026-07-12, 11 commits, UNMERGED (human review pending). Security: CVE deps patched (pnpm audit 0), SVG import sanitized both editors, container non-root (BREAKING: PORT >=1024), nginx:1.31-alpine pin, min-release-age guard. Clean: -93 lines dead code (canvg dep dropped), 3 dedup extracts, i18n dead keys purged. Docs synced (README/DEPLOY/CHANGELOG, incl. stale origin/master). 6 bugs quarantined -> BUGS-FOUND.md (worst: B-3 draft mirror write-only). 4 reconcile suggestions pending /reconcile. Report: .claude/audits/TOUR.md. LRN-030/031, EVAL-004 captured. --- ## 2026-10-08 SaaS migration kickoff. Step 0: 8 docs in docs/development/ (27-step plan, domain map, FE/BE arch, migration, tests, 9 open questions) — user validated + decided: no external users, no v2 compat obligation, equine only, 2 SVG assets kept, import anomalies into draft (no silent fix), self-hosted Supabase on adequate infra, design decisions gated by user (ChatGPT), manual report points confirmed. Step 1: 91 characterisation tests, 2 golden fixtures, CHARACTERIZATION_REPORT.md; 271/271, typecheck/lint/build green; host had no pnpm → corepack (LRN-032). Both committed on feature/step-01-characterisation-tests, validated. - Step 2 (same day): app → apps/app (git mv, 144 R100), pnpm workspace, Node 24 + pnpm 10.13.1 pins, Dockerfile node:24 filtered build (unverified locally, no daemon), Gitea CI, WORKSPACE.md; 271/271, typecheck, lint, build green from root. Finish purged docs/superpowers (lib BDR-065) → restored under docs/history (BDR-025). Both steps merged into develop (c8d48ab, 4959602). BDR-023/024/025, LRN-034. User confirmed `@faunosteo/app`; working method set: harness owns gitflow/memory/quality, user gives step goals, design changes gated. Next: Step 3 on user goals. ## 2026-10-08 (session 3 — Step 3) Step 3 Supabase foundation on feature/step-03-supabase-foundation (9 commits, pushed). Docker socket denied (BLK-006) → PGlite+pgtap harness (BDR-028). 3 migrations: foundation (private/audit, set_updated_at, append-only audit_logs, log_event), profiles (auth trigger, own-row RLS, column grants), platform_roles (4-value enum BDR-026, RPC-only writes audited BDR-027, helpers hierarchy). 81 pgTAP checks allowed+denied; packages/supabase (client PKCE, types in gen format BDR-029, schema↔types test); app env.supabase null-safe, lib/supabase.ts, entrypoint/env.example; CI supabase job; SUPABASE.md. 278+13 tests, typecheck/lint/build green. Not run: real stack, gen types, seed. LRN-035/036, EVAL-006. Next: user validation; Step 4 (sheet model) parallelizable; Docker access for real-stack proof. - Same day, Docker access granted by user: real stack up, pgTAP 81/81 after seed-agnostic fix, gen types adopted (prettier pipe), REST script verified, db reset OK. BLK-006 resolved, EVAL-007, LRN-037. Branch still awaiting user validation before finish. - Step 3 validated by user (session 4). chore/supabase-cli-gitignore finished into develop. Step 4 (sheet model) started on feature/step-04-anatomical-sheet-model. - Step 4 (session 4): spec docs/development/ANATOMICAL_SHEET_MODEL.md; packages/domain (Zod doc strict, 17 integrity rules, 60 tests, opus executor); migration 20261008110000 (species, sheets, immutable versions, assets, 11 RPCs, RLS) + pgTAP 005 (95 checks); types regenerated on real stack (Docker now OK), pgTAP 176/176 real + PGlite; publishSheetVersion gate; docs synced. 5 commits on feature/step-04-anatomical-sheet-model. BDR-030/031/032, LRN-038/039. Verifier + security gates dispatched. Next: user validation, Step 4b importer → equine draft. - Gates: verifier ECARTS(5) + security BLOCK(1) on first pass (private EXECUTE never revoked = BLK-007, foundation flaw). Fixed: hardening migration 20261008110100, explicit revokes + pgTAP census, set_sheet_visibility RPC, no direct draft DELETE, caps, authz-first, counter, asset copy scoped, SQL check split, url http(s) only. Real stack 210/210, root check green. Fresh verifier re-dispatched on the delta. ## 2026-10-09 Step 4 validated + finished into develop. User decisions on the 7 open points → BDR-033 (follow-gated use, verified publication, no auto-deprecation, platform-owned official, kind rename, server validation, erasure path). Step 4b on feature/step-04b-equine-import: packages/anatomy importer (opus executor, 25 tests) → seed equine v1 as DRAFT (27 ann / 26 linked / 792 nodes / 612 leaves / 41 vet, 0 integrity issues, 18 anomalies reported, ssb-dysfunctions flagged); Storage migration + policy through the sheet, shim storage tables, harness applies seed/**, pgTAP 006/007 (238/238 real stack), assets uploaded + REST/Storage checks (owner 200, alice/anon 400). BDR-034, LRN-041. Gates dispatched; stop for user validation before Step 5. - Gates 4b: verifier ECARTS(4) + security PASS/MEDIUM → fixed same session (confirm_sheet_asset_upload + uploaded_at in read predicate, 27 anomalies declared, seeds-listed test, Dockerfile manifests for domain/anatomy, docker build green). Real stack 256/256, Storage e2e verified. EVAL-009. Fresh verifier re-run on delta; stop for user validation. - 2026-10-10 Step 4c on feature/step-04c-equine-curation: Docker `faunosteo_` convention (BDR-035); schema v2 (references, review_status, count_range; migration 20261010100000, pgTAP 008); curation pipeline (executor) + review overlays; 4 research agents (skull, axial, limbs, osteo/legal) → 44 changes / 679 ops / 48 refs authored from scratch python modules; draft 811 nodes, 28 annotations, 0 integrity errors; 9 points moved, carpus added, 9 questions for the osteopath. Root check green, real stack pgTAP + types clean, docker build OK. BDR-036, LRN-042. Gates next; stop for user validation; no publication. - Gates 4c: verifier ×3 (4→2→1 écarts, last 3 doc lines fixed by hand at cap), executor closed the applier rule + typed tests; security PASS (LOW url scheme → SQL rule `reference.url.scheme`). Real stack 267/267, Storage e2e OK. EVAL-010. Awaiting user validation; `.env.example` COMPOSE_PROJECT_NAME left to the user (file denied). - Step 4c VALIDATED by user 2026-10-10 → tracking: head view check documented (spec §6), BLK-008 migration limit, BDR-037, DEPLOY.md `.env.example` note. Finished into develop. Next: Step 5 (app on the canonical sheet), design points flagged before any UI work. - Step 5 preparation (2026-10-10): 4 analyzer agents (core/store, rendering, PDF, tests) + plan/spec reading → docs/development/STEP5_MIGRATION_ANALYSIS.md on chore/step-05-migration-analysis. Key facts: all 27 legacy data-anno-ids differ from canonical ids; 170/612 legacy finding paths moved/removed by curation → generated report-migration-map; markers never drawn by the app (in the SVG); PDF depends on markers only for the highlight; 66 tests import the registry. 8 decisions D1–D8 await the user. No implementation. - Step 5 implemented (2026-10-10, feature/step-05-app-on-canonical-sheet): domain report v3 + migration (80 tests), pipeline migration map/sheet-ref/app review drawings + layer renderer (110), app rewritten on the sheet (99 tests: service, store, provider, canvas, pickers, PDF v2/v3, route), legacy code removed, docs rewritten (ANNOTATION-RENDERING.md replaces the SVG convention). Root check green, docker build OK, real stack 267/267, default build carries no sheet. BDR-038, LRN-043. Gates next; awaiting user validation. - Step 5 gates (2026-10-10): verifier 36→4→4 (real gaps closed by 2 executors + doc fixes; cap reached, last test lot unverified by a 4th pass), security PASS (2 LOW fixed: prototype keys, size caps). EVAL-011. Final check green. Awaiting user validation; no publication; default build carries no sheet. - Step 5 addendum (2026-10-10, user testing manually): per-leaf migration tests (612 leaves, anatomy + app + PDF roundtrip), `pnpm report:compare` archive check tool (privacy default, escaping), stale `scaffold:species` script removed, attachment read/parse split. Gates: verifier 2→1→CONFORME, security PASS ×2 (2 MEDIUM + 4 LOW fixed by executors). EVAL-012, LRN-044. Branch 14 commits ahead, not merged; awaiting user validation; no Step 6. - Step 5 user validation (2026-10-10): all paths OK. One defect: findings picker text blurry on screen. Root cause (headless Chromium measure): permanent `will-change: transform, opacity` on the picker list + fractional offset inside height-animated card → composited text resampled; PDF unaffected. Hotfix 1f0b710: prop dropped, regression test (app 182). Security PASS, docs NONE. Full check green. User signal → finish Step 5; carpus + moved points noted, 28 annotations NOT a final catalog (enrichment with the osteopath + future editor later). Step 6 to present, not started. ## 2026-10-10 (session — Step 5 closed, Step 6 analysis) Step 5 validated + closed by user; LRN-045 (permanent will-change blurs text) written on develop. Step 6 analysis on chore/step-06-pdf-archive-analysis: 3 analyzers (PDF pipeline, data model, app/tests) → facts: export reads live SheetIndex (labels, views, asset, all annotations of view), 4 fetched logos + 3 hard-coded URLs, DOM in drawing/highlight/raster, attachment = bare v3 Flate'd by pdf-lib, getAttachments dead on pdf-lib 1.17.1, no report↔sheet check anywhere. Measured: lean snapshot envelope 172 KB raw / 51 KB stored (3 obs), 228 / 54 worst; SVG = 90% of stored. Plan: snapshot = lean AnatomicalSheetDocument + assets inline (reuses index/renderer/integrity rules), packages/pdf engine (xmldom compose promoted from app-review.ts, Rasterizer + Branding inputs, no DOM lib), envelope v1 layered reading (report never lost), rebase on import/restore keeps report.sheet == snapshot.ref, export-side caps. 3 plan-challengers GO WITH FIXES (16+19+13 findings folded in). docs/development/STEP6_PDF_ARCHIVE_ANALYSIS.md; TODO 6.0–6.7. Awaiting user decisions D1/D4/D6/D7/D8/D10/D12/D13; no implementation. ## 2026-10-11 (Step 6 implementation) User validated the Step 6 analysis with D7 (branding archived), D8 (imported snapshot kept, explicit rebase, no new UI without UX gate), D13 (explicit import messages). Analysis chore branch finished; feature/step-06-pdf-archives. Part II contract (exact types) + BDR-039. Phases by executors: 0 freeze (39 goldens, demo fixture, bare v3 PDF, route characterisation), 1 domain (archive/{snapshot,envelope,branding,labels}, sheet-index moved, rebase, bundle asset hashes), 2 anatomy (composeViewSvg + highlightLayer promoted from app-review), 3 engine packages/pdf (xmldom composition, allowlist sanitiser, safeText, Rasterizer, envelope v1, layered reader, resvg test), 4 app (export/import on the engine, archive in session `osteo:archive`, rebase + 4 messages, legacy modules removed). Verifier ECARTS(31, all my contract's oracles/scope) → CONFORME. Security BLOCK(1) HIGH (URI injection via archived branding) → 4 fix loops (hex URI → ASCII hex after poppler regression, URL schema, export re-validation, PNG IHDR budget → chunk allowlist + IEND → native IDAT inflation against exact raw size + IHDR fields, CSS escapes, NaN, file.size) → PASS. Docs: PDF-FORMAT.md real, CLAUDE/README/WORKSPACE/DEPLOY/CHANGELOG. 656 tests, build + docker green. Sizes: demo envelope 55 KB stored no logos / 136 KB with archived branding (306 KB raw). LRN-046, BLK-009, EVAL-013. Awaiting user validation + UX decision for re-export of the kept archive; Step 7 not started. ## 2026-10-11 (Step 6 manual-test feedback) User: step not merged; findings-picker text still blurry; footer logos absent in their PDFs; decisions: re-export from archive wanted (UX to propose), restore-rebase must be visible, exact labels to validate; BLK-009 analysis. Done on feature/step-06-pdf-archives: logos NOT reproduced (real export in headless Chromium dev/preview/Docker image + Firefox 157 engine harness: 4 logos embedded, 0 warnings, poppler + pdf.js render them) → branding bundled into the app (`src/assets/brand`, `?inline`/`?raw`, no fetch at all) + export returns warnings + `editor.export_warnings` alert (293a6e0); blur NOT reproduced (headless Chromium/Firefox, DPR 1/1.25/2, scrolling 9-leaf list, CDP LayerTree: no composited layer, no lingering animation/will-change; headed runs on the user's Wayland display failed to capture) → analysis + A/B recipe for the user; restore rebase alert `editor.draft_rebased` (e8f1734); docs/development/PDF_IMPORT_HARDENING.md (byte-scan reader + no object streams now; worker/parser later) (5ed4a4b). Root check 660 tests, build, docker green. Awaiting user: browser/zoom for the blur, UX choice for re-export, label validation. ## 2026-10-11 (Step 6 closure) User round 2: logos OK, picker text crisp, flows OK → STEP 6 VALIDATED. Decisions BDR-040: re-export-archive button refused for good; restore-rebase alert approved; import headlines full/partial (62b8a43). BLK-009: byte-scan attachment reader + export without object streams (60ee712), verifier CONFORME, audit PASS+2 MEDIUM → slice-fed inflater + candidate budget (3a6e926), focused re-audit. EVAL-014. Then: gitflow finish into develop, release/0.2.0 prep (Milestone A) up to the human go; Step 7 not started (UX/design to discuss with ChatGPT first). ## 2026-10-11 (Step 7 implementation) User: mockups validated (external, not in repo), implement Step 7 on a branch. feature/step-07-identity-app-shell off develop (release/0.2.0 still open, awaiting go). Foundation: packages/supabase auth/profile/roles services (closed AuthFailure kinds), migration 20261011100000 professional columns + pgTAP 009 (PGlite 22/22, real stack 280/280, types regenerated), config.toml TOTP on + google/apple via env(), `APP_AUTH_PROVIDERS`. App: authStore + localeSync + AuthProvider, routes /login /signup /forgot-password /reset-password /auth/callback, guards, AppLayout (sidebar / top bar / drawer), dashboard (profile completeness, local tool, account), Mon compte (4 sections, one save each), Home entry when configured. Tests 277 app + 24 supabase, lint 0, typecheck, build, docker OK; impeccable detect clean; headless e2e against the local stack 20/20 (guard, login, account save, SIRET error, language, mobile no overflow, drawer, logout, signup → Mailpit confirmation → /app, recovery → reset → login). Docs: IDENTITY.md, CLAUDE.md, SUPABASE.md, CHANGELOG, plan note. BDR-041, LRN-047. Gates (verifier, security) dispatched; awaiting user validation; `.env.example` edit denied (file rule) → user adds `APP_AUTH_PROVIDERS=`. Gates: verifier ECARTS(2) → `safeNextPath` parser-escape fix (+5 tests) + contract CHECK scoped → CONFORME 16/16; security PASS (MEDIUM = same redirect; LOWs: sign-out failure alert, `reauthentication_needed` kind, prod redirect allowlist doc). EVAL-015. Real-stack pgTAP 280, build, docker green. Stop: user validation. ## 2026-10-12 (Step 7 closure) User validated Step 7 (all screens, flows, FR/EN, responsive; Home-without-sidebar accepted). Mockup file dropped at root → `docs/design/faunosteo-etape7-maquettes-validees.png` + README (deltas vs step, owning steps); CLAUDE.md design-reference rule; IDENTITY.md pointer. BDR-042; TODO 7.10 follow-ups (MFA gate, verification ≠ SIRET, OAuth real tests, tool integration). Final check green; gitflow finish into develop. Next: Step 8 files foundation, awaiting user go (Q2 hosting/edge-runtime decision shapes the SVG sanitizer). ## 2026-10-12 (Step 8 analysis) User: Step 7 closed; Step 8 = files foundation + Storage, analysis before implementation; Q2 settled (self-hosted first, managed later); 8 private buckets closed by default; quarantine + server validation; allowlist SVG; avatar in Mon compte; release 0.2.0 kept = Steps 3–6, identity → 0.3.0, check deploy triggers before finishing. Done on chore/step-08-files-analysis: docs/development/STEP8_FILES_ANALYSIS.md (assets table authority, server-built keys, quarantine prefix, worker `faunosteo_worker` sharp + pdf sanitiser, policies through assets, Storage API signing under RLS, sweeper/reconcile, file volume + restic backups, managed migration by rows, 10 security answers, scope, tests, risks, D1–D8); 3 plan-challengers dispatched. Release check: CI on push main/develop only, no tag trigger, no deploy job; hooks push only; VPS deploy manual; default 0.2.0 build has no sheet → never redeploy the live tool from main without SHEET_BUNDLE=draft. Awaiting user: D1–D8 + Step 8 go; release finish go. ## 2026-10-12 (Rust-by-default review) User: new permanent rule, Rust preferred for everything equivalent or better, existing code included; study + roadmap before Step 8 or any migration; nothing implemented. On chore/step-08-files-analysis: 4 analyzers + 3 researchers (scratchpad reports) → `docs/development/RUST_ARCHITECTURE_REVIEW.md` rev 1 (6a078da) → 3 plan-challengers (61 findings, 2 blockers: deletion schedule vs surviving TS consumers; CSP/VPS deployment facts) → rev 2 folded. Outcome: A/B/C classification (B empty), 3-crate workspace, Rust worker design (keyless parent, traced seccomp, libwebp in child), roadmap R0–R5 with end criteria + rollback rows, 13 decisions D-R1..D-R14. Memory: BDR-043, LRN-048, EVAL-016; CLAUDE.md "Rust by default" section; TODO Rust block. No cargo on the dev host (owner installs rustup at R0). Awaiting owner validation; release 0.2.0 untouched. - Same day: owner validated the Rust orientation (10 principles, BDR-044), asked the expanded decision table + R0 scope before validating D-R1..D-R14 → Annex A (13 decisions: recommendation, alternatives, pros/cons, risks, consequence, impact tags) and Annex B (R0: Docker builder image as the reference toolchain, rustup optional locally, workspace skeleton, worker image, CI job, 7 experimental proofs kept as tests, exit criteria) appended to the review. Nothing started; awaiting the 13 validations. ## 2026-10-13 (Rust R0 delivered) Owner go (BDR-045): chore/step-08-files-analysis finished into develop (Annex C), feature/rust-r0-foundation. Built R0 through the Docker builder only: workspace (core, wasm, worker), proofs (float_roundtrip finding, trap/fresh-instance behaviour, musl + libwebp 1.6.0, seccomp 7 syscalls derived by strace on the release binary, CSP 'wasm-unsafe-eval' proven in Chrome 156, 225 KB / 85 KB gzip module), packages/core-wasm (14 proofs), CI (rust job, worker test stage, advisories nightly, manual release-images), docs (RUST.md, DEPLOY digest deploy prepared, CLAUDE/WORKSPACE/TEST_STRATEGY/CHANGELOG). Gates: verifier ×3 (oracle gaps only, CONFORME in substance), security ×3 (1 HIGH + mediums fixed; my first fixes introduced 3 mediums, fixed; follow-ups documented). Root `pnpm check` 777 tests, live deployment untouched, frontend loads nothing. BDR-046, LRN-049, EVAL-017. Stop: owner validation of R0; R1 not started; release 0.2.0 pending. ## 2026-10-13 (R0 correction: native toolchain) Owner brief: dev = Ubuntu native server, Docker for services/isolation/images, VPS separate, no CI active. Host audit: rustup 1.29.1 already user-level, `rustup show` auto-installed 1.99.0; added wasm32 target, wasm-bindgen-cli 0.2.129, cargo-deny 0.20.2 (`--locked`, 100 s, no sudo, no package missing). Scripts moved docker/ → scripts/ (`rust-check.sh`, `wasm-build.sh`, PATH guard `rust-env.sh`), root `rust:check`/`wasm:build` native, `:docker` variants, `pnpm check:all` single pre-merge gate (+ warn-only advisories, porcelain drift gate). Worker unit tests now in the native check; sandbox/seccomp stay Docker. SAFETY comments rewritten as invariants (no `[gated]`), stride checked_mul, prctl args as c_ulong. Workflows kept, marked prepared/never executed. Docs: RUST.md §1/§4/§5.8/§6, CLAUDE, README, DEPLOY, WORKSPACE, TEST_STRATEGY, CHANGELOG, review C.1. Gates: verifier ECARTS(2 prose) → CONFORME; security PASS ×2 (fixes landed). `check:all` green ×2. BDR-047, LRN-050, EVAL-018. 7 commits on feature/rust-r0-foundation, pushed. Stop: owner's final validation; R1 not started; no deploy, no release. ## 2026-10-13 (Step 8 = Rust R1 delivered) Owner validated R0, go for R1 with D1–D9 (D1 Rust worker, D3 top-bar avatar). `gitflow finish` of R0 refused by the classifier → R1 branch feature/step-08-files-foundation cut from the R0 tip (owner finishes both). Delivered: migration 20261013100000 (assets, 7 private buckets, avatar policies through assets, purge queue, 11 RPCs, lease token, per-account byte budget + bytes-present ceiling), pgTAP 010 (140), worker R1 loop (ureq, config/log/keys/backend/http/job/sweep/watchdog, 11 loop tests, child untouched, allowlist unchanged), TS assets layer + avatar UI (Mon compte, sidebar, drawer, top bar), real-stack e2e + runner, compose worker profile, STORAGE.md + docs. Gates: verifier CONFORME (pass 2), security PASS after 5 passes (1 BLOCK from my own fix), check:all ×4 green, e2e ×7, Chromium smoke 18/18. BDR-048, LRN-051, EVAL-019. Stop: owner manual validation; no merge, no deploy, no release. ## 2026-10-13 (R1 validated, merges, DEV on the LAN) Owner: R1 10/10 validated, identity final (Faunosteo, faunosteo.com), env DEV/STAGING/PROD, permanent LAN-access rule. gitflow finish R0 then R1 → develop (linear graph, two merge commits, branches deleted). chore/dev-lan-access: DEV origin centralised (`scripts/dev-env.sh`, CLI wrapper, `pnpm dev` on the LAN, config.toml via env()), ENVIRONMENTS.md, docs, CHANGELOG. Verified: GoTrue/Studio on the LAN address, signup mail link on the LAN, probes from a separate Docker network (app/api/mailpit 200, studio 307), 10-step procedure in headless Chromium at http://192.168.1.100:5175 computer + phone 26/26 with URL audit. Firewall state unreadable (no sudo) → proposal to the owner (54322 loopback, 54323/54324 subnet). BDR-049. Stop: owner LAN validation + R2 go. - Same day, LAN least privilege (owner brief): measured from a distinct Docker network → Mailpit open without auth, PostgreSQL open, Studio open. Built DEV gateway (nginx, API + Mailpit basic auth on the LAN address), `pnpm dev:gateway`, `pnpm dev:net-check`; gateway proven on alternate ports. Pending owner authorisation: `~/.config/docker/daemon.json {"ip":"127.0.0.1"}` + rootless daemon restart (daemon-wide, only Faunosteo containers on it). LRN-052. Branch not merged; R2 not started. - Same day, owner applied the UFW rules (ENVIRONMENTS.md §3.2) and verified from another device: 54322, 54323, 54324 refused, 54321 answers; app served by the owner's `pnpm dev`. Allowed surfaces 5/5 by dev:net-check. Remaining: owner's 10-step run on computer + phone, then merge go and R2 go. - Owner validated the 10-step path on computer and phone over the LAN; merge go for chore/dev-lan-access. R2 not authorised yet. ## 2026-10-14 (Rust R2 delivered) Owner: LAN validated, R2 go (brief 2026-10-13), 4 new strings validated (recommended wording). feature/rust-r2-domain-core off develop 1a7ee7d. Plan + 3 challengers (45 findings, 1 blocker) → rev 2. Freeze first (envelopes, N-1 copy, Zod oracles, characterisation 84 + verdicts 765 + editor 49 + conformance 26), contracts byte-equal, rules by 3 worktree forks, runtime (lazy, poison, offline recovery, BUILD_STAMP), app switched (sheet, store, click chain, pickers, import, export snapshot, publish gate fail-closed), quarantine, degraded states, Docker wasm stage + gzip_static, CSP proof on the image 15/15. Verifier 12/12 + floor 2 (deleted tests, owner micro-gate); security PASS → by-ref deserialisation (module 341 KB gzip). check:all green. BDR-050, LRN-054, BLK-010, EVAL-020. Stop: owner validation, no merge, R3 not started, release 0.2.0 untouched. ## 2026-10-14 (R2 closure) Owner: manual 10/10 validated, R2 accepted (architecture, migrations, contracts, perf); L1 refused (silent U+FFFD). Costed preservation (own JSON reader + lossless string type) → owner chose refusal + quarantine, detailed import wording. Fixed: core refuses lone surrogate as `lone_surrogate` (draft/archive quarantined verbatim, import refused with message, action refused, gate invalid_shape). Deletions proven covered (12+1 Rust tests + 49 oracle cases; stale module fails suites). Worktrees verified recoverable-free. Gates: verifier CONFORME 13/13, security PASS 6 LOW; check:all green. BDR-051, LRN-055, EVAL-021. Next: finish into develop, worktree cleanup, R3 summary (not started). - Same day: owner go honoured → `gitflow finish` R2 into develop (c3f28d8, pushed, branch deleted); 3 agent worktrees + temp branches removed (BLK-010 resolved). R3 summary presented, not started; release 0.2.0 untouched. ## 2026-10-14 (R2 maintenance) Owner brief: maintenance before R3. bugfix/r2-maintenance: rustls 0.23.46 (4 advisories, none reachable: ring no ML-KEM, no ECH/brotli; e2e on new image, compose worker paused then restarted), `supabase/.temp/cli-latest` untracked, session texts held when set-aside fails (owner chose resolution panel + banner; quarantine UI deferred). Found 2 extra overwrite paths (mirror removed draft on any store change; newest-only slot overwrite). Editor effect loop (OOM) from per-render deps + fresh array setState → attempt guard. Verifier 11/11, security PASS 4 LOW fixed, check:all green. Merged into develop. Next: R3 plan + freeze.