ci / rust (push) Canceled after 0s
ci / check (push) Canceled after 0s
ci / docker (push) Canceled after 0s
ci / supabase (push) Canceled after 0s
91 lines
8.4 KiB
Markdown
91 lines
8.4 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.
|