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. |