Repository navigation
refactor(storage): name stored records by id and batch order creation - #38
Merged
Merged
Conversation
Certificates get a fresh random ID per finalize attempt and are written before the token-gated order write, which becomes the commit point. A completion that loses the order write leaves its certificate stored but referenced by no order, so it is never served; certificates are reachable only through an order whose Certificate URL names them.
CreateOrder stores the order together with its authorizations and challenges, replacing the separate child-first creates. Backends with multi-record atomicity write the whole tree in one transaction; the contract otherwise requires children before the order so a readable record never references a missing one.
Stored authorizations name their challenges by ID; GetAuthorization composes the wire-format challenges from the challenge records, so the copies cannot drift from the records they mirror. SettleAuthorization now writes only the status transition, and finalize reads challenge status from the fetched record instead of an embedded copy.
brandonweeks
force-pushed
the
storage-record-shape
branch
from
July 16, 2026 18:54
ff9f14a to
9aea8c8
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.
Certificates get a fresh random ID per finalize attempt, written before the token-gated order write that commits them; a completion that loses that write leaves its certificate referenced by no order, so it is never served.
Stored authorizations name their challenges by ID, and GetAuthorization composes the wire-format challenges from the challenge records, so the copies cannot drift from the records they mirror. CreateOrder stores the order together with its authorizations and challenges, replacing the separate child-first creates.