177 KiB
Decisions Registry
Format: BDR-XXX | Date | Title | Rationale | Alternatives | Status
BDR-001 | 2026-05-18 | React SPA exception for tool app
Tool is practitioner-only, no public indexing needed → SPA valid per CLAUDE.md rule. Alt: Next.js SSR rejected — no server, static deploy only. Status: closed.
BDR-002 | 2026-05-18 | SVG inline via DOMParser, not img/object
Inline SVG = full CSS control, pointer-events, data-* access. img/object = sandboxed, no DOM access, no click delegation. Status: closed.
BDR-003 | 2026-05-18 | PDF attachment via native pdf-lib attach()
Native EmbeddedFiles (afRelationship:Data) = proper PDF spec, survives re-save in Acrobat. Alt: custom metadata → rejected (non-standard, stripped by some viewers). Status: closed.
BDR-004 | 2026-05-18 | Runtime identity via window.APP_CONFIG
Build-time VITE_APP_* → baked into bundle; runtime injection via entrypoint.sh → no rebuild needed for brand changes. Order: runtime > build-time > defaults. Status: closed.
BDR-005 | 2026-05-18 | Vertebra picker: region tabs + chip grid
≥40px touch targets, multi-select, per-region toggle. Alt: flat list → too long for 54 total vertebrae. Status: closed.
BDR-006 | 2026-05-18 | Drag-reorder: up/down buttons, not DnD
DnD on mobile unreliable; ↑/↓ buttons accessible + simple. Status: closed.
BDR-007 | 2026-05-18 | pnpm 11 used instead of pnpm 9
pnpm@9 not available on host; corepack resolved 11.1.3. Package.json engine constraint set to >=9 for Docker (Docker uses corepack latest). Status: closed — deviation accepted.
BDR-008 | 2026-05-19 | PDF page layout — branded heading pattern
Each PDF page leads with bold-uppercase accent eyebrow (size 9), Times 22 title, 2pt × 48pt accent rule under title. Section labels follow same eyebrow style (uppercase bold accent) above their values. Observation severity rendered as filled color-coded pill (sage / amber / red) next to the obs number. Alts: plain text titles only — rejected (overlapped header rule + read unstyled). Status: closed.
BDR-009 | 2026-05-20 | Findings JSON keeps snake_case in TS, observation snapshot uses camelCase
JSON catalog fields (name_fr/name_en/description_fr/requires_vet_referral/...) stay snake_case in TS types/Zod schema — no transform layer. Domain-expert authored, reads natural in JSON, zero remap cost. Observation Finding snapshot uses camelCase (labelFrSnapshot/labelEnSnapshot/requiresVetReferral) per app convention. Alt: Zod transform to camelCase everywhere — rejected (extra layer, hides JSON shape, no real upside for a static catalog). Status: closed.
BDR-010 | 2026-05-20 | Observation findings snapshot labels at selection time
Finding stores labelFrSnapshot + labelEnSnapshot copied from leaf at click time. Exported reports remain readable years later even if catalog renames/restructures leaves. Path[] still carried for future re-link/migration. Alt: lookup labels on render via path — rejected (breaks already-exported PDFs if catalog edits). Status: closed.
BDR-011 | 2026-05-20 | v1 PDF import — hard-fail with version-specific FR message
importReportFromPdf detects data.version !== 2 BEFORE strict Zod parse, throws IncompatibleReportVersionError, wrapped into ImportError with explicit "v{n}, incompatible avec v2, réexportez..." message. No retro-compat shim (no prod PDFs in the wild).
Alt: silent generic ImportError — rejected (user can't tell why import failed).
Alt: v1→v2 migration adapter — rejected (no install base to justify cost).
Status: closed.
BDR-012 | 2026-05-20 | Species auto-discovery via Vite import.meta.glob
src/domain/species/registry.ts uses import.meta.glob('./*/index.ts', { eager: true }) and registers every module that default-exports a SpeciesManifest. Drop-folder onboarding: scaffold writes index.ts with export default <id>, no registry edit needed. Duplicate id → warn + first wins. Missing default export → silently skipped.
Alt rejected: hardcoded SPECIES_REGISTRY map — forced edits in two places, broke "single source of truth" per species folder.
Alt rejected: explicit registerSpecies() runtime helper — extra import boilerplate per species, no compile-time check that registration runs.
Status: closed.
BDR-013 | 2026-05-20 | SVG↔JSON zone bridge via fuzzy FR/EN label match
SVG data-anno-id values stay opaque generator strings (point-mpb..., zone-...). JSON catalog keys are stable human zone names (sphenoid, atm). Bridge runs at observation render: matchZoneFindings normalizes both sides (lowercase + NFD-strip accents + alphanum-only) and scores EN-exact → FR-exact → substring → Levenshtein within max(2, floor(maxLen*0.25)) tolerance. EN first because no accent normalization edge cases.
Alt rejected: rename SVG data-anno-id to JSON keys — couples opaque SVG generator output to human-meaningful catalog, brittle across SVG re-exports.
Alt rejected: add new data-anno-finding-zone attribute on every hitbox — forces SVG edit per species, double-source for the same info already in name_fr/en.
Status: closed.
BDR-014 | 2026-05-20 | PDF locale = render preference, not Report schema field
exportReportToPdf takes explicit { locale } option read from localeStore at call site. Locale lives outside Report — never persisted in schema. Rationale: Finding snapshots already carry labelFrSnapshot+labelEnSnapshot (per BDR-010), so render-time locale picks the correct snapshot; no schema bump needed; re-imported PDF can be re-exported in either locale without data migration; embedded JSON byte-identical between locale variants of the same Report.
Alt rejected: store locale field on Report schema — would force v3 bump, complicate re-export ergonomics, duplicate state already in store.
Alt rejected: default locale to 'fr' in export — caller is route layer, has store, easy to pass; explicit arg makes tests + API surface clean.
Status: closed.
BDR-015 | 2026-05-20 | Typed ImportError discriminant (kind + foundVersion) over localized messages
ImportError carries kind: 'invalid_pdf' | 'incompatible_version' | 'no_attachment' + optional foundVersion. Message field collapses to internal sentinel. UI layer (HomeRoute) resolves user-facing string via i18n dict using err.kind, with {version} template substitution. Rationale: review caught hardcoded FR in pdf/import.ts + pdf/attachment.ts leaking to EN UI; original "throw with localized message" coupled domain layer to one locale; typed discriminant moves message authoring to the UI layer where i18n lives.
Alt rejected: keep FR messages, translate via err.message string match — brittle (any rewording breaks the lookup), spreads i18n knowledge into the catch site.
Alt rejected: pass t() into domain layer — wrong direction; domain should not know about React hooks or current locale.
Status: closed.
BDR-016 | 2026-05-21 | pathologies.json v2.0 — boolean source of truth, generic vet description_fr purged
Catalog bumped v1.2→v2.0. requires_vet_referral: true boolean = sole source of truth for vet flag. Generic "orienter vers vétérinaire" descriptions purged on 25 leaves where boolean alone sufficed. description_fr kept on 16 leaves carrying differential cue (cause neuro/sinusale/ligamentaire/rotulienne/etc.). Horse coverage extended placeholder 3 zones → full 26 zones (9 head + 17 body), 792 nodes, 612 leaves, 41 vet-referral leaves. Schema_version "2.0".
Why: v1.2 had textual fallback (description_fr.includes('vétérinaire')) + boolean coexisting → redundant + ambiguous. v2.0 collapses to one signal.
How to apply: Any new species JSON authored at v2.0 — boolean on vet leaves only, description_fr only when it adds clinical differential beyond "see vet". Consumers MUST use boolean check, never textual scan.
Alt rejected: keep dual signal — wastes maintainer attention, drift risk between text and boolean.
Status: closed.
BDR-017 | 2026-05-22 | SVG editor: vanilla JS wrap over React rewrite
editor.html = ~1630-line standalone SVG annotation tool (DOM manipulation, drag/drop, polygon editing, zoom, categories, export). Integrated into React app via useRef + useEffect mounting all vanilla JS logic into container refs. Only CSS restyled to Faunosteo tokens.
Alt rejected: full React rewrite (convert all state to Zustand/useState, all DOM ops to React) — massive effort ~10x, high risk of subtle behavior differences in drag/polygon/zoom interactions.
Status: closed.
BDR-020 | 2026-05-22 | Pathology editor: standalone HTML, not React route
pathology-editor.html = standalone tool at project root, same pattern as SVG editor integration. Vanilla JS/CSS, no build step, no deps. Decoupled from React app entirely — zero imports from src/. Why: tool for domain experts editing JSON, not practitioners using main app. No shared state needed. Standalone = deployable anywhere, no Vite required. Alt rejected: React route with Zustand store — unnecessary coupling, heavier DX for a JSON editing tool. Status: closed.
BDR-021 | 2026-05-22 | Port zoneMatch.ts inline into pathology editor
Fuzzy matching logic (normalizeLabel, levenshtein, scorePair, matchZone) duplicated inline in pathology-editor.html rather than imported from src/lib/zoneMatch.ts. Why: standalone HTML cannot import TS modules. Keeping identical algorithm ensures matching consistency between main app and editor. Alt rejected: extract to shared .js file — adds dependency management for a tool that should be zero-dep. Status: closed.
BDR-018 | 2026-05-27 | Vertebra picker confirm — target region replaces, other regions union
VertebraPicker anchored on clicked spine zone but lets user switch region tabs. On confirm, distributeVertebraeToZones spreads picks across one spine zone per region. Target region (clicked zone) = REPLACE (picker seeded with its full set → unchecking deselects). Other regions = UNION with any pre-existing zone (picker didn't display them → side-tab pick must be purely additive, never wipe). Region with no SVG spine zone → fold verts back onto target (nothing lost).
Why: picking verts in a non-target tab must behave as if that zone was also clicked — highlight + findings picker both flow from observation.zones. Replace-everywhere would silently wipe a cervical zone selected earlier when reopening lumbar picker.
Alt rejected: seed picker with full-spine union of all zones → forces handling deselection-to-zero per region (remove zone + orphan its findings); bigger scope, destructive. Additive-only matches user request.
Alt rejected: keep dumping all verts on clicked zone (old bug) — other zones never highlight, no findings picker.
Status: SUPERSEDED by BDR-019 (same session) — additive-union model dropped once picker shows full spine.
BDR-019 | 2026-05-27 | Vertebra picker = unified full-spine editor, authoritative confirm
User asked picker to SHOW selections from all regions when switching tabs. Once it displays + edits every region, additive-union confirm (BDR-018) breaks: unchecking a side-tab vert can't stick (union re-adds from existing zone). So model flipped to unified + authoritative.
Seed: collectSpineVertebrae(zones, bones, clickedBoneId) = union of all spine-zone verts, clicked zone first.
Confirm: syncSpineZones(zones, verts, bones) — per region: REPLACE existing zone verts (deselect sticks); PRUNE spine zone whose region → 0; SPAWN zone for newly picked region. Non-spine zones + order preserved. targetIndex dropped — each vertebra carries its own region, no anchor needed.
Tab: clicking zone ALWAYS opens its region — initialRegion now beats initial[0].region in VertebraPicker (was reverse). Updated the test that asserted old precedence.
Why: picker as whole-spine editor is the only coherent model when all regions visible + editable; partial/additive semantics contradict what user sees.
Known wart (accepted): pruning a region orphans its findings (findings keyed by tree zoneId, not boneId; sync works in boneId space). Parity with existing ✕ remove-zone button — neither cleans findings. Follow-up if needed.
Confined to spine: picker only opens for special==='vertebral-precision'; sync/collect/find all gate on it; non-spine zones pass through. Tests cover.
Alt rejected: keep additive (BDR-018) + only change seeding — deselection in non-clicked tab silently fails.
Status: closed.
BDR-022 | 2026-06-13 | Keep pathology-editor standalone — asymmetry vs svg-editor intentional
After 404 fix (moved pathology-editor.html root→public/, LRN-029), considered unifying it with svg-editor pattern (React route, vanilla wrapped in useEffect, BDR-017). Rejected. Two editors differ by COUPLING, not accident:
- svg-editor REUSES app internals (getAllSpecies registry, useLocaleStore+getDict, AppHeader) → React route earns its keep (BDR-017).
- pathology-editor = zero src/ imports by design (BDR-020/021): own inline i18n (76 keys), own zoneMatch copy. Isolated on purpose.
Why keep standalone: editor PRODUCES the prod
pathologies.jsonthe live app reads (fetches/species/equine/{pathologies.json,Horse.svg,Horse_head.svg}— same bytes as app). Tool touching prod data = minimal-change zone. Wrapping ~1700 lines of imperative DOM in a useEffect to chase cosmetic parity risks the JSON export path for no functional gain. The svg-editor wrap (1832-line useEffect) is the WORSE of the two patterns, not the target to copy. Alt rejected: pathology→React route (BDR-017 style) — propagates the dubious pattern over 1700 lines, regression risk on drag/tree-edit/SVG-sanitize/fuzzy-match. Alt rejected: both→standalone public/ (de-wrap svg) — cleaner unification but svg now coupled to species registry + locale store; de-wrapping costs + loses language sync. Status: closed.
BDR-023 | 2026-10-08 | Monorepo: apps/app + pnpm workspace, packages extracted on demand only
App moved to apps/app (@faunosteo/app, git mv, 144 pure renames). Root package.json delegates (pnpm -r). packages/ = README only; a package is created when it has a clear owner + real code (plan Steps 3/4/6). apps/public-web, apps/worker, supabase/ created by the step needing them.
Why: root one-word commands, Docker filtered build, lockfile v9 already workspace-capable; moving later (after packages + 2nd app) costs more. Empty packages = config to maintain for nothing.
Alt rejected: app kept at root beside apps/public-web (special-cased configs); single Next.js app (rewrite, SSR useless behind auth).
Status: closed (user validated 2026-10-08).
BDR-024 | 2026-10-08 | Node 24 LTS + pnpm 10.13.1 pinned, engine-strict
Node 24 (.nvmrc, .node-version, engines >=22.12 <25, Dockerfile node:24-alpine, CI). pnpm 10.13.1 via packageManager + root devDependency (scripts find node_modules/.bin/pnpm under corepack or any install) + engines <11. .npmrc engine-strict=true.
Why: Node 20 EOL 2026-04-30; dev host on 24; all checks ran on 24. pnpm 11 needs Node ≥22.13 and rewrites lockfile; 10.13.1 = Dockerfile-validated pin (BLK-005). Lockfile rewritten by 10.13.1 (libc fields from earlier pnpm 11 dropped) → coherent with pin.
Alt rejected: keep Node 20 (EOL); global pnpm (user rule: no global install).
Risk: Docker build on node:24 not run locally (no daemon) → CI docker job / manual build before deploy.
Status: closed.
BDR-025 | 2026-10-08 | Design records live in docs/history/superpowers, not docs/superpowers
gitflow lib purges docs/superpowers/{specs,plans} at every finish (BDR-065, fixed path list). Step 1 finish deleted 9 design docs (8f217d8). Restored from history under docs/history/superpowers/ (not purged); refs updated (CLAUDE.md, migration map, plan). Audit docs keep old path (frozen).
Alt rejected: revert in place → purged again next finish; editing the lib list → global change for one repo.
Status: closed.
BDR-026 | 2026-10-08 | platform_role enum = owner/admin/moderator/support only; professional statuses excluded
Business arch §4.1 lumps 7 values in profile_roles.role (practitioner/student/professor + 4 platform). User rule: never confuse platform roles with professional statuses. Table name kept profile_roles (plan + helper names unchanged), enum platform_role 4 values. practitioner/student/professor → verification outcome (identity step); cabinet roles → organization_members. Hierarchy for checks: owner ⊇ admin ⊇ moderator; support separate (§17.3). Deactivated profile (active=false) → all helpers false.
Alt rejected: 7-value enum per arch doc → self-declared "practitioner" row readable as verified status.
Status: closed (user instruction), name profile_roles open to rename if user prefers platform_roles.
BDR-027 | 2026-10-08 | Role writes RPC-only + audited; column-level GRANT protects profiles.active / phone_verified_at
No INSERT/UPDATE/DELETE policy on profile_roles; only grant_platform_role / revoke_platform_role (security definer, actor = auth.uid(), self-target refused, owner any role / admin moderator+support) → private.assign/withdraw_platform_role → private.log_event. Bootstrap first owner: assign_platform_role(null, uid, 'owner') from privileged SQL. Last active owner cannot be revoked. profiles: grant update (display_name, first_name, last_name, phone, locale, timezone) instead of a protect-columns trigger → active, phone_verified_at raise 42501 for API role, server functions untouched.
Alt rejected: BEFORE UPDATE trigger checking auth.uid() → blocks future server RPC acting for the caller; column grants declarative, visible in has_column_privilege.
Status: closed.
BDR-028 | 2026-10-08 | pgTAP single source of SQL tests; PGlite runner in vitest beside supabase test db
Docker socket denied to user on dev host (BLK-006). PGlite 0.3.16 (PG17 WASM) ships pgtap extension → packages/supabase/tests/db/ applies supabase-shim.sql (API roles, auth.users, auth.uid(), Supabase default privileges) + migrations, runs every supabase/tests/*.sql, fails on not ok / plan mismatch. Same files run by supabase test db on real stack (CI supabase job). Shim replicates permissive default privileges so a missing revoke fails.
Alt rejected: TS-only RLS tests (duplicate harness, drift); waiting for Docker (no executed proof).
Status: closed.
BDR-029 | 2026-10-08 | database.types.ts hand-written in supabase gen types format + schema↔types test
CLI gen needs running stack. File written in generator format (Row/Insert/Update/Relationships/Functions/Enums/Constants). schema-types.test.ts: compile-time exhaustiveness (every Row column listed, every Args key listed) + runtime diff vs information_schema / pg_enum / pg_proc in PGlite; also pins RLS-on + no using(true) for every future public table. CI db:types:check diffs against real generator once Docker available; first real run may reformat (PostgrestVersion string) → regenerate + commit.
Status: closed; column scalar types (uuid→string…) reviewed by hand, not executed.
BDR-030 | 2026-10-08 | Step 4 split: model + persistence now, importer → official equine DRAFT next
User brief: no full equine import yet; first official horse sheet = draft, business content verified before publication. Plan Step 4 bundled model + importer. Split: Step 4 = packages/domain document + validation + migration + pgTAP + docs; Step 4b = legacy importer → draft + IMPORT-REPORT, publish on user go. packages/anatomy created at 4b. Alt rejected: importer in same step → publishes seed v1 immutable before expert review (contradicts brief). Status: closed (plan note added under Step 4).
BDR-031 | 2026-10-08 | Canonical sheet document shape (schema_version 1)
Labels { fr, en } objects (one LocalizedText, new locale = optional key) instead of name_fr/name_en pairs. Strict Zod objects (unknown key rejected). Structural records explicit null; finding tree nodes lean on input, .default() fills description/sources/children/requires_vet_referral (612 leaves). Views = tree (parent_view_id), detail svg_asset_id nullable = crop parent via view_box (C9). Annotation discriminated union point|zone|detail_trigger; laterality 4 values explicit (unpaired/bilateral/left/right); spine = vertebral_region_code → ordered vertebral_config.regions with free codes (C1/Q3); findings link = inline finding_zone_id (no separate map, no label matching); finding categories carry kind dysfunction|observation|anamnesis|custom; node ids unique among siblings so (zone, path[]) addressing survives Step 5. Two tiers: shape (Zod, every save) vs integrity (validateSheetDocument, 17 coded rules, publish gate).
Alt rejected: name_fr/name_en flat (BDR-009 catalog style) → no locale extension; annotation_finding_map array → extra structure for a 1:N field; UUIDs as in-document ids → unreadable, legacy paths re-keyed.
Status: closed; category kind observation vs report Observation collision (C7) flagged to user.
BDR-032 | 2026-10-08 | Sheet persistence: trigger-enforced immutability, SQL publish re-check, content-addressed assets
Tables species / anatomical_sheets / _versions / _assets. Published immutable via BEFORE UPDATE trigger (every role incl. owner; only published→deprecated with stamps); deprecated frozen; BEFORE DELETE trigger = preconditions (never published, never current, never base of active fork; reports join later) → no session flags, RPC just deletes. One draft per sheet (partial unique index, C8). Document↔row: CHECK content->'schema_version' = to_jsonb(document_schema_version), trigger species match. private.sheet_document_issues(jsonb) re-checks the non-recursive error rules at publish + unknown asset ids → defense in depth, same codes as TS (BACKEND_ARCH "SQL doesn't re-implement Zod" kept for shape). Assets content-addressed (sha256, unique per sheet), Storage path <sha256>.svg by convention, fork = metadata copy + remap_document_assets. Draft autosave = column-level UPDATE (content, change_note) policy on own draft (unaudited by design); identity (name/slug/description) column policy; visibility via audited set_sheet_visibility RPC and draft deletion via delete_sheet_version after gate review (sharing + deletion = sensitive state); last_version_number counter (no number reuse); content ≤ 2 MiB, byte_size ≤ 20 MiB, reason ≤ 500; require_actor refuses deactivated profiles; authz before lookup (unknown id = same 42501); fork copies only referenced assets. can_use_sheet = active ∧ (public ∨ editor) until grants/follows. Official sheet = creator null + is_official, platform admins edit.
Alt rejected: session-flag delete bypass (hacky); Zod-equivalent validation only in TS (browser not a boundary); per-sheet asset storage copy on fork (needs worker job).
Status: closed; names (anatomical_sheet_assets, storage layout, official ownership) listed for user confirmation.
BDR-033 | 2026-10-09 | User decisions on the Step 4 open points (sheets: follow, verification, versions, official, naming, server validation, erasure)
User validated Step 4 and ruled: (1) public read by visibility, USE of a community sheet requires following its author, official sheets exempt → can_use_sheet + follow at community step; (2) private drafts for anyone, community publication only for authorised + verified accounts, student/professor keep own rules → gate in publish/set_visibility at verification step; (3) new publication = current, no auto-deprecation (current behaviour); (4) official sheets platform-owned, admin-run (current model); (5) finding kind observation → consultation_reason (done, packages/domain); (6) server-side validation mandatory for publication, frontend never a boundary → Zod shape check server-side before community step; (7) account deletion handles dependencies/transfer explicitly, nothing may block erasure forever → retention step anonymises authorship via a system path.
Scope guard from user: implement along the planned steps, keep 4b (equine import) free of community/account features.
Status: closed (recorded in ANATOMICAL_SHEET_MODEL.md §5).
BDR-034 | 2026-10-09 | Equine import = generated seed, draft only; assets content-addressed in a private bucket read through the sheet
Importer (packages/anatomy, one-off, deterministic) emits supabase/seed/anatomical-sheets/equine/v1: document.json, legacy-id-map.json, assets.json + SVG copies, IMPORT-REPORT.md (FR, for the osteopath), equine_v1.sql (idempotent: official platform-owned sheet faunosteo-cheval private + 2 asset rows + draft v1 via private.insert_sheet_draft(null,…)). Golden test = committed artifacts equal a fresh run. Ids: annotation = catalog zone key on exact FR+EN match (26/26), views main/head, trigger head-trigger, asset/sheet uuids derived from sha256 (uuid v5-like). No medical correction: ssb-dysfunctions kept + anomaly; only degraded slugs normalised and declared; 12 anomalies to validate, 6 informative. Seed listed in config sql_paths (every env) and applied by the PGlite harness (seed/**, never seed.sql). Storage: bucket anatomical-sheet-assets private, <sha256>.svg, SELECT policy via private.can_read_sheet_asset_object (published reference of usable sheet, or editor), no API writes, operator upload script with service key from env.
Alt rejected: data migration for the sheet (immutable file for a draft meant to be edited); TS seeding via PostgREST (needs service key in a committed path); fuzzy zoneMatch at import (26/26 exact, strict equality + report suffices).
Status: closed; publication of v1 = explicit user decision after report review.
BDR-035 | 2026-10-09 | Docker resources prefixed faunosteo_ (multi-SaaS VPS)
User rule: every Faunosteo Docker resource (container, network, volume, image, future worker/self-hosted Supabase) named faunosteo_* when configurable → cohabitation on one VPS without collision. Applied: compose name: faunosteo + container_name: faunosteo_app (was faunosteo-web, stateless, no volume → rename safe). Supabase CLI hard-codes supabase_<svc>_<project_id> → suffix faunosteo, documented limit, no wrapper. Rule for future persistent volumes: keep volume name across renames.
Alt rejected: wrapping supabase start to rename containers (fragile, breaks CLI status/stop).
Status: closed (DEPLOY.md "Docker resource naming", SUPABASE.md §3, CLAUDE.md).
BDR-036 | 2026-10-10 | Sheet document schema v2 + curation changeset as data (Step 4c)
Schema v2: document references registry (id, type, citation, url|doi), reference_ids + review_status (inherited|reviewed|to_confirm) on finding nodes/categories/annotations, count_range on vertebral regions; rules reference.id.duplicate, finding.reference.missing, region.count_range.invalid on TS + SQL (jsonpath ** descent); CHECK document_schema_version = 2. Curation = authored JSON changeset (curation/changes.json: CHG-nnn, level A|B|C, kind, FR/EN title, rationale, reference_ids, priority, question required for C; ops set/rename/add/remove/move/cite over string targets) applied by a deterministic pipeline to the 4b baseline → draft/ (document, one cleaned SVG, head view = view_box crop, CHANGELOG with before/after per elementary edit, 10-section REVIEW-REPORT, review/annotations-<view>.svg before/after drawings, converging seed). Legacy baseline kept generated under legacy-import/, v1/ removed. Nothing publishes.
Alt rejected: editing document.json by hand (no traceability, golden test); TS code per change (reviewers read data, not code); per-node inline sources (792 copies → registry + ids); PNG renders in git (operator artifact, renderer-dependent).
Status: closed; content awaits professional review (REVIEW-REPORT §10, 9 questions).
BDR-037 | 2026-10-10 | Step 4c validated: reference draft, review semantics, migration rule
User decisions: curated equine draft = reference draft of the app until published (no publication without professional review); technical integrity ≠ medical validation (inherited / reviewed / to_confirm stay visible, REVIEW-REPORT the hand-off doc for the osteopath, 11 open questions → next changeset); future schema changes = incremental non-destructive migrations (BLK-008); legal scope text re-read on consolidated Légifrance texts before publication; head view preserved as crop, per-view assets still possible. Docker faunosteo_ rule permanent; .env.example change documented in DEPLOY.md (file denied to Claude). SaaS development continues without waiting for medical validation.
Status: closed.
BDR-038 | 2026-10-10 | Step 5: app on the canonical sheet — bundled sheet, layer renderer, Report v3, migration map
Sheet source: SheetProvider interface; Step 5 implementation = Vite virtual module virtual:faunosteo-sheet built from the seed draft (vite/sheet-bundle.ts), mode SHEET_BUNDLE=draft|none, default draft for dev server, none for builds/CI/Docker (--build-arg SHEET_BUNDLE=draft = explicit preview) → unvalidated draft never ships by accident (D2). Markers: pure renderer @faunosteo/anatomy/render (element tree, no DOM) reproduces legacy look (hitbox r + twin r−12, opacities 0.65/0.5, spine 0.3, trigger 0.06 dashed); colours = document data (categories[].color, additive annotations[].color for the head shades, schema_version stays 2 for additive optional fields); same renderer feeds draft/review/app-<view>.svg for visual checks. Report v3 in packages/domain: (annotationId, viewId) zones with label snapshots, (findingZoneId, path) findings, severity codes, sheet {sheetId, versionId|null, documentSha256}, unresolved: true for what migration cannot place, localAnnotations: [] reserved. Migration map generated by the pipeline from applier records (replay renames/moves/removals + unique re-homing): 792 nodes → 571/180/7/34. Interaction = pure service + reducers (BDR-019 kept); store = v3 + persistence adapter (v2 draft migrated on restore). D4 applied: registry, matchers, SVG parser, editors, pathology-editor, public species assets deleted; legacy sources moved to supabase/seed/.../legacy-sources/ (importer input).
Alt rejected: copying the draft into apps/app (duplication, drift); runtime fetch of /sheets/*.json (still public, no gain); UUID annotation ids (BDR-031); converting v3→v2 for attachments (lossy); per-view colour table in the app (horse knowledge in generic code).
Status: closed; awaiting user validation of Step 5.
BDR-039 | 2026-10-11 | Step 6: autonomous PDF archives — lean-document snapshot, envelope v1, archived branding + labels, explicit rebase
User-validated design (docs/development/STEP6_PDF_ARCHIVE_ANALYSIS.md Part II). Attachment = envelope v1 {format, envelopeVersion, exportedAt, locale, report v3, sheetSnapshot, branding, labels} in one osteo-report.json, SVG inline as text. Snapshot = {status, ref, document, assets} where document = valid lean AnatomicalSheetDocument (all views/annotations/categories/regions, finding zones kept by id, trees pruned to used paths with ancestor labels, references emptied) → reuses sheet index, layer renderer, 21 integrity rules; no dedicated schema. Branding (logos base64/svg, credits, URLs) + label dict (fr+en) archived so future logo/wording changes never alter a re-render (user D7 adjustment). Engine packages/pdf: explicit inputs {report, sheet, branding, labels, locale, rasterizer, exportedAt}, no DOM lib, xmldom composition promoted from curation app-review, Rasterizer adapter (browser Image/canvas; resvg devDep for tests), per-view/per-logo degradation, export-side validation (caps, integrity, sheet invariant). Read = layered: report first (v3/v2 existing dispatch), envelope metadata tolerant, snapshot strict → snapshotRejected enum, report never lost; attachment_stripped via Info.Keywords stamp. Session: imported archive kept immutable (osteo:archive), working copy rebased explicitly on the loaded sheet (rebaseReportOnSheet, unresolved flags + labels from archived snapshot) (user D8 adjustment); re-export of the kept archive = technical support only, UX submitted after step. No CLI, no page change, no original v2 JSON re-embedded.
Alt rejected: dedicated SheetSnapshotSchema (rewrites lookups, loses integrity rules); separate embedded files per asset (first-EmbeddedFile reader, stripping risk); pruning views/annotations (saves ~0 KB, breaks trigger titles); snapshot discarded on import (user: keep for faithful re-read); crypto hash check of assets (self-referential; sha copied from catalog manifest as provenance pointer instead).
Status: closed (Step 6 validated by user 2026-10-11; D8 finalised in BDR-040).
BDR-040 | 2026-10-11 | Step 6 closure: no "re-export the original archive" button, visible rebase, BLK-009 gate
User decisions after manual validation (logos and picker text confirmed OK on their side; Step 6 VALIDATED). (1) Re-export of the imported archive from the UI REFUSED permanently: the practitioner already holds the original PDF; no second button, no dedicated UX flow. Keep the archived snapshot, its integrity and the autonomy tests (engine exportFromEnvelope stays as the proof + future server use); the UI exports only the open working report. Do not propose this feature again. (2) Rebase on draft restore shown to the user (editor.draft_rebased) approved; import messages approved on principle with an explicit "full restoration" vs "partial recovery" headline. (3) BLK-009 treated now: byte-scan attachment extraction without pdf-lib load on import + export without object streams; remaining risks (worker/server import, pdf-lib replacement, read caps) stay an explicit BLOCKER gate before any external user import; never declared solved by passing tests alone.
Alt rejected: a re-export action on the home screen after import (same objection); a toast system for import feedback (no component, alert pattern kept).
Status: closed.
BDR-041 | 2026-10-11 | Step 7 scope: zustand auth store (no TanStack), professional fields on profiles, MFA = documented gap, config-driven OAuth buttons, local tool stays open
Step 7 brief (UX validated by user with external mockups, not versioned). Choices: (1) no TanStack Query: one profile read/update per section, zustand authStore + localeSync enough; query layer deferred to the first list screens. (2) practice_name, professional_title, siret added to profiles as declared free text (CHECKs, column grants), verification stays the Professional Verification domain (Step 11). (3) MFA: foundations had TOTP disabled, no has_mfa(), no admin table → TOTP enabled server-side, enforcement + enrolment UI documented as gap (IDENTITY.md §4), Security section shows a note, no fake UI. (4) OAuth buttons listed by APP_AUTH_PROVIDERS / VITE_AUTH_PROVIDERS; config.toml providers read env() ids, enabled = false until ids exist; platform_invitations not written. (5) Local tool routes untouched + unauthenticated (LocalToolShell, catch-all), Home header entry only when Supabase configured; /app guard sends to /login?next= with same-origin check. (6) Account locale wins over device locale once per sign-in; switches while signed in persist to profiles.locale.
Alt rejected: TanStack now (YAGNI); MFA enrolment screen (unvalidated UI, nothing to protect); /register naming (/signup kept); nested <a><button> for card CTAs (ButtonLink instead).
Status: active, awaiting user validation of the step.
BDR-042 | 2026-10-12 | Step 7 validated; validated mockups versioned as permanent design reference; Home without sidebar accepted
User validated every Step 7 screen and flow (login, signup, recovery, dashboard, account, sidebar + drawer, logout, FR/EN, responsive), no UI correction. Decisions: (1) the mockup file the user produced (docs/design/faunosteo-etape7-maquettes-validees.png, 7 views) is the permanent graphic reference for the SaaS shell; docs/design/README.md lists what it shows beyond Step 7 with the owning step (Bilans/Clients/Animaux/Agenda/Fiches entries, stat tiles, bell, avatar photo → Step 8, Mon compte tabs, mobile tab bar) so no screen invents them early; a redesign needs a new validated file there. (2) Local-tool Home (/) shows no sidebar when signed in, only "Mon espace": accepted until the tool is integrated into /app (Step 14). (3) Password rule in the mockup (8 chars) does NOT override the server policy (12 + classes). (4) Follow-ups kept in TODO 7.10: MFA before sensitive admin features, professional verification ≠ SIRET format, real OAuth tests once ids exist, tool integration into /app.
Status: closed; Step 7 finished into develop.
BDR-043 | 2026-10-12 | Rust by default: permanent language rule + target architecture (study awaiting validation)
Owner rule: Rust preferred wherever equivalent or better; "already TS", "more work", "no perf gain" never reasons for C. Kept: React/TS UI + DOM + stores + vendor glue, Tailwind, SQL + RLS, Supabase Auth/Storage, Vite tooling. Study docs/development/RUST_ARCHITECTURE_REVIEW.md rev 2 (61 challenger findings folded). Classification: A = domain contracts/rules, sheet handle + index data, reducers, data-building component rules, publish gate, layer renderer + compose, one SVG sanitiser, PDF reader + writer, CLI tools, curation pipeline + importer, upload script, Step 8 worker, every future backend/rule mirror; B = none; C = React render glue + display helpers, Zustand/storage adapters, supabase-js session + error shapes (no Rust GoTrue PKCE client), UI form schemas + dictionaries, clock/crypto/Intl screen dates, browser rasteriser (DOM), Vite tooling, SQL/RLS, public web (Astro, global rule). Target: 3 crates (core feature-gated lib + tool bins, wasm facade, worker bin), JSON strings across the boundary + ts-rs types (no serde-wasm-bindgen: writes absent optionals as null), SheetHandle built once, closed error kinds, ids/time injected, panic=abort handled TS-side (poison + reinstantiate), lazy init + core_unavailable, reader in terminated Web Worker. Worker: Rust binary, decode child = same binary dispatched before any thread, empty env, RLIMIT_AS/CPU, traced seccomp allowlist (Landlock dropped: redundant), pure-Rust decoders (image/zune-jpeg/png/image-webp) + moxcms ICC, lossy WebP via libwebp-sys ≥ 1.6 in the child only, parent parses RIFF header only (never decodes), 512 KiB output cap, per-stage deadlines; service key kept (dedicated role = Step 27 option). Roadmap: R0 workspace + worker image inside Step 8, R1 = Step 8 worker, R2 domain core before Step 9, R3 anatomy, R4 pdf reader + writer (Std14 AFM metrics, draw-log golden frozen first), R5 pipeline + importer + tools, all before Step 13; TTF fonts separate later change. Deploy prerequisites: CSP 'wasm-unsafe-eval', gzip wasm, images built in CI pulled by digest (VPS 1 GB never compiles), N-1 reader test, draft quarantine.
Alt rejected: single core crate without features (worker would carry pdf deps) → features chosen; 6 crates (rev 1) → too many; resvg in browser (949 KB gz, visual change); wasm-pack (one maintainer, CLI lock); Edge Functions (limits, hand deploy); Prettier-chained sheet identity (hash only compared at runtime → one-time rebase accepted); parent re-decode of child output (breaks keyless-decoder invariant).
Status: active, awaiting owner validation of the study + 13 decisions D-R1..D-R14 (D-R6 withdrawn); nothing implemented; release 0.2.0 untouched.
BDR-044 | 2026-10-12 | Rust orientation validated by the owner; detailed decisions D-R1..D-R14 pending
Owner validated the study's orientation + 10 principles: Rust worker at Step 8; Cargo workspace; native + WASM libs; progressive anatomy migration; PDF migration under complete compatibility proofs; React + PostgreSQL/Supabase kept; testable increments with rollback; no premature deletion of TS still used; fully dockerised, production builds outside the small VPS; WASM vs production CSP proven before activation. Requests: expanded decision table (Annex A), R0 scope with build tools reproducible in Docker and no Rust on the VPS (Annex B), serde/WASM/panic/musl hypotheses verified experimentally when they condition a choice (R0 proofs as permanent tests). Release 0.2.0 still waiting. R0 and Step 8 implementation NOT started until the 13 decisions are validated. Status: active; awaiting D-R1..D-R14 validation.
BDR-045 | 2026-10-12 | Rust review rev 2 validated with amendments; R0 go
Owner validated D-R1/2/3/7/8/10/11/12/14 as recommended. Amended: D-R4 libwebp C only in the isolated child, parent validates result + limits before use, linked libwebp version known/controlled, no new unmanaged risk; D-R5 fingerprint → canonical JSON (RFC 8785 JCS or strictly defined alternative) independent of formatter, explicit compat with old fingerprints/archives, existing fingerprints untouched, decision prepared for R5; D-R9 Edge Functions → Rust services, shared code but distinct processes (worker vs HTTP endpoints), same image + subcommands, least privilege per service, Supabase Auth keeps OAuth; D-R13 CSP 'wasm-unsafe-eval' proven experimentally without widening JS permissions, reproducible Docker builds in CI, digest images + rollback prepared, no auto-deploy, no image publication without workflow + validation, VPS never compiles Rust. R0 go per Annex B (7 proofs for real, unverified hypotheses tested, blockers reported not assumed); R1 NOT started without a go; release 0.2.0 pending; live deployment untouched.
Status: closed (owner, 2026-10-12); R0 in progress on feature/rust-r0-foundation.
BDR-046 | 2026-10-13 | R0 implementation choices (Rust foundation)
Choices made while building R0 (feature/rust-r0-foundation), within the validated review: (1) toolchain arbiter = Docker builder image (docker/rust-builder.Dockerfile, rust:1.99.0-bookworm + wasm target + wasm-bindgen-cli 0.2.129 + cargo-deny 0.20.2 + rustfmt/clippy baked in: official images ship rustup's minimal profile), docker/rust-run.sh with named volumes faunosteo_cargo_registry / faunosteo_rust_target; no rustup on the host, never on the VPS. (2) serde_json features preserve_order + float_roundtrip (default parser one ULP off, found by the proof). (3) Boundary = JSON strings + ts-rs types committed under packages/core-wasm/types with a CI drift check (no serde-wasm-bindgen/tsify). (4) Fresh wasm instance = cache-busting dynamic import of the glue (ESM cache returns the same instance otherwise); R2 must do the same in the browser or use a Worker per instance. (5) Worker: RLIMIT_CPU soft N / hard N+2 (soft = hard → SIGKILL first); seccomp allowlist = the 7 traced syscalls (read write mmap munmap mremap exit_group getrandom) + 7 abort-path ones, derived by strace in the Dockerfile test stage and compared on every build; dependencies optimised in the dev profile (4096² decode under the 10 s CPU cap); test hooks behind a cargo feature never in release; parent parses the RIFF container only (D-R4 amendment). (6) App Dockerfile, docker/nginx.conf, compose untouched at R0 (deviation from Annex B's "wasm stage built in CI": no consumer before R2, owner said live deployment untouched); CI check job builds the wasm itself (no artifact action dependency on the Gitea runner). (7) cargo-deny allow-wildcard-paths = true (a versionless path dep reads as a wildcard) and the core path dep declared per crate (workspace-inherited path dep hits a cargo-deny bug). (8) CSP proof committed as docker/csp-proof/ (playwright-core outside the repo, documented).
Alt rejected: rustup on the dev host (owner: builds reproducible in Docker); wasm-pack; artifact upload/download between CI jobs (unverified on the forge); Landlock + NPROC/FSIZE/NOFILE (redundant under the allowlist, challenge finding).
Status: closed (R0 delivered, awaiting owner validation; R1 not started).
BDR-047 | 2026-10-13 | Native Rust toolchain primary on the Ubuntu dev server; Docker builder = reproducible alternative; no CI active
Owner brief after R0 delivery: dev machine = self-hosted Ubuntu native (not WSL, not VPS), Docker rootless. Decision: daily Rust = native user-level rustup (channel from rust-toolchain.toml, wasm32 target, wasm-bindgen-cli 0.2.129, cargo-deny 0.20.2 via cargo install --locked, no sudo, no global package). Root scripts rust:check / wasm:build run scripts/rust-check.sh / scripts/wasm-build.sh natively (moved from docker/, PATH guard scripts/rust-env.sh); rust:check:docker / wasm:build:docker = same files through the builder image (kept, reference for a future runner, proof VPS never compiles). pnpm check:all (scripts/check-all.sh) = single pre-merge gate: rust check, types drift, wasm, pnpm check, app image, worker:test, worker:image read-only. Docker keeps Supabase, worker container (isolation untouched), sandbox + seccomp tests, images. Workflow files kept, headers "prepared, never executed"; no runner / secret / registry. Supersedes BDR-046 (1) "no rustup on host, container = arbiter". Names: existing script names stay = native (main path), :docker suffix = alternative; check stays the Node gate, check:all the full one.
Alt rejected: Docker as main path (owner: native loop; Docker for services only); scripts left under docker/ (misleading location); one script per environment (drift); check:all needing the Supabase stack (non-hermetic; pnpm db:test stays the complement after a supabase/ change).
Status: active; awaiting the owner's final validation before R1.
BDR-048 | 2026-10-13 | Step 8 / R1 implementation choices: lease token, SQL-side sweeps, ureq worker, no signed URL
Built on STEP8 D1–D9 (D1 = Rust worker, D3 = top-bar avatar + name → Mon compte). Choices beyond the analysis: (1) assets.lock_token uuid set by claim_avatar_jobs, required by complete/reject → stale worker after lease expiry refused (invalid_state), not only superseded rows; (2) complete refused → worker deletes nothing, purge queue owns every object of a terminal row (the analysis' "delete the clean object it wrote" would race a legit re-claim); (3) key-driven quarantine sweep = SQL anti-join RPC claim_quarantine_leftovers on storage.objects (same DB) instead of paginated Storage API listing; expire_pending_uploads RPC for the 24 h expiry; (4) closed refusals = SQLSTATE P0001 with the code as message, authz = 42501; TS/Rust map message → closed kind only when it has the code shape; (5) worker HTTP = ureq 3 (rustls + ring, webpki-roots), hand JSON log lines, 25-line base64url decoder: deviation from review Part V (tokio/reqwest/tracing/base64) justified by sequential loop + smaller keyed-process tree (34 → 84 crates, no aws-lc-rs/cmake); (6) Storage API v1.79 answers a missing object HTTP 400 + statusCode "404" → normalised to 404 = purge done (found by the e2e, queue entries looped otherwise); (7) e2e = vitest file outside the default include, runner script starts the worker container (5 s sweep, 0 grace), fresh admin-created user per run (10/h rate limit), purge clock shifted via docker exec psql; (8) run --check exit 0 when startable OR wholly unconfigured (check:all envless stage), 2 on partial config; (9) .env.worker* not writable here (file rule) → documented in DEPLOY.md, user creates it; (10) R1 branch cut from the R0 tip because gitflow finish of R0 was refused by the harness classifier.
Alt rejected: profile column avatar pointer (D5 kept derived); signed read URL (bearer outlives row flip); Storage listing sweep (3-level prefix pagination); reqwest blocking (pulls tokio).
Status: active; awaiting owner validation (TEST FONCTIONNEL + TEST GRAPHIQUE), no merge.
BDR-049 | 2026-10-13 | Identity Faunosteo / faunosteo.com; DEV-STAGING-PROD; DEV reachable on the private network; R0+R1 validated and merged
Owner decisions: (1) R1 validated 10/10 manual + graphic → R0 and R1 finished into develop (5cfb6f1, f5865f0; the earlier classifier refusal did not recur); (2) identity final: product/app/site = Faunosteo, domain https://faunosteo.com, no new brand name, logo/palette/mockups kept; (3) environments: DEV = self-hosted Ubuntu native (Claude Code, git, rustup, Vite, Docker rootless, local Supabase, worker), STAGING = staging.faunosteo.com planned not created, PROD = separate VPS, current site preserved, no DNS/cert/proxy/data change; isolation of DB/Storage/secrets/accounts/OAuth/payments/mails/files per env, prod data never copied to DEV, merge ≠ deploy, no CI/CD operational (workflows preparatory); (4) permanent rule: the owner tests from other devices (computer, phone) → every test surface addressed by the DEV origin (LAN address or private name), never 127.0.0.1/localhost, never hard-coded; implemented as scripts/dev-env.sh (FAUNOSTEO_DEV_HOST, detected via hostname -I, prod host refused) + scripts/supabase.sh wrapper (config.toml env() for api.external_url, auth.site_url, studio.api_url) + scripts/dev.sh (pnpm dev on the origin, pnpm dev:offline without backend) + private-network redirect URLs; (5) exposure: 5173/54321 needed by browsers, Studio 54323 + Mailpit 54324 unauthenticated → private subnet only, PostgreSQL 54322 published by the CLI on 0.0.0.0 (no bind option) → firewall restriction proposed to the owner, not applied; worker no port; (6) Rust native via Cargo, Docker for services/worker/sandbox/images/prod, VPS never compiles.
Alt rejected: hard-coded IP in config.toml (first iteration, replaced the same day); Vite dev:lan variant (folded into dev); binding the CLI ports to loopback (impossible in config.toml).
Status: active; chore/dev-lan-access awaiting the owner's LAN validation; R2 not started.
BDR-050 | 2026-10-14 | R2 implementation choices: Zod semantics in serde, minimal index data, form edits stay Zustand, quarantine, lazy core
Built on review rev 2 + Annex C; plan .claude/tasks/plans/2026-10-13-rust-r2-domain-core.md rev 2 (3 challengers, 45 findings, 1 BLOCKER folded). Choices: (1) JSON read text → serde_json::Value (JSON.parse dup-key semantics) → typed; lone surrogate escape → U+FFFD pre-pass (L1, owner to confirm); (2) Zod reproduced by field helpers: js::present (optional: absent ok, null refused, skipped), js::nullable (required key), JsInt (any integer-valued number, JS print), hand-written patterns (no regex crate), url crate for .url(); unions = untagged enums + literal tag fields at Zod position → byte-equal with JSON.stringify(Zod.parse(x),null,2); PDF label fields in engine dict order → frozen envelopes round-trip byte-equal; (3) quirks ported site by site (Map last-wins, find first-wins, JS truthiness, ??=, malformed map entry still fails the read); (4) SheetIndexData minimal (positions, names, spineIds, nodeKeys as JSON [zone,...path]), TS SheetIndex = accessors only + ops; (5) one core call per user action; form-value observation edits (comment, severity, free text, finding removal) stay Zustand assignments (no per-keystroke wasm, D-R7); store actions answer {ok}, callers stop on failure; hydrateReport deleted; (6) runtime: sync calls, trap → poison → offline recovery from kept compiled module + pre-imported spare glue record, cap 3, per-generation sheet handles, retry clears all caches; pkg/ shipped vs pkg-proofs/; BUILD_STAMP refuses stale module in tests; (7) quarantine only on content kinds, newest-only keys, source removed after successful copy, pre-rebase raw kept when unresolved > 0; editor never redirects in degraded states; (8) Home and /new read availability from the bundle, core loads at submit / import / editor; (9) import = TS byte scan (until R4) → core archive.import (read + rebase one call); export = core archive.snapshot → frozen TS engine; (10) publish gate takes the core validator (DI), fails closed; (11) report:compare CLI keeps the frozen domain (R4); practitioner prefill keeps a small Zod schema (D-R7, core not loaded on /new mount); (12) app image wasm stage + gzip_static; DEPLOY: CSP keyword before an R2 image, never built on VPS.
Alt rejected: mutation corpus with full outputs (simplicity challenge: drift-free verdict table + characterisation instead); report.replace_observation per keystroke; serde internally tagged enums (tag first breaks byte equality); Web Worker for every call (async races in the click chain); unify duplicate-id policies (behaviour change).
Status: active; R2 delivered on feature/rust-r2-domain-core, awaiting owner validation, no merge.
BDR-051 | 2026-10-14 | L1 resolved: lone UTF-16 surrogate refused whole, never replaced (supersedes BDR-050 choice 1 on this point)
Owner refused U+FFFD replacement of lone surrogate escapes (silent alteration of historical user data). Chosen (owner, 2026-10-14): refusal + quarantine. js::parse_json no pre-pass; serde_json refuses escape like any error; failure classified by strict escape scan (on failure only) → JsonReadError::LoneSurrogate → closed kind lone_surrogate (parse_input, sheet.check, draft.restore, archive.import). App: draft → osteo:quarantine:draft verbatim + existing editor.draft_quarantined; session archive → osteo:quarantine:archive; import → ImportError('lone_surrogate') + new home.import.error_lone_surrogate (owner-chosen detailed wording FR/EN, file untouched); editor action → refused, report unchanged, core.action_failed; publish gate → invalid_shape. Oracles untouched: L1 cases now assert TS kept surrogate + Rust refuses; test loader spells lone escapes out as literal text (never U+FFFD).
Alt rejected: faithful preservation (own JSON reader + lossless WTF-16 string type over ~150 contract fields + serialiser, oracles re-frozen; multi-day, for corrupted/pasted-UTF-16 data only; door stays open since nothing is lost); in-band tunnel (placeholder code points mapped back at facade output; collisions with sheet strings, UTF-16 length drift, every output path must be post-processed: hacky).
Status: active; merged with R2.
BDR-052 | 2026-10-14 | R2 maintenance: held session texts, resolution panel, save-failure banner
Owner rule: no user data removed/overwritten implicitly when save or quarantine fails. Owner UI choice (AskUserQuestion): resolution panel in editor (download exact copy, delete permanently w/ confirmation, open adapted version w/ confirmation for pre-rebase draft, retry); New report / Import refused while held → alert + panel; storage-full banner on refused draft (or archive) write; set-aside texts UI = later. Code: occupied quarantine slot never replaced; draft+archive pair set aside together (rollback own copy); restore returns held, opens nothing; mirror writes only on report change; new session reads unread draft via core first (unreadable → set aside, readable → replaced as before); reset no-op without open report. rustls 0.23.46 (4 advisories, none reachable); supabase/.temp/cli-latest untracked.
Alt rejected: dropping held texts after warning (owner rule); multi-slot quarantine (scope); refusing every New report over an unread readable draft (behaviour change, not asked).
Status: closed (merged aab61c2).
BDR-053 | 2026-10-15 | R3 design: one Rust SVG reader, constant canvas op, highlight unexposed, declared stricter rules
Plan rev 2 after 3 challengers (32 findings). Reader = prescan (markup state machine, caps before parse: 2 MiB, BOM, DOCTYPE, depth 64, 20k elements, attrs 256/100k, 16 xmlns, raw < 100k = 200k) → roxmltree 0.21.1 → own tree (qualified names as written, TS allowlist parity) → allowlist + declared extras (SVG ns only, comments dropped, text only title/desc ≤ 4 KiB, root without class/style/transform/filter/mask/clip-path, id grammar, href/url( local only after ASCII/CSS whitespace) → reference graph (cycles refused, expansion ≤ 50k) → serialiser (control whitespace as char refs, output ≤ 4 MiB). Product drawing with any removal refused at load (LRN-055). Facade: only view.canvas {viewId} (stateless, memoised per view; data-state still restyled in place). Highlight composition = core fn proven vs TS (O3), no facade op until R4 (snapshot-based call). Behaviour = code where ANNOTATION-RENDERING.md differed (doc rewritten first). Canvas failure → existing degraded notice + retry.
Alt rejected: roxmltree alone with nodes_limit (recursion overflows wasm stack, measured); svg.sanitize / view.highlighted ops now (no consumer, wrong source for R4); states in the canvas op (dead: restyle runs after every build); dangling-ref removal (rendering change); duplicate-id refusal; property tests (no generator crate).
Status: active; R3 awaiting owner validation, not merged.
BDR-054 | 2026-10-15 | R3 owner UX decisions: trigger names per language, three canvas failure states, retry policy
Owner validated after R3 review: (1) unnamed trigger → data-anno-name-fr/-en + title take opened view name per language, empty language falls back to other; display only (not identifier, not persisted); frozen oracles untouched, tests apply declared change (with_trigger_names_per_language / withTriggerNamesPerLanguage, MAKE refused). (2) canvas failures distinct: engine (core_unavailable, internal) → sheet.core_unavailable + Réessayer (fresh instance may succeed); view (svg_rejected, no_asset, unknown_view, invalid_character, parse) → canvas.view_unavailable, no retry; detail in core outcome + DEV console only. (3) recovery cap 3 kept; after it CoreRuntime.stopped → core.stopped ("reload the page, report kept in tab") in canvas and in the 8 action alerts (coreFailureMessage), no retry. Wording of the three messages accepted.
Alt rejected: correcting the TS renderer too (engine/pipeline frozen until R4/R5; invisible in PDF: data-* dropped, title not rasterised); retry for deterministic view failures; editing goldens.
Status: closed (decisions); R3 still awaiting owner LAN confirmation, not merged.
BDR-055 | 2026-10-16 | Engine stopped vs unsaved draft: honest variant, core-free copy, restart not counted
Owner audit of 0279953 (stopped state) not satisfactory → owner choices (AskUserQuestion 2026-10-15): stopped + isUnsaved (saveFailed && report) → core.stopped_unsaved + "Télécharger une copie" (in-memory report JSON, lib/download.ts, no core); save fine → core.stopped + core.reload button; copy button also on editor.save_failed banner (any engine state); beforeunload guard in editor while unsaved; "plusieurs erreurs" (counter = page lifetime, not successive). One CoreStoppedNotice: editor banner slot, top of Home / New report, CoreUnavailable full page; canvas stopped text without button. Runtime: failed recovery below cap restarted by next call / ready() (restartable = unavailable && !stopped && generation > 0), compiled module kept, restart not counted (cap = traps); deferred status listeners. Core failure reading unread draft → FAILED, never held. ESLint census on failure keys. Commit 6371523.
Alt rejected: counting failed restarts toward cap (offline → stopped, reload offline fails too); retry button on every page (new UI, owner already removed dead retries); copy only once stopped (offline restart loop never reaches stopped, no rescue).
Status: closed; R3 still awaiting owner LAN confirmation, not merged, R4 not started.
BDR-056 | 2026-10-17 | R3 final checks: rescue copy importable, trapping draft held, replace confirmed, guard app-wide
Owner brief 2026-10-16 + AskUserQuestion: (1) Home import also takes JSON rescue copy: sniff first KiB (%PDF- → PDF; { / .json → copy), cap MAX_ATTACHMENT_BYTES 16 MiB before read, fatal UTF-8, pure readRescueCopy → core draft.restore (no JS parse), then existing hydrateImport branch; UNREADABLE_DRAFT_KINDS → invalid_copy. (2) internal reading draft → held engine_failure row (+ archive companion), TrapMemory keyed on (draft, archive) pair: no re-read by mount / New report / Import, only panel Retry (retryTrapped); any discard clears; held_blocked_engine alert. SUPERSEDES BDR-055 "never held" for internal only (core_unavailable etc. stay FAILED). (3) ReplaceSessionDialog (Annuler / Ouvrir le bilan en cours / Remplacer, copy when unsaved) on New report submit + Home pick when report in memory or draft slot; Home picker clicked synchronously. (4) useUnsavedGuard once in App. Commit 9bd9aca.
Alt rejected: new store action openCopy (dup of hydrateImport, session change before validation); JS JSON.parse of copy (depth; core reads raw text); copy cap MAX_PDF_BYTES (50 MiB file cap, not JSON bound); trapped memory on draft text only (archive parsed in same call); fixing GC finalizer via glue internals.
Status: closed; R3 awaiting owner LAN validation, not merged, no R4, release 0.2.0 untouched.
BDR-057 | 2026-10-18 | R4 plan validated: module workers, incremental export in main instance, JSON memory guard gated at R4.2
Context: R4.0 plan rev 2 (.claude/tasks/plans/2026-10-17-rust-r4-pdf-core.md: options §A.2, conditions §A.6), 3 challengers, owner approval 2026-10-18.
Decision: OD-1 module workers everywhere; import needs Firefox 114 (today it already needs DecompressionStream: Firefox 113, Safari 16.4); import support documented per browser apart from app support, from real checks. OD-2 incremental ExportSession in main instance: PDF + one decode ≈ 0.37 MB/view vs TS ≈ 3.8 MB/view (RGB planes held until save) vs two calls ≈ 0.91; offline export kept; cleanup on error/cancel. OD-3 JSON value budget in linear pre-scan + module --max-memory, thresholds from R4.2 reproducible measurements; not shown → stop before R4.3 import switch. OD-4 overwritten duplicate key holding lone surrogate refused, file untouched. OD-5 PDF crash/timeout error_generic, copy crash/timeout error_core_unavailable, kinds keep technical / resource / invalid apart. OD-6 J1 matrix exact, unrun device never reported validated. OD-7 ~5 MB fixtures, no real data in git.
Alt rejected: classic iife worker for Firefox 102-113 (dev/prod split for dead versions); two-call export (all PNGs in linear memory); disposable export worker (asset fetched at export breaks offline, protocol cost); throwaway main-thread instance (glue retains instances, LRN-060); own lossless JSON reader (R2 rejection holds).
Status: active. Order: plan merge → Safari download bugfix (owner validation) → feature/rust-r4-pdf-core → R4.1.
BDR-058 | 2026-10-18 | R4.2 validated: OD-3 thresholds fixed, R4.3 switch gated on large-file memory and leak series
Context: R4.2 report (RUST.md §10.3, §10.4): O7 144/144, O9 38/38, O8 47 + 4 declared, browsers 666/678; security gate BLOCK(1) fixed (prescan count past depth cap) → PASS. Owner validation 2026-10-18.
Decision: MAX_JSON_VALUES = 400,000 (10 × CAP envelope 39,652) and --max-memory 1 GiB final for R4; existing depth / size / complexity / inflation caps kept, no raise without measurement. 1 GiB = safety net, never a tab memory guarantee. Leak criterion: first import = init cost, counted apart; then ≥ 5 consecutive imports + idle, recurring growth ≤ 10 MiB, in Chromium + Firefox + WebKit, GC fluctuations repeated and explained; global peaks kept beside. Three distinct subjects: no leak / low peak / ceiling guarantee. Before the app import switch: 20–50 MiB files (WebKit 324 MiB vs TS 76) must be fixed (fewer ArrayBuffer copies, fewer linear copies, early release, no retained refs, transfer / streaming when it pays) and re-measured on 3 engines, or an explicit size limit with controlled refusal proposed with numbers; no switch before that is solved or decided. OD-4 refusals accepted (L1); no legitimate corpus file may be refused; never rewrite source files or drop bilan data on error; oracles unchanged. Worker technical error / resource overflow / timeout never presented as proof of a corrupt PDF. TS reader deleted only after parity + non-regression. WebKit one-off worker error: not blocking, keep trace, repetition tests, never mask error events. J1 on real devices announced with "TEST FONCTIONNEL DISPONIBLE"; headless ≠ Safari/iPhone validation.
Alt rejected: 1,000,000 values (25 × CAP; more headroom, weaker bound). Switch import before the large-file fix.
Status: active. R4.3 started 2026-10-18 on feature/rust-r4-pdf-core; no R4 merge into develop, no R5, no 0.2.0, no deploy.
BDR-059 | 2026-10-18 | J1 authorised with the two WebKit reserves; PDF cap kept at 50 MiB
Context: R4.3 checkpoint report (RUST.md §10.5): WebKit 50 MiB file 145 MiB vs TS 76 (worker read was 324); WebKit leak series above 10 MiB but navigation control grows too, one-page series levels off; no forced GC headless. Owner decisions 2026-10-18.
Decision: both WebKit reserves accepted provisionally; J1 device acceptance launched on feature/rust-r4-pdf-core. PDF cap stays 50 MiB; no streaming scanner in R4.3. Leak criterion unchanged (≤ 10 MiB recurring over ≥ 5 imports after init), same-page measures separated from navigation ones, a no-import control kept; any device overshoot documented and analysed before final acceptance. OD-3 400,000 / 1 GiB, copy cap 16 MiB, worker protections, validated messages kept. J1 focus: Safari iOS, large PDFs, repeated imports, timers. Deliverable: PASS / FAIL / NON TESTÉ per device and scenario, gaps, residual risks, argued recommendation. Not a final validation of R4.3; headless never sufficient; TS reader kept; no merge; stop at J1, no R4.4.
Alt rejected: streaming scanner now; lowering the PDF cap; blocking J1 on the WebKit growth.
Status: active. Kit generated at ../faunosteo-j1-kit; results template docs/development/R4_J1_RESULTS.md; waiting for the owner's device run.
BDR-060 | 2026-10-18 | R4.3 accepted provisionally; iPhone J1 blocking before any R4 merge; R4.4 go
Context: J1 partial (computer run, no failure; iPhone unavailable, deferred). Owner decision 2026-10-18. Decision: R4.3 provisionally accepted on the branch, only for scenarios actually run; Safari iOS J1 mandatory before any merge of R4 into develop; BDR-058/059 WebKit memory reserves stay open; headless ≠ device. R4.4 authorised on the same branch per plan: layout, text, AFM, dates, DrawLog, validated against O1, O4, O5 and the Step 6 goldens. No regression on R4.3: reader, worker and memory guarantees untouched unless demonstrated need + prior validation. Automated tests and parity checks at every step; TS reader kept until R4.8. End of R4.4: detailed report (changes, tests, parity, performance, risks, decisions), stop before R4.5. Status: active.
BDR-061 | 2026-10-18 | R4.4 validated; R4.5 serialiser authorised with parity, tooling and compatibility gates
Context: R4.4 report (RUST.md §10.6: O1 12 runs 2,124 calls, O4/O5/O6 exact). Owner decision 2026-10-18.
Decision: R4.5 on the branch: content emitter + numberToString, pdf-writer, PNG gate and decode, links, Info, attachment, self-check, from_envelope. Gates: parity with O2, O4, O6 and applicable goldens (declared differences kept, oracles never edited to hide a gap); qpdf --check, poppler 150 dpi 0 px vs R3, O11 reads; restoration compat: R4 PDF read by Rust reader + kept TS reader, envelope/N-1 copies, no bilan data loss on export → import; PNG and PDF structure protections before large allocations (plan caps), invalid cases and messages checked; measure performance, allocations, real wasm size with the writer linked (W1 600 KB per plan), compared with TS baselines on same files/conditions; R4.3 import and worker guarantees untouched; WebKit reserves and iOS recette still blocking merge; gates green; RUST.md documented. Stop at R4.5 checkpoint: components, oracle/golden results, compat, perf/memory, wasm size, gaps/risks, R4.6 recommendation.
Status: active.
BDR-062 | 2026-10-19 | R4.5 validated; R4.6 session export authorised; chunked file, decode on arrival, catalog last
Context: owner decision 2026-10-19 on the R4.5 report (RUST.md §10.7). R4.6 brief: ExportSession + app driver, rasters as bytes one by one, OD-2 buffers documented, view_raster_failed on raster failure, parity + restoration (Rust → Rust, Rust → TS reader, N-1), E3/E4 three engines same data, shipped W1 measured, TS engine kept until R4.8, no merge, stop at R4.6.
Decision (design, measured): session in main instance per OD-2. File written in chunks never reallocated (target 1 MiB doubling to 8 MiB), image object written at add_raster (PNG + planes freed in the call), logos kept until branding batch completes (slot order as engine), catalog + page tree objects written last, file handed to JS in parts → new Blob(parts), self-check scans attachment chunk behind header. R4 digests (own bytes, not TS oracle) re-frozen once for it; O2 suite + qpdf + poppler re-run green. Hex strings upper-case as pdf-lib (B4). Alternatives measured and dropped: single Vec doubling (125 MiB for 44 MiB file, realloc spike), two buffers (2 × file at finish), 1 MiB fixed chunks (0.12 MB fragmentation per view).
Status: active; owner checkpoint R4.6 pending.
BDR-063 | 2026-10-19 | R4.6 accepted provisionally; R4.7 report-compare authorised; Chromium 10 MiB series = open reserve
Context: owner decision 2026-10-19 on the R4.6 report (RUST.md §10.8). Chromium per-export RSS growth on L (≈ 20 MiB, same in TS control, plateau after 8) accepted provisionally: not a leak validation, kept as open reserve; reports must split wasm linear memory / browser global / canvas-blob-URL retention / transient vs persistent; thresholds never changed, no FAIL turned PASS. J1 + J2 on real devices mandatory before any merge; NON TESTÉ kept. R4.7 per plan, no scope widening; S2 export worker not engaged without proof + new decision.
Decision (R4.7 design): pdf::compare pure module behind feature cli (= pdf-read + pdf-write, never in wasm), Files trait for fs; binary src/bin/report_compare.rs only std::fs file; seed sheet read at run time from CARGO_MANIFEST_DIR/../../supabase/seed/.../draft (no drawing); root report:compare → scripts/report-compare.sh (rust-env + cargo run --release --features cli). A.3 closed lines chosen: report document invalid: <serde detail> (ZodError dumps), attachment refused: lone UTF-16 surrogate escape at byte N (surrogates kept/overwritten), report version null cannot be read (overflow → null, incl. envelopeVersion overflow where TS printed a rejected-envelope header). Alternatives dropped: include_str! of the seed (bakes content, rebuild on seed change); spawning the binary per O10 row in tests (230 spawns, slow): in-process run + 8 spawns instead.
Status: active; owner checkpoint R4.7 pending.
BDR-064 | 2026-10-19 | R4.7 validated; R4.8 deletions: test read-back on own PDF reader, N-1 scanner exported, in-process import helper
Context: owner validated R4.7 (three A.3 lines accepted, 25 s first compile accepted, no prebuilt binary). R4.8 brief: delete packages/pdf, pdf-lib, TS CLI, redundant tests, generators; keep frozen oracles, goldens, reference PDFs, fixtures; packages/anatomy render until R5; audit consumers first; non-regression proofs; checks must fail on missing Rust component; no merge, no R5.
Decision: vitest read-back of the app export without pdf-lib = tests/helpers/pdfFile.ts, a reader of the writer's own format (objects, inline dicts, Flate via node:zlib, Kids order, Info, annots, XObjects) + buildPdfWithAttachment for the rejection inputs; view goldens from the SVGs captured at the mocked rasteriser (request order = engine order; the bundled partner SVG logo comes first with real branding); importReportFromPdf for tests = module SheetHandle.import_pdf on a throwaway handle + worker's pdfImportOf (tests/helpers/pdfImport.ts; GlueSheetHandle.free() added to the interface); envelope + N-1 suites read attachments with the frozen O11 scanner, exported through @faunosteo/core-wasm/n-1 (index re-export only, copies untouched); pdf.export.app deleted (re-export from envelope = cargo export_from_envelope, no sheet/branding in signature); @faunosteo/domain dropped from apps/app (two incidental test uses → core types / N-1 Zod); ledger script reads frozen cases from the committed TSV. Alternatives dropped: keep pdf-lib as test-only devDependency (review R4 row forbids it in apps/app lockfile); move all content-stream checks to cargo (loses app-path coverage of non-fixture reports); importPdf on main-thread SheetOps (breaks OD-1).
Status: active; owner checkpoint R4.8 pending.
BDR-065 | 2026-10-20 | R4.9: Chromium export reserve classified bounded browser raster path; no rasteriser change; recettes re-issued
Context: owner R4.9 brief (R4.8 validated; final checks, memory bench before merge, import risk classes, J1/J2 re-issue, fresh audits; no merge, no R5). Bench scripts/browser/r4-memory-bench.mjs (5 dimensions + rest windows + Chromium pressure + raster-only control).
Decision: Chromium ≈ 20 MiB/L export = browser raster path, not session: control with no core call grows same 20 MiB/step to same plateau (436 vs 437 MiB, 16 steps, last 5 within 10 MiB); linear flat after init, JS heap flat, 847/847 canvases + Blobs collected, 854/854 URLs revoked after 30 s; critical pressure returns nothing. Class: accepted temporarily (§6 row 7), device check J2.6/J2.7. Correction only if a device fails: one reused canvas / OffscreenCanvas, bench vs control first; rasteriser untouched (pixel parity pinned). Import risks: PDF_IMPORT_HARDENING §6, 20 rows; blocking before merge = J1 + J2 device runs + timer confirmation. Port 4173 recette surface closed by UFW by default; owner opens one rule per session.
Alt rejected: reused canvas now (no measure says it helps; risk on pinned raster output); disposable export worker S2 (no device failure).
Status: active; owner checkpoint R4.9 pending; gitleaks allowlist [gated] marker = owner action.
BDR-066 | 2026-10-21 | R4.10 owner decisions final: J1.7 PASS with reserve, J2.3 option 1, logo bundle, gitleaks marker valid, 23 deletions, Safari iOS real device only
Context: owner verdict after R4.10 gates (verifier 8/8 + one formal scope gap = contract file itself; security PASS 3 LOW).
Decision: J1.7 functional PASS, perf reserve (~60 s OS picker offline, same via Ctrl+O outside app); M1/M2 PASS ~60 s; M3 NON TESTÉ = complementary non-blocking, never PASS without run; M4/M5/M6 NON TESTÉ; no app work on 60 s without Faunosteo-specific proof; Cache-Control fix kept. J2.3 option 1 final: editor export = current branding even for logo-less archive; corrected expected result validated; data/oracles/goldens unchanged. ZenQuality logo bundle dcc7940 validated (same image, CSP intact, no zenquality.fr dependency); reintroduction tests + CSP proof (every violation fails, except refusal a negative test expects) kept. [gated 2026-10-18] marker valid: marker needs explicit owner decision, writing delegable (Claude wrote it under authorization). R4.8 authorization = exactly 23 test files of 0dc1ba2 (21 = census error, EVAL-025 superseded on count); no further deletion under it. Safari iOS NON TESTÉ until real iPhone results; simulator never memory proof.
Recorded: RUST.md §10.11 (marker wording, count) + §10.12 D; R4_MINI_RECETTE, R4_J1/J2 + RESULTS. LEDGER.tsv untouched (generated byte for byte by scripts/r4-ledger.mjs).
Status: active; R4 close still waits on Safari iOS real device; no merge, no R5, no release.
BDR-067 | 2026-10-21 | R4 closed: owner accepts J1/J2 on computer + Android + real iPhone, validates R4.12, authorizes merge into develop with named residual risks
Context: owner brief « Validation finale de R4 et autorisation de fusion » after R4.12 checkpoint (verifier CONFORME 9/9, security PASS 3 LOW).
Decision: J1 + J2 declared PASS as a whole on iPhone Safari iOS (no per-check split, no model/version/timing/memory given → recorded as missing, never invented); J1.7 PASS w/ picker-delay reserve; J2.3 PASS under approved rule (new export = current branding); M3 NON TESTÉ non-blocking. R4.12 D1/D3/D6 validated. Residual risks accepted for develop merge, open until own deadline (never closed by merge): base image by tag not digest + cosign unchecked (before prod image), semgrep partial parse 2 test files, guardrails WARN species_select_active outside diff, device timings/memory unreported (hardening §6 items 5/6/7/9/20), J1.7 cause unknown, BDR-063 Chromium raster growth, D2/D4/D5 deferred. Merge = gitflow finish after usual final checks; blocking defect → stop and report.
Alternatives: wait for per-check iPhone measures (rejected by owner: device-level declaration suffices for merge, measures = follow-up); regenerate goldens on any gap (forbidden).
Recorded: RUST.md §10.15 (risk table + checks), PDF_IMPORT_HARDENING.md §7, R4_J1/J2_RESULTS + MINI_RECETTE, CHANGELOG headers, TODO R4.13.
Status: active; limits stay: no release 0.2.0, no deploy, no DNS/server change, no R5 before next owner signal, D2/D4/D5 deferred.
BDR-068 | 2026-10-22 | R5 owner decisions: D-R5 = RFC 8785 of validated doc, aliases, F1 fix, byte-exact port, frozen SVG bytes
Context: owner validated R5.1 (« Validation R5.1, décision D-R5 et lancement du portage Rust »).
Decision: D-R5 = option B, convention sha256-rfc8785-validated-v1 = sha256 of RFC 8785 canonical JSON of the validated document (defaults filled, canonical model), real RFC 8785 (UTF-16 key sort, ES number print, UTF-8, no Unicode normalisation, I-JSON refusals, Rust/JS deterministic) proven by official vectors + edge cases + independent differential; v1 freezes the construction and validation rules (later defaults/schema never change v1 identity retroactively). Alias mechanism approved: Report v3 sheet.documentSha256 stays 64 hex; new reports stamp current convention; old reports open with no rebase on identical document; aliases only from trusted frozen historical documents, never from an archive or bundle; unknown fingerprint ≠ official sheet; real anatomical change still migrates; no archive/fixture/oracle rewritten. F1 fix authorised first. Port byte-exact by default, differences declared one by one; fingerprint-bearing artifacts regenerated once at R5.6 only. Historical SVG bytes (horse.svg) kept, never re-serialised. .prettierignore on Rust-written generated paths, narrow, with a reproducible check. Upload tool reuses ureq (no reqwest by default) at R5.5. Slicing R5.1b to R5.7 validated; stop after R5.2.
Alternatives: A (Rust emitted bytes, re-ties identity to a serialiser), C (Rust reproduces Prettier bytes, keeps formatter chain); one-time visible rebase of every old archive (rejected: transparent alias possible).
Status: active. R5.1b + R5.2 done 2026-10-22; documentSha256, seed, report contracts untouched until R5.6; no merge, no package deletion, no 0.2.0, no deploy.
BDR-069 | 2026-10-24 | Refuse three non-canonical v3 report shapes at reader entry
Decision (owner go): check_v3_shape on raw value before Report::deserialize: sheet, practitioner must be objects, severity string. At read_report_document v3 + parse_envelope. Rationale: serde derives accepted positional arrays / one-key enum maps Zod refused → crafted file could swap same-typed fields silently. Alternatives: generic shape guard (draft/shape.rs style) on whole contract (wider, not authorised); deserialize_with in contract structs (touches contract). Status: applied d502dfa; v2 + other contracts keep serde leniency (not in go). Owner confirmed fingerprint convention sha256-rfc8785-validated-v1, one alias 27c7383c…2660; R5.6 scope files approved, switch not authorised.
BDR-070 | 2026-10-25 | D-R5.6 active: fingerprint sha256-rfc8785-validated-v1, registry alias, M1 option 1
Decision (owner, activation 9e87016): sheet fingerprint = SHA-256(JCS RFC 8785 of R2 typed reading, no integrity error, warnings allowed, depth 128). Equine canonical 12d78872…74e2; old 27c7383c…2660 = sole TRUSTED_ALIASES entry, bound to sheet 503dc301 + content. Alias honoured only via LoadedSheet::recognises_historical_stamp (loader-verified v1 private state + document recomputed at decision + one-way registry pair + same sheet id); equivalence pub(crate). M1 option 1: snapshot of old report keeps its stamp (build_sheet_snapshot); export, archive reader strict. v0 refs (no block) load unverified, no privilege; null/malformed block refused. Rust = sole seed writer, TS legacy until R5.7. Alternatives rejected: A file-bytes (Prettier-bound), C Prettier reproduction; re-stamp at rebase (rewrites reports); export-side alias (M1 defect, no proof). Status: active on feature branch; rollback not transparent for post-switch reports (rebased, nothing lost) → settle before user release.
BDR-071 | 2026-10-25 | Product roadmap principle validated: P0 → V1-1 → V1-2 → V1-3 → V1-4 → V1-5
Decision (owner, brief « P0 : arbitrages documentaires et finalisation du contrat V1-1 »): order P0 docs → V1-1 clients + animals → V1-2 sheets from Supabase → V1-3 cloud bilans + history → V1-4 stored PDF + authorised sharing → V1-5 mobile + a11y pass; a11y + security apply at every step (IMPLEMENTATION_PLAN §0). Release readiness track RR-1..RR-10 stays separate: no V1 step authorises release or public exposure. C4 (records owned by workspace, no global client directory), C5 (writes = workspace members with write right), C6 (email confirmation ≠ pro verification) = owner orientations, awaiting business ratification. V1-1 orientations D1-D9, D16 recorded as proposals in V1-1_OWNERS_ANIMALS.md §9.1; no table, RPC, RLS or component before ratification. Owner also confirmed: anatomical reference changes only via curation sources + Rust pipeline until Step 17, no graphic sheet editor, equine draft unpublished until business review, no auto publication; bilan annotations ≠ reference changes.
Alt: plan's numeric step order (verification, cabinets, entitlements before any client screen).
Status: principle active; C4/C5/C6 + V1-1 orientations pending ratification; P0 merge awaits owner go.
BDR-072 | 2026-10-25 | Correction of BDR-041: professional verification = plan Step 9, not Step 11
BDR-041 point (2) names Professional Verification "Step 11"; IMPLEMENTATION_PLAN numbers it Step 9 (Step 10 cabinets, Step 11 entitlement skeleton). Plan numbering kept. BDR-041 left as written (append-only); this entry supersedes its step number only, rest of BDR-041 unchanged. Docs cite Step 9: plan Step 7 note, V1-1 contract §5.2, OPEN_QUESTIONS C6. Status: active.
BDR-073 | 2026-10-25 | V1-1 business decisions ratified by owner (BDR-071 proposals → approved)
Decision (owner brief « V1-1 : ratification des décisions métier et préparation de l'implémentation »): D1 UI term « Clients », client = natural person or structure, Propriétaire/Détenteur/Contact = relation roles ≠ identity, no platform role reused as animal owner. D2/C4 workspaces + workspace_members, one personal workspace per practitioner, cabinet workspaces later w/o destructive transfer, no global directory, no cross-practitioner visibility, no sharing/invitations/cabinet perms in V1-1. D3 person | structure. D4 required = display name (person) / dénomination (structure), rest optional, no silent default country, no forced email/phone. D4a optional first/last names allowed, display name stays required reference, contract sets priority rule. D5 exactly 9 contract species + « Autre » w/ required detail; species ≠ sheet; equine draft never auto-published. D6 required name, species, sex w/ explicit unknown; optional breed, full birth date when known, year alone; D6a extras (neutering, identification, colour, notes, death date) + weight, photo deferred; no full vet record. D6b year never becomes date, precision kept, CHECK + tests. D7 many-to-many w/ explicit role, co-ownership, animal w/o owner OK, always in valid workspace, no fake client, never cross-workspace. D7a history: start date when known + nullable ended_at; no incoherent current duplicates, successive allowed; owner/keeper change never deletes history silently. D8 archive read-only reversible, relations kept, no cascade client→animals, archive ≠ erasure, no retention invented. D9/D9a temporary DEV guard vs account deletion leaving incoherent data, never permanent ban; lifecycle later. C5 V1-1 writes = practitioner in own personal workspace; finished bilans never changed silently. C6 email confirmed ≠ pro verified ≠ platform role; verification = Step 9. D16 staff no ordinary access, no admin screen, no impersonation/support access in V1-1; exceptional access = separate audited policy before publication. D15 technical caps ≠ commercial quotas; thresholds proposed before RPCs. Naming: explicit nomenclature, no generic owner_id.
Still open: D10-D14, D17 (UI); technical design (SQL/RLS/RPC, N1-N9, D15 thresholds, U1-U3) awaits owner validation at V1-1 preparation checkpoint; no migration before. Contract restructured: verification now §6.2 (BDR-072 cites old §5.2).
Alt: keep proposals open; global client record (2026-10-08 plan Step 12); owner_user_id column instead of workspaces.
Status: active. Branch feature/v1-1-clients-animals off develop 5502617. Contract docs/development/V1-1_OWNERS_ANIMALS.md §13.1.
BDR-074 | 2026-10-25 | V1-1 architecture + N1-N9 validated by owner; V1-1.1 M1 workspaces built in isolation
Decision (owner brief « Validation du contrat V1-1 et autorisation de V1-1.1 Workspaces »): V1-1 model accepted as target (workspaces + members, one personal ws per practitioner, cabinets later as shared ws, no organizations table, isolation per ws, clients person|structure, animals per ws, N-N relations, composite FKs, D-R7 TS forms + SQL CHECK boundary, RLS at creation, RPC writes). 6-step split accepted; only V1-1.1 authorised. N1 9 species + other, rows not enum, ids unchanged (Rust species_id free string, SQL CHECK fits). N2 no first/last names. N3 client notes deferred. N4 CHANGED: logical voiding (voided_at, void_animal_client_relation) ≠ end; voided never shown current/former, no invented ended_on, minimised audit; delete RPC dropped. N5 dates optional, never invented, ordered; CHECKs written in contract §5.3. N6 caps approved, write budget PER WORKSPACE (1000/h, 5000/day), concurrency-safe (no bare count+insert), mechanism fixed with M2. N7 service_role minimisation w/o claiming admin paths closed; existing tables/global privileges untouched. N8 sex none preselected. N9 no staff general view; audit = technical ids, op, time, result, bounded correlation; metadata {workspace_id} only (relation_role dropped). D10-D14, D17, U1-U3 stay contract-level; tab-bar contradiction → V1-1.3.
M1 as built (20261025100000_workspaces.sql): creation = server init in sign-up tx (trigger on profiles → private.ensure_personal_workspace one-statement CTE, ON CONFLICT on named unique workspaces_personal_user_unique); deferred constraint triggers workspaces_personal_holder/workspace_members_personal_holder (personal ws = exactly its account as holder, any writer); backfill once; caller_workspace_ids (active + email confirmed, auth.uid only) EXECUTE authenticated; writable_workspace_ids EXECUTE none; revoke all incl. service_role on new tables/functions; log_event correlation cap + NOT VALID CHECK.
Deviations: packages/supabase/src/workspaces.ts → V1-1.2 (no consumer); db:reset && db:test on DEV replaced by isolated sandbox (owner kept DEV untouched).
Alt: workspace created at first authorised login (client-triggered, forgeable timing, partial-state risk); invariant only by grants (owner-role bugs undetected); per-actor budget (cabinet-blind).
Status: active. M1 not applied to DEV (owner action, SUPABASE.md §3.3). Contract §5.3, §8.1, §9, §10, §13.2.
BDR-075 | 2026-10-25 | V1-1.1 validated; V1-1.2 M2 clients built: budget counter, divergent replay, C-lower fold, sandbox tool
Decision (owner brief « Validation V1-1.1 et autorisation V1-1.2 Données clients »): V1-1.1 accepted (M1, grants, RLS, tests); MEDIUM scanner findings non-blocking, trust boundary kept documented; service_role / GoTrue admin indirect access never claimed closed. Sandbox tool kept in repo: scripts/db-sandbox.sh (pnpm db:sandbox), rootless, loopback, own ports, no volume, generated secrets outside Git, CLI runners via --db-url. M1 on DEV = owner procedure (SUPABASE.md §3.3), not Claude.
M2 as built (20261025110000_clients.sql): budget = owner's transactional counter per workspace: private.workspace_write_budgets row upserted by private.consume_write_budget, fixed UTC hour/day windows (restart at 1 in a new window; 1000th passes, 1001st rate_limited; up to 2000 across an hour boundary, day 5000 holds), called LAST in every write RPC → lock order workspace → (animal → client in M3) → budget, no cycle; refused / replayed / no-op not counted (rollback). Divergent replay: create_request_digest (sha256 of normalised content, not API-readable) → request_conflict. Fold = unaccent then lower(... collate "C") (ASCII only) for PGlite/ICU parity. search_clients without current_animal_count until M3. Text rule via private.is_clean_text. Access layer → V1-1.5.
Measured: search 20k clients p95 21 ms (no trigram index); held budget row delays only its workspace.
Alt: count audit rows per workspace (needs index on metadata, count+insert race without extra lock); rolling windows (owner chose UTC windows); accept divergent replay as replay (silent divergence).
Status: active. M1+M2 not on DEV.
BDR-076 | 2026-10-25 | V1-1.2 validated; V1-1.3 UI foundations: native modal dialog, Playwright + axe on sandbox
Decision (owner brief « Validation V1-1.2 et autorisation V1-1.3 Socle UI »): V1-1.2 accepted (M1+M2 on isolated stack, budget 1000/h 5000/day UTC fixed windows, not to reopen without defect). D13 built on platform <dialog> + showModal() (components/ui/ModalDialog.tsx): no a11y primitive in deps, browser modal = proven one, no hand-written trap. Never self-closes: Escape keydown cancelled → onClose, cancel → onClose, forced close reported. First tabbable focused explicitly. Restore after commit (microtask) to opener else first control of nearest surviving container. Tab past last control → browser UI one step (platform; kept). Dialog: aria-labelledby + optional description. Drawer on same primitive, closes at lg. D14: Playwright 1.64.1 + axe 4.14.0 exact dev deps. Owner choices this run: e2e backend = sandbox (not DEV), pnpm e2e:ui + pnpm e2e:shell, drawer aligned, check:all runs e2e:ui if Chromium present else SKIPPED. D11: no tab bar in V1-1.3, three-way comparison in contract §11.6, decision before V1-1.6.
Alt: inert + custom Tab loop (artisanal, contract's first wording); focus-trap / Radix (new dep); e2e on DEV (writes sessions to existing accounts); route-stubbed backend (not real GoTrue).
Status: active. Contract §11.6, BROWSER_TESTS.md.
BDR-077 | 2026-10-26 | V1-1.3 validated; V1-1.4 M3 animals + relations built: states, caps, lock order, scoped axe exceptions
Decision (owner brief « Validation V1-1.3 et autorisation V1-1.4 Animaux et relations »): V1-1.3 accepted (native dialog, Playwright + axe, defects fixed); no JS focus trap without shown defect; D11 still open, 3 options before V1-1.6, none default. M3 20261026100000_animals_relations.sql as built (contract §8.3): species 8 + other rows (equine unchanged, rows not enum, Rust untouched); animals w/ D6b CHECKs, sex no default; relations w/ composite FKs (not deferrable), partial unique index current = ended_at and voided_at null; states current / ended (date known or unknown, ended_at discriminates, no contract change) / voided (frozen, shown nowhere). Caps: current ≤ 20 excludes ended+voided; totals 200/animal + 100 000/ws count every row (create-void loop bounded). create_animal + relation = 2 budget units (2 audit rows), relation reuses animal request id. Relation replay answered before archived (idempotence). Lock order M2+M3: workspace → animal → relation → client → budget last; relation RPCs read target ws unlocked among writable first (no lock outside ws). search_animals filter = species_filter (PG forbids param named like output col). list_client_animals cursor sort_key = '0'/'1' + name_key. Helpers utc_tomorrow(timestamptz) (pure, testable 31 Dec), parsers, lock_relation_for_write. No id-immutability trigger: privileged SQL may repoint within ws / move relation-less animal (§4 evolution path); composite FKs forbid cross-ws. Access layer → UI steps. Brief §2 follow-ups: axe KNOWN = rule + selector + opening markup + route; check:all prints PASSED / SKIPPED / NOT RUN, FAILED stage on error.
Alt: 1 budget unit per create_animal (undercounts audit rows); totals excluding voided (unbounded create-void loop); replay after archived check (retry of committed create fails); trigger freezing ids (blocks §4 transfer path); keep ^dl$ route-free exceptions (new screens inherit).
Status: active. M1-M3 not on DEV; procedure SUPABASE.md §3.3 (owner runs).
BDR-078 | 2026-10-26 | V1-1.4 validated; V1-1.5 client screens: owner U1/U2 choices, workspace in authStore, leave guard on links
Decision (owner brief « Validation V1-1.4 et autorisation V1-1.5 Interface Clients »): V1-1.4 accepted (species_filter + replay order in scope). Owner choices asked before UI: U1 « Afficher plus » keyset (25 + 1 probe row, no count), U2 one « Afficher les archivés » switch, client page animals read-only (list_client_animals, no link/add), « premier animal » section → V1-1.6. Built: access layer packages/supabase/src/{records,workspaces,clients,species}.ts (closed RecordFailure = §9.4 kinds + session_expired + network; Zod on RPC answers; read by id explicit columns, non-uuid → null w/o request); personal workspace in authStore (loading/ready/inactive/unconfirmed/missing/error; account change resets profile+roles+avatar+workspace in one set; late answers of previous user dropped; ready kept during same-user re-read); RequireWorkspace remounts routes per workspace; leave guard = beforeunload + AppLayout capture on in-app links (ModalDialog), back/forward not interceptable (documented); heading focus on open (callback ref, waits drawer close); request id per form mount via generateUuid (getRandomValues; LAN http has no randomUUID). Shell suite: no HTML reporter (kept typed passwords).
Alt: numbered pages (needs count), tabs for archived, data-router migration for blocking, global data cache lib, storing search term (PII) to survive back nav.
Status: active. Client screens not checked on DEV (M1-M3 not applied; owner).
BDR-079 | 2026-10-26 | V1-1.5 validated; V1-1.6 animal screens: D11 drawer only, first animal from client page, no default role, in-page link panel
Decision (owner brief « Validation V1-1.5 et autorisation V1-1.6 Interface Animaux et clôture »): V1-1.5 accepted; reserves kept as product follow-up (search not kept on back, E.164 display, back/forward not guarded); no complex navigation manager for them. D11 = drawer only for V1-1, mockup tab bar not reproduced (later UX subject, mockup unchanged). Owner answers before UI: first animal from client page (« Ajouter un (premier) animal » → /app/animals/new, client id in navigation state, never URL, re-read and checked active; one atomic create_animal with relation; client form untouched); no relation role preselected (like sex N8); link client/animal = in-page panel (no modal form, contract §11.4), end/dates/void = ModalDialog confirmations pending until write + reload; U3 = full date fills and locks year. D12 tiles outside brief → not built, stays open. Built: access animals.ts, relations.ts (relations read by one select with client embedded via animal_client_relations_client_fk, voided_at is null, limit 200); one RequireWorkspace above clients + animals holding SpeciesProvider (species read once per workspace, dropped on account change); conflict/not_found on a relation write → reload + stale message (voided elsewhere surfaces as conflict: lock order archived → revision → voided). No new business rule in TS or Rust: RPCs decide, TS = D-R7 checks + display.
Alt: section in client create form with two-call resume (contract §11.1 text; changes client form); role owner preselected; relation forms in modal or new routes; client id in query string; per-component species fetch; new voided failure kind (needs M3 change).
Status: active. Not checked on DEV (M1-M3 pending, owner).
BDR-080 | 2026-10-26 | V1-1.6 validated; DEV procedure: restore check on sandbox, fingerprints, e2e:avatar out of the run
Decision (owner brief « Validation finale V1-1 et préparation de la recette DEV »): V1-1.6 + V1-1 closure limits accepted; Claude reads DEV only, owner runs backup, migration up, acceptance, merge go. SUPABASE.md §3.3 rewritten: SQL through read-only helpers (default_transaction_read_only), step 2 counts + md5 row fingerprints + structure counts saved, Storage bytes by docker cp …:/mnt - tar, step 3b restore into restore_check_v1_1 on sandbox db (same image) instead of DEV server, post.sql (workspaces, holders, species, grants, pgtap), before/after diff with exact expected deltas, supabase status -o env | grep API_URL (default output prints keys). e2e:avatar removed from run: writes beyond fixture. Browser acceptance = brief §11 (19 lines).
Alt: createdb scratch on DEV server (rehearsed form, but writes DEV server, typo risk on dropdb); throwaway postgres container (unrehearsed init); cold volume copy (stops DEV, restore = volume overwrite); keep e2e:avatar (touches bob + purge queue).
Status: active. Steps 0-4 not run on DEV (owner).
BDR-081 | 2026-10-27 | V1-2 orientations D1-D8 approved + D9 in-app admin of official sheets mandatory; contract drafted, not ratified
Decision (owner brief « V1-2.0 : contrat fonctionnel et technique des fiches anatomiques », after read-only V1-2 audit): D1 publish = habilitated platform admins, business validation traced apart from publish act, platform_role ≠ professional status. D2 no publish with blocking to_confirm, never auto → reviewed. D3 official drafts only admins/editors/explicit reviewers; equine stays draft. D4 published official sheets readable by authenticated authorised users, any workspace. D5 creation admin-only, no personal/community sheets in MVP. D6 traceable review (author, submitter, reviewers, decisions, publisher, exact version). D7 report editor + historical readers unchanged in V1-2, switch in V1-3. D8 published immutable, referenced versions readable after archive. D9 (new, mandatory): admins create/edit/version/prepare publication of official sheets of any species from the app (structured editor + minimal visual tool), no SQL or Git JSON per sheet, Rust core = validation authority.
Contract docs/development/V1-2_ANATOMICAL_SHEETS.md proposes: capabilities table (editor, reviewer, publisher; owner grants), review rows bound to SQL content digest + frozen draft, atomic publish gate on server verdict (worker core run per submitted revision), element keys (finding path keys), MFA aal2, SVG clean before upload, Rust edit primitives, 10 steps, options O1-O20. Challengers fixed: deprecated deletable (F13), to_confirm→inherited bypass, can_edit_sheet (F14).
Alt: read-only catalogue first + editor at Step 17 (audit plan) rejected by owner (D9).
Status: orientations approved; contract proposals await owner ratification.
BDR-082 | 2026-10-28 | V1-2 decisions O1-O23 ratified; contract consolidated
Decision (owner brief « V1-2.0 : ratification des arbitrages O1 à O23 et consolidation du contrat », after read-only review of O1-O20): O1 A+D three explicit capabilities (editor, reviewer, publisher) + provisional catalog_reader, owner grants with required reason + verification note + optional expiry, audited; reviewer may be non-admin; email confirmation ≠ competence. O2 A no author acks or approves, author set frozen at submit, two people suffice, publisher may approve. O3 B no to_confirm + no inherited at approve/publish; legacy import never a base (fixes contract §14 vs §6.4). O4 A aal2 everywhere except published catalogue read; factor recovery operator-only, audited; O4-D (aal2 on platform role RPCs) evaluated, not ratified. O5 A one decision. O6 A disclaimer FR+EN. O7 A new elements to_confirm. O8 A published/deprecated immutable, never deleted, readable by id after archive. O9 C editor creates inactive species, owner activates, species_select_active not widened so animal forms unchanged; V1-1 N1 amended. O10 A several sheets per species. O11 B catalogue copy deferred. O12 A explicit save. O13 A packages deferred. O14 A editor read-only < 1024 px. O15 A async worker verdict in sandboxed child; no browser verdict, no HTTP service; DEV worker start = separate checkpoint (AVATAR-01 waiting upload + purge queue). O16 A, inherited shown « Hérité, non relu ». O17 C historical sheet 503dc301… intact + read-only, server-side working copy carries equine work, one source of truth, reference picked at V1-3. O18 mixed (carpus requalified, 11 level B changes in dossier; anatomy to reviewers). O19 A cleaning classes, active/external SVG content refused. O20 deferred, RR-2 open, gate before user release. O21 catalogue access explicit, provisional, fail-closed until Step 11 entitlements. O22 Rust sole authority on document rules; SQL mirror business rules removed in M5; structural/relational guards + one declared defensive status check kept. O23 fail-closed verification: states, idempotent retries, limits, withdrawal always possible, audit.
Supersedes for official sheets the 2026-10-25 rule « no graphic editor until Step 17 » (OPEN_QUESTIONS conflict 1); curation pipeline stays authority of historical equine sheet only.
Consolidation also fixed: rights table moved to M4 (M4 used table created in M5); core step V1-2.2 now before worker step V1-2.3; progressive review via per-group acknowledgments with digests.
Alt: options not chosen listed in contract §17 and the 2026-10-28 review; O15 B and O4 C rejected outright.
Status: ratified; contract under owner final review; V1-2.1 not authorised.
BDR-083 | 2026-10-28 | AR-1 ratified option B: aal2 for every platform role change
Decision (owner brief « V1-2.0 : résolution définitive d'AR-1 »): grant, revoke, replace, promote, demote of any platform role (owner, admin, moderator, support) need valid aal2 session, checked server-side in RPC at call time. No permanent exception (owner, first admin, old accounts, admin UI, direct RPC). aal2 necessary never sufficient: can_manage_platform_role, self-target refusal, last-owner guard stay. Ordinary users no MFA. Completes O4, no change to D1-D9, O1-O23.
Why: aal1 owner session could grant owner to attacker account → enrol own TOTP → aal2 → self-grant all catalogue capabilities. Read from 20261008100200 RPCs.
Shape (contract §5.7): aal2 check 2nd after auth, before role checks (no role oracle); private assign/withdraw re-check for non-null actor; service_role revoked on profile_roles/profiles + RPC EXECUTE (F17); owner-count race locked (F18); first owner: enrol 2 factors first, role assigned last by operator; DEV owner: enrol before M4 applied; recovery operator-only, ban account during enrol window; GoTrue v2.197.0 enrol/unenroll need aal2 once verified factor (source read, sandbox proves).
Alt: A (owner+admin only) rejected: leaves moderator/support weak path; C (accept residual) rejected.
Review (fresh challenger FATAL(4), all integrated, no ratified decision changed): grant needs target with verified factor; private fns: non-null actor = auth.uid() + aal2, null actor only without JWT; advisory lock both RPCs; DEV precondition before M4 = ENVIRONMENTS §3.6 hardening (public default JWT secret + demo service key + 54321 LAN → aal2 forgeable) + seed owner password changed + role holders listed; recovery reordered (ban, password set with owner, unban, enrol).
Reserves: staff read policies (is_platform_admin) stay aal1, owner decision; stolen aal2 session residual; refused attempts not in audit table.
Status: ratified; contract only, no code/migration/DEV change; V1-2.1 not authorised.
BDR-084 — V1-2.1 M4/M5 secure SQL foundations (sandbox) (2026-10-28)
- Status: implemented + tested on sandbox; DEV apply is an owner action (contract 16.11)
V1-2.1 M4/M5 built + tested on sandbox (not DEV). Migrations
20261028100000_sheet_access_hardening(M4),20261028110000_sheet_review_workflow(M5); applied together (M4 removes Step-4 unsafe write paths, M5 adds the reviewed workflow; no unprotected window).
Key design choices:
- AR-1 B:
private.has_aal2_session()= aal claim ==aal2AND the token'ssession_idnames a liveauth.sessionsrow of the caller at aal2 (closes the stolen-token-after-downgrade window at once, not after jwt_expiry). GoTrue v2.197 probe confirmed: verify upgrades the SAME session to aal2, token carriesaal+session_id+amr, exp-iat=3600. - Predicates split by caller vs stored actor:
grant_active(uid,kind)(no assurance) for stored approvers/acknowledgers;caller_has(kind)=grant_active(auth.uid())+has_mfa()for the session.can_edit_sheetredefined oncaller_has('sheet_editor')+ caller==auth.uid() (F14). - F12/F17:
revoke all ... from service_roleon every catalogue table + profiles/profile_roles; role RPCsEXECUTErevoked from service_role. service_role stays a GoTrue-admin residual (§13), not a table writer. - F18 last-owner race: one
pg_advisory_xact_lockin both RPCs and both private writers, guard counts active owners under the lock. Cross-revoke resolves safely (one 200, one refused; one owner remains). - O22 mirror removed: dropped
sheet_document_issues+ the 4 business-mirror helpers; keptsheet_document_has_shape,check_sheet_version_document,unknown_assets; added the declared status checksheet_all_reviewed(absent review_status = inherited = refused). pgTAP 011 + the SQL-mirror parts of the Rustsheet_conformancegenerator deleted; ledger retargeted. - Publish gate:
publish_sheet_version(review_id)atomic;guard_sheet_version_updatelets draft->published only with an approved round of same version+revision + passed verdict (no direct UPDATE publishes, even table owner). Verdict is a fixture until M6 (V1-2.3). - Reader column grants narrowed; editor needs only
revisionon versions; authors/provenance/fingerprint reach staff via RPCs (get_sheet_version).
BDR-085 — V1-2.1 owner final decisions: M6 self-review grant, M7 Git fixture, text size measure (2026-10-28)
- Status: implemented + tested on sandbox; DEV untouched
Owner brief « V1-2.1 : décisions finales du propriétaire » on checkpoint
2af61e7. Three decisions, M4/M5 edited in place (never on DEV). - M6 option A:
grant.self_reviewdropped fromgrant_catalog_right+SHEET_FAILURE_KINDS. Owner at aal2 + verified factor may self-grantsheet_reviewer. Separation stays per round: author refused at ack + approve (review.separation), author approval refused again at publish (publish.approval.invalid). pgTAP 015 flipped, 017 owner-reviewer block (7 cases). Residual: owner reviewing others' drafts is now a normal path, audited like any grant. - M7: Git fixture accepted for V1-2.1 upgrade rehearsal (horse.svg, sha256 = DEV asset row). Bytes/metadata/relations compared before/after. No DEV Storage read -> live DEV object integrity NOT shown; checked when owner applies M4-M6 on DEV. Contract §12.3, §16.2, §17.3.
- Size: one measure = UTF-8 bytes of jsonb text form
octet_length(content::text)(": ",", "separators, jsonb key order, numeric without exponent). Base table CHECKpg_column_size(binary jsonb, uncompressed at write, bigger than text for dense docs) replaced in M5 by the text measure;check_document_structuredrops pg_column_size. TS/Rust: no check today; core must compute same form in V1-2.2 (compact JSON.stringify shorter -> necessary not sufficient). Alternative rejected: compact JSON measure (SQL cannot compute it exactly: numeric prints no exponent).
BDR-086 — V1-2.2 core authoring surface: verdict, PreviewSheet, edits, cleaning (2026-10-29)
- Status: implemented + tested; READY FOR REVIEW; DEV untouched
V1-2.2 core built (contract §16.3), no SQL/screen/DEV. Owner answers 2026-10-29 before code: editor exports (Inkscape/Illustrator/Figma/Affinity) supplied by owner under tests/fixtures/svg/exports/owner, cairo 1.18.4 + ImageMagick 7.1.2-18 exports committed meanwhile; strict-parse fail =
verification.integrity.document(+.base), 19 rule errors =verification.validation.rules(§6.7 aligned on §6.5); PreviewSheet draft = caps excess + missing drawings reported, published/deprecated = refused. Design choices: verdict snake_case in the shape M5 SQL reads (groups[{key,digest,coverable}], drawings[{asset_id,sha256}], fingerprint), purecompute_verdict, NOT exported to wasm (O15). Digest = sha256(JCS({"group": key, ...content})) from typed doc (omitted status written inherited); general = doc minus views/annotations/finding_zones; view: = views of id + annotations drawn in it; zone: = zones of id; removal = {removed:true}; coverable = no to_confirm/inherited. Size = PG jsonb text measure (size.rs), oracle by PGlite 17.5. Edit: free opsheet.editdoc in → doc out; refuses ambiguous keys (duplicate id among siblings), unknown keys, id change, bad position, finding depth > 8; no cascade beyond tree descendants (dependents lists the rest); views whose drawing/crop changed → annotations to_confirm. Cleaning: sanitiser walk classes removalsactive(script, embeds, image, animation, a, on*, external refs, @import, javascript:, expression(, image-set(, behavior:, backslash); cleaning-only reading drops oversized title/desc (stored reader still refuses, too_complex). Alt: verdict in wasm (rejected, O15); handle-applied edits (kept free op, page holds text for undo); serde tagged derive for commands (rejected: +100 KB wasm).
Reviews: verifier ECARTS(6) then ECARTS(3) (owner exports, helper); security PASS x2, MEDIUMs fixed (PIs, HTML fetchers, long-title bypass, quadratic groups, cubic view walk, bounds). Open owner: dangling #id across inlined drawings, clean upload = original bytes, stricter-than-table refusals, edit reading (contract 8.1/9.2), cairo rgb() colours. Module 596 671 B of 600 000.
BDR-087 — V1-2.2 canonical stored SVG form, owner-ratified (2026-10-30)
- Status: accepted
Decision (owner, 2026-10-30, on
05de816): drawings stored only in canonical form = deterministic serialisation by Rust core (serialize::stored_form). Original uploaded bytes never trusted as safe by default. Integrity (sha256, verdictverification.integrity.svg_not_canonical, previewnot_canonical, upload tool) checked on representation actually stored. Fingerprints of approved historical resources kept (equine drawing sha2560ea5202f…, fingerprint12d78872…unchanged).
Also kept by owner: per-document-instance prefix required on top of per-view prefix (fv.<view>.); no multi-document inline rendering opened without it. Cairo strict numeric rgb()/rgba() kept, atomic remove refusal while named (has_dependents), wasm cap 600 000 B unchanged.
Rationale: validated bytes = stored bytes = rendered bytes; no gap between what check saw and what browser reads.
Alternatives: store original bytes after validation (rejected: validation and storage could diverge); re-serialise historical drawings (rejected: breaks approved fingerprints, archive reproduction).
BDR-088 — V1-2.2 A6 scope (Figma + real Illustrator, Affinity optional) and mask/clip units allowed (2026-10-30)
- Status: accepted
Decision (owner, 2026-10-30, contract §17.5): A6 = Inkscape (met) + Figma (required; owner's two raw exports
owner/figma-web-20261030-{default,ids}.svg, permanent fixtures) + real Adobe Illustrator (required; VectorCraft not equivalent). Affinity optional. V1-2.2 not VERIFIED until Illustrator exports committed and pass. Allowlist gainsmaskUnits,maskContentUnits,clipPathUnits, valuesuserSpaceOnUse/objectBoundingBoxonly, else removed.
Rationale: Figma writes <mask maskUnits="userSpaceOnUse"> for frame clipping. Removal re-reads mask x/y/width/height in bounding-box units: Chromium 156 cut half stroke at (10,100), 208 px diff at ×8; mask off origin could hide content (deduced, untested). With keywords allowed: stored forms pixel-identical to raw files. Enumerated keywords carry no function, no reference.
Alternatives: keep removal, document 1 px loss (rejected: silent fidelity loss, worse off-origin); allow maskUnits only (rejected: same risk class for the two siblings); allow any value (rejected: free text where keyword suffices).
- Status (2026-10-30): accepted, A6 scope part superseded by BDR-090 (Illustrator optional, 2026-10-30); mask/clip units part still in force
BDR-089 — V1-2.2 reserved PDF halo id, refused by shared reader and composers (2026-10-30) (2026-10-30)
- Status: accepted
Decision (owner, 2026-10-30, RUST.md §12.9): PDF halo id
osteo-haloreserved. Shared reader refuses any kept element holding it, root included, ASCII case folded (SvgRejection::ReservedId,reserved_id); cleaning, verdict, preview, loaded sheet, upload tool, PDF snapshot gate answer through same reader. Both composers refuse tree holding it (ComposeError::ReservedId), halo always engine's (has_halo_filterskip removed). Exact setrefs::RESERVED_IDS, neverosteo-*prefix.
Rationale: PDF view keeps drawing ids, engine writes filter#osteo-halo next to them. Defect: drawing own filter#osteo-halo → engine skipped its filter, transparent filter erased marker (0 highlight px Chromium 156 vs 1602); g#osteo-halo before first <defs> won resolution → halo lost (825 px). 11 historical drawings incl. DEV equine object (sha256 0ea5202f…) carry osteo-overlays → prefix reservation would refuse them. Fix: 08efd9a.
Alternatives: reserve osteo-* (rejected: refuses historical drawings); rename engine id to unguessable (rejected: changes R3 oracle + R4 digests, still collidable); strip drawing element silently (rejected: silent change, refusal explicit); composer guard only (rejected: refusal must happen before verification/publication).
BDR-090 — V1-2.2 A6 final perimeter: Figma, Inkscape, cairo, ImageMagick; Illustrator + Affinity optional (2026-10-30) (2026-10-30)
- Status: accepted
Decision (owner, 2026-10-30, final; contract core E1, V1-2 contract §17.6): A6 tested perimeter = Figma (owner's two raw exports
owner/figma-web-20261030-{default,ids}.svg), Inkscape 1.4.3, cairo 1.18.4, ImageMagick 7.1.2-18, all real exports read by suite. Adobe Illustrator + Affinity optional: never declared compatible/validated without real export; absence no longer blocks V1-2.2.owner/folder, procedure (Illustratorpresentation/internal-css, Affinityweb/hq), suite reading any file there kept for later. Replaces A6 part of BDR-088 (mask/clip units part still valid).
Rationale: owner had already lifted Illustrator requirement; earlier brief wording ("Illustrator obligatoire pour revendiquer la compatibilité Illustrator") read as A6 blocker. Compatibility claim stays evidence-bound: no export, no claim.
Alternatives: keep Illustrator required (rejected by owner: blocks step on tool not owned); fabricate or emulate exports (forbidden: VectorCraft not equivalent, never fake fixtures).
BDR-091 — V1-2.2 view frame: one Rust rule, out_of_frame refusal (2026-11-01) (2026-11-01)
- Status: accepted
Context: V1-2.2 three MEDIUM, defect 3 (owner brief 2026-10-30). View without
view_boxframed by drawing rootviewBox; shifting it + translating content back kept horse identical, all 19 main markers off frame, accepted.
Decision: one Rust rule anatomy::frame::view_frame = view view_box, else drawing viewBox read with SVG grammar. Same frame for both composers (canvas, PDF), server verdict, PreviewSheet. Annotation not entirely inside (edges incl., curves/arcs on shape, unreadable path data refused) → issue annotation.geometry.out_of_frame, verdict verification.validation.out_of_frame; no usable frame → view.frame.unknown. Document never rewritten. Owner validated 2026-11-01.
Alternatives: cap on viewBox dims (rejected: bypass by scale); document owning main frame (heavier model change); TS-side check (rejected: Rust by default, one definition).
Extension 2026-11-01 (same rule, owner brief « décisions »): frame usable only within browser-faithful range (edges ≤ 2^20, span ≥ 1, aspect ≤ 100, far edge ≤ 256 spans); marker visible size ≥ 4 CSS px at 320 × 568 → verification.validation.marker_too_small. RUST.md §12.11, §12.13.
BDR-092 — V1-2.2 VERIFIED: 4 px interior rule, codes approved, six LOWs accepted and tracked (2026-11-01)
- Status: accepted
Decision: V1-2.2 VERIFIED by owner 2026-11-01 (brief « Validation définitive V1-2.2 »). Zone or drawn trigger (polygon, path) must fill disc of 4 px diameter at 320 × 568 preview, nonzero rule, stroke never counted; conservative measure, compute caps, refusal in doubt. Codes approved:
annotation.geometry.interior_too_small,verification.validation.marker_interior_too_small. Equine accepted unchanged.
Rationale: 4 px = approved point threshold; equine min widest disc 4.951 px (caudal). Conservative (under-estimate) measure never accepts shape browser fills less; browser probe on 3 engines confirms. Evidence .claude/audits/2026-11-01-v1-2-2-interior-evidence.md, RUST.md §12.14, V1-2 contract §17.7.
Accepted LOWs (tracked, NOT fixed, stay in TODO V1-2 section): (1) fully overlapping marker discs: no rule, human review must find them before publication, no claim of individual selectability; (2) arc rotation sub-pixel error, bounded, tests kept; (3) arc tangent to frame edge refused (conservative); (4) f32 arc margin is bounded estimate (≤ 0.13 unit measured on model); (5) verification cost of all-arc sheet (~1.8 s native worst); (6) relative path commands accumulated in f32 (contrived worst 6 % of span). Complex-sheet duration monitored at editor validations on real devices.
Alternatives: larger threshold (6 px) refused equine; renderer-based measure (new dependency, WASM budget); area threshold (thin sliver keeps area). Rejected.
Status: accepted
BDR-093 — V1-2.3 VERIFIED: M6 worker verdict, retry by cause, sandbox-only e2e; CPU-contention MEDIUM accepted temporarily (2026-11-02)
- Status: accepted
Decision: V1-2.3 VERIFIED by owner 2026-11-02 (brief « Clôture V1-2.3 et lancement V1-2.4 », HEAD
57b93af), sandbox scope only. Kept: M6 (four service-role RPCs, five worker codes, lease 10 min, verdict cap 3 MiB child / 4 MiB SQL), retry by effective cause (resource_limitintrinsic to frozen input andverdict_refusedclose at first occurrence;timeout,unavailableincl. external SIGKILL,lease_expiredtransient, delays 2/5/10/20 s, five attempts,not_beforein SQL, no blocking wait), stale and null-token protections, avatar e2e on sandbox only (pnpm e2e:avataralias, DEV script removed, suite refuses non-sandbox URL, container, key issuer), per-session sandbox secrets, seccompbrk+ budgets, noworker-verifyon DEV.
Accepted temporarily (sandbox scope, NOT fixed, NOT a deploy authorisation): MEDIUM CPU contention: document needing ~60 s CPU under host contention can reach 90 s wall deadline first → timeout → retried up to five runs (~8 min worker time); owner refused unsafe rusage read at this stage. Re-examine before enabling worker-verify on DEV or exposing verification to external users. Register: V1-2 contract §13 accepted risks. LOWs open: header > 64 KiB → resource_limit not caps; oversized object → [caps, drawing_missing] not size_mismatch; SIGABRT also panic / host ENOMEM; verdict bound to another round answers stale. Four historical test reductions justified in .claude/audits/2026-11-01-v1-2-floor-reductions.md.
Rationale: definitive failures deterministic for frozen input → one child run, not five; transient by environment keeps retries; SQL owns code policy so any worker honours it. Evidence: RUST.md §13.1, V1-2 contract §6.4/§6.5, gates on 3c141c9 (check:all, pgTAP 1898, verify-e2e 10/10, avatar-e2e 5/5, e2e:shell 86, DEV untouched).
Alternatives: retry every worker code (five identical runs on deterministic failure, refused by owner); per-call final flag in RPC (signature change, rejected); rusage-based timeout classification (needs unsafe, deferred by owner).
BDR-094 — V1-2.4 catalogue access UX (O21): hidden entry, « Accès non autorisé » page, reviewer keeps limited Administration; §6.5 alert divergence recorded (2026-11-02)
- Status: accepted
Decision: owner brief « V1-2.4 : validation de la décision UX n° 3 » (2026-11-02, on
1a68cd8). Signed-in account without catalogue right (private.can_read_official_catalogfalse, O21):
- Sidebar and drawer hide « Fiches anatomiques » (
/app/anatomy; owner's « Catalogue anatomique » = same entry, name kept). - Direct URL (
/app/anatomy,/:sheetId,/versions/:n) → page « Accès non autorisé »: explanation + link back to/app. Same page whether sheet exists or not (no existence oracle). - Server checks, capabilities, RLS unchanged; hidden entry protects nothing.
- Reviewer-only account (
sheet_revieweronly) keeps « Administration » entry to reach its rounds (boards 07, 09, 10; §11.1 E,V,P; R1 « À relire »), sees no entry or action it cannot use: no « Nouvelle fiche », « Créer une copie de travail », « Accès et habilitations », species creation or activation. Owner chose this reading of « ne pas exposer les entrées d'administration » (AskUserQuestion), boards unchanged. - Not signed in →
RequireAuth→/login?next=(IDENTITY.md); signed in, not entitled → « Accès non autorisé ». Never mixed. Also: G1/G2 corrections validated, conformance 8/8 acknowledged; UX decisions 2-11 of the 2026-11-02 checkpoint list ratified (3 settled here); item 1, labels, open. §6.5 « reported to the operator » forverification.worker.verdict_refuseddiverges from code: worker logscomplete_malformedat error level, RPC keeps code on round + audit, no notification; recorded, no alert mechanism added. Still open: owner visual validation of 12 boards, 31 FR/EN labels.
Rationale: O21 right ≠ authentication ≠ capability (§5.3), so UI must tell the three apart; fail-closed, server decides. Hiding entry for reviewers would cut R1 (no e-mail in V1-2). Implementation (V1-2.5): visibility hint from own anatomical_catalog_grants rows (select policy user_id = auth.uid()), page decision from server refusal, never the hint.
Alternatives: show catalogue page with explanation for everyone (rejected by owner); hide « Administration » from reviewer-only accounts with separate « À relire » entry (needs boards 07, 09, 10 redrawn, not chosen); rename entry « Catalogue anatomique » (design change, not chosen).
BDR-095 — V1-2.4 catalogue search by sheet name only (replaces BDR-094 item), distinct failed/unavailable titles (2026-11-02)
- Status: accepted Decision: owner briefs « V1-2.4 : dernières corrections graphiques » and « arbitrages propriétaire et préparation de validation finale » (2026-11-02).
- Catalogue search (
/app/anatomy) by sheet name only in V1-2; field « Rechercher une fiche ». Explicitly replaces zone-name search, ratified earlier same day under BDR-094 (« UX decisions 2-11 ratified », item 4). No repo trace of an earlier « no zone search » decision cited by external review. - Distinct titles per outcome:
failed« Vérification échouée » / « Verification failed »;unavailable« Vérification indisponible » / « Verification unavailable ». Round statusverification_failedkept as technical status, §3 label unchanged. - Future review lists (V1-2.7): tell content failure from technical unavailability only when data establish it (
anatomical_sheet_reviews.failure_outcome, nullable, no CHECK tying it toverification_failed); otherwise exact generic label, never inferred cause. No migration now. - No SQL model, business rule or closed code change. Rationale: search by zone widens a slice already large; one title per outcome stops an unavailable service reading as bad content. Alternatives: zone search (withdrawn); one title « Vérification échouée » + « indisponible » tag (replaced).
BDR-096 — V1-2.4 GRAPHICAL APPROVED: 12 boards + « Accès non autorisé » page, last label arbitrations, V1-2.5 authorised on VERIFIED deps (2026-11-02) (2026-11-02)
- Status: accepted
Decision: owner brief « Validation propriétaire V1-2.4 » (2026-11-02, on
74aa8f6), after review of archivefaunosteo-v1-2-4-maquettes-arbitrages-3.zip. V1-2.4 GRAPHICAL APPROVED: 12 boards01-12+ complementary page « Accès non autorisé » = design reference V1-2.5 to V1-2.7. No board, source or rule changed by the record.
object_conflictFR: « Le contenu du fichier de l'illustration ne correspond pas à son empreinte SHA-256 enregistrée. » (meaning checked: stored bytes vs recorded sha256 key,HashMismatch). EN not arbitrated, checked at integration.- L14: « Access and permissions » in UI;
capabilitystays technical term (§3 row unchanged). - L20: « Corriger le brouillon » / « Fix the draft » (content failure); « Modifier le brouillon » / « Edit the draft » (size limit).
- L32: « Accès non autorisé » / « Access denied »; explanation + « Retour au tableau de bord » / « Back to dashboard » declared already decided (board 12 wordings).
- Other technical messages (16 closed codes, L30 refusals) checked at integration, not blocking graphic closure. L15 2nd sentence not named by brief → stays open until V1-2.6.
- Minor doc remarks fixable without new graphic review, boards untouched. Board 12 keeps older
object_conflicttext and « à arbitrer » marks; REVUE.md + contract §17.9 hold ratified wordings. - V1-2.5 authorised once §16.6 dependencies VERIFIED, existing contract only. Kept: no merge develop/main/release, no Supabase DEV op without own authorisation, no DEV worker, tests + independent review fit for step, commits + pushes on V1-2 branch, STOP at V1-2.5 checkpoint. Design not reopened without demonstrated defect or new owner decision. Rationale: four review rounds (G1/G2, final corrections, arbitrations, verifier CONFORME 21/21) closed every graphic finding; remaining messages are integration-time checks against code. Alternatives: regenerate board 12 with final wordings (rejected by brief: design not modified); hold approval until every message settled (rejected: owner closes graphics, messages at integration).
BDR-097 — V1-2.5 start: M7 admin read migration, working-copy action in V1-2.5, EN Permission for Habilitation (2026-11-02)
- Status: accepted
Decision: V1-2.5 started 2026-11-02 under brief « Validation propriétaire V1-2.4 » after prerequisite check on
994b04e: V1-2.1 VERIFIED atac71c5b(M4/M5 unchanged since), V1-2.2 VERIFIED (BDR-092), V1-2.4 approved (BDR-096), V1-2.3 VERIFIED (BDR-093). Owner answers (AskUserQuestion, 2026-11-02) to three gaps found at start:
- Admin reads: admin list needs working-copy badge + round counts;
working_copy_source_version_idexcluded from table grants (§5.3), no admin read RPC existed, §16.6 said « SQL changes: none ». Chosen: one read migration M7sheet_admin_reads(list + overview RPCs, capability holders at aal2, no write path, no policy/rule change), sandbox only, DEV untouched. Contract §12.3, §16.6, §17.10. - Working copy: « Créer une copie de travail » built in V1-2.5 (board 10) on existing
create_sheet_working_copy, lands on copy's overview; editor link with V1-2.6. A1 new sheet also lands on overview until V1-2.6. - EN term: « Habilitation » = « Permission » in English UI;
capabilitystays technical term. Contract §3 amended. Rationale: board 10 (approved) shows badge, counts and working-copy action; column grant widening would expose the column to readers (§5.3); a read RPC keeps reader grants narrow. « Permission » follows L14 « Access and permissions ». Alternatives: drop badge in V1-2.5 (deviates from §11.1 + board 10); widen column grant (rejected, §5.3); defer working-copy action to V1-2.6; keep EN « Capability » (§3 old).
BDR-098 — get_sheet_version returns deprecated versions' fingerprint (M7) (2026-11-02)
- Status: accepted
Decision: owner 2026-11-02 (AskUserQuestion), V1-2.5 slice I.
get_sheet_versionreturnsdocument_fingerprintfor published AND deprecated versions (draft: none). Redefined in M720261102100000_sheet_admin_reads.sql(never applied to DEV); body otherwise identical to M5. pgTAP 022 +3. Contract §10, §12.3, §17.10 amended. Rationale: core PreviewSheet (V1-2.2) checks stored fingerprint for published + deprecated; M5 RPC gave it for published only (contract §10 wording) → every withdrawn version page refusedfingerprint_mismatch; §10 also says deprecated previews like published (self-contradiction). Fingerprint was public while version was published; integrity check kept. Alternatives: core skips fingerprint for deprecated (loses integrity check); defer retired versions (C8 unmet).
BDR-099 — V1-2.5 VERIFIED: permission states, Retry, Paris end-of-day expiry, species order 0..9999, UX deviations, MFA recovery prerequisite (2026-11-03)
- Status: accepted
Decision: owner accepted V1-2.5 final checkpoint at
b4415a3(brief « Validation V1-2.5 et autorisation V1-2.6 », 2026-11-03) → V1-2.5 VERIFIED. Decisions ratified (contract §17.11):
- Permission states,
/app/admin/sheets/neworder: own grantsloading→ waiting status; server species read answeredrights.*→ « Accès non autorisé » (server wins over failed client read, BDR-094); own grantsfailed→ « Impossible de vérifier vos autorisations » + short text + « Réessayer », never form;ready+ activesheet_editor→ form;readywithout it (reviewer-only, publisher-only, owner without capability) → refused. Technical error never read as no-right. Admin home: same notice replaces « Vos habilitations » line. Lists hide grant-dependent actions on failed read, no notice. Server checks + RLS stay mandatory. - Retry (
reloadAccess): statusloading, re-reads platform roles + own grants (+ species list on creation page when it failed); endsreadyorfailed(grants[]); never wipes profile, roles, workspace already held; never rejects;setForUserguard drops late answers. - Grant expiry: stored instant = 23:59:59.999 Europe/Paris of chosen day, offset in force then (DST-aware); picker + display in Paris dates; backend unchanged (
expires_at > now()); historical rows untouched. - Species order: integer 0..9 999, checked server-side in M7 (
create_species,update_inactive_species); null keeps old meaning; M5 untouched. - Two accepted UX deviations, boards unchanged: selection in zone panel not tag over drawing (aria-live region mounted before pick, names zone); « Références » card not collapsible on phone (starts at/below drawing bottom, measured 320 + 375 px).
- MFA lost-authenticator: no safe rehearsed recovery path exists (IDENTITY §4.2) → production prerequisite (contract §13). No bypass, no aal2 weakening, no factor-reset path.
- Reserve: unavailable-permissions e2e runs desktop only (skipped chromium-375; admin pages at 375 covered by other specs); sandbox suites share stack state, two state-dependent tests fixed (
0499a39,f5456f3), others may surface → fresh stack per gate run. Rationale: owner brief §1-§5 at V1-2.5 checkpoint (14ff890) + final acceptance (b4415a3); fail-closed UI without false refusal; Paris = initial French scope. Alternatives: show form on failed read (rejected, owner); deduce no-right from error (rejected); UTC midnight expiry (cuts chosen day short); collapsible Références (rejected, no redesign); add MFA recovery bypass now (rejected, weakens aal2).
BDR-100 — V1-2.6 UX technical decisions ratified: T11, T16 conditional, T2/T3 conditional, T4 no residual gap, T5 history, T9, T10 principle, T12 principle (2026-11-05)
- Status: accepted
Decision: owner brief « FAUNOSTEO — V1-2.6 UX — Ratification des décisions techniques » (2026-11-05) answers T11, T16, T2/T3, T4, T5, T9/T10, T12 of
docs/development/V1-2-6_UX_DECISIONS.md. UX choices not reopened.
- T11 approved: old-UX (level 1) trials stopped; anomalies + untested items tracked (TODO level-1 line); level 1 NOT declared validated as a whole.
- T16 conditional deferral: curve handle editing out of V1-2.6 → curves lot (ex-U9), precedes any feature letting a path into a document. Audit: tracked docs 0 paths (seed draft 22 circles 6 polygons, legacy import 21/6), no product journey writes or needs a path change; DB contents (DEV, sandbox) not queried → read-only count before an env gets U6. Paths kept byte for byte, never converted; ops that would change one refused, doc unchanged; « Remplacer par un polygone » = sole explicit exit (contract §8.3).
- T2/T3 principle, conditional on proofs (COMPATIBILITY §8: fingerprints, Rust, SQL, PDF, worker, N-1, R3/R4, BDR-068):
role+fill_opacityoptional in schema v2, omitted when absent, never null by default, explicit null refused, absent never defaulted in fingerprinted doc; opacity integer 10-100; controlled snapshot-reader widening (exactly two keys, typed, ranged; else Schema rejection, report kept). One-way compat only: no return to old app after first write; never "full backward compatibility". - T4 no residual gap: absolute verdict-tier rule on draft (3 roles once each, fixed names) → existing
verification.validation.rules;edit.rsrefusals + repair path; U6 migration withdraws rounds in flight + core gate onverified_with(pre-U6 passed verdict refused; marker needed, every core says 0.1.0); publication gate unchanged (current verdict). Write lock: keys written only after SQL + worker live (order SQL, worker, app). Save stays permissive (drafts may be incomplete) → owner confirmation pending. - T5 history preserved: ids, names, colours, 3 own colours, annotations, fingerprints of historical equine; roles on working copy only; conversion test on in-memory copy. New-sheet defaults (ids, EN names, colours) pending.
- T9: explicit 3-action dialog on every crop drawing replacement, before upload: keep (R inside V + accept passes), reposition (same aspect exact, no path, no descendant crop), cancel (nothing uploaded). No approximate auto transformation;
remap.aspectrefusal. - T10: access never put in Os/Articulations/Vertèbres;
detail_triggerexists but requires an existing category; recommended internal categorycat-accessrolenavigation(to confirm); automatic access moved U5 → U6. - T12: one versioned copy; legal text, source, validation to supply; U7 blocked; no invented normative text. Rationale: owner answers; no integrity gap at round or publication; history and archives preserved; honest compat wording. Alternatives: base-relative rules with first-version gap (old T4 rec, rejected); save-time SQL check (locks pre-U6 drafts, mirrors core rule; offered to owner); Joints category for access (rejected); optional trigger category (breaks N-1 type test + snapshot); V=R without question (rejected). Open: T1 (only if budget exceeded), T4 save boundary, T5 defaults, T6 (V1-2.8), T10 option B, T14, T15 (U1), T17 (U6), T12 text. No code; U0 needs new explicit authorisation.
- Status (2026-11-05): accepted, items 4 and 6 superseded after second review: T4 adds declared SQL check of fixed model at approval + publication, recommended save non-regression check (no role removed/duplicated/renamed away; role-less drafts still save), both to confirm with O22 amendment; functional write lock = rules epoch RPC read by app, SQL first mandatory; editor: role brings fixed names, repairs for names + duplicates, navigation never assignable; withdrawal limited to draft rounds; replay filters category.fixed.*. T9: keep only when V equals R, reposition same aspect on 0.01 grid, premises stated, two core calls (offer before upload, batch after hold), no viewBox -> cancel only.
- Status (2026-11-05): accepted, item 2 count scope aligned with DECISIONS T16: read-only path count before U6 or U8 reaches any env beyond throwaway sandbox (third check G4)
- Status (2026-11-05): accepted, open items answered 2026-11-05 by BDR-101: T4 SQL checks (save + approval/publication) approved, T5 defaults, T10 option B, T15; T1, T6, T14, T17, T12 text still open
BDR-101 — V1-2.6 U0: T4 SQL checks approved (O22 amended), T5 defaults, T10 option B, T15 wording, T16 count, polygon replacement explicit (2026-11-05) (2026-11-05)
- Status: accepted Decision: owner brief « FAUNOSTEO — V1-2.6 UX — Autorisation U0 uniquement » (2026-11-05). U0 authorised alone (docs, contract, preconditions, non-destructive checks). 16 V2 boards + 11 UX choices approved for good, no graphic arbitration reopened. Complementary ratification:
- T4: both declared SQL checks approved. Save: no role carried twice, role-bearing category keeps fixed FR/EN names, no role of stored draft lost; role-less drafts (pre-U6, equine working copy) still save. Approval + publication:
bone,joint,vertebraonce each with fixed names,navigationat most once, independent of worker. O22 amended strictly for these invariants (contract §12.2, §17.12); no other core rule mirrored. Both planned at U6, not built. - T5 new-sheet defaults:
cat-boneOs/Bones#a41e65,cat-jointArticulations/Joints#ff9500,cat-vertebraVertèbres/Vertebrae#e100ff. Sources: Bones/Joints + colours = equine draft categoriesos,articulations,zone-colonne(draft/document.json:417-446); no existing category named Vertebrae, EN taken from editor tab pair (fr.ts:1230/en.ts:1199). History + fingerprints untouched. - T10 option B: internal
cat-access, rolenavigation, FR « Accès aux vues détaillées », EN « Detail view access », colour null; never shown as anatomical category; automatic access only at U6, on U5 overlap list, only when empty. Implementer: edits never give, change or clearnavigation; canonicalcat-accessenters only in core-built access batch. - T15: « Annuler la dernière modification » = history command (header, toast); « Abandonner » / « Abandonner les modifications » = leaving a form / discarding unsaved changes (C11 relabelled at U1).
- T16 kept: curves lot out of V1-2.6; read-only path count on each env before new model activated there (U6 write lock lifted); no DEV during U0.
- « Remplacer par un polygone »: explicit replacement only, core-validated, old path kept until success, undo/redo; no automatic conversion. Holds in level-1 code (
usePlacement.ts:39-63, one commit under accept); undo/redo exact-restore test at U2. - T12: U7 blocked until legal text, source, validation supplied. T1, T6 conditions kept. T17 open (blocks U6, not U0).
- U0 amended: V1-2 contract §6.2, §6.4 (draft rounds only, was « every round »), §6.7, §7.4, §8.2-§8.4, §12.2 + §17.1 O22 row, §16.7, §16.12, new §17.12; level-1 contract C3, C4, C6, C7, C8, C11, C13, C32, C33, C40; docs/design/README.md (v1-2-6 validated); rules sheet-model.md, schemas.md. Docs only. Rationale: owner answers; integrity enforced at save + publication even if worker defective; history and archives preserved; no invented wording. Alternatives: no save check (rejected, owner); full core validation mirrored in SQL (rejected, O22); access in Joints or optional trigger category (rejected, BDR-100); keep « Annuler » for both history and forms (rejected, T15). Open: T1 (only if wasm measure > 600 000 B), T6 (V1-2.8), T14 (follow-up), T17 (before U6), T12 text (before U7). U1+ need new explicit authorisation.
- Status (2026-11-06): accepted, item 8 completed: level-1 notes also on C16, C20 (keyboard path via handles), C28; contract §16.7 test line
- Status (2026-11-06): accepted, item 8 extended after 4th check: level-1 header precedence rule (validated boards and amended contract prevail; undecided board points listed in DECISIONS for U1/U6), notes on C5, C11 header, C16, C18, C25; C16 edited by note, not inline
- Status (2026-11-06): accepted, 5th check: precedence rule refined (amended contract first, then boards; listed board differences stay open owner questions, level-1 text in force until answered; V1-2.7 points stay there); level-1 plan choice 2 (properties at creation) listed open for U2/U5
- Status (2026-11-06): accepted, correction after 6th check: detail-view names follow validated choice 6 (not open); only points/zones properties at creation (plan choice 2 vs boards 02/04) open for U2; C11 note: dialogs closing without effect keep Annuler
BDR-102 — V1-2.6 T17: fallback Régions vertébrales entry in Annotations without vertebra role, configured from Vertèbres category once it exists, no duplicate (2026-11-06)
- Status: accepted
Decision: owner brief « FAUNOSTEO — V1-2.6 UX — Autorisation de U1 uniquement » (2026-11-06) answers T17: no category with role
vertebra→ Annotations offers fallback entry « Régions vertébrales »; Vertèbres category exists → regions configured from that category (board 09), no duplicate entry. New category model not built before U6. Effect: U1 relocates existing level-1 regions editor into Annotations as that fallback entry (no role before U6); U6 adds vertebra-role path + removes entry when role present. Equine working copy uses fallback until V1-2.8 (T6). Rationale: board 09 path needs role; working copy and pre-U6 drafts have none; one place to edit regions avoids divergence. Alternatives: regions only from category (blocks equine copy until V1-2.8, rejected); permanent separate tab (duplicate, rejected by four-tab shell). Open: none on T17. Recorded in DECISIONS T17, contract §17.12, PLAN U6, TESTS U6, TODO.
BDR-103 — V1-2.6 U2b principle approved: F1, F2, F6, F8, F22 decided, F7 term Famille, F3/F4 partial, F5 + F9-F21 open (2026-11-06)
- Status: accepted Decision: owner brief « Validation de principe U2b et préparation des checkpoints » (2026-11-06) approves principle of bidirectional annotations ↔ findings navigation. Owner decisions only (recommendations not recorded as decided):
- F1: sub-step U2b « Annotations et constats » after U2, before U3; own contract, tests, checkpoint. Not started; needs own authorisation.
- F2: counters = real findings at any depth, families not counted, a zone named by several annotations counted once. Open: intermediate groups counted or not (study 7.1; boards count them: grasset 29 nodes vs 25 leaves; draft 730 vs 627).
- F3 partial: instant search, accent- and case-insensitive. Field list, word rule, language rule to ratify (study 7.2).
- F4 partial: text ∩ drawing; several picked zones = union, no duplicate. View semantics to ratify (study 7.3: model A facets, recommended; model B picks only).
- F6: below 1 024 px consultation + list filters, no graphical editing.
- F7 (term only): « Famille » = finding families, distinct from annotation categories. Other labels of F7 stay C44 proposals.
- F8: annotation without zone gets one through one atomic, core-validated, undoable operation, no silent duplicate (
commitBatch, one undo entry; duplicate-name notice = proposed reading, confirm in U2b contract). - F22: finding added from a selected annotation takes that annotation's zone; no second zone choice (board 18 A).
Not decided: F5, F9-F21. U1 plan at
2e46c14untouched: integration points re-checked, enough. Rationale: U2 rewrites selection/pointer/keyboard model of same canvas +PropertiesPanel→ U2b after it; U3-U6 never touch zone link or findings tree. No core op, no document change (request C:finding_zone_idalready links annotation → zone). Alternatives: U2b after U6 (lessAnnotationFieldsrework, later delivery); inside U2 (too large). « Catégorie de constats » kept (clashes with annotation « Catégorie »). Open: F2 groups, F3 fields, F4 view model, F5, F9-F21. Recorded inV1-2-6_UX_FINDINGS_NAV.md§7,V1-2-6_UX_PLAN.md§3 U2b, contract2026-11-06-v1-2-6-findings-nav-decisions.md. - Status (2026-11-06): accepted, corrected 2026-11-06 after fresh verifier: F22 decision = owner sentence only (« préselectionner sa zone de rattachement. Ne pas imposer une seconde sélection inutile. »); form variant open: fixed zone (board 18 A) or preselected changeable field (literal reading). F8 decision = owner wording (« opération logique atomique, validée et annulable, sans doublon silencieux »); core validation via commitBatch, one undo entry, duplicate-name notice = study's proposed means, confirm in U2b contract.
- Status (2026-11-06): accepted, completed by BDR-104 (F2 leaves, F3, F4 model A, F8, F22 decided 2026-11-06)
BDR-104 — V1-2.6 U2b F2/F3/F4/F8/F22 decided, U1 design confirmed, no implicit sandbox deletion (2026-11-06)
- Status: accepted Decision: owner brief « U1 / U2b — Derniers arbitrages avant implémentation » (2026-11-06). U1 design confirmed; U2b placement between U2 and U3 confirmed. U2b decided in full:
- F2: count selectable leaves only, no intermediate groups; duplicates from several annotations of one zone removed (grasset 25, draft 627). Identity = zone id + node path, never label.
- F3: search FR + EN on names of zones, families, groups, leaves; accent- and case-insensitive; all words must match, any order, across tree levels.
- F4: model A. No annotation ticked → selected views filter their zones; from first tick → explicitly picked zones; intersection with text.
- F8: never auto-create redundant zone; annotation without zone → explicit link to existing zone or validated creation; coherent, undoable, non-destructive; never merge two distinct findings on equal labels.
- F22: finding added from an annotation defaults to its zone; any change of anatomical association = explicit action, no silent move of existing findings. Study reads « par défaut » as variant (b): preselected, changeable field.
- Sandbox rule: plan approval authorises NO data deletion, sandbox included. Each
db:sandbox down/up freshneeds its own explicit owner go (proposed contract clarification 2.9 ofV1-2-6_UX_U1_CHECKPOINT.md, prevails over plan :38-40, :397). Still open: F5, F9-F21 (recommendations only); U2b contract details: F3 œ/æ/’ fold shared with catalogue, other-language display, F8 second confirmation for a duplicate name. U1 authorisation pending: 18 choices, amendments 2.1-2.9, reset procedure. Rationale: leaves = what practitioner records (FindingsTreePicker.tsx:35); facet model gives a view's findings in one click; explicit association avoids silent data moves. Alternatives: F2 all nodes (boards' 29/730); F4 model B picks only; F22 variant (a) fixed zone (board 18 A). Open: see above. Recorded inV1-2-6_UX_FINDINGS_NAV.md§6-§7,V1-2-6_UX_PLAN.mdU2b,V1-2-6_UX_U1_CHECKPOINT.md. - Status (2026-11-06): accepted, precision after fresh verifier: F2 « Identity = zone id + node path » is the study's reading (V1-2-6_UX_FINDINGS_NAV.md §7 F2), not owner wording; « never by label » comes from owner F8.
- Status (2026-11-06): accepted, wording: « decided in full » means decided by the owner; details left to the U2b contract stay open (F3 œ/æ/’ fold and other-language display, F8 second confirmation).
BDR-105 — V1-2.6 U1 final ratification + conditional authorisation; U2b F5, F9-F21 ratified (2026-11-06)
- Status: accepted 2026-11-06 by owner Owner brief « V1-2.6 UX — Ratification finale U1 et autorisation conditionnelle d'implémentation », 2026-11-06. Owner decisions only.
U1: 18 visible choices (checkpoint page §1), approach A, amendments AC3/AC4/AC5/AC7/AC17, changes 2.6-2.9 approved. Plan 2e46c14 stays reference, not redesigned. Two precautions: (1) 2.8 forms unmounted: no silent loss of typed input on 1 024 px crossing or recovery decision; check real components; keep values when safe U1-scope solution exists, else explicit confirmation or precise documented limit with recovery guarantees; out-of-scope need → report block before that work; tests. (2) AC7 save time: check rights of existing endpoint, no permission widening; not readable with normal practitioner rights → « Enregistré · révision n »; never success before server confirmation, never browser clock. Pre-code: independent re-check of 3 unverified confirmation-pass fixes (commitFocusedField before moves, tracing kept on « Aller à », every editor-*.spec.ts per lot from B1) + both precautions; exact verdict; blocking gaps fixed and re-checked first. Then U1 lots A-I authorised, commit + push per lot, no next lot with unmet preconditions.
Sandbox: per-operation go only. Before each db:sandbox down, up fresh or equivalent: stop, read-only inventory (containers, non-seed accounts, sheets, drafts, resources), show exact deletion, wait explicit go. No carry-over of earlier go. DEV never substitute.
U2b (no implementation): F5, F9-F21 approved as recommended (a). Precisions: F3 shared normalisation catalogue + findings, œ/oe, æ/ae, straight/typographic apostrophes; match only in other language shows that label too. F8 same-name zone → reuse proposed; distinct zone after explicit confirmation; no name uniqueness. F11 first annotation in document order, others offered at once. F12/F14 accessible identification, not colour alone, visible names. F13 detail hidden while filtering, state kept. F22 zone preselected, change via « Changer la zone associée », no silent move. U2b after U2, before U3.
Alternatives not taken: plan redesign; global sandbox reset go; U2b now. Status: in force. Supersedes nothing (completes BDR-104).
BDR-106 — V1-2.6 U1 checkpoint: out-of-scope files + 3 rewrites accepted, checkpoint open, exact e2e 188/90/4, RR-13 rights paging track (2026-11-09) (2026-11-09)
-
Status: accepted 2026-11-09 by owner Owner brief « V1-2.6 UX — Décisions au checkpoint U1 », 2026-11-09. Owner decisions only.
-
Accepted: 5 files outside initial FILE SCOPE (CatalogueCanvas.tsx B2a, placeVisibility.ts B2a, editingContext.ts B2b, references/filter.ts D, ShellChrome.tsx F) + 3 one-for-one assertion rewrites (editor-journey.spec.ts:14 8→4 lines, editor-recovery.spec.ts:7 4→2, editor-route-recovery.test.tsx:93 8→5;
expect(per file unchanged 37/41/45; mapping99b669b). Condition: justification + mapping kept in final report (V1-2-6_UX_U1_CHECKPOINT.md§7.2). No general scope widening for later steps. -
U1 status: implementation done, owner validation checkpoint stays open (manual trial). Exact shell suite at
da95b84: 188 pass / 90 skip / 4 fail (admin.spec.ts:717 fr/en × desktop/375). Never claim suite green on last commit. 192/0 at81fba46on fresh sandbox = earlier evidence only. 4 failures = probable sandbox-state dependency (single working-copy slot, WorkingCopyAction.tsx:88), confirm later by non-destructive reproduction or isolated test. No sandbox reset to get green. -
New priority track RR-13 « Pagination côté serveur de la liste des droits et prévention de l'épuisement mémoire », separate from U1 and U2, not implemented now. Future plan: bounded server paging, deterministic order, authorization unchanged, paging + volume tests, admin scenario independence tests, memory check, DEV protected from test-suite side effects.
-
Limits kept in U1, not moved silently to U2: N4, N6, repair result/draft, local recovery copy (sessionStorage), references panel inert, widths (538 px at 1 024/1 280), trial-lan not run.
-
Doc closure authorized: LRN, TODO, BDR, journal, U1 criteria + reservations; docs-only commit + push. ChatGPT review file stays untracked. No app/Rust/SQL/worker/DEV config change, no merge, no deploy, no U2.
Alternatives not taken: sandbox reset for a green verdict; paging folded into U1 or U2; U1 limits moved to U2. Status: in force. Completes BDR-105.
BDR-107 — V1-2.6 U1 trial arbitrations: References tab back, Défaire/Refaire, deselect, generic sheet list, trial stack, anomalies A-C (2026-11-09)
- Status: accepted Owner brief « V1-2.6 UX — Arbitrages du premier essai propriétaire » 2026-11-09, after U1 trial diagnosis. Decided: fifth main tab « Références » between Constats and Vérification; header Références button removed; contextual panel only from finding detail, filtered, « Tout afficher » → tab, ~34 rem, slide 150-200 ms, prefers-reduced-motion honoured; tiles collapsible, search + clear, sort doc order (default) / A-Z / citation count / type, sort never touches document, reorder only in doc order; <640 px Références in « Plus ». History « Défaire » / « Refaire » (T15 history part superseded, form « Abandonner » kept). « Désélectionner » near « Supprimer »; Escape deselects when no dialog/priority panel/menu/tracing consumes it; deselect = UI state, no doc change, no history; empty-canvas click left to U2. Sheet list: search + clear, sort last modification (default) or name, date visible, better admin home card; no section by UUID/name/slug/test convention, generic, no test filter. Dedicated persistent manual trial stack separate from sandbox (plan only). Test anomalies A fictitious fingerprints, B working copy never archived by sheets-admin.sandbox.ts, C silent card integrity failure: tracked apart from U1/U2. Lots R0 boards → R1 labels/deselect → R2 References tab → R3 list → R4 card warning (independent). SQL or Rust change → own checkpoint. Supersedes: U1 AC1, AC3 (header opener), AC4 labels, AC12/AC13 panel target, AC17 panel tests; checkpoint choices 5, 10 (carried), 15; board 11 once R0 validated. Not contradicted: BDR-099 item 5 (catalogue phone card), U2b F5 (panel slot kept). Rejected alternative (owner): UI section for historical sheets, test-data filter in product. Docs: docs/development/V1-2-6_U1_CORRECTIONS.md, docs/development/TRIAL_STACK.md, docs/design/v1-2-6-r0/. Contract .claude/tasks/contracts/2026-11-09-v1-2-6-trial-arbitrations.md. Next: owner validates R0 boards + arbitrations A1-A15; no code before.
BDR-108 — R0 owner decisions: A3 Retirer de ce constat, A6 focus, A7 SQL checkpoint, db:trial with two accounts, graphic validation pending (2026-11-09)
- Status: accepted
Owner brief « R0 — Décisions propriétaire et dernière validation graphique » 2026-11-09, on R0 report (BDR-107).
Ratified: A3 « Retirer de ce constat » in finding panel, removes citation link only, reference stays in document, undoable via editor history. A6 focus after Désélectionner → annotation row if still exists else drawing; focus return never reselects; accessible announcement. A7 dedicated SQL checkpoint for true last-modified date (docs/development/V1-2-6_R3_SQL_CHECKPOINT.md,
last_modified_at= greatest(sheet, versions updated_at)); until then no creation date shown as modification date, no misleading sort → R3 ships search + name sort first. Trial stack:pnpm db:trialapproved;db:sandbox trial*kept provisionally, not removed nor silently redirected; two accounts (owner/admin; practitioner with editing rights — O1 makes sheet_editor need admin role, flagged); suites must not reach it; volumes preserved, resources capped, secrets renewable (rotate-keys + rotate-secrets). Anomalies A/B stay independent tracks. R4 accepted as independent display fix, fingerprint check unchanged. Boards 23-30: functional direction approved, graphic rendering NOT yet validated. Asked: review archive (8 boards, contact sheet, REVUE, CORRECTIONS, TRIAL_STACK + full A1-A15 table), targeted independent counter-check of last two conformity fixes, honest impeccable detect status + compliant proposal. No R1-R4, U2, U2b; no code, SQL, script, stack change.
BDR-109 — R0 graphic verdict: approved with corrections 23/24/26, A1-A15 settled, SQL design accepted, impeccable observations kept (2026-11-09)
- Status: accepted Owner verdict « R0 — Verdict de revue graphique propriétaire » 2026-11-09: R0 graphic direction APPROVED WITH THREE TARGETED CORRECTIONS. 25, 27, 30 approved; 28, 29 approved for post-SQL-checkpoint state. Fixed: 23 cited reference shows no Supprimer, hint « … « Aller à », puis « Retirer » dans le détail du constat ou de la famille » (existing editor.action.remove, exact for family citations), uncited keep Supprimer; 24 D note moved to annotation; 26 draws U1 ToolColumn icon-only + KeyboardAdd row; 28/29 annotations = post-checkpoint state. 25/27/30 byte-identical (board 23 frame shortened 78 px to keep positions). Arbitrations: A1 A2 A4 A5 A5b A8 A9 A10 A11 A15 ratified per exact recommendation; A3 A6 A7 A12 kept. A13 two accounts: owner/admin; practitioner = technical admin + sheet_editor, no owner/reviewer/publisher, not a production profile, O1 unchanged. A14 one-year keys on dedicated local stack, documented rotation, no secret in Git/logs, security review of renewal. SQL last_modified_at design accepted; no migration created/applied; R3 split before/after kept. impeccable detect 4.1.0 offline from cache (owner run + rerun after fixes): 2 observations overused-font Inter (app token --font-sans) and cream-palette #ECE6DA (mockup backdrop only; app bg #fbf9f5); kept by owner decision, documented.
BDR-110 — R0 graphically validated: boards 23-30 reference for R1-R4 after closing counter-check CONFORME (2026-11-09)
- Status: accepted
Owner brief « R0 — Autorisation des trois dernières corrections graphiques » 2026-11-09. Applied: 28 inherited A7 fallback note + REVUE « Repli A7 » row removed, final rule = no reliable last-modified date and no date sort before SQL checkpoint, real date + sort after it is validated and applied; 26 A6 note complete (row if exists else drawing, focus never reselects, announcement « Aucune annotation sélectionnée. » / "No annotation selected."); 24 A uncited reference cr-l243-3 open with Supprimer (existing confirmation), cited = hint only. 25/27/30 byte-identical since
45f1cce(heights compensated, disclosed). impeccable 4.1.0 offline third run: same 2 observations kept. Fresh closing counter-check CONFORME (10/10 items, 9/9 render hashes, scope incl. SQL checkpoint doc via BDR-109 clarification). R0 GRAPHICALLY VALIDATED: boards 23-30 = reference for R1-R4. Review archive ~/faunosteo-v1-2-6-r0-maquettes.zip rebuilt. Next: R1-R4 each need own owner go; SQL migration needs own go.
BDR-111 — Trial app served on LAN 192.168.1.100:5194 during dev (owner connects via LAN) (2026-11-11)
Decision (owner 2026-11-11, verbatim: « il faut relancer le serveur sur --host on va se connecter systematiquement sur 192.168.1.100 pendant le dev »): during dev the owner always connects through the LAN address 192.168.1.100. Trial app = pnpm db:trial app with default host (FAUNOSTEO_DEV_HOST = 192.168.1.100) → Vite binds 192.168.1.100:5194 only (never 0.0.0.0), Host allowlist keeps other names out (403). Never start it on 127.0.0.1 by default.
Supersedes the 127.0.0.1:5194 / « ne pas ouvrir l'application sur le LAN » line of the owner brief « DB TRIAL — Checkpoint sécurité et autorisation des comptes » (same day).
Why coherent: trial GoTrue SITE_URL / API_EXTERNAL_URL / redirect allowlist already = http://192.168.1.100:5194 (set at create and rotation from trial_host); a 127.0.0.1 app origin mismatches GoTrue links.
Trade-off: app proxies signed-in sessions to the trial gateway; reachable by every device of the private network. Firewall not changed (ENVIRONMENTS.md §3 owner action). Playwright LAN tests still gated by arbitration 2 (environment check before any LAN test): this decision covers manual use of the app only.
Apply: every later trial session starts the app on 192.168.1.100 unless owner says otherwise; same for pnpm dev (already LAN by scripts/dev-env.sh).
BDR-112 — db:trial owner grant needs one verified TOTP factor (narrows BDR-083 to non-trial stacks) (2026-11-11)
Decision (owner 2026-11-11 « Modification de la règle MFA »): db:trial stack only, one verified TOTP factor suffices for owner grant, as for admin and practitioner; second factor optional backup.
Narrows BDR-083 Shape "first owner: enrol 2 factors first, role assigned last by operator" → db:trial carve-out only. Every other stack (production included), V1-2 §5.6/§5.7.1/§5.7.7 procedure text, IDENTITY.md recommendation: unchanged until distinct study + owner authorisation.
Kept: verified TOTP before owner/admin (count before typed confirmation + recount >= :need inside grant tx, \gset zero rows → rollback); catalogue rights need has_verified_totp (+ admin for editor/publisher); aal2 in RPCs/policies; SQL untouched; no bypass.
Where: scripts/db-trial.sh grant_platform_role local need=1 (owner branch need=2 dropped), harness 375/0 (0 factors refused, 1 granted, 2 granted, tx recount 0 refused); SUPABASE.md §5.2; V1-2 §5.7.1 step 2 dated note + §5.6 pointer. Commit 45d7453; contract .claude/tasks/contracts/2026-11-11-trial-owner-one-factor-2050.md; verifier CONFORME 7/7, security PASS, 3-lens challenge folded.
Alternatives: keep 2 for owner (rejected by owner: trial friction); change SQL/production rule (forbidden without study).
Trade-off: one-factor owner losing device → no second path; recovery = V1-2 §5.7.7 by hand at trial db, or new account via grant (SUPABASE.md §5.2).
BDR-113 — R1 editor deselection paths and Escape priority (D6b press-based rule; editor only) (2026-11-12)
- Status: accepted (owner 2026-11-12; R1 editor only; manual db:trial check pending)
Decision (owner GO 2026-11-12 « GO R1 COMPLET + D6b », gates G1/G2): R1 sheet editor only: deselect paths = « Désélectionner » button, Escape, empty press on drawing (D6b). Scope: editor AnnotationCanvas + its read-only twin (CatalogueCanvas
onEmpty, editor-only). NOT a general rule for other components; catalogue reader (SheetRoute) unchanged (BDR-099 item 5). D6b rule: verdict from the PRESS (src/catalogue/useEmptyTap.ts): pointerdown target without[data-anno-id], primary, button 0, no second pointer anywhere (document capture listener), no contextmenu, accumulated move ≤ 4 px. Mouse → act at pointerup, swallow next click. Touch + pen → act in tap's own click, only if click target has no[data-anno-id](pen = controller ruling after code review; cost: rare second tap after field blur-rebuild). Escape order (A5, validated, must hold): dialog > « Plus » menu > references panel > tracing > selection. Text field keeps Escape. Only SHOWN annotation body acts (usePlaceVisible), via document keydown listener while selection resolved, no tracing, no references open, nodialog[open]; target body or inside[data-editor-workspace]. Focus (G1, owner): button → A6 (row else drawing box); Escape from properties panel → A6; Escape elsewhere and drawing press → focus stays / canvas box. Announcement « Aucune annotation sélectionnée. ». G2: « Supprimer » style unchanged. Alternatives rejected: decide from click target (pointer capture retargets click of selected marker press; blur-commit rebuild drops click); deselect at pointerup for all pointers (touch click lands on shifted layout); Escape registry in workspace (hidden kept body cannot hold focus → per-body listener simpler). Refs: contract .claude/tasks/contracts/2026-11-12-r1-history-deselect-1141.md; plan rev 3 .claude/tasks/plans/2026-11-12-r1-history-deselect-1141.md; commits7dda61d,bbb1668,bbdfd27,a1ee194,132756e, 6ed90ef; docs V1-2-6_U1_CORRECTIONS.md R1 « Behaviour and limits », ANNOTATION-RENDERING.md D6b. Supersedes D6 line « empty-canvas click left to U2 » (BDR-107). Validation: technical (verifier 15/15, security PASS x2, code review fixes landed, e2e:shell 197/4/99 = baseline fails only); owner manual check on db:trial PENDING. - Status (2026-11-12): accepted; R1 validated functionally by owner 2026-11-12 (10/10 manual db:trial +
927537bvisual check)
BDR-114 — R2 Références tab: display sort/search in TS, provisional EN labels, anomaly B fixed apart, GO after R1 visual confirmation (2026-11-12)
- Status: accepted (owner 2026-11-12)
Decision (owner 2026-11-12 « Validation du plan R2 » + « Validation finale R1, correctif E2E et GO R2 »): R2 = Références tab (D1-D4, A1-A4, boards 23-27), sub-lots R2.0-R2.6, one commit + push per validated sub-lot.
A. Sort + search of references for display in TypeScript: pure over reference ids; never mutate document, stored order, ids or undo/redo history. Exception to BDR-043 (Rust by default) written in
RUST_ARCHITECTURE_REVIEW.mdPart II. Why: display ordering only; locale collation viaIntl.Collator(Rust equivalent needs ICU);filter.ts,citations.tsalready TS. B. EN labels ofdocs/design/v1-2-6-r0/REVUE.md= provisional working basis, NOT ratified one by one; exhaustive FR/EN table of new/changed R2 labels with ambiguities flagged, app terminology kept, shown at R2 checkpoint before final validation. C. Anomaly B (admin.spec working-copy dialog on historical sheet, slot taken by sandbox suite copy 8c315a12) fixed apart, before R2, own commit: isolated fixture (seedOfficialSheet, real core fingerprint), suite archives only copies it created, no existing data changed or deleted, assertions not weakened. Fails or needs existing data → stop, R2 not started. Gate lifted: R1 visual confirmation of927537bobtained 2026-11-12 (R1 validated functionally). Constraints: sandbox-only automated tests; no SQL migration, Rust/worker, roles, MFA, secrets, trial data, historical sheet or manual working copy change; no merge/deploy; R3/R4/U2/U2b not started. Alternatives rejected: sort/search in Rust core (no gain, ICU weight, no document impact); EN labels ratified en bloc (owner wants per-label check); set-aside/restore of existing copies like editor-equine (modifies existing data). Refs:.claude/tasks/TODO.mdR2 block (a1d4084),docs/development/V1-2-6_U1_CORRECTIONS.md§R2,docs/design/v1-2-6-r0/{ARBITRAGES,REVUE}.md, BDR-110.
BDR-115 — R2 Références tab: owner-validated choices and 2026-11-13 corrections, pending manual validation (2026-11-13)
- Status: implemented, pending owner manual validation on db:trial
Context: R2 « Références » tab (V1-2.6) built 2026-11-12 (
52aac41), owner brief 2026-11-13 (reviewed with ChatGPT) validated functional choices WITHOUT final validation, asked corrections before db:trial trial. Status: R2 implemented + corrected, PENDING owner manual validation on db:trial; nothing merged, nothing deployed. Decisions: - Read-only flip (width < 1024) keeps citations panel open (not a close, criterion 15 amended). Refused draft never dropped silently: tile in edit pinned (editingKey) through flip whatever search/sort; drop said once in polite live region + visible note in tile; forced close names every refused field once; flip adds no history entry (C1
3303530,1e19479). - « Annuler l'ajout » on draft tile + Escape (non-text target, or pristine text field; never during IME composition): document + undo/redo untouched, focus back to « Ajouter une référence » (C2
d177992,c8109af). - Pinned tile outside search shows « Ne correspond pas à la recherche » (aria-describedby); « Aucun résultat » only when no tile shown, add draft excluded (C3
b1fd896). - 667×375: trigger reachable by touch, proof only, no app code (C4 969a5f3..78fb2d0). Rotation-at-scroll-0 cramped exception kept, auto-scroll offered as option.
- User leave with several refused fields focuses first refused field WITH its own error (final review I1,
94f8a8b). - Draft dropped with its tile (header « Défaire »/« Refaire » removes the reference in edit) announced once from the drop callback via surviving AnnounceContext; panel tiles silent during panel's own forced close (hostLeaving, relies on React 19 parent-first layout cleanup, guarded by forced-close count test) (verifier gap,
cb1ad47). - New keys provisional EN: add_cancel fr « Annuler l'ajout » en « Cancel adding »; outside_search fr « Ne correspond pas à la recherche » en « Does not match the search ».
Stated limits (owner to ratify): undo/redo replacing pending draft in still-mounted view overwrites typed text silently; two drops in one flip speak only last (visible notes remain); full page reload out of scope (recovery copy rules); rotation cramped exception; admin.spec red on accumulated sandbox (BLK-015).
Alternatives rejected: close panel on read-only flip (loses context); drop slot in a store (StrictMode, scope) → tile-local; rotation auto-scroll (scope, offered); per-field error map in useEditCommand (every panel uses it).
Refs: plan
.claude/tasks/plans/2026-11-12-r2-references-tab-1730.mdrev 5/5b, contract criteria 15, 21-29,docs/development/V1-2-6_U1_CORRECTIONS.md§R2, BDR-114, BLK-015.
BDR-116 — R2 finish: editor dialogs, view state in browser history, filter by finding (2026-11-13)
- Status: accepted Context: owner R2 trial 2026-11-13, UX finish of sheet editor (plan .claude/tasks/plans/2026-11-13-r2-ux-finish-1624.md R2F-1..9, gate approved). Decision: finding + reference add/edit/detail in D13 modal dialogs, transactional forms (one undo entry per changed save, BDR-050 amended for dialogs). Citations panel = modal side sheet over finding dialog (D2 kept: from finding only). Editor view layers (tab, section, dialog by element key, sheet, references filter by finding key) live in history.state via react-router navigate state (src/editor/history/{entry,useEditorHistory}.ts); never typed text, search, draft. Entry owned by sheetId+userId, foreign entry -> default view; reload drops forms; read-back allowlisted + length capped. « Tout afficher » filters by finding with removable chip (A3 amended). « Plus » = overlay dropdown, CloseWatcher closes it first (board 27 A amended). Sidebar sticky top-0 h-dvh. No new mockups: owner brief + gate = validation (docs/design/README.md addendum 2026-11-13). Clients/animals list searches NOT in history (BDR-078 stands). Alternatives: URL params (rejected: leaks into links, A2), data router + useBlocker (rejected BDR-078), inline forms (owner asked modals). Limits: delete replaces dialog entry (one dead Back); POP during pending Back can swallow a same-instant move; CloseWatcher stub-proved only; outside tap only closes « Plus »; multi-entry Back out of editor drops dirty dialog draft -> content-free sessionStorage flag, notice once on next mount (src/editor/leftDraft.ts). Status: built, awaiting owner trial on db:trial. Commits 553a0e5..021685f on feature/v1-2-anatomical-sheets.
BDR-117 — R2 closure after owner trial 2026-11-14: edit-only citing, session tag, leave confirm, U2 orientation (2026-11-14)
- Status: accepted
Context: owner R2 trial 2026-11-14 validated main journeys; asked last fixes + U2 orientation.
Decision: (1) citing/removing references only in finding edit form, part of transactional save (one undo); view = « Références citées » + « X références »; sheet read-only (no « Retirer de ce constat »); draft citations reach sibling sheet via zustand store citationDraft.ts (shortcut). (2) deletion pops dialog entry (first Back moves); first Défaire reveals restored finding (store
revealed). (3) « Plus » pick focuses new tab panel. (4) history entries carry random 128-bit session tag, not account id; tag record in sessionStorage bound by FNV-1a fingerprint salted with tag (sync, works on http LAN); rotated on sign-out/mismatch. (5) multi-entry traversal leaving editor with dirty dialog: Navigation API navigate event preventDefault (cancelable same-document traverse, verified Chromium 156 incl. CDP history jump), cascade ask top-down, only layers a Back removes are asked; fallback no API/not cancelable = content-free left-draft flag + notice; sign-out with dirty dialog = salted flag, notice at same account's next sign-in. U2 orientation: properties in modal dialog, geometry direct on canvas; click without move opens dialog, drag never does; point size slider stays on canvas strip; boards 02-06, 13 redraw + owner validation before U2 code. U2 not started. Owner-accepted limits: same-instant move vs Back race, « Aller à » view mode, search kept across tabs, first outside tap closes « Plus » only. To confirm: CloseWatcher on real Android, cascade limit, browser matrix (Firefox/Safari unverified). Status: built afc1051..f8be0ad, awaiting owner final manual checks (OWNER_TRIAL §4.12).
BDR-118 — References dialog replaces citations side sheet; one tab order (2026-11-15)
- Status: accepted
Owner 2026-11-15: finding dialog keeps only « Références citées » + « X références » (view and edit). Button opens references dialog (Dialog layer, native) stacked over finding dialog, replaces side sheet (board 25). View mode read only; own « Modifier » = draft of adds/removes on current reference_ids: cite existing, remove, « Nouvelle référence » (created then cited in draft), « Modifier la référence » (stacked reference dialog). One save = one update = one Défaire. Families too (isCitable). Guard layer
citationsbetween finding and reference; LAYERS_TOP_DOWN derived from LAYERS.{create}over citations never read back from history. Tabs: one order everywhere; phone shows Général + Annotations, « Plus » vertical list with Vérification error count. Rejected: citations in finding edit form (Rev 4, owner reversed). Status: built b41c24b..ebd1d6d, awaiting owner db:trial check. - Status (2026-11-15): shipped: validated by owner db:trial 2026-11-15, R2 closed
BDR-119 — Citations draft owns creations and explicit cite (2026-11-15)
- Status: implemented, awaiting owner db:trial Owner pre-closure brief 2026-11-15. Reference created from references dialog edit mode held in draft (created[]), written with citations by one commitBatch (inserts + update = one undo); abandon leaves library unchanged. Dry-run applyEdit validates at draft submit. Select only browses, « Citer » button cites; save with pending choice refused. Family labels via isFamilyKey (finding key path len 1), 18 _family keys. Shared Dialog close 44px. Alternatives: write-now + delete on abandon (two undo steps, rejected); fold existing-reference edits into draft (offered to owner, not done).
- Status (2026-11-15): shipped: validated by owner db:trial 2026-11-15, R2 closed; both offered choices ratified as built
BDR-120 — R3 sheet list + admin home closed by owner, phone filters panel (2026-11-16)
- Status: accepted
Decision: R3 closed 2026-11-16 by owner after db:trial trial. Sheet list: search fr/en, sort by true last_modified_at (M9
private.official_sheet_admin_summary) or name, count line, Paris date, « indisponible » when date missing/unreadable (never fallback date). Home card: latest five + « Voir les {n} fiches ». Phone (<640 px): four filters in CSS-only collapsible panel (grid-rows 0fr→1fr,visibility:hiddenclosed, « Filtres (n) »), reset only inside panel (owner confirmed, no other button). Filter-only empty line not a live region: count line announces once. Rationale: owner trial passed; desktop layout unchanged; no JS viewport detection; closed panel height 0 asserted at 375 px. Alternatives: reset button outside panel (rejected by owner);inerton panel (would disable desktop grid); motion lib (CSS enough). Open, separate: BLK-015, RR-13 (admin lists paging, server search), pgTAP 014/021 on accumulated sandbox, D5 keep list state on back. No merge, no deploy, DEV unchanged.
BDR-121 — R4 catalogue card integrity closed by owner, test sheets archived (2026-11-17) (2026-11-17)
- Status: accepted
Decision: R4 closed 2026-11-17 by owner after manual trial on
pnpm db:sandbox trial(§4.16, account praticien@trial.local, catalog_reader only). Catalogue card says its own failure: integrity class (fingerprint, drawing hash, drawing missing, invalid document) → A10 line error tone, no retry; caps → own existing text, no retry (D1 alternative); other kinds → existing text warning tone + per-card « Réessayer »; view not drawable → neutral line (D2). « Consulter » always kept, check never bypassed, sheet page unchanged. Owner rulings at closure: e2e test sheets archived (not deleted) viaprivate.set_sheet_statusby captured id + name read-back; rules on sheets with published version unchanged (delete_anatomical_sheetstill refuses); out-of-scopeCard.tsx(aria-busy) ande2e/support/records.ts(capturedId) accepted. Rationale: owner trial pass; soft delete of a published-history sheet = state no screen reaches, archive reachable + inside owner's authorisation. Alternatives: soft delete (rejected, breaks §6.9); one engine retry for all cards (R-7, per-card kept); live region per card (burst at load, rejected). Open, separate: BLK-015, RR-13, anomaly A (4 « Cheval sandbox » fingerprint_mismatch). No merge, no deploy, DEV unchanged.
BDR-122 — U2 design boards and A1-A15 validated by owner, three adjustments (2026-11-17) (2026-11-17)
- Status: accepted
Decision: U2 design validated by owner 2026-11-17 after external graphic review (ChatGPT): nine boards
docs/design/v1-2-6-u2/+ A1-A15 as recommended. Deviations from 2026-11-14 orientation accepted: A1 first click/Enter selects only, second click, double-click or « Propriétés » opens dialog, creation dialog opens itself after placement/trace close; A2 dialog over right column, never over drawing; A3 overview column stays. Three adjustments at implementation, boards not redrawn: A13 discreet contextual two-finger pan hint on tablet; A14 message line never moves/resizes drawing; board 33 validation messages name only fields actually missing. Rationale: selection without dialog keeps successive shape corrections cheap; skeleton stays visible; list stays keyboard path. Alternatives: orientation rules 1 and 6 literal (dialog per click), dialog over drawing, column removed (rejected by owner choice). Next: U2 technical plan + challengers, owner gate before code. No merge, DEV unchanged.
BDR-123 — U2 plan validated: D1 repair coords until U5, D2 zoom hint, mode guard when started (2026-11-17) (2026-11-17)
- Status: accepted
Decision: U2 plan rev 2 validated by owner 2026-11-17, implementation authorised (plan rev 3, contract
2026-11-17-v1-2-6-u2-implementation.md). D1: RepairDialog keeps coordinate fields until U5; A8 = normal annotation journey only. D2: « + » hidden on segments too short at current zoom, zoom reveals; while selected zone has hidden « + », strip shows discreet « Zoomez pour ajouter un sommet sur les segments courts. » (R-18). R-12 corrected: move mode / redraw end at once on navigation when nothing started; ask (« Abandonner le déplacement ? » / « … nouveau tracé ? ») once position changed or vertex placed; « Annuler », Escape = explicit, immediate. No silent loss: read-only flip suspends started mode; document change elsewhere dropping it is announced. Confirmed: veil ignores clicks, double-click opens, strip/messages no shift, read-only keeps properties readable, touch/loupe/gestures; A13, A14, board 33 as integrated. Rationale: precision without accidental insert; no silent loss of started work. Alternatives: RepairDialog redone in U2 (rejected: rare, redesign of decision 7); all « + » always shown (rejected: mis-tap inserts); silent cancel of modes (corrected by owner). Next: execute plan Tasks 1-10; owner trial onpnpm db:trialbefore U2 closure. No merge, DEV unchanged.