Repository navigation
chore(control): add versioned first-party migrations - #121
Merged
abruption merged 1 commit intoSep 21, 2026
Merged
Conversation
abruption
force-pushed
the
chore/115-control-migrations
branch
from
September 21, 2026 01:59
02e6a8f to
2e72b26
Compare
abruption
force-pushed
the
docs/116-v1-compatibility
branch
from
September 21, 2026 02:00
55a64cc to
ebf5c34
Compare
abruption
force-pushed
the
chore/115-control-migrations
branch
2 times, most recently
from
September 21, 2026 02:03
bee4634 to
82da76c
Compare
abruption
force-pushed
the
docs/116-v1-compatibility
branch
from
September 21, 2026 05:35
ebf5c34 to
c5ddc8d
Compare
abruption
force-pushed
the
chore/115-control-migrations
branch
from
September 21, 2026 05:36
82da76c to
d52fdf3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The control service previously created session-peer tables from runtime constructors, so an installed Alpha database had no versioned upgrade boundary. This change adds an atomic first-party migration ledger, makes the compiled migration command install both Better Auth and session-peer schemas, and makes normal startup fail closed with
migration_requiredwithout DDL.It preserves zero-based stable principals, users, device generations, revocation tombstones, operation receipts, and the monotonic public revision. The generic and KR runbooks now require a fenced snapshot and same-identity/writer-lock migration. The KR snapshot records and validates the control schema version together with database integrity, signing-key/JWKS identity, and public/replay revision fencing.
Validation:
okThis PR is stacked on #120 so the migration behavior is reviewed against the v1 compatibility contract. After #120 merges, its base can be changed to
mainwithout changing this diff.Closes #115