docs(docs): V1-2.5 start, prerequisites and owner answers
Contract §17.10 (V1-2.1 VERIFIED at ac71c5b, V1-2.2, V1-2.4 approved), §3 EN « Permission », §12.3 M7 admin reads, §16.6 SQL and working-copy action, §16.2 state; step contract and plan.
This commit is contained in:
1 parent
994b04ee73
commit
3d80812cdb
3 files changed
+109
-3
No files matched your search
@@ -0,0 +1,68 @@
|
||||
# Contract: V1-2.5 administration space, rights, species, MFA, catalogue (owner, 2026-11-02)
|
||||
|
||||
Brief « Validation propriétaire V1-2.4 » (2026-11-02): V1-2.5 authorised once its dependencies are VERIFIED,
|
||||
within the existing contract, no new scope. Prerequisites checked on `994b04e` (V1-2 contract §17.10). Plan:
|
||||
V1-2 contract §16.6, with §5.2 to §5.7, §7.2, §10, §11, §15; owner answers BDR-097 (M7 admin reads,
|
||||
working-copy action, EN « Permission »); design reference `docs/design/v1-2-4/` (approved, BDR-096).
|
||||
Step plan: `.claude/tasks/plans/2026-11-02-v1-2-5.md`.
|
||||
|
||||
Kept from the brief: no merge into develop, main or a release; no Supabase DEV operation; no worker on DEV;
|
||||
tests and an independent review fit for the step; commits and pushes on `feature/v1-2-anatomical-sheets`; STOP
|
||||
at the V1-2.5 checkpoint (gates; the owner tries the result at V1-2.6). Sandbox stack only (`pnpm db:sandbox`),
|
||||
never DEV; every command runs from the V1-2 worktree, never from the main checkout. The graphic design is not
|
||||
reopened.
|
||||
|
||||
## Criteria
|
||||
|
||||
- C1 MFA behaviour proven on the sandbox (real GoTrue, §5.6, §5.7.1, §5.7.3, §5.7.4): first factor enrolled
|
||||
at `aal1`; verify reaches `aal2`; a second factor from `aal1` refused; removal of a verified factor from
|
||||
`aal1` refused; removal from `aal2` and what it does to the account's other sessions recorded; a dormant
|
||||
unverified factor verified later recorded; a password change or reset never reaches `aal2`; refresh keeps
|
||||
`aal2`; a new sign-in starts at `aal1`. Expectations are what the pinned image does; if `aal1` can enrol a
|
||||
second factor or remove a verified one, the step STOPS for an owner decision.
|
||||
- C2 Mon compte, Sécurité: add a TOTP factor (QR code, secret shown once, never stored, logged or sent
|
||||
anywhere by the app), verify it with a code, name it, list and remove factors; the `aal2` requirements of
|
||||
GoTrue surfaced as messages, never bypassed; a step-up challenge entering `/app/admin` at `aal1`, no admin
|
||||
data requested before it succeeds.
|
||||
- C3 Navigation (§11.1, BDR-094): « Fiches anatomiques » only for catalogue readers (hint from the caller's own
|
||||
grant rows), one « Administration » entry for capability holders and the owner role, sidebar and drawer; a
|
||||
direct `/app/anatomy` URL without the right shows « Accès non autorisé » (L32) acting on the server's
|
||||
refusal, the same whether the sheet exists or not; signed out → login. Hidden entries protect nothing.
|
||||
- C4 Administration (board 10, §11.1): the page lists the caller's permissions and session state; cards
|
||||
« Fiches officielles », « Espèces », and « Accès et habilitations » for the owner only; each account sees only
|
||||
the entries and actions its capabilities allow (reviewer-only: no « Nouvelle fiche », « Créer une copie de
|
||||
travail », « Accès et habilitations », species creation or activation).
|
||||
- C5 Sheets (A1, W1 start): `/app/admin/sheets` every official sheet with the historical and working-copy
|
||||
badges and the filters species, sheet status, version status, round status, through M7; `/new` species
|
||||
(inline creation of an inactive species), names, slug, from the core's empty document; `/:sheetId` overview
|
||||
with versions and rounds; « Créer une copie de travail » on the historical sheet, disabled with its
|
||||
explanation while a copy is active; creation and copy land on the overview (editor in V1-2.6).
|
||||
- C6 Species (S1, §7.2): `/app/admin/species` active and inactive species; creation and editing of an
|
||||
inactive species (E); activation and renaming (O); the animal forms unchanged until activation.
|
||||
- C7 Rights (A0, §5.2): `/app/admin/access` (owner): find an account by e-mail, grant with reason,
|
||||
verification note (capabilities) and optional expiry, revoke with a reason; active, expiring (30 days),
|
||||
expired and revoked grants with their reason and note; `aal1` attempts refused in the UI and in SQL.
|
||||
- C8 Catalogue (P1, boards 01 to 03, complementary page): `/app/anatomy` published sheets by species, search by
|
||||
sheet name only, species filter; `/:sheetId` current version (views, zones, findings, references, disclaimer,
|
||||
earlier versions); `/:sheetId/versions/:number`; loaded through `get_sheet_version` and `PreviewSheet`
|
||||
(hash, fingerprint, caps checked by the core); whole drawing at opening on a phone, zoom and pan after;
|
||||
drafts never listed; archived sheets absent from the list and readable by id; Supabase or core unavailable
|
||||
→ the unavailable notice.
|
||||
- C9 M7 `sheet_admin_reads`: read RPCs only, capability holders at `aal2` (`caller_can_see_official_sheet`),
|
||||
one answer for unknown and forbidden ids; no write path, grant widening, policy or rule change; pgTAP allowed
|
||||
and denied cases (anonymous, reader, admin without capability, capability at `aal1`); types regenerated; a
|
||||
fresh install and an upgrade from the M6 state on the sandbox.
|
||||
- C10 Labels: ratified wordings used verbatim (V1-2 contract §3 with BDR-097, REVUE.md tables); every new
|
||||
FR/EN string goes through i18n and is listed at the checkpoint as a proposal; every failure kind the screens
|
||||
meet has an FR and an EN message.
|
||||
- C11 Tests and gates: unit; `e2e:shell` A0, A1, S1, P1, access per right, MFA required, refresh keeps `aal2`,
|
||||
no `aal1` enrolment of a second factor, axe, 320 to 430 px for the catalogue, 375 px for admin screens, FR
|
||||
and EN; `pnpm check:all`; fresh verifier against this contract; fresh security audit. Nothing reported as
|
||||
passed that did not run.
|
||||
- C12 Docs: IDENTITY.md (MFA screens, step-up, recorded GoTrue behaviour), V1-2 contract state, CLAUDE.md
|
||||
folder map, design README owning steps, TODO, memory.
|
||||
|
||||
## Out of scope
|
||||
|
||||
The editor (V1-2.6), the review and publication screens (V1-2.7), deprecation and archive actions (V1-2.7),
|
||||
the equine working copy content work (V1-2.8), any DEV operation (§16.11), recovery runbook rehearsal (V1-2.9).
|
||||
@@ -0,0 +1,19 @@
|
||||
# Plan: V1-2.5 administration space, rights, species, MFA, catalogue
|
||||
|
||||
Contract `.claude/tasks/contracts/2026-11-02-v1-2-5-admin-catalogue.md` (C1 to C12). Branch
|
||||
`feature/v1-2-anatomical-sheets`, sandbox only. One slice = one coherent change, committed and pushed when its
|
||||
own checks pass. Slices A, B and C have no dependency on each other; D needs B and C; E to I need D.
|
||||
|
||||
| Slice | Content | Criteria | Checks |
|
||||
|---|---|---|---|
|
||||
| A | GoTrue MFA behaviour on the sandbox: `packages/supabase/tests/sandbox/mfa-behaviour.sandbox.ts` with the existing `mfa.ts` / `totp.ts`; findings written into IDENTITY.md. STOP for the owner if `aal1` enrols a second factor or removes a verified one | C1 | sandbox suite |
|
||||
| B | M7 `supabase/migrations/20261102100000_sheet_admin_reads.sql`: `list_official_sheets_admin()`, `get_official_sheet_admin(sheet_id)`; pgTAP `022`; types; sandbox fresh + upgrade from M6 | C9 | PGlite, `db:sandbox test-db`, `db:types --check` |
|
||||
| C | Core op `sheet.empty` (wraps `create_empty_sheet_document`: species, names, slug), wasm facade, ts-rs types | C5 | `rust:check`, `wasm:build`, core-wasm proofs |
|
||||
| D | `packages/supabase`: MFA wrappers (list, enrol, challenge and verify, unenrol, assurance level), species, working copy, account lookup, M7 reads, catalogue reads (versions of a sheet, drawing download), closed failure kinds; unit tests | C1-C9 | `test:run`, typecheck, lint |
|
||||
| E | Shell: nav entries and their hints (own grants + roles), guards `RequireCatalog` and `RequireAdmin` (step-up), « Accès non autorisé » page, routes | C3, C4 | unit, e2e |
|
||||
| F | Mon compte, Sécurité: factor list, enrolment (QR, secret once), verification, naming, removal; step-up screen | C2 | unit, e2e |
|
||||
| G | Administration page (board 10), species screens, rights screen | C4, C6, C7 | unit, e2e |
|
||||
| H | Sheets list with filters, creation (inline species), overview, working copy action | C5 | unit, e2e |
|
||||
| I | Catalogue list (board 01), sheet page (board 02, 03), version page; `PreviewSheet` load path, canvas with zoom and pan | C8 | unit, e2e |
|
||||
| J | `e2e:shell` journeys A0, A1, S1, P1, access per right, MFA, refresh, axe, viewports, FR/EN | C11 | `pnpm e2e:shell` |
|
||||
| K | Docs, `check:all`, fresh verifier + security, memory, checkpoint report with the label proposals | C10-C12 | all gates |
|
||||
Reference in new issue
Block a user