docs(docs): R4 card integrity plan rev 2, owner decisions pending

This commit is contained in:
bchanot committed 2026-11-16 23:47:51 +01:00
1 parent dc67c4aaca
commit b895ecf136
2 files changed
+275

No files matched your search

+1
View File
@@ -733,6 +733,7 @@ Order (BDR-071): P0 docs + decisions → V1-1 clients and animals → V1-2 sheet
- [x] (was) Anomaly B (owner 2026-11-12, decision C): `admin.spec.ts` « admin screens: axe and no sideways scroll » (4 failures: 2 locales × 2 viewports) depends on the historical sheet's free working-copy slot, taken on the sandbox by `sheets-admin.sandbox.ts:181-195` (copy `8c315a12-…`, never archived). Fix in its own commit with proof the 4 failures are gone; isolated reproducible fixture, no existing data deleted; stop and present options if impossible without a destructive op or a scope change
- [x] R3 sheet list: search + name sort first; date, date sort and « most recent » home card only after the dedicated SQL checkpoint `docs/development/V1-2-6_R3_SQL_CHECKPOINT.md` (A7 ratified 2026-11-09; never a creation date shown as modification date). Two-step split superseded 2026-11-16 by owner D2: one lot after M9, tracked in the R3 block above
- [ ] R4 catalogue card integrity warning (independent fix, = anomaly C): `useCardDetails.ts` drops a failed `loadVersion` silently; UI only, check never bypassed
- [ ] R4 plan rev 2 (owner brief 2026-11-16 « R3 est terminé … passer à R4 »): `.claude/tasks/plans/2026-11-16-r4-card-integrity-2337.md`, audit F1-F12, three challenges on rev 1 (correctness FATAL(4), robustness FATAL(4), simplicity FATAL(3)) folded in. STOP: owner decisions D1 caps class, D2 thumbnail failure, D3 trial place (sandbox recommended, trial stack has no published version), D4 e2e cleanup of published fixtures (archive own rows by SQL recommended). No implementation before them; DEV unchanged, no merge
- [ ] owner arbitrations A1-A15 (`V1-2-6_U1_CORRECTIONS.md` §6, `TRIAL_STACK.md` §6)
- [ ] Test anomaly A (owner 2026-11-09, separate from U1/U2): fictitious fingerprints `'a'.repeat(64)` from worker stand-ins (`packages/supabase/tests/sandbox/sheet-fixtures.ts:115` openRound, `sheets-concurrency.sandbox.ts:168`, `sheets-perf.sandbox.ts:169`); 7 published/deprecated sandbox versions fail `check_published`. Fix: real fingerprint through the core (as e2e `fingerprintOf`, `apps/app/e2e/support/catalogue.ts:88`); never weaken the publish gate or the reader check. Needs its own go.
- [ ] Test anomaly B (owner 2026-11-09, separate from U1/U2): `packages/supabase/tests/sandbox/sheets-admin.sandbox.ts:181-195` creates the historical working copy and never archives it; slot taken → `admin.spec.ts:717` fails x4. Fix test independence and cleanup; the existing copy `8c315a12-20d4-4432-9db3-7cb88b27a5b4` stays untouched until the owner authorises. Linked: RR-13, the admin.spec confirmation line above.
@@ -0,0 +1,274 @@
# R4 Catalogue Card Integrity Warning Implementation Plan (V1-2.6), rev 2
> **For agentic workers:** REQUIRED SUB-SKILL: Use subagent-driven-development to implement this plan task-by-task.
> Steps use checkbox (`- [ ]`) syntax for tracking.
**Status:** DRAFT rev 2, waiting for the owner's answers to D1 to D4. No implementation before them. DEV unchanged,
no merge. BLK-015 and RR-13 stay separate tracks. Rev 2 = rev 1 + three fresh challenges of 2026-11-16 (correctness
FATAL(4), robustness FATAL(4), simplicity FATAL(3)); what became of each finding is in « Challenge round » at the end.
**Goal:** a catalogue card whose published version fails the core's integrity check says so inside the card, with
« Consulter » kept; a card whose load failed for another reason has its own line and « Réessayer »; nothing is
hidden and the check is never bypassed.
**Architecture:** UI only. `useCardDetails` keeps the failure kind it drops today and offers a retry. A pure
function in `catalogue/failure.ts` sorts the closed kinds into « integrity » and « other ». A new `CardFailure`
component renders the line board 30 draws through `Notice`, which gains a `warning` tone, an optional glyph and an
option to not be a live region (defaults keep its 114 call sites as they are). One new glyph. No SQL, no Rust, no
worker, no change to the sheet page or to `CatalogueFailureNotice`.
**Tech Stack:** React 19, Tailwind 4, vitest + happy-dom (real core through `CataloguePreview`), Playwright + axe on
`pnpm db:sandbox`.
**Spec:** `docs/development/V1-2-6_U1_CORRECTIONS.md` §3 « R4 — Integrity warning in catalogue cards (D9 C,
independent fix) » and §5 row C; board `docs/design/v1-2-6-r0/30-catalogue-carte-integrite.png` (approved as is,
2026-11-09); arbitration A10 (`docs/design/v1-2-6-r0/ARBITRAGES.md`, wording ratified); labels
`docs/design/v1-2-6-r0/REVUE.md:85`; REVUE point 9 (caps and view « restent à classer »: D1, D2).
Plan form (as R2 and R3): pure functions in full; React tasks give files, behaviour, test cases and verification,
the executor writes the JSX under TDD against board 30.
## Audit findings (2026-11-16, read-only, at dc67c4a; checked again by the three challenges)
| # | Finding | Evidence | Consequence |
|---|---|---|---|
| F1 | The card already runs the full check: `loadVersion` reads the version, downloads the drawings and builds `CataloguePreview` (hashes, fingerprint, caps). On `!load.ok` the hook returns without state: the card keeps name, « Version n » and « Consulter », silently. | `apps/app/src/catalogue/useCardDetails.ts:31-33`, `catalogue/catalogue.ts:197-220` | The failure kind is already computed; R4 keeps it. No new read, no second check. |
| F2 | The closed kinds exist: `CatalogueFailure` (11 kinds), `serverFailure`, `coreFailure` (which folds `internal`, a trap, into `core_unavailable`). The sheet page phrases them through `catalogue.failure.<kind>` and `CatalogueFailureNotice`, which offers « Réessayer » for every kind it shows. | `catalogue/failure.ts:9-58`, `CatalogueFailureNotice.tsx:17-35` | The card reuses the kinds and texts; one new label only (A10). Retry policy aligned on the page's. |
| F3 | `Notice` has three tones; its glyph is chosen from the tone (`check` or `alert`), no glyph prop; `error` is `role="alert"`, the others `role="status"`. Board 30 draws the network line in a warning tone with a « no network » glyph; `Icon` has none. | `components/ui/Notice.tsx:4-28`, `components/ui/Icon.tsx:26-50` | `Notice` gains tone `warning`, `icon?: IconName` and `live?: boolean`, defaults unchanged; `Icon` gains `wifi-off`. |
| F4 | The publication date comes from a second read, `listSheetVersions(...).catch(() => [])`: its failure only drops the date. That read is a GET, which postgrest-js retries 3 times after a fetch failure (1, 2, 4 s): with the network really down a card settles after about 7 s. | `useCardDetails.ts:28-29`, `packages/supabase/src/sheets.ts:510-515`, postgrest-js 2.117.3 `fetchWithRetry` | Date kept silent (R-6). The retry state must hold for seconds (R-3), and the owner's offline step names the wait. |
| F5 | When the version passes but the main view cannot be composed, `thumbnail` stays null: counts without a picture and without a word. `preview.canvas` answers a closed refusal, or `core_unavailable` / `internal` when the engine fails. | `useCardDetails.ts:35-40`, `catalogue/preview.ts:114-118, 186-192` | « À classer »: D2. If shown, the engine kinds go to the core line with its retry, never to « vue refusée ». |
| F6 | `caps` is a core refusal, not listed by board 30 among the integrity failures. | `failure.ts:38-44`, board 30 note « Portée » | « À classer »: D1. |
| F7 | The existing first unit test asserts a card whose version id is unknown keeps « Version 1 » and its link: that card's load fails with `denied`. | `tests/unit/routes.catalogue.test.tsx:139-141` | Extended, not removed: the card now also shows its line (R-5). |
| F8 | The trial stack has no published version (2 drafts): its catalogue is empty. The sandbox lists 156 published entries, 4 of them current versions with the fictitious fingerprint of test anomaly A, which fail the check today. | read-only counts 2026-11-16 | Where the owner tries R4: D3. Anomaly A stays a separate track. |
| F9 | The catalogue e2e seeds official sheets by SQL as postgres, « prior owner actions » (`seedOfficialSheet`), and never cleans them. `delete_anatomical_sheet` refuses any sheet that ever had a published version (`sheet.published_history`) and requires aal2 and `sheet_editor`; R3's D7 only ever deleted draft sheets. The catalogue lists `status = 'active'` sheets only. | `e2e/support/catalogue.ts:141-190`, `20261028110000_sheet_review_workflow.sql:1275-1294, 1625-1646`, `20261028100000_sheet_access_hardening.sql:42` | A published test sheet cannot be deleted; left listed, each run adds a broken card to the shared catalogue. Cleanup: D4. |
| F10 | Each card loads once, at mount (effect keyed on sheet and version ids); cards are keyed by `sheet_id`. Going offline after the list loaded changes nothing; a card shows a network failure only if it mounts while offline (a search hides it, then shows it again). | `useCardDetails.ts:24-53`, `CatalogRoute.tsx:66-68` | The e2e and the owner's step remount the card by search, never by reload. |
| F11 | The core runtime does not retry a failed first load by itself: `ready()` answers false until `coreRuntime().retry()` is called; the sheet page and `CatalogueCanvas` call it before reloading. Each trap spends one of three recoveries for the whole tab. | `packages/core-wasm/src/runtime.ts:142-184`, `catalogue/useSheetVersion.ts:85-88`, `CatalogueCanvas.tsx:100-104` | The card's retry for `core_unavailable` calls `coreRuntime().retry()` first (R-2). |
| F12 | e2e: the app talks to a fake `.invalid` origin served only by the `routeToSandbox` context route; Playwright runs the last route first. Every card loads at mount (156+ on the sandbox). | `e2e/support/sandbox.ts:12, 33-40`, `CatalogRoute.tsx:68` | A route that aborts one version must `route.fallback()` the rest and be removed alone; the spec searches its tag before any check (as `catalogue.spec.ts`). |
## Owner decisions pending
| # | Question | Recommendation | Alternative(s) | Cost if wrong |
|---|---|---|---|---|
| D1 | `caps` (a version over the size limits) in a card | Integrity line, error tone, A10 text, no « Réessayer »: the core refuses the version itself and a retry cannot change it. | Its own line, existing text `catalogue.failure.caps` (« Cette version dépasse les limites de taille d'une fiche. »), error tone, no retry. | One mapping line. |
| D2 | The version passes the check but its main view cannot be drawn (no thumbnail) | Say it: a neutral line (tone `info`, not a live region) with the existing text `catalogue.failure.view`; counts and « Consulter » kept; when the engine itself failed (F5) the core line with its retry instead. Nothing left silent, no new wording. | (a) Silent as today (no code). (b) A new shorter text for the card, to ratify (e.g. « L'aperçu de cette fiche ne peut pas être affiché. »). | One component branch and its test; built only if chosen. |
| D3 | Where the owner tries R4 | `pnpm db:sandbox trial` (the automated-test stack served for a manual trial, used on 2026-11-09): its 4 failing entries show the integrity line as they are; the network line by hiding a card with a search, going offline in DevTools, clearing the search, waiting about 7 s, going back online, « Réessayer ». No write by Claude on any stack. The page loads slowly there (156 cards each load their version). | (a) Seed two published test sheets on the trial stack (one sound, one with a wrong stored fingerprint) through a new `db:trial` step: a script change and a write on the owner's trial data, its own go. (b) Both. | (a) adds a script and a write; the recommendation adds none. |
| D4 | Cleanup of the browser spec's own data on the persistent sandbox (F9): published test sheets cannot be deleted | The spec archives its own sheets at the end, by SQL as postgres under the seed owner, the same « prior owner action » form as its seed (status `archived`, read back per id), and revokes its own catalogue grant the same way; it touches no other row. Archived sheets leave the catalogue. | (a) No cleanup, as `catalogue.spec.ts` today: every run leaves one broken card listed on the sandbox (and in the D3 trial). (b) Archive through the application RPC with an aal2 publisher account: one more account and grant per run (BLK-015). | (a) grows the shared catalogue with broken cards; the recommendation writes only the run's own rows. |
## Recorded unless the owner objects
- R-1 Integrity class (error tone, A10 text in bold, glyph `alert`, no retry): `fingerprint_mismatch`,
`drawing_hash_mismatch`, `drawing_missing`, `invalid_document` (board 30 note « Portée »), plus `caps` if D1 as
recommended. `drawing_missing` includes Storage answering « not found » for the drawing (400 or 404, folded by
`classifyDrawingError`): an illustration the server does not give is missing (board 30 « illustration manquante »).
The executor checks which Storage answers fold there and pins them in a test.
- R-2 Other class (warning tone, existing text, « Réessayer » for that card): every other kind; texts
`catalogue.failure.<kind>`, `access_denied.title` for `denied`, the core's text and retry label for
`core_unavailable` (its retry calls `coreRuntime().retry()` before reloading, F11). Retry offered unless the kind is
integrity or the engine stopped for good, as `CatalogueFailureNotice`. A version that traps the core spends one of
the tab's three recoveries per click, as on the sheet page (accepted, same blast radius).
- R-3 Announcements and focus: the lines are not live regions (no burst of announcements at load when several
cards fail). During a retry the line and « Réessayer » stay in place, the button `aria-disabled` and the card
`aria-busy`, clicks ignored (no parallel loads); the focus stays on the button. If the retry fails again, a
visually hidden polite region of the card, cleared at each attempt, says the line again. If it succeeds, the focus
moves to the card's « Consulter » only if it was still on that card's « Réessayer » or on `body`.
- R-4 Glyph: `wifi-off` for `network` (board 30), `alert` for every other line.
- R-5 `denied` in a card (listed entry, version read refused): other class, « Accès non autorisé », with retry.
- R-6 The publication date missing after a failed `listSheetVersions` stays silent (F4).
- R-7 Engine-wide failure: when the core does not load, each card shows the core line with its own retry (the board
draws per-card lines only); one card's retry restarts the engine and reloads that card, the others reload on their
own retry. Accepted limit, recorded in the docs.
- R-8 Rust by default: sorting closed kinds for display is display formatting (CLAUDE.md « kept as is »); one row in
the review's Part II exception table, class C, as R3 did.
## Global Constraints
- The integrity check is the core's (`CataloguePreview` / `check_published`); never bypassed, weakened or skipped.
- Card text FR « Contrôle d'intégrité échoué : cette version ne peut pas être affichée. », EN « Integrity check
failed: this version cannot be displayed. » (A10, REVUE.md:85), key `catalogue.card.integrity_failed`.
- The card stays in the list; « Publiée » stays; « Consulter » stays enabled and focusable in every state.
- The sheet page (`SheetRoute`, `CatalogueFailureNotice`) is unchanged; `Notice` keeps today's role and glyph at
every existing call site.
- All UI strings through `useT()`, same keys in `fr.ts` and `en.ts`.
- Max 25 logic lines per function, 100 columns for TypeScript; `shortcut:` comments harvested into TODO.md.
- Tests never edit a pre-existing row; the spec's cleanup (D4) touches only the ids it created, read back per id;
the spec never opens the rights screen (BLK-015). Never run `editor-equine.spec.ts`. No sandbox reset.
- No merge, no deploy, DEV unchanged; no write on the trial stack (D3 recommendation).
## Review Focus
1. Several cards fail at once: one line per card, no burst of announcements, each « Réessayer » reloads its card
only. Test: Task 1 test 4.
2. A retry still running when the card unmounts (a search hides it): no state set after unmount, blob URLs created
and revoked in balance, one `free()` per preview built. Test: Task 1 test 6 (deferred answer, spies).
3. A retry that fails again: focus stays on « Réessayer », the polite region says the line again. Test: Task 1 test 3.
4. The core's first load fails, then « Réessayer » succeeds (runtime retried). Test: Task 1 test 7.
5. Phone width: the line wraps, « Réessayer » and « Consulter » 44 px high, no sideways scroll. Test: Task 2 at 375 px.
## File Structure
- Modify `apps/app/src/catalogue/failure.ts`: `cardFailure(failure, stopped)` (pure, below).
- Modify `apps/app/src/catalogue/useCardDetails.ts`: returns `{ state, retry }`.
- Create `apps/app/src/components/catalogue/CardFailure.tsx`: the line, its glyph, « Réessayer », the polite region.
- Modify `apps/app/src/components/catalogue/CatalogueCard.tsx`: the failure in place of counts and thumbnail.
- Modify `apps/app/src/components/ui/Notice.tsx`: tone `warning`, `icon?: IconName`, `live?: boolean`.
- Modify `apps/app/src/components/ui/Icon.tsx`: glyph `wifi-off`.
- Modify `apps/app/src/i18n/fr.ts`, `en.ts`: `catalogue.card.integrity_failed`.
- Tests: `tests/unit/routes.catalogue.test.tsx` (cards, `cardFailure` exhaustiveness), `Notice` defaults.
- E2E: `apps/app/e2e/support/catalogue.ts` (option `storedFingerprint`, archive and revoke helpers per D4),
`apps/app/e2e/shell/catalogue-integrity.spec.ts`.
- Docs (Task 3).
### Task 1: The card says its failure (board 30)
**Files:** as File Structure, app side.
**Interfaces:** Produces
```ts
// catalogue/failure.ts
export function cardFailure(
failure: CatalogueFailure,
stopped: boolean,
): { integrity: boolean; retry: boolean }
// catalogue/useCardDetails.ts
export type CardState =
| { status: 'loading' }
| { status: 'ready'; details: CardDetails }
| { status: 'failed'; failure: CatalogueFailure; retrying: boolean; attempt: number }
export function useCardDetails(entry: CatalogEntry): { state: CardState; retry: () => void }
```
```ts
const INTEGRITY: ReadonlySet<CatalogueFailure> = new Set([
'fingerprint_mismatch',
'drawing_hash_mismatch',
'drawing_missing',
'invalid_document',
'caps', // D1
])
/** How a catalogue card treats its failure (board 30, A10): never hidden, retried where it can work. */
export function cardFailure(failure: CatalogueFailure, stopped: boolean) {
const integrity = INTEGRITY.has(failure)
const retry = !integrity && !(failure === 'core_unavailable' && stopped)
return { integrity, retry }
}
```
`CardFailure` derives the rest at its one render site: text (`catalogue.card.integrity_failed` for integrity,
`coreFailureMessage(t, 'sheet.core_unavailable')` for the core, `access_denied.title` for `denied`, else
`catalogue.failure.<kind>`), tone (`error` / `warning`), glyph (`wifi-off` for `network`, else `alert`), retry label
(`sheet.core_retry` for the core, else `common.retry`).
Hook behaviour: today's loading and freeing order kept (preview freed once the canvas is composed, blob URL revoked
on cleanup, `live` guard of each effect run). `retry()`: ignored while `retrying`; for `core_unavailable` it calls
`coreRuntime().retry()` first; it sets `retrying: true` (the `failed` state stays, so the line and button stay
mounted) and bumps the attempt in the effect's dependencies. Within 25 logic lines per function: split the load
into a plain async function and the hook.
- [ ] **Step 1: Write the failing tests** in a new `describe('catalogue cards (R4, board 30)')` reusing the file's
`serveVersions`, `versionAnswer` and Storage mocks:
1. integrity, one row per kind (fingerprint `'a'.repeat(64)`, one drawing byte altered, Storage answering not
found, `{ schema_version: 2 }`): the card shows `fr['catalogue.card.integrity_failed']`, no `role="alert"` or
`role="status"` inside the card, no « Réessayer » in it, « Consulter Cheval » with its href, « Publiée ».
2. network: `get_sheet_version` answers `{ error: { message: 'network' } }` (`classifySheetError` gives `network`
for that message, a `TypeError` or status 0): text `catalogue.failure.network`, one « Réessayer »; serve the
version again, click: the line goes, the counts appear, the focus is on « Consulter Cheval ».
3. retry fails again: the button stays mounted and focused, `aria-disabled` while the attempt runs; afterwards the
polite region holds the line text (cleared then set).
4. two failing cards, retry one: the other id's `get_sheet_version` call count is unchanged.
5. a second click while the attempt runs starts no second load.
6. unmount during retry: `get_sheet_version` held on a deferred promise; click « Réessayer », type a search that
removes the card, resolve: no state update warning, `URL.createObjectURL` / `URL.revokeObjectURL` calls balanced,
`CataloguePreview.prototype.free` once per preview built.
7. core first load fails (`coreRuntime().ready` stubbed to `false` once): the core line with `sheet.core_retry`;
click: `coreRuntime().retry` called, the card loads.
8. `session_expired` and `denied`: their texts, with « Réessayer ».
9. the existing first test: « Chien, rachis » also shows `fr['access_denied.title']` (F7).
10. English: the integrity line reads the EN text.
11. `cardFailure` exhaustiveness: every member of `CatalogueFailure` gives the expected pair (the test lists the
union's members and fails on a new one).
12. `Notice` defaults: `error` keeps `role="alert"` and `alert`, `success` keeps `check`; `live={false}` removes the
role; `icon` overrides the glyph.
13. D2 only if chosen: the main view's canvas refused shows `catalogue.failure.view` (tone `info`, no role) with the
counts; the canvas answering `core_unavailable` shows the core line with its retry.
- [ ] **Step 2: Run, expect FAIL** `pnpm --filter @faunosteo/app exec vitest run tests/unit/routes.catalogue.test.tsx`.
- [ ] **Step 3: Implement** `cardFailure`, `Notice`, `Icon`, the hook, `CardFailure`, the card, the two dictionary lines.
- [ ] **Step 4: Run, expect PASS**; then `pnpm --filter @faunosteo/app test:run`, `pnpm typecheck`, `pnpm lint`,
`pnpm build`.
- [ ] **Step 5: Commit** in two: `feat(ui): notice warning tone, glyph and non-live option` (Notice, Icon, test 12),
then `feat(app): catalogue cards say an integrity or load failure (board 30)`.
### Task 2: The browser proof on the sandbox
**Files:** Modify `apps/app/e2e/support/catalogue.ts`; Create `apps/app/e2e/shell/catalogue-integrity.spec.ts`.
- `seedOfficialSheet(names, shape, options?: { storedFingerprint?: string })`: when given, the versions get that
fingerprint instead of the core's (additive; `catalogue.spec.ts` unchanged).
- Fixtures (`beforeAll`): one tag per run; one `listed` sheet with the core's fingerprint (« R4 <tag> saine »), one
with `storedFingerprint: '0'.repeat(64)` (« R4 <tag> altérée »); one catalogue reader account and grant as
`catalogue.spec.ts` does. Ids kept in the run's own list.
- Cleanup (`afterAll`), per D4 as recommended: each own sheet archived on its own by SQL as postgres under the seed
owner (the executor uses the migrations' own archive path, e.g. `private.set_sheet_status`, never a bare update
that skips its triggers), read back `archived`; the run's grant revoked the same way and read back; failures
listed, then asserted empty. If D4 is (a), no cleanup and the accumulation line goes to TODO.
- Integrity, per locale (fr, en) and project (desktop, chromium-375): sign in, open the catalogue, search the tag;
the altered card shows the integrity line, its « Consulter » focusable and opening the sheet page, which shows its
unchanged `catalogue.failure.fingerprint_mismatch` notice; the sound card shows its counts; axe on the searched
list; no sideways scroll at 375 px; « Consulter » at least 44 px high.
- Network, fr only, both projects: `context.route('**/rest/v1/rpc/get_sheet_version', handler)` aborting the
request whose body names the sound version's id and calling `route.fallback()` for every other; remount the sound
card by searching a term that hides it, then the tag again (never a reload); it shows the network line and
« Réessayer » (44 px); `context.unroute` of that handler only; click: the counts appear and the focus is on its
« Consulter »; axe with the line shown.
- [ ] Run only `pnpm db:sandbox e2e-shell e2e/shell/catalogue-integrity.spec.ts` (sandbox up, never reset), then the
existing `e2e/shell/catalogue.spec.ts` alone (the support change is additive). Record exact counts, and read back
that no row other than the run's own changed (guard query before and after).
- [ ] Commit `test(app): catalogue card integrity and retry on the sandbox`.
### Task 3: Documents and closing gates
- Mandatory: `V1-2-6_U1_CORRECTIONS.md` §R4 as built (classes, R-1 to R-8, D1 to D4 answers) and §5 row C closed;
the review's Part II row (R-8); `CHANGELOG.md`; `.claude/tasks/TODO.md` (one line per run, shortcuts harvested).
- One line each: `BROWSER_TESTS.md` (the new spec), `docs/design/README.md` (only if a deviation from board 30).
- Per D3: `V1-2-6_OWNER_TRIAL.md` §4.16 in French, no em-dash, with the remount and the wait of the offline step.
- Gates, in order: task reviews, design review against board 30 (screenshots desktop and 375 px from the spec run),
final code review, security review of the diff, fresh verifier on the contract, `pnpm check:all`.
- Commit `docs(docs): R4 catalogue card integrity warning as built`.
## Out of scope, tracked
- Test anomaly A (fictitious fingerprints of worker stand-ins): separate, own go.
- Every card loading its version at once (156+ on the sandbox): with RR-13.
- BLK-015 (rights screen on the accumulated sandbox) and RR-13: separate, open.
- `catalogue.spec.ts` leaving its published sheets listed: existing accumulation, a follow-up line (D4 applies to the
new spec only).
- Keeping catalogue search on back (BDR-079 follow-up).
## Challenge round (2026-11-16, three fresh `plan-challenger` agents, read-only, on rev 1)
| Lens | Finding | Rev 2 |
|---|---|---|
| all three | Cleanup by `delete_anatomical_sheet` cannot work (published history, aal2, editor right); R3's D7 covered drafts only | F9, D4 (owner), Task 2 cleanup |
| correctness, simplicity | `Notice` picks its glyph from the tone: `wifi-off` had no way to the screen | F3, `icon?` prop, test 12 |
| correctness, robustness | Offline step of the trial cannot show the line (cards load once at mount) | F10, D3 recipe |
| correctness, robustness | Focus and announcement unspecified for a retry that fails again; a `loading` reset unmounts the focused button | R-3, hook keeps `failed` with `retrying`, tests 3 and 5 |
| robustness | Core retry never works without `coreRuntime().retry()` | F11, R-2, test 7 |
| robustness | GET retries make an offline card settle after about 7 s | F4, D3 recipe |
| correctness, robustness | e2e abort must `route.fallback()` the rest; no reload (156+ cards) | F12, Task 2 network step |
| robustness | Focus move on success could steal focus | R-3 condition |
| robustness | Same text not re-announced | R-3 cleared region |
| correctness, robustness | D2 hid engine failures as « vue refusée » | F5, D2 recommendation, test 13 |
| robustness | A trap spends a recovery per click | R-2, accepted as on the sheet page |
| robustness | `drawing_missing` may come from Storage | R-1, pinned by test |
| robustness | One engine failure shown N times | R-7, accepted limit |
| robustness | Unmount test could pass vacuously | test 6 deferred, spies |
| robustness | Grant per run feeds BLK-015 | D4 revokes the run's grant |
| correctness | `'Failed to fetch'` is classified `unavailable` | test 2 uses `'network'` |
| simplicity | `NO_RETRY` diverged from the page | removed, retry aligned (R-2, R-5) |
| simplicity | Task 1 too ceremonial, struct derivable | merged into Task 1, `cardFailure` returns two booleans |
| simplicity | D2 built ahead of the owner | test 13 and its branch conditional on D2 |
| simplicity | e2e network case in every locale | fr only, both projects |
| simplicity | Docs fan-out | mandatory set plus one-liners, trial text per D3 |
| simplicity | Hidden polite region beyond existing retries | kept, narrowed to a repeated failure (correctness and robustness both need it) |