Repository navigation
fix: prove runtime grants for cutover sets - #1760
Merged
Merged
Conversation
Cutover-set activation previously checked transfer-profile grants through the ordinary session, so success did not prove daemon startup readiness. Resolve a distinct runtime URL, bind and catalog-check both roles before lease effects, admit only reciprocal peers, and align the CLI, docs, and rehearsal handoff with the revoke-only post-activation step. Migrate the PG18 set activation and rollback fixtures to distinct real login roles. Signed-off-by: Bernardo Donadio <bcdonadio@bcdonadio.com>
Round-one review found that the real PostgreSQL set test did not observe the active roles at S6, S7, and S15 or prove ordinary readiness after the transfer role was revoked. Wrap the production verifiers, prove the no-peer handoff, add the second-member pre-lease drift case, and align the remaining operator and rehearsal wording with the revoke-only post-activation step. Signed-off-by: Bernardo Donadio <bcdonadio@bcdonadio.com>
Bring the reviewed cutover-set runtime-role change onto the current main head while preserving the upstream S21 and S23 fixes. Signed-off-by: Bernardo Donadio <bcdonadio@bcdonadio.com>
bcdonadio
enabled auto-merge
October 25, 2026 08:13
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
Why
After #1607, single-generation
lcm migration activateproves the daemon runtime role's grants.lcm migration activate --setstill ran every step under the transfer role and checked health through the transfer verifier, so a successful set activation did not show that the daemon could start. The set runbook also kept the old manual grant swap after activation.How
This follows the #1607 design (PR #1713). Admission is caller-scoped, so the daemon and every other caller are unchanged.
cutover-set-activate.ts): a requiredordinarySettingsinput gives the runtime role its own connection. Transfer sessions (S0, S7) keep the settings derived from the prepared target.current_user = session_user) and on TLS. Role discovery failures refuse at S6 before any lease write and become a roll-forward interruption once an effect has begun.activate-generation.ts): role discovery is extracted into one context-free helper that both activators use. Single-generation behavior is unchanged.cli-cutover-set.ts):activate --set, andresume --setwhen it routes to activation, resolveLCM_POSTGRES_RUNTIME_URLonly when activation actually runs (never on dry run). The URL is never printed. A missing or invalid URL refuses withactivation-runtime-target-missing. Prepare, verify, rollback, abort and settled resume don't need it.next: revoke-transfer-grants-then-start-daemonandtransferGrantRevocation: required-before-daemon-start(replacinggrantSwap). Exit 8 keepsset-restart-required, now with the revoke-only remedy.activate --set; after exit 0 the one manual step is revoking the transfer grants. There are notes for sets prepared or interrupted on an older build, and for no-peer callers (including the set rollback target check), which refuse until the transfer grants are revoked.lcmhelp anddocs/migration-operations.mdare swept too.docs/migration-rehearsal-gate.*is regenerated separately in Regenerate the cutover rehearsal gate after #1607 #1726.Testing
cutover-set-member-evidence-drifted, no guard calls); post-selection binding before fence reads; CLI URL handling (dry run, refusal without a service call, never rendered).Reviewer guide
preSelection,resolveMemberFences,observeHealthandmemberCensusinsrc/migration/cutover-set-activate.ts.discoverMigrationActivationRolesinsrc/migration/activate-generation.ts.runActivationinsrc/migration/cli-cutover-set.ts, then the runbook indocs/migration-cutover-set.md.Closes #1707