chore(memory): BLK-014, LRN-132, editor-equine risk, R2 GO

This commit is contained in:
bchanot committed 2026-11-12 17:36:55 +01:00
1 parent f873e06413
commit f078b1eb96
4 files changed
+21

No files matched your search

+7
View File
@@ -109,3 +109,10 @@ Friction: owner R1 trial on db:trial (brief « V1-2.6 — R1 — Dernier retour
Root cause: `SelectionTag.tsx` = in-flow `inline-block` `<p>`, mounted only while an annotation selected, placed before canvas in both twins (EditableAnnotations.tsx TagOf, tabs/AnnotationsTab.tsx). Mount/unmount changes column height above canvas. Not a live region (no announce lost).
Solution: 927537b: tag `sr-only` (Tailwind 4.3: absolute, 1 px, clipped; no reserved space in `space-y-3` column), no role/aria-live, kept for SR browse mode. Unit test (sr-only, not live); e2e editor-deselect.spec.ts: canvas `boundingBox().y` unchanged for point, zone, link selected then deselected, desktop + read-only twin 375 px; editor-equine toBeVisible → toHaveCount(1). Gates: typecheck, lint, unit app 1382; e2e:shell db:sandbox 6 editor specs 37 passed / 37 skipped (other viewport) / 0 failed (run 1: 1 unrelated flake equine:348 commit latency). Verifier CONFORME (pass 2), security PASS x2. Docs 00936c8: board 04 + board 26 (v1-2-6-r0) deviation in docs/design/README.md, U1_CORRECTIONS R1, BROWSER_TESTS, OWNER_TRIAL §4.9.
Scope of resolution: SelectionTag shift only. NOT all drawing shifts: ToolNotes `role="alert"` hint above canvas (EditableAnnotations.tsx ~373) cleared by `select` still moves drawing one line when a hint is showing (kept visible, out of R1 scope, TODO). Selection itself still not announced to SR (unchanged). Owner browser confirmation on db:trial pending.
## BLK-014 — admin.spec dialog check depended on shared singleton working-copy state (2026-11-12)
- **Status**: resolved 2cdee42 (these 4 failures only)
Friction: `apps/app/e2e/shell/admin.spec.ts` « admin screens: axe and no sideways scroll » failed 4× (fr/en × chromium-desktop/chromium-375) on every sandbox run since 2026-11-08: click on « Créer une copie de travail » timed out on `<button disabled>`.
Root cause: working copy exists only for historical sheet (`private.historical_sheet_id()` fixed `503dc301-…`; `create_sheet_working_copy` refuses other source `working_copy.source_invalid`) and ONE active copy per database. Test required slot free in shared persistent sandbox. (a) slot taken by `8c315a12-…` leaked by `packages/supabase/tests/sandbox/sheets-admin.sandbox.ts` (`kindOf` discarded created id; afterAll deleted accounts, not sheets). (b) `editor-equine.spec.ts` set-aside (archive active copies, create own, restore) flips slot while admin.spec runs in parallel (fullyParallel, 8 workers).
Solution: 2cdee42 (owner option 1). Dialog checks → e2e:ui harness `e2e/harness/working-copy.*` + `e2e/ui/working-copy.spec.ts` on real `WorkingCopyAction` (StrictMode, MemoryRouter, free + taken): axe, overflow, panel in viewport, name, description, prefilled slug, explicit Tab/Shift+Tab order with one 'browser' step, Escape + focus return, taken disabled + reason. Shell: historical page kept in axe/overflow loop + state-consistent button check (disabled iff reason shown and linked). Sandbox suite: every created copy id captured, archived only those, `returning id` asserted equal, 3 independent cleanup steps, first error rethrown. Before 4 failed → after 4 passed ×2; full admin.spec 16/8 skipped/0; e2e:ui 251 ×2; sandbox sheets-admin 5/5; 637 pre-existing anatomical_sheets rows identical per id. Verifier CONFORME 6/6, security PASS (1 LOW: optional uuid check before interpolation).
Scope of resolution: THESE 4 failures only. NOT all concurrency risks of e2e suites: editor-equine set-aside still writes pre-existing copies (8c315a12 updated_at already changed 2026-11-12 13:40 UTC by R1 follow-up run) → TODO, separate fix, suite not run on persistent data meanwhile. Open: cleanup creation branch and shell free-slot branch not run on a fresh stack. Limit (documented): dialog no longer a11y-checked in real server context by this test. Test fixtures accumulate (A1 sheets never archived) → tracked.
+1
View File
@@ -556,3 +556,4 @@ R5.4: `draft/{labels,changelog,review_report,drawing,overlay,app_review,svg_comp
- 2026-11-12 R1 + D6b delivered on feature/v1-2-anatomical-sheets (owner GO): Défaire/Refaire, Désélectionner, Escape priority, empty press on drawing deselects (useEmptyTap, press-based; mouse at pointerup, touch+pen at own click). Plan challenged x2 (capture retarget, blur-rebuild click drop, touch click-through). Gates: unit 1381/180/66, e2e:ui 227, e2e:shell 197/4/99 (4 = admin.spec.ts:717 baseline). Verifier 15/15, security PASS x2, code review fixes landed. Stopped at R1 checkpoint; R2 not started.
- 2026-11-12 R1 last owner feedback: « Sélection » tag above drawing made sr-only (927537b), drawing stable on select/deselect (desktop + 375 twin e2e); docs 00936c8 (board 04/26 deviation). BLK-013, LRN-131. Owner: R1 accepted technically, visual fix to confirm on db:trial; ToolNotes shift + SR selection announce + iOS open; RR-14 secrets rule added. R2 not started.
- 2026-11-12 R1 VALIDATED functionally by owner (10/10 manual checks + 927537b visual confirmation). BDR-114 R2 decisions recorded. Next: anomaly B e2e fix (isolated fixture), then R2 GO.
- 2026-11-12 Anomaly B fixed 2cdee42 (owner accepted): BLK-014, LRN-132. editor-equine set-aside risk + fixture accumulation tracked in TODO (separate fix). Owner GO R2.0-R2.6.
+11
View File
@@ -920,3 +920,14 @@ Limit: wording of this client version only.
**A11y check**: sr-only text not live = no announce, available to browse only; announce needs live region, avoid duplicating an existing one.
**Open instance**: ToolNotes hint above canvas (EditableAnnotations.tsx ~373) cleared on select = remaining shift, needs option (b).
**Refs**: SelectionTag.tsx, editor-deselect.spec.ts layout tests, docs/design/README.md deviation 2026-11-12, LRN on layout shift vs hit-test (recompute box per press).
## LRN-132 — E2E tests and database-wide singleton state (2026-11-12)
**Context**: anomaly B (BLK-014, 2cdee42): e2e on shared persistent sandbox asserted an action that needs a database-wide singleton free (one active working copy of historical sheet per database).
**Rules**:
- Never require a unique/singleton resource to be AVAILABLE in a shared persistent database: state depends on earlier runs and parallel suites.
- Need to check the UI of that action → test the REAL component on a harness (e2e:ui, no backend) with the state simulated; import the production component, no fork/mock of its logic; prove it is the real one (e.g. its computed default value).
- Server-side (shell) tests assert CONSISTENCY of the state actually present (e.g. button disabled iff reason shown and linked), both branches written, not conditional skips.
- Clean up / archive ONLY resources created and identified by the current run (capture ids from successful calls, all calls, before classification); verify ids actually modified (`returning id` = expected set); each cleanup step independent, first error rethrown; skip empty `in ()`.
- Avoid concurrent suites mutating the same singleton (set-aside/restore patterns race with readers under fullyParallel and alter pre-existing metadata such as updated_at).
- Prove non-interference: per-id snapshot (id, status, archived_at, updated_at) of pre-existing rows before/after; counts alone lie (fixtures add rows).
**Refs**: BLK-014, `e2e/ui/working-copy.spec.ts`, `sheets-admin.sandbox.ts` afterAll, `editor-equine.spec.ts` set-aside (open), LRN-076, LRN-082.
+2
View File
@@ -704,6 +704,8 @@ Order (BDR-071): P0 docs + decisions → V1-1 clients and animals → V1-2 sheet
- [ ] R2.5 tests and non-regressions (unit, e2e:ui, e2e:shell on db:sandbox, axe, keyboard walk, layout widths)
- [ ] R2.6 docs, FR/EN label table, Rust exception (Part II), db:trial manual protocol, closure
- [x] Anomaly B FIXED `2cdee42` (owner 2026-11-12 « Décision sur l'anomalie E2E », option 1): dialog checks moved to e2e:ui on the real WorkingCopyAction (`e2e/harness/working-copy.*`, `e2e/ui/working-copy.spec.ts`), shell keeps the historical page + state-consistent button check, sandbox suite archives only its own copies (`returning id` checked). Before 4 failed; after 4 passed ×2; full admin.spec 16 passed / 8 skipped; e2e:ui 251 ×2; sandbox sheets-admin 5/5; pre-existing anatomical_sheets rows identical per id (637 → 643, 6 added by A1). Verifier CONFORME, security PASS (1 LOW: optional uuid check before interpolation). Open: cleanup creation branch not run on a fresh stack; free branch of the shell check not run on this sandbox; `editor-equine.spec.ts` set-aside still archives and restores pre-existing copies (8c315a12 included, updated_at 2026-11-12 13:40 from the R1 follow-up run): owner decision. R2.0 waits for the owner's green light on this result
- [ ] editor-equine risk (owner 2026-11-12 « Validation du correctif E2E et GO R2 » §3; separate fix, NOT part of R2): `editor-equine.spec.ts` beforeAll archives every active historical working copy (`update public.anatomical_sheets … private.is_historical_working_copy(id)`), afterAll restores them, and `confirmHistoricalDrawing` may upload / confirm the historical sheet's drawing; it already changed 8c315a12's `updated_at` (2026-11-12 13:40 UTC). NOT to be run on a persistent database holding data to preserve until fixed. Before any rerun: list its writes exactly, propose a reproducible non-destructive isolation of pre-existing resources, check interactions with admin.spec and parallel suites; keep 8c315a12 and its current metadata (no artificial date restore); no sandbox reset or deletion
- [ ] e2e fixture accumulation (owner 2026-11-12 §3): sheets created by the suites persist on the sandbox (admin.spec A1 `fiche-e2e-<tag>` never archived, seedDraft / seedOfficialSheet sheets, editor copies); track them (count per run, owner per fixture) and propose run-scoped cleanup limited to ids each run created
- [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
- [ ] 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)
- [ ] R4 catalogue card integrity warning (independent fix, = anomaly C): `useCardDetails.ts` drops a failed `loadVersion` silently; UI only, check never bypassed