Home

boring / v2

publicBoring-Software-Inc/v2
Overview Code History Branches Pull requestsIssuesInsights Campfire Docs
main
HomeOverview Code PRsIssues

feat(core): arm-time backfill — replay stored events into runs, surface off (§4)

4 months ago

174eb87
Authored
grim7/14/2026, 4:23:26 AM
Arming enqueues a backfill-repo job; the worker replays the repo's stored
change-request events through the real runWorkflows into real runs, so the
dashboard has history the moment they arm. No hand-inserted runs.

The hard requirement — no comments/checks on historical threads — is met by
runWorkflows({surface:false}): it records action rows as 'suppressed', not
'recorded'. The sweeper only picks up 'recorded', and backfill never calls
emitPrSurface/emitPendingCheck, so history appears with zero PR surfaces (test:
run persists, verdict block, all actions suppressed).

Bounded: 30 days, cap 50 change requests, paced 400ms; a failed forge read
degrades one run via the fail-closed floor. Progress on repos (migration 0004) →
RepoLite; BackfillProgress polls 2s and shows 'backfilling — N of M change
requests', the dashboard filling in live via pg_notify. dev:demo skips the
enqueue.

Checks: typecheck all, biome, boundaries, 240/240.

Parentc566b0a

22 files changed
  • DECISIONS.md+25−0
  • all-summaries.md+15−0
  • apps/web/src/components/activity/activity-page.tsx+4−1
  • apps/web/src/components/arming/backfill-progress.tsx+38−0
  • apps/web/src/lib/arm.functions.ts+8−3
  • apps/web/src/lib/onboarding.functions.ts+2−0
  • apps/web/src/lib/server/active-repo.ts+2−0
  • apps/web/src/routes/index.tsx
+3
−0
  • apps/worker/src/index.ts+18−0
  • apps/worker/src/jobs/backfill-repo.ts+103−0
  • apps/worker/src/jobs/run-workflows.ts+7−0
  • apps/worker/src/process-event.integration.test.ts+48−0
  • packages/db/drizzle/0004_big_emma_frost.sql+2−0
  • packages/db/drizzle/meta/0004_snapshot.json+1579−0
  • packages/db/drizzle/meta/_journal.json+7−0
  • packages/db/src/index.ts+2−0
  • packages/db/src/queue.ts+8−0
  • packages/db/src/schema/repos.ts+7−0
  • packages/db/src/services/events.ts+37−0
  • packages/db/src/services/onboarding.ts+5−0
  • packages/db/src/services/repos.ts+18−0
  • packages/db/src/services/runs.ts+7−0