Skip to content

[codex] Add sentinel readiness status#886

Draft
deanbaker wants to merge 1 commit into
block:mainfrom
deanbaker:codex/sentinel-ready-status
Draft

[codex] Add sentinel readiness status#886
deanbaker wants to merge 1 commit into
block:mainfrom
deanbaker:codex/sentinel-ready-status

Conversation

@deanbaker
Copy link
Copy Markdown
Contributor

@deanbaker deanbaker commented May 28, 2026

🤖

Context

We want to support an automated sentinel-drop pipeline that runs once a day during low-traffic windows. That pipeline should only drop _spirit_sentinel when Spirit is actually ready to proceed to cutover.

For multi-day migrations, the sentinel table can exist for a long time while copy/checksum work is still in progress. With the current table-existence-only signal, automation cannot distinguish "sentinel exists because cutover is deferred and ready" from "sentinel exists because the migration is still copying/checksumming." Dropping it too early can remove the operator safety gate before Spirit has reached the cutover wait point.

Summary

  • Add a status column to Spirit-created sentinel tables.
  • Initialize sentinel rows as status = 'copying'.
  • Mark sentinel rows as status = 'ready' only when Spirit reaches the sentinel wait point before cutover.
  • Keep legacy/manual sentinel tables compatible: if the sentinel exists without a status column, Spirit still waits for it to be dropped.
  • Treat a sentinel dropped during the ready-status update race as a normal release, not a migration failure.
  • Document the readiness signal for both migrate and move.

Operator Impact

Automation can now query the sentinel row and only drop the table when it sees ready, making daily low-traffic cutover windows safe for migrations that run across multiple days.

Validation

  • go test ./pkg/migration ./pkg/move -run '^$'

@deanbaker deanbaker force-pushed the codex/sentinel-ready-status branch from 00986a8 to 896d59c Compare May 28, 2026 08:12
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