docs(docs): R0 owner graphic corrections, arbitrations settled, impeccable observations

This commit is contained in:
bchanot committed 2026-11-09 17:01:26 +01:00
1 parent 45f1cce460
commit 9e676bb811
13 files changed
+139 -55

No files matched your search

+16 -10
View File
@@ -1,7 +1,8 @@
# Dedicated manual trial stack: technical plan
Status: PROPOSAL, 2026-11-09 (owner brief « V1-2.6 UX — Arbitrages du premier essai propriétaire », §5), with the
decisions of the brief « R0 — Décisions propriétaire et dernière validation graphique » (2026-11-09, BDR-108): name
decisions of the briefs « R0 — Décisions propriétaire et dernière validation graphique » (BDR-108) and « R0 — Verdict
de revue graphique propriétaire » (BDR-109), both 2026-11-09: name
`pnpm db:trial`, two trial accounts, `db:sandbox trial*` kept for now, isolation from the suites, volumes preserved,
resources capped, secrets renewable. Plan
only: no stack is created, started, reset or removed, no script changes, existing data untouched. Implementation
@@ -67,7 +68,10 @@ keys with the same secret and restarts the services: a persistent stack with the
itself out after a month. Full renewal (owner 2026-11-09) is `rotate-secrets`: a new JWT secret and new keys, new role
passwords set in the database (`alter role … password`, values through psql variables, never argv), env files
rewritten (600), services restarted in order, the previous secrets file kept as `secrets.prev.sh` (600) until the
stack answers; account passwords are untouched. Both commands print no secret. Since every secret differs from the sandbox's, a suite that reached a trial port by mistake
stack answers; account passwords are untouched. Both commands print no secret. Rules (A14, decided 2026-11-09): keys valid one year on this dedicated local stack
only; no secret in Git, in a command line, in the script's output or in a log (the state folder sits outside the
repository and the script refuses one inside it); the rotation procedure is written in the script's help and in
`SUPABASE.md`; the renewal code gets a security review (fresh security gate) before the stack is used. Since every secret differs from the sandbox's, a suite that reached a trial port by mistake
would be refused by GoTrue, PostgREST and Postgres instead of writing.
### 3.4 Persistence and lifecycle
@@ -94,10 +98,12 @@ would be refused by GoTrue, PostgREST and Postgres instead of writing.
(`db-sandbox.sh:457-472`); `grant <email> <right>` as `cmd_trial_grant` (:476-496).
1. Owner/admin account, for the administration trials: platform roles `owner` and `admin`, catalogue rights
`sheet_editor`, `sheet_reviewer`, `sheet_publisher`.
2. Practitioner account, for the normal journey: `sheet_editor` only, no `owner`, no reviewer or publisher right.
Fact to weigh: today a `sheet_editor` right is active only for a platform admin (rule O1,
`supabase/migrations/20261028100000_sheet_access_hardening.sql:199`), so this account also needs the `admin`
role; without it, it can read the catalogue (`catalog_reader`) but not edit. Changing O1 is out of scope.
2. Practitioner account, for the normal journey (decided 2026-11-09, A13): technical platform role `admin` and the
catalogue right `sheet_editor`; no `owner`, no `sheet_reviewer`, no `sheet_publisher`. The `admin` role is there
only because rule O1 activates `sheet_editor` for a platform admin alone
(`supabase/migrations/20261028100000_sheet_access_hardening.sql:199`); O1 is not changed. This is a trial
account, not a production practitioner profile: a production practitioner holds neither `admin` nor a catalogue
editing right by default.
Editing and Administration require a TOTP factor (aal2, same file :321-341), enrolled in Mon compte by each account.
- The equine sheet: the seed gives the historical sheet its fixed id and `private.historical_sheet_id()` flags it
(`20261102100000_sheet_admin_reads.sql:56`); it is the only official sheet at creation.
@@ -143,8 +149,8 @@ they created; `shellcheck` on both scripts.
| # | Question | Recommendation |
|---|---|---|
| A11 | Command name, prefix, ports | `pnpm db:trial` (RATIFIED), `faunosteo_trial_`, 58xxx and 5194 as in 3.2 (open). |
| A11 | Command name, prefix, ports | RATIFIED: `pnpm db:trial`, `faunosteo_trial_`, 58xxx and 5194 as in 3.2. |
| A12 | Fate of `pnpm db:sandbox trial`, `trial-account`, `trial-grant` | DECIDED: kept for now, neither removed nor silently redirected. |
| A13 | Trial accounts | DECIDED: two accounts (3.5). Open: confirm the practitioner account takes `admin` because of O1. |
| A14 | Key lifetime and renewal | Renewal DECIDED (`rotate-keys`, `rotate-secrets`); one-year lifetime open. |
| A15 | Backup before every `migrate` | Automatic, kept in the state folder, never pruned without the owner. |
| A13 | Trial accounts | DECIDED: two accounts (3.5); practitioner = technical `admin` + `sheet_editor`, not a production profile; O1 unchanged. |
| A14 | Key lifetime and renewal | DECIDED: one year, documented rotation, no secret in Git or logs, security review of the renewal (3.3). |
| A15 | Backup before every `migrate` | RATIFIED: automatic, kept in the state folder, never pruned without the owner. |
+4 -3
View File
@@ -1,8 +1,9 @@
# R3 SQL checkpoint: a true last-modification date for the sheet list
Status: PROPOSAL for the owner's dedicated SQL checkpoint, 2026-11-09 (brief « R0 — Décisions propriétaire et
dernière validation graphique », A7). Nothing here is written as a migration; no SQL, application, script or sandbox
change before the owner authorises this checkpoint. Companion of `V1-2-6_U1_CORRECTIONS.md` (lot R3).
Status: DESIGN ACCEPTED by the owner, 2026-11-09 (verdict « R0 — Verdict de revue graphique propriétaire », BDR-109),
after the brief « R0 — Décisions propriétaire et dernière validation graphique » (A7). No migration is created or
applied for now; writing and applying it needs the owner's later go. R3 keeps its split before and after this
checkpoint (section 5). Companion of `V1-2-6_U1_CORRECTIONS.md` (lot R3).
## 1. The problem
+20 -16
View File
@@ -86,6 +86,9 @@ reference of R1 to R4.
button per tile (`aria-expanded`, `aria-controls`), the toolbar with a search field and its explicit clear button
(focus back to the field), a native `<select>` with its external « Trier par » label. Tile count reads « Citée N
fois » (citations from families and findings, as `citations.ts` counts them); the open tile names a family as a family.
A cited reference shows no « Supprimer » (the core refuses it): a hint explains how to delete it once each citation
is removed (« Aller à », then « Retirer » in the finding's or family's detail); an uncited reference keeps « Supprimer » (owner verdict,
board 23).
« Ajouter une référence » appends in document order, resets search and sort, opens the new tile in edit with focus
on its citation field. Sorting is a pure function over the reference ids that never
touches the document: document order; citation A to Z with `Intl.Collator` of the current language; citation count
@@ -99,9 +102,9 @@ reference of R1 to R4.
- Unit tests (about 15 files today assert the four-tab structure or the panel): five tabs and the « Plus » tier at
500 px; each sort, stable, document untouched (text compared before and after); reorder commands present only in
document order without search; clear button; tile disclosure and focus; « Aller à » from Vérification opens the
tab, the tile open and focused; « Aller à » from a tile reaches the finding; the panel from a finding: filtered, « Retirer de ce constat » removes only that citation (the reference
stays in the document) and one undo restores it,
« Tout afficher » opens the tab with search and sort reset and focus on its heading, close returns focus to the
tab, the tile open and focused; « Aller à » from a tile reaches the finding; a cited tile has no « Supprimer » and
shows the hint, an uncited tile keeps it; the panel from a finding: filtered, « Retirer de ce constat » removes only
that citation (the reference stays in the document) and one undo restores it, « Tout afficher » opens the tab with search and sort reset and focus on its heading, close returns focus to the
finding's button; unsaved edits in a tile form survive a tab change (kept-mounted places); no edit control in any
read-only mode or without the editor right; the reduced-motion class.
- E2E: `TABS` helper (`e2e/support/editor.ts:327`) to five; `editor-shell-journeys.spec.ts:116-125` count 4 to 5;
@@ -159,24 +162,25 @@ the gates of R2 and R3 are read, since its taken slot fails four admin specs on
## 6. Arbitrations
Status as of the brief « R0 — Décisions propriétaire et dernière validation graphique » (2026-11-09, BDR-108).
Status as of the brief « R0 — Décisions propriétaire et dernière validation graphique » (2026-11-09, BDR-108) and the
owner's graphic verdict « R0 — Verdict de revue graphique propriétaire » (2026-11-09, BDR-109): every arbitration is settled.
The owner-facing table with consequences, in French: `docs/design/v1-2-6-r0/ARBITRAGES.md`.
| # | Question | Recommendation | Status |
|---|---|---|---|
| A1 | Reorder commands with a search active in document order | Hidden, as checkpoint choice 10 already rules (moving among a hidden subset is ambiguous); one hint line. | open |
| A2 | Tiles open at once; how long open state, search and sort last | Several open at once; kept while the editor stays open (kept-mounted tab), reset when it reopens. | open |
| A1 | Reorder commands with a search active in document order | Hidden, as checkpoint choice 10 already rules (moving among a hidden subset is ambiguous); one hint line. | RATIFIED 2026-11-09 (BDR-109), exact recommendation |
| A2 | Tiles open at once; how long open state, search and sort last | Several open at once; kept while the editor stays open (kept-mounted tab), reset when it reopens. | RATIFIED 2026-11-09 (BDR-109), exact recommendation |
| A3 | Actions in the contextual panel | « Modifier », « Retirer de ce constat », « Aller à »; no add, no reorder, no « Supprimer » (always refused by the core there). « Tout afficher » opens the tab with search and sort reset, focus on its heading. | RATIFIED: « Retirer de ce constat » removes only the finding's citation of the reference, never the reference; undoable through the editor history |
| A4 | Closed tile content | Citation on two lines at most, type, « Citée N fois » or « Non citée » (the count includes families). | open |
| A5 | Escape priority | Dialog, then open menu, then contextual panel, then tracing in progress, then selection. | open |
| A5b | « Toutes les annotations » already clears the selection | Keep both (D6). | open |
| A4 | Closed tile content | Citation on two lines at most, type, « Citée N fois » or « Non citée » (the count includes families). | RATIFIED 2026-11-09 (BDR-109), exact recommendation |
| A5 | Escape priority | Dialog, then open menu, then contextual panel, then tracing in progress, then selection. | RATIFIED 2026-11-09 (BDR-109), exact recommendation |
| A5b | « Toutes les annotations » already clears the selection | Keep both (D6). | RATIFIED 2026-11-09 (BDR-109), exact recommendation |
| A6 | Focus after « Désélectionner » | The annotation's row in the list. | RATIFIED with precision: the row if it still exists, else the drawing; focus never selects again; an accessible announcement |
| A7 | Source of the last-modification date | SQL read change `last_modified_at`, own checkpoint. | RATIFIED: dedicated SQL checkpoint `V1-2-6_R3_SQL_CHECKPOINT.md`; until then no creation date shown as a modification date and no misleading sort |
| A8 | Date format | Absolute, « 9 nov. 2026, 12:06 » (EN « 9 Nov 2026, 12:06 »). | open |
| A9 | Administration home card | The five most recently modified sheets with species, status and date, then « Voir les N fiches ». | open (needs A7 first) |
| A10 | Catalogue warning wording | FR « Contrôle d'intégrité échoué : cette version ne peut pas être affichée. », a distinct line with « Réessayer » for a load that failed for another reason. | R4 ACCEPTED as an independent display fix, the fingerprint check unchanged; wording open |
| A11 | Trial stack command | `pnpm db:trial`, prefix `faunosteo_trial_`, ports 58xxx and 5194. | RATIFIED: `pnpm db:trial`; prefix and ports open |
| A8 | Date format | Absolute, « 9 nov. 2026, 12:06 » (EN « 9 Nov 2026, 12:06 »). | RATIFIED 2026-11-09 (BDR-109), exact recommendation; shown only after the SQL checkpoint |
| A9 | Administration home card | The five most recently modified sheets with species, status and date, then « Voir les N fiches ». | RATIFIED 2026-11-09 (BDR-109), exact recommendation; final state after the SQL checkpoint |
| A10 | Catalogue warning wording | FR « Contrôle d'intégrité échoué : cette version ne peut pas être affichée. », a distinct line with « Réessayer » for a load that failed for another reason. | R4 ACCEPTED; wording RATIFIED 2026-11-09 (BDR-109), exact recommendation |
| A11 | Trial stack command | `pnpm db:trial`, prefix `faunosteo_trial_`, ports 58xxx and 5194. | RATIFIED 2026-11-09 (BDR-109), exact recommendation (name, prefix, ports) |
| A12 | Old `db:sandbox trial*` commands | Remove once the trial stack is validated. | DECIDED otherwise: kept for now, neither removed nor silently redirected |
| A13 | Trial accounts | `admin` with catalogue rights, `owner` if needed. | DECIDED: two accounts, an owner/admin account and a practitioner account with the editing rights (see `TRIAL_STACK.md` §3.5 on rule O1) |
| A14 | Key lifetime and secret renewal | One year, `rotate-keys`. | Renewal RATIFIED (`TRIAL_STACK.md` §3.3); lifetime open |
| A15 | Backup before every `migrate` | Automatic, kept, never pruned without the owner. | open (volumes preserved: ratified) |
| A13 | Trial accounts | `admin` with catalogue rights, `owner` if needed. | DECIDED 2026-11-09: two accounts; practitioner = technical `admin` + `sheet_editor`, no owner, reviewer or publisher; not a production practitioner profile; O1 unchanged |
| A14 | Key lifetime and secret renewal | One year, `rotate-keys`. | DECIDED 2026-11-09: one-year keys on the dedicated local stack, documented rotation, no secret in Git or logs, security review of the renewal |
| A15 | Backup before every `migrate` | Automatic, kept, never pruned without the owner. | RATIFIED 2026-11-09 (BDR-109), exact recommendation |