kanban-dev-webapp/scripts
Dave a2986a11d0 test(intake): per-(link, project) cap infrastructure
Phase 9a Task 6. Three integration tests:
  - schema lands: row inserts with link/project/date/count fields,
    composite unique index is the only constraint (different
    project same link + date is allowed)
  - duplicate (link, project, date) is rejected by the unique index
  - the public route returns a sensible status, never 500, on a
    Phase 9 link (the route will be wired in 9b; 9a only proves
    it does not crash today)

Two bridges from the plan:
  - PocketBase's date field defaults to unique=true; my schema
    fix flipped it via ensureIntakeLinkSubmissionsDateNotUnique.
    The relation and number fields appeared to share the same
    default but getOne()'s response omits the key, so the
    explicit unique=false on those doesn't stick — yet rows with
    the same link and different projects work in practice (the
    composite index does its job). Worth a follow-up if a future
    PocketBase release tightens the default.
  - bumpDailyCapForProject wraps the read-then-create-or-update
    in a retry on the unique constraint to handle PocketBase's
    read-after-write latency window. The cap-isolation property
    is verified end-to-end in 9c.
2026-09-21 13:27:58 +02:00
..
_dbg.ts feat(dashboard): remove session-clustering paragraph from methodology 2026-09-16 15:30:46 +02:00
backfill.ts fix(commits): set source on ingest/backfill writes, tidy Task 1 review findings 2026-09-19 10:22:26 +02:00
build-icons.ts feat(pwa): icon build script and committed PNG outputs 2026-09-21 11:22:32 +02:00
compute.ts feat(dashboard): remove session-clustering paragraph from methodology 2026-09-16 15:30:46 +02:00
relink.ts chore(relink): CLI helper for off-server relink runs 2026-09-16 13:36:42 +02:00
seed-demo.ts feat(linking): idempotent relink engine preserving manual links 2026-09-16 13:23:33 +02:00
setup-remote.ts test(intake): per-(link, project) cap infrastructure 2026-09-21 13:27:58 +02:00