Repository navigation
PAY-002B2A: persist immutable command registration and audit event - #166
Merged
Merged
Conversation
✅ Deploy Preview for luminous-fox-7c393f ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This was referenced Jul 13, 2026
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.
Closes #165
Outcome
Adds the first durable PAY-002B journal boundary. A server caller can atomically create one deterministic command record and its revision-1 audit event, or create neither. An exact retry is read-only. A different command type, endpoint schema, or canonical payload fails as a conflict. Orphaned, malformed, timestamp-inconsistent, or future-version records fail closed without repair.
This is deliberately persistence only. It grants no lease, execution/send permission, Stripe action, result replay, endpoint, deployment, or production behavior.
Safety boundary
transaction.createso races cannot overwrite either immutable record.journal_unavailableoutput.Verification
Hosted CI intentionally does not run the opt-in dedicated Firestore emulator suite. The full local emulator evidence above is therefore separate from hosted evidence.
Compatibility and migration
Additive only. The new module is not imported by any runtime entrypoint, so existing production behavior and data are unchanged. No backfill is included. Retention or deletion remains blocked on #110 and requires an approved tombstone design.
Officer impact: None — this server-only module is unused by the live app and adds no officer task.
Officer documentation: None — no public content, navigation, admin duty, collected data, permission, deployment, payment operation, incident process, backup, or recovery behavior changes.
Deployment evidence: Source and local tests only before merge. No website publication, Firebase deployment, Stripe/provider configuration, or production behavior is claimed.