feat: auto-run database migrations on startup #164

Closed
pook wants to merge 2 commits from feat/auto-migrate-on-startup into main
Owner

Summary

  • Adds runMigrations() using Drizzle programmatic migrate() API
  • Migration failure exits with code 1
  • SKIP_MIGRATIONS=true env var escape hatch
  • 3 unit tests (all pass)

Closes #33

## Summary - Adds runMigrations() using Drizzle programmatic migrate() API - Migration failure exits with code 1 - SKIP_MIGRATIONS=true env var escape hatch - 3 unit tests (all pass) Closes #33
Adds a runMigrations() function using Drizzle's programmatic migrate API
that runs pending migrations before the HTTP server binds its port.
Migration failure logs the error and exits with code 1 to prevent serving
on a stale schema. SKIP_MIGRATIONS=true env var bypasses for local dev.

Closes #33

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Author
Owner

Closed 2026-04-10 during pipeline triage.

Merge conflicts with current main were blocking the CEO agent's backlog view. The compliancebot repo had ~60 open PRs and 141 open agent-task issues. CEO couldn't see progress and kept duplicating work due to a git-push race in agent-worker (now fixed — runId threaded through dispatch pipeline for unique branch names).

Reopen / resubmit against current main if the work is still relevant. Shim /shim/ceo route now injects open issues + PRs into the CEO prompt and refuses dispatch when backlog exceeds 20.

Closed 2026-04-10 during pipeline triage. Merge conflicts with current main were blocking the CEO agent's backlog view. The compliancebot repo had ~60 open PRs and 141 open agent-task issues. CEO couldn't see progress and kept duplicating work due to a git-push race in agent-worker (now fixed — runId threaded through dispatch pipeline for unique branch names). Reopen / resubmit against current main if the work is still relevant. Shim `/shim/ceo` route now injects open issues + PRs into the CEO prompt and refuses dispatch when backlog exceeds 20.
pook closed this pull request 2026-04-10 15:08:12 -04:00

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pook/compliancebot!164
No description provided.