Index-only dates and statuses become body lines, frontmatter format: 2, Index tables removed. memory.sh check rc 0 before and after; digest statuses unchanged (BLK-008, BLK-009 open).
130 lines
13 KiB
Markdown
130 lines
13 KiB
Markdown
---
|
||
format: 2
|
||
type: blockers_registry
|
||
entry_prefix: BLK
|
||
schema:
|
||
id: BLK-XXX
|
||
date: YYYY-MM-DD
|
||
friction: string (what was blocked)
|
||
real_cause: string (root cause, not symptom)
|
||
solution: string (workaround or fix)
|
||
status: [open | resolved | upstream]
|
||
rules:
|
||
- Open a blocker as soon as friction > 15 min wasted. Close it with a real cause, not "moved on".
|
||
- Link to upstream issue / PR / commit when applicable.
|
||
- If cause is a bug in a dependency, set status upstream with a pointer to the tracker.
|
||
- Entries in English, caveman format (BDR-009): drop articles + filler, fragments OK, technical terms exact.
|
||
---
|
||
|
||
# Blockers Registry
|
||
|
||
Format: BLK-XXX | Date | Friction | Root cause | Solution | Status
|
||
|
||
---
|
||
|
||
## BLK-001 — pnpm not on PATH (2026-05-18)
|
||
|
||
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 — Pathology DB empty — pending content review (2026-05-18)
|
||
|
||
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 — Detail-popup zone clicks silently dropped (2026-05-19)
|
||
|
||
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 — PDF text loop assumed one line per array entry (2026-05-19)
|
||
|
||
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 — Docker build crash — ERR_UNKNOWN_BUILTIN_MODULE node:sqlite (2026-05-21)
|
||
|
||
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 — Docker socket permission denied → no local Supabase stack for Claude (2026-10-08)
|
||
|
||
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 — Per-schema ALTER DEFAULT PRIVILEGES REVOKE is a no-op → private helpers kept PUBLIC EXECUTE (2026-10-08)
|
||
|
||
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 — Schema v2 CHECK migration fails on a database holding a v1 draft (2026-10-10)
|
||
|
||
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 — pdf-lib inflates PDF object streams without cap at `PDFDocument.load` (import path) (2026-10-11)
|
||
|
||
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 — Agent worktrees created on a stale base; their cleanup refused by the classifier (2026-10-14)
|
||
|
||
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 — Stopped-engine message promised "bilan conservé" with draft unsaved; dead "Réessayer" paths (2026-10-16)
|
||
|
||
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 — Rescue copy not restorable; trapping draft stuck tab; work loss outside editor (2026-10-17)
|
||
|
||
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 — e2e:avatar on develop reached DEV (keys via supabase status, worker on DEV net, purge queue drained) (2026-11-02)
|
||
- **Status**: resolved
|
||
Friction: develop `pnpm e2e:avatar` = scripts/avatar-e2e.sh could reach DEV: keys via `supabase status -o env`, worker on supabase_network_faunosteo against DEV Kong, suite wrote accounts + drained whole purge queue (`expeditePurges` unscoped), psql on supabase_db_faunosteo. Same family as sheet-assets incidents 2026-11-01.
|
||
Real cause: runner and suite knew no authorised target; URL, keys, container from env or DEV defaults.
|
||
Solution: 3a4614b ports V1-2 sandbox runner (`db-sandbox.sh avatar-e2e`: loopback gateway 127.0.0.1:57800, worker in 600 env file, constants unconditional) + guarded suite (fixed URL, container, key issuer `db-sandbox`, per-run accounts); DEV runner deleted. d3dfd03: clients refuse redirects (`noRedirectFetch`, `redirect: 'error'`). Proofs a-j strace, 2 × 5/5, log `.claude/audits/2026-11-02-avatar-e2e-sandbox-only.md`.
|
||
Status: resolved for develop path after merge. NOT fixed in old checkouts: main checkout /home/bchanot/Documents/faunosteo (feature/v1-1-clients-animals) and worktree old-958228a still hold scripts/avatar-e2e.sh + old alias; `pnpm e2e:avatar` there targets DEV. Agents never run them; owner decides their fate.
|