Repository navigation
id-store: durable policy-epoch adapter for admission reauthorization (#17179 slice 1) - #17187
Merged
developing-today-fleet[bot] merged 2 commits intoNov 30, 2026
Merged
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
developing-today-fleet
Bot
deleted the
archer/17179-policy-epoch-adapter
branch
November 30, 2026 13:02
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.
Slice 1 of #17179 (parent #10192): the policy-epoch durable adapter.
What lands
PolicyEpochSource— the durable seam for the current policy epoch:current_epoch()/advance_to()(monotone), every failure a typedPolicyEpochError(Missing / Corrupt / Regression / Io).FilePolicyEpochSource— one small file holding canonical decimal epoch text. Atomic writes (sibling tmp file + fsync + rename + read-back verification), so a crash mid-advance leaves the old epoch or the new one, never a torn record. A missing record is fail-closedMissing, never an implicit epoch 0; a corrupt record is refused and never clobbered by an advance.DurableEpochReauthorizer— binds the existingReauthorizertrait to the durable source:reauthorize()reads the durable epoch first and refuses the commit withAdmissionRejection::Policywhen the record is missing/corrupt/unreadable (fail-closed, per the id admission: durable policy-epoch / ledger / outbox adapters (slice of #10192) #17179 oracle);policy_epoch()reports the durable epoch, or thePOLICY_EPOCH_UNREADABLEsentinel when unreadable (audit-only accessor — the pipeline reads it only after reauthorization succeeds, so the sentinel can never be recorded for a committed outcome). Gate ordering unchanged: no trait signatures touched.Tests
admission::epoch_tests): missing fail-closed, advance-survives-reopen + monotonicity, corrupt refused and never clobbered (incl. u64 overflow), wrapper delegation.pkgs/id/tests/admission_epoch.rs: pipeline commits record the durable epoch; restart (fresh pipeline + source over the same record) commits at the same epoch; missing and corrupt records block the commit at reauthorization with the commit step never run and the ledger entry restingRejected.Verification: fleet-command run dispatched against this head (id in the #17179 evidence comment). Ledger and outbox durable adapters remain as follow-on slices of #17179.
Refs #17179, #10192. Lane 0607-G (charlie ADVANCE).
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.