chore(memory): functional inventory, roadmap proposal, release readiness track
ci / rust (push) Canceled after 0s
ci / check (push) Canceled after 0s
ci / docker (push) Canceled after 0s
ci / supabase (push) Canceled after 0s

This commit is contained in:
bchanot committed 2026-10-25 15:06:37 +01:00
1 parent d6306ff448
commit 0c54e4b3c3
3 files changed
+113

No files matched your search

@@ -0,0 +1,96 @@
# Faunosteo functional inventory and roadmap proposal (2026-10-25)
Owner brief « Clôture officielle R0–R5 et reprise de la roadmap produit ». Read-only survey of `develop` at d6306ff
(four parallel read-only analyses: identity and roles; care data, PDF and sheets; agenda, billing, notifications, public web,
lifecycle; i18n, mobile, accessibility, tests and release inputs). Sources: `faunosteo-business-architecture.md`,
`docs/development/IMPLEMENTATION_PLAN.md` (27 steps), `OPEN_QUESTIONS.md`, `DOMAIN_MAP.md`, `docs/design/README.md`,
`.claude/memory/decisions.md`, the code, the 9 migrations, the tests. Proposal only: no decision taken here, no code changed.
Status legend: DONE = implemented and tested end to end from the UI; PARTIAL; PLANNED = in the plan, nothing usable;
DECISION = undefined or blocked by an owner decision.
## 1. Inventory
| Domain | Status | What a user can do today | Evidence | Blocking decisions |
|---|---|---|---|---|
| Auth and accounts | PARTIAL | sign-up with email confirmation, login, recovery, password change, sign-out, guarded `/app` (DEV only) | `app/App.tsx`, `packages/supabase/src/auth.ts` (13 failure kinds), `config.toml` (12-char policy), tests auth.validation 12, guards.RequireAuth 5, LoginRoute 7, SignupRoute 3, authStore 9; no unit test for Forgot/Reset/Callback | Q7 providers; OAuth (none enabled, Apple paid account); MFA enrolment absent |
| Practitioner profile | DONE (declared scope) | edit personal, professional (practice, title, SIRET format), preferences, locale synced, avatar via the Rust worker | migrations profiles + profiles_professional + files_foundation, pgTAP 002/009/010, AccountRoute 5, AvatarSection 9, e2e avatar 5 (manual) | professional data unverified (Step 9); tabs and "Cabinet et activité" fields of the mockup not built |
| Clients and owners | PLANNED | type an owner name inside a bilan | `Owner = { name }` in the report; bucket `client-files` closed | C4 (global client record), C5, C6, Q6(b), consent texts |
| Animals, multi-species | PARTIAL (model) | pick "Cheval", type name, breed, age inside a bilan | species table with one row; generic sheet model (ordered regions, free codes); `DEFAULT_SPECIES_ID = 'equine'` | next species and who authors its sheet; animal record (sex, owner, DOB, id, weight, photo, deceased) = Step 12 |
| Bilans, observations, history | PARTIAL | full editor in the local tool (zones, findings, laterality, vertebrae, severity, comments, conclusion, recommendations, next appointment), draft kept in the tab | `reportStore`, `persistence.ts` (sessionStorage), 61 app test files (heldSession 20, reportStore 15, quarantine 13, AnatomyCanvas 11, EditorRoute 9) | no server storage, no history per animal, no status, no quota: Steps 11 to 14, C11, Q6(a) |
| PDF export, sharing | PARTIAL | export A4 PDF (archive envelope v1), re-import v2/v3/envelope or rescue JSON in the local tool | `crates/core/src/pdf`, `apps/app/src/pdf`, pdf.roundtrip 18, pdf.goldens 6, HomeRoute.import 7, core.importWorker 7, n-1.reader 5 | sharing absent although the sign-up screen promises « partage avec les propriétaires » (`fr.ts`, `auth.brand_note`); import for external users gated (BDR-040, PDF_IMPORT_HARDENING §5); Q1 |
| Appointments, calendar | PLANNED | a date or period typed in the bilan, printed in the PDF | `nextAppointment` (report v3), `profiles.timezone` | Steps 19 to 21; calendar library, routing provider, token encryption |
| Booking, payments | PLANNED | nothing | no table, no Stripe code | prices proposed only (€9 / €100 TTC, free = 5 completed reports), cabinet price open, Stripe Tax |
| Reminders, notifications | PLANNED | GoTrue auth mails only (default templates, Mailpit in DEV, no production SMTP) | `config.toml` `[local_smtp]`, no `supabase/templates` | Q7; reminders MVP status contradictory (§34 vs §3.5); consent purposes lack reminder/SMS channel; unsubscribe/STOP not documented |
| Cabinets | PLANNED | free-text practice name only | traces: `audit_logs.organization_id`, closed `logos` bucket | cabinet pricing, seat rules (Steps 10, 11, 23) |
| Teachers, students, verification | PLANNED / DECISION | nothing | closed `professional-documents` bucket, SIRET check; students/professors owned by no plan step | C6, legal document list (§5), which step owns education |
| Roles, permissions | PARTIAL | own role badges shown; grant/revoke only by raw RPC or SQL | `platform_role` (4 values), audited RPCs, pgTAP 003 (28), 004 (12), census 001 (26) | no `has_mfa()`, deactivation SQL only, professional statuses not modelled (BDR-026) |
| Anatomical library, curation | PARTIAL (back office) | nothing from the UI; operator CLI `pnpm import:equine`, `pnpm assets:upload` (local stack) | sheet tables, RPCs, immutability, pgTAP 005 (127), 006, 007, 008, 011; Rust curation pipeline; app reads the bundled draft, never the DB | equine draft unpublished until professional review of REVIEW-REPORT (BDR-034/037); Step 13 provider and GC absent |
| Community sharing | PLANNED | nothing | `fork_anatomical_sheet`, `set_sheet_visibility` RPCs only | Steps 17, 10, 11; verification gate (BDR-033) not wired: any active editor can make a sheet public at RPC level (DEV only) |
| i18n FR/EN | DONE (two gaps) | whole UI, sheet labels (878 + 111 descriptions), PDF labels in FR and EN; locale synced with the account | 350 keys each, i18n.dicts and i18n.keys tests | auth emails in default GoTrue English; `APP_TAGLINE` single-language; no lint rule against raw JSX strings |
| Mobile, accessibility | PARTIAL | responsive shell (drawer, 44 px hamburger), editor stacks below `lg`; device runs J1/J2 declared PASS | `shell.AppLayout` 7, `scripts/visual-canvas.mjs` (manual) | bottom tab bar not built; dialogs without focus trap or restore; canvas zones unreachable by keyboard; no axe test; no WCAG target |
| Admin, moderation | PLANNED (foundation) | nothing from the UI | append-only `audit.audit_logs`, `log_event`, 15 actions; not exposed through the API | Step 25; admin MFA (IDENTITY §4) |
| Imports, lifecycle | PARTIAL | local-tool PDF/JSON import; account cascade to profile, roles, assets and purge queue | `crates/core/src/pdf/read`, STORAGE.md | no export or deletion RPC; `anatomical_sheets.creator_user_id on delete restrict` blocks deleting a sheet creator; legal retention durations |
| Public web | PLANNED / DECISION | faunosteo.com serves the SPA (revision not recorded in the repo) | DEPLOY.md, ENVIRONMENTS.md | domain split (public site, `/app`, local tool), URL scheme (§27 vs Step 22), Q8 marked open although D-R8 (Astro) was validated |
Tests today: vitest app 446, core-wasm 60, supabase 40; cargo core 383, worker 33 native + 16 Docker sandbox; pgTAP 11 files,
446 planned assertions. No automated real-browser test of sign-up, login, account, the full editor flow or mobile navigation
(`apps/app/e2e` planned in TEST_STRATEGY §1, absent); no CI has ever run (BDR-047).
## 2. Usable today
The local tool (no account): new bilan, editor on the curated equine draft, PDF export, re-import, draft kept in the tab, FR/EN.
The account area on DEV: sign-up, login, recovery, profile, avatar. The two are not linked: being signed in changes nothing
in the tool (practitioner block from the localStorage cache, not from `profiles`).
## 3. Incomplete
Bilans live only in the tab and in the PDFs the user keeps. Clients and animals exist only as text in a bilan. The sheet in
the database is never read by the app. Roles have no admin screen. Auth lacks OAuth, MFA, French emails and browser e2e.
## 4. Gaps with the vision
Multi-species (horse only, pipeline horse-specific), cabinets, verification and education statuses, agenda, booking,
payments, notifications, community, admin, data lifecycle, public pages. Mobile-first: shell yes, tab bar and keyboard/a11y
no. Plan text has drifted from the code: verification numbered Step 9 in the plan and Step 11 elsewhere; Steps 19, 21, 23
and BACKEND_ARCHITECTURE §6 still name a Node worker and Edge Functions retired by D-R9; Step 13 DoD says "seed v1 published"
while BDR-037 keeps the draft unpublished; Step 13 and 17 cite deleted legacy tools; the role enum has 7 values in arch §4.1
and DOMAIN_MAP §1, 4 in code (BDR-026).
## 5. Roadmap proposal (to validate)
Principle: vertical steps, each usable end to end on DEV, mobile-first, FR/EN, species-generic data model; the plan's
27 steps kept, regrouped toward a first usable version (V1 = a signed-in practitioner keeps owners, animals and bilans in
the cloud, with history and PDF, on phone and computer).
| Order | Step | Plan steps | Depends on | Needs decisions |
|---|---|---|---|---|
| P0 | Plan refresh (docs only): renumber, retire Node worker/Edge mentions, Step 13 DoD without "published", close or reopen Q8, fold BDRs into OPEN_QUESTIONS | — | — | which OPEN_QUESTIONS are closed |
| V1-1 | Owners and animals of the practitioner (`/app/clients`, `/app/animals/:id`, create, edit, list, search; animal with species, sex, owner) | 12 (reduced) | 7, 8 | C4, C5, C6, consent text, whether cabinets enter the model now (10) |
| V1-2 | Sheet served from Supabase (SheetProvider on the DB, draft readable by the signed-in practitioner, read-only `/app/anatomy`) | 13 (reduced) | 3, 4, 8 | serve a draft to users before professional review, or wait for publication |
| V1-3 | Bilans saved in the cloud, linked to an animal, history per animal, draft/completed, copy from previous; local drafts migrated without loss | 14 (+ 11 skeleton if a quota applies) | V1-1, V1-2 | C11 quota, Q6(a) report-only points, whether the local tool stays |
| V1-4 | Stored PDF artifacts and export from a saved bilan (locale recorded, C14) | 15 (reduced) | V1-3 | Q1 |
| V1-5 | Mobile and accessibility pass on those screens (tab bar, dialog focus, keyboard path in the canvas, axe in tests) | design README, TEST_STRATEGY | V1-1 to V1-4 | WCAG target |
| Next | Cabinets 10, verification 9 + admin MFA, entitlements 11 → billing 23, notifications 19 → agenda 20 → travel 21, public web 22, sheet editor 17 → community 18, imports 24, admin 25, lifecycle 26, hardening 27 | | | per step |
Technical risks that really block: C4 decides the shape of the client tables, which are hard to change once data exists; the
report contract is frozen while Q6 is open (a later `localAnnotations` definition is a version bump); the sessionStorage →
server switch can lose drafts if not migrated; Q2 (hosting) blocks any production backend.
## 6. First recommended step: V1-1 « Propriétaires et animaux »
Why first: every later vertical (cloud bilans, history, agenda, reminders, sharing) needs an animal and its owner; it needs no
provider (Q7), no payment, no publication of the sheet. It needs owner decisions C4, C5 and C6 first.
Acceptance criteria (draft, to validate with the decisions):
1. A signed-in practitioner creates, edits, lists and searches owners (name, contact fields decided by the owner) and animals
(name, species from `species`, sex, breed, birth date or age, owner link), on phone (375 px) and computer, FR and EN.
2. Another practitioner never sees them (RLS by owner, allowed and denied pgTAP cases, cross-account test on the real stack).
3. Every write goes through an audited RPC or an owner-scoped policy as the decision on C4 requires; tables ship with RLS in
the migration that creates them, regenerated types, PGlite and real-stack pgTAP.
4. Validation rules (formats, lengths, required fields) live in `crates/core` and are reached through the wasm facade
(BDR-043); the forms keep Zod for i18n messages only.
5. Screens follow `docs/design/` (Clients, Animaux entries; bottom tab bar on mobile); keyboard and screen reader can complete
the forms; an axe check runs in the suite.
6. Deleting or archiving an owner or animal follows the owner's rule (anonymise vs keep, BDR-033(7)), tested.
7. `pnpm check:all` green, fresh verifier and security gates, no change to the bilan format.
+4
View File
@@ -384,3 +384,7 @@ R5.4: `draft/{labels,changelog,review_report,drawing,overlay,app_review,svg_comp
## 2026-10-25 (R5 merged)
- Owner authorised finish. Pre-checks: branch = origin, develop = origin/develop 9c0117a ancestor, post-gate delta .md only, census 18/18, no secret. `gitflow finish` → merge 9ba2a25 (parents 9c0117a, 505a837), tree = branch tip, feature branch removed local + origin.
- R0-R5 done on develop. Not production: npm advisories (zod 4 first), rollback v1, DEV hardening, cascade debt, SQL checks, export API trust, census LOW stay open. STOP at checkpoint.
## 2026-10-25 (product survey)
- Owner closed R0-R5, asked read-only functional survey + roadmap. 4 parallel analyzers. Inventory `.claude/audits/2026-10-25-functional-inventory.md`; release readiness track RR-1..RR-10 in TODO.
- Finding: local tool and /app not linked; no client/animal/report tables; plan text drifted (step numbers, Node worker, Step 13 "published"). Proposed V1-1 owners + animals first, needs C4/C5/C6. STOP, no branch, no code.
+13
View File
@@ -367,6 +367,19 @@ feat/findings-tree-v2 merged (FindingsTreePicker tracked in HEAD); all work belo
- [ ] Release 0.2.0 (branch release/0.2.0 = Steps 3–6, version.txt + package versions 0.2.0, CHANGELOG [0.2.0] 2026-10-11): deploy-trigger check done 2026-10-12 (CI = branches main/develop only, no tag trigger, no deploy job, docker job builds `faunosteo:ci` locally; hooks push only; DEPLOY.md deploy = manual on the VPS). Default 0.2.0 build carries NO sheet (SHEET_BUNDLE=none) → the live local tool must not be redeployed from main without `--build-arg SHEET_BUNDLE=draft`. Finish via /release-candidate (finish + tag span, tag push on explicit go); CHANGELOG back-merge conflict expected (Unreleased Step 7 above [0.2.0]). Awaiting the user's go.
---
## Release readiness track (owner 2026-10-25, distinct from the functional roadmap; nothing here authorises a release or exposure)
Inventory: `.claude/audits/2026-10-25-functional-inventory.md`. Each item: treat or qualify before any release or public exposure; not fixed now unless an active critical flaw is shown.
- [ ] RR-1 npm advisories (57, pre-existing; published severity kept apart from Faunosteo exposure). Zod 3.25.76 GHSA-mrhx-c7xc-m3w5 first: Zod parses only forms, the practitioner cache and one RPC result, no collection schema found; untrusted files go through the Rust core caps (PDF 50 MiB / 16 MiB attachment, depth 64, 400k values; sessionStorage value budget). Plan zod 4 as its own chore; drop zod from core-wasm `dependencies` if only its tests use it
- [ ] RR-2 fingerprint rollback limit (BDR-070, RUST.md §11.22): choose before a user release: ship the switch with the release, or ship the alias registry in any build that can be rolled back to
- [ ] RR-3 RLS/SQL before exposure: `confirm_sheet_asset_upload` checks no object size/existence (R5.5 L5); guardrails WARN `species_select_active`; SB-RLS-LIVE manual check; verification gate on `set_sheet_visibility` (BDR-033, Step 9); PDF_IMPORT_HARDENING §6 items 12, 15, 18 + device items 5, 6, 7, 9, 20; MFA (`has_mfa()`, enrolment, admin enforcement)
- [ ] RR-4 API trust boundaries: direct export API trusted for what it declares (RUST.md §11.22), `export_from_envelope` L6, RPC surface review (authenticated 17, service_role 9, anon 0), worker service key readable by the docker group (DEPLOY.md)
- [ ] RR-5 production configuration: CSP example in DEPLOY.md lacks `'wasm-unsafe-eval'` and the Supabase `connect-src`; compose publishes 8080 on all interfaces while DEPLOY says 127.0.0.1 (rootful Docker bypasses UFW); stale no-backend DEPLOY sections; Q2 hosting; production SMTP, FR auth email templates, captcha, OAuth ids; DEV hardening (demo keys, 54321 on LAN)
- [ ] RR-6 dependencies and images: base images by tag only (pin digests), cosign, workflow actions by tag, CI never run (BDR-047), release-images never executed
- [ ] RR-7 accessibility: WCAG target to set; dialog focus trap/restore, close button 24 px, canvas zones keyboard-unreachable, no axe test, D2/D5 Context7 items (RUST.md §10.14)
- [ ] RR-8 mobile and end-to-end: real-browser e2e for sign-up, login, account, avatar, full editor flow, export, locale, mobile drawer (TEST_STRATEGY §1 `apps/app/e2e`); per-check device results (J1/J2 recorded as a whole)
- [ ] RR-9 release 0.2.0 fate (Steps 3–6 on TS engines, 341 commits behind develop): ship, supersede, or rebase; sheet bundle default `none`
- [ ] RR-10 census tools maintenance (LOW `#[ignore]` positions) and controlled oracle evolution on a new anatomical changeset
## Phase A — DONE (kept for reference)
- [x] Scaffold (deps, configs, Docker, schemas, stubs)