128 lines
17 KiB
Markdown
128 lines
17 KiB
Markdown
# Blockers Registry
|
||
|
||
Format: BLK-XXX | Date | Friction | Root cause | Solution | Status
|
||
|
||
---
|
||
|
||
## BLK-001 | 2026-05-18 | pnpm not on PATH
|
||
|
||
pnpm command not found on shell start.
|
||
Root: corepack shim broken on Node 20.20.0 (ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING).
|
||
Fix: curl https://get.pnpm.io/install.sh → ~/.local/share/pnpm/bin/pnpm.
|
||
Status: resolved.
|
||
|
||
---
|
||
|
||
## BLK-002 | 2026-05-18 | Pathology DB empty — pending content review
|
||
|
||
40-60 equine entries needed; source-cited from Merck Vet Manual, IMAIOS, PubMed, EVJ, WikiVet, LCAO.
|
||
Client osteo will review post-scaffold.
|
||
Status: resolved 2026-05-21 — superseded by hierarchical v2.0 catalog, 26 zones / 792 nodes / 612 leaves / 41 vet-referral leaves authored by domain expert. Counts blow past original 40-60 target. Source citations not yet attached on every leaf (sources optional in schema) — content review still a client task but DB no longer empty.
|
||
|
||
---
|
||
|
||
## BLK-003 | 2026-05-19 | Detail-popup zone clicks silently dropped
|
||
|
||
Friction: clicks on head detail SVG zones did nothing.
|
||
Root: EditorRoute.onZoneClick looked up id in main-SVG bones map only → detail ids (point-*) undefined → early return.
|
||
Fix: parse detail SVG on detail open, store detailBones, fallback lookup `bones.get(id) ?? detailBones.get(id)`.
|
||
Status: resolved.
|
||
|
||
---
|
||
|
||
## BLK-004 | 2026-05-19 | PDF text loop assumed one line per array entry
|
||
|
||
Friction: long zone string collided with following lines (pathologies, sévérité, commentaire).
|
||
Root: pdf-lib maxWidth wraps glyph drawing but caller advanced cursor by `i * 14` based on block index — wrapped lines invisible to layout.
|
||
Fix: explicit wrapLines + per-line cursor advance + per-block gap.
|
||
Status: resolved.
|
||
|
||
---
|
||
|
||
## BLK-005 | 2026-05-21 | Docker build crash — ERR_UNKNOWN_BUILTIN_MODULE node:sqlite
|
||
|
||
Friction: VPS `docker compose up --build -d` crashed on pnpm install (fresh cold build).
|
||
Root: `node:20-alpine` (Node 20.20.2) cannot load pnpm 11.x — pnpm 11 itself imports `node:sqlite` from `../store/index/lib/index.js`, and `node:sqlite` is a Node 22.13+ built-in. Crash: `ERR_UNKNOWN_BUILTIN_MODULE: node:sqlite`. Local dev was deceptive — host runs Node 20 too, but `pnpm install` never ran on host (lockfile already resolved); `pnpm run typecheck` / `pnpm run test` only spawn child scripts and never load the store-index module.
|
||
Iterations:
|
||
1. `corepack prepare pnpm@latest` → fails (resolves to current pnpm 11.x).
|
||
2. `corepack prepare pnpm@11.1.3` → still fails (entire pnpm 11.x line needs Node 22.13).
|
||
3. `corepack prepare pnpm@10.13.1` → works. Last major before the node:sqlite cache backend; reads lockfile v9 unchanged; already cached on dev host.
|
||
Fix: Dockerfile:7 pinned to `pnpm@10.13.1`.
|
||
Status: resolved (commit 990c8e7).
|
||
|
||
---
|
||
|
||
## BLK-006 | 2026-10-08 | Docker socket permission denied → no local Supabase stack for Claude
|
||
|
||
Friction: `supabase start` → "permission denied … /var/run/docker.sock"; daemon up (`docker info` client OK), user not in `docker` group. No psql/postgres on host either.
|
||
Root: host group membership; needs `sudo usermod -aG docker $USER` + re-login (user runs, not Claude).
|
||
Workaround: PGlite harness (BDR-028) executes migrations + 81 pgTAP checks; CLI config parses (`supabase start` fails only at Docker inspect).
|
||
Status: resolved 2026-10-08 (same day) — user added docker group; `supabase start` pulled postgres 17.11.0.004, applied 3 migrations + seed; `supabase test db` 81/81 after scoping counts to fixture ids (seed rows broke 6 absolute counts, PGlite had no seed); `gen types` adopted (CLI output unformatted → piped through prettier); REST script §8 matched expectations; `db reset` from zero OK.
|
||
|
||
---
|
||
|
||
## BLK-007 | 2026-10-08 | Per-schema ALTER DEFAULT PRIVILEGES REVOKE is a no-op → private helpers kept PUBLIC EXECUTE
|
||
|
||
Friction: Step 4 verifier + security gate both found every `private.*` function executable by `authenticated` (incl. definer helpers taking a caller-supplied actor: assign_platform_role, insert_sheet_draft).
|
||
Root: foundation ran `alter default privileges in schema private revoke execute on functions from public`; PostgreSQL adds per-schema defaults on top of the built-in PUBLIC EXECUTE, a per-schema REVOKE cannot remove it. Nothing reachable via API (PostgREST exposes public only, anon no USAGE on private) but the rule "EXECUTE revoked from public" was false.
|
||
Fix: explicit `revoke all on function private.f(args) from public` for every function (new migration 20261008110100 for the Step 3 helpers, inline for Step 4); pgTAP 001 census: anon executes nothing in private/audit, authenticated only the 7 policy predicates.
|
||
Status: resolved (commit on feature/step-04-anatomical-sheet-model).
|
||
|
||
---
|
||
|
||
## BLK-008 | 2026-10-10 | Schema v2 CHECK migration fails on a database holding a v1 draft
|
||
|
||
Migration 20261010100000 replaces the CHECK with `document_schema_version = 2` without rewriting rows → errors on any DB seeded before 4c (dev only today). Cause: schema bump shipped as constraint change, not as data migration. Solution: before real data, data migration lifting stored documents (add `references: []`, `review_status` defaults) then CHECK; rule from user: incremental non-destructive migrations, never a reset. Documented ANATOMICAL_SHEET_MODEL.md §6.
|
||
Status: open (no real data yet; treat before Step 7+ persistence of user reports).
|
||
|
||
---
|
||
|
||
## BLK-009 | 2026-10-11 | pdf-lib inflates PDF object streams without cap at `PDFDocument.load` (import path)
|
||
|
||
Security audit Step 6 (MEDIUM, pre-existing since Step 1 import): `PDFDocument.load` decodes every `/ObjStm` and xref stream eagerly with its own uncapped FlateStream; measured 408 KB PDF → 400 MB in 1.4 s, 468 MB RSS; `MAX_PDF_BYTES` 50 MiB allows ~50 GB. Attachment cap (16 MiB) covers the attachment only. Impact: tab freeze/OOM for the practitioner on a crafted PDF, no code execution. Cannot refuse `/ObjStm` (pdf-lib `save()` emits object streams in our own PDFs). Options: parse in a Web Worker (bounded blast radius), or locate the attachment by scanning bytes without a full load, or a capped custom decoder. pdf-lib 1.17.1 unmaintained since 2021 (LOW in the same audit).
|
||
Status: MITIGATED on the browser import path 2026-10-11 (60ee712: byte-scan attachment reader, no `PDFDocument.load` on untrusted bytes, export without object streams; ObjStm bomb read in 5 ms, +0.5 MiB RSS). Then 3a6e926: inflater fed in 16 KiB slices (Chromium read-ahead defeated the cancel: 4 GiB bomb +2.2 GB → +192 MB measured), shared 16 MiB candidate budget, bounded endstream search; final loop: candidates sorted by offset, JSON depth pre-scan. Audits ×3 PASS; worst measured costs on crafted files: +192 MB single bomb, ~0.5 s / ≤0.4 GB for 32 failing inflations, ~1 s deep JSON (before the pre-scan). GATE STILL OPEN before any external-user import (BDR-040): Firefox/Safari inflater read-ahead unmeasured (no browser test runner), Worker/server import with time+memory budget, pdf-lib replacement decision (unmaintained), report collection caps on read, `<use>` nesting budget, low-end phone measurement. Plan: docs/development/PDF_IMPORT_HARDENING.md §5. Never close on passing tests alone.
|
||
|
||
## BLK-010 | 2026-10-14 | Agent worktrees created on a stale base; their cleanup refused by the classifier
|
||
|
||
Friction: the three `isolation: worktree` forks of R2 started at 605ee7c (an old develop merge), not at the feature branch HEAD 22fea87; each fork noticed and moved its own temp branch (`git reset --hard` / `checkout -B` on the empty worktree, flagged by the classifier as a security warning). After merging their diffs by hand, `git worktree remove --force` + `git branch -d worktree-agent-*` refused by the auto-mode classifier.
|
||
Root cause: harness side (base commit of the agent worktree), not reproducible from the repo; the removal refusal is the destructive-command policy.
|
||
Solution: forks briefed with the exact base commit and told to verify `git log -1`; diffs collected uncommitted and copied by literal paths. Leftover: `.claude/worktrees/agent-{a0cefd439bff650a2,a3f684449d0776ad1,af6ebe79b8f742039}` (3.2 GB) + 3 local temp branches at 22fea87 (merged), owner removes them (`git worktree remove --force <path>`, `git branch -d <branch>`).
|
||
Status: resolved 2026-10-14 — after R2 merged into develop (c3f28d8): 66 files checked blob by blob (60 identical to branch history, 6 = fork stub / merged mod lists / lifted `#[ignore]`), no process or agent on them, tip 22fea87 in develop → `git worktree remove --force` ×3 + `gitflow.sh delete` ×3 accepted this time. Harness base-commit cause stays upstream.
|
||
|
||
## BLK-011 | 2026-10-16 | Stopped-engine message promised "bilan conservé" with draft unsaved; dead "Réessayer" paths
|
||
|
||
Friction: 0279953 picked `core.stopped` from `CoreRuntime.stopped` alone: with sessionStorage full, reload restored older draft, edits lost silently; save banner advised PDF export (needs core). CoreUnavailable, export, import, new report still offered retry after stop; failed recovery below cap = dead end (nothing called `retry()` in editor; canvas button only rebuilt).
|
||
Root cause: terminal-state message not bound to persistence status (`saveFailed` existed, unread); retry labels audited only on the 8 alerts + canvas the patch touched, not every failure surface; runtime exit from `unavailable` only via explicit `retry()` called by useSheet alone.
|
||
Solution: 6371523 (BDR-055): `isUnsaved` selector drives variant + copy; CoreStoppedNotice on all core pages; runtime self-restart below cap; FAILED not held; ESLint census. Verifier CONFORME 12/12 (pass 2), security PASS 2 LOW.
|
||
Status: resolved 2026-10-16. Residuals: saveFailed also on refused archive (over-warns); offline restart never stops (copy on banner); beforeunload only in editor; trap-every-load draft → reload loop; GC finalizer of trapped-instance SheetHandle throws "memory access out of bounds" later (harmless, tests retain handles).
|
||
|
||
## BLK-012 | 2026-10-17 | Rescue copy not restorable; trapping draft stuck tab; work loss outside editor
|
||
|
||
Friction: JSON copy (6371523) had no in-app restore (Home picker PDF only; devtools only). Draft trapping `draft.restore` → CoreUnavailable reload each load, New report/Import FAILED, every re-read spent a recovery. beforeunload only in editor; New report / Import replaced bilan in progress (memory or slot) silently.
|
||
Root cause: copy shipped without restore path (round trip never tested in app); `internal` from draft read treated as transient core failure, no memory of trapping input; guard scoped to one route; session replacement unguarded since MVP.
|
||
Solution: 9bd9aca (BDR-056). Evidence: round trip identical (3 golden reports, slot + import); fuzz 37k draft.restore 0 traps, OOM only ~50 MB drafts (5 MB worst = 0.4-0.8 GB wasm). Verifier CONFORME 10/10, security PASS 2 LOW, check:all green.
|
||
Status: resolved 2026-10-17. Residuals: GC finalizer throws "memory access out of bounds" after stack-overflow trap (console only, live instance unaffected 50/50), ≤ 3 dead instances retained (~13.5 MB typical, ~4.5 MB each) until reload; raw lone surrogate in archive text quarantines readable draft (unreachable, session.rs); copy lacks archive envelope; iOS Safari likely ignores beforeunload (dialog + copy are protection there); Retry clicked during ms-long recovery → reload screen; re-importing copy of trapping draft re-traps (spends recovery); copy near 16 MiB may OOM low-memory device; storage full + confirmed replace + reload restores replaced draft; `internal` may come from handle rebuild (Retry reopens).
|
||
|
||
## BLK-013 — Editor drawing jumps on select/deselect (SelectionTag in flow above canvas) (2026-11-12)
|
||
- **Status**: resolved 927537b
|
||
Friction: owner R1 trial on db:trial (brief « V1-2.6 — R1 — Dernier retour utilisateur », 2026-11-12): « Sélection : zone « … » » text above drawing; drawing moves down on select, back up on deselect; redundant with highlight + side panel.
|
||
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.
|
||
|
||
## BLK-015 — admin.spec rights screen crashes under axe on accumulated e2e grants (sandbox) (2026-11-13)
|
||
- **Status**: open
|
||
Friction: `apps/app/e2e/shell/admin.spec.ts` A0 « the rights screen with grants » (:373, sometimes :369 grant row not visible) and « admin screens » (:750 loop, fr/en, desktop + 375) fail with « Target crashed » inside axe (`e2e/support/browser.ts:219`) on persistent sandbox; locale varies run to run.
|
||
Real cause: accumulation of e2e grants in persistent sandbox. Rights screen (/app/admin/access) renders EVERY grant (`list_catalog_grants` no argument, `GrantList` shows all) → renderer dies under axe. Grants 753 → 1 282 (R2.3) → 2 269 (C0 start 2026-11-13) → 3 515 (C6 end); each admin.spec run adds 25 grants + 25 accounts, full sweep +149.
|
||
Evidence: interleaved A/B admin.spec alone, pre-R2 worktree 65a8fd3 vs HEAD 52aac41, 4 runs all 13p/8s/3f same crashes → not an R2 regression. Dose-response quiet window (temp spec copy routing list_catalog_grants to 753 newest rows, deleted after): capped 16p/0f (2 526 grants), full 11p/5f 4 crashes (2 551), capped 16p/0f (2 570). Final sweep c6sweep2 221p/119s/5f all admin.spec; isolated 12p/8s/4f. Guard OK every run.
|
||
Solution: none applied (owner: no reset, no deletion of pre-existing data, pagination stays in RR-13). Rerun admin.spec alone only as diagnosis, never as gate. Close when RR-13 paginates grant list (or run-scoped fixture cleanup approved) and admin.spec green on sandbox.
|
||
Refs: `docs/development/BROWSER_TESTS.md` §6, `V1-2-6_U1_CORRECTIONS.md` §R2, BDR-115, LRN-133.
|
||
- **Status (2026-11-13)**: open: R2 finish 2026-11-13 sweep, admin.spec A0 + admin screens still Target crashed, same signature; shell chrome changed, no A/B cap rerun on this branch; pagination stays RR-13
|