Skip to content

refactor(storage): name stored records by id and batch order creation - #38

Merged
brandonweeks merged 3 commits into
mainfrom
storage-record-shape
Jul 18, 2026
Merged

brandonweeks merged 3 commits into
mainfrom
storage-record-shape

Conversation

@brandonweeks

Copy link
Copy Markdown
Owner

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.

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
brandonweeks force-pushed the storage-record-shape branch from ff9f14a to 9aea8c8 Compare July 16, 2026 18:54
@brandonweeks
brandonweeks merged commit d63fed7 into main Jul 18, 2026
6 checks passed
@brandonweeks
brandonweeks deleted the storage-record-shape branch July 18, 2026 05:53
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