Skip to content

feat: Phase 3 migrations (T3.1–T3.2) - #13

Merged
trippyogi merged 2 commits into
mainfrom
build/control-plane-phase-3-migrations
Aug 8, 2026
Merged

trippyogi merged 2 commits into
mainfrom
build/control-plane-phase-3-migrations

Conversation

@trippyogi

Copy link
Copy Markdown
Owner

Summary

  • Add numbered db/migrations runner (npm run migrate / auto-migrate on startup) with schema_migrations checksums and WAL-checkpointed backups
  • Rename legacy Flow attention table to flow_touches; create canonical baton_touches (dedupe_key) plus DecisionRequest and domain DDL (T3.1–T3.2)
  • Retarget Flow-era SQL to flow_touches; add npm run test:migrations with legacy fixture coverage

Test plan

  • npm run test:migrations
  • npm test (CI Ubuntu gate)
  • Fresh DB: flow_touches + empty canonical baton_touches + decision_requests exist
  • Legacy fixture upgrade preserves Flow touch rows under flow_touches

Introduce numbered SQLite migrations, rename legacy Flow touches to
flow_touches, and add DecisionRequest plus domain DDL for T3.1–T3.2.
Handle empty flow_touches vs legacy baton_touches collisions, resume
interrupted copies, defer strict run unique indexes, and WAL-checkpoint
backups before auto-migrate.
@trippyogi
trippyogi marked this pull request as ready for review August 8, 2026 03:02
@trippyogi
trippyogi merged commit 4bccf89 into main Aug 8, 2026
1 check passed
@trippyogi
trippyogi deleted the build/control-plane-phase-3-migrations branch August 8, 2026 03:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant