Repository navigation
PAY-002A1: add canonical commerce state reducers - #162
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 #161
Outcome
Adds the source-only version-1 commerce state contract that later race, shop, webhook, cancellation, and refund work can share. No current endpoint imports it, no record is changed, and no payment behavior becomes available.
Security and compatibility boundary
The module is dependency-free CommonJS and makes no Firebase, Stripe, network, filesystem, environment, logger, clock, or random call. Inputs and outputs are non-mutating/frozen; hostile accessors, proxies, prototypes, nested timestamp values, opaque IDs, and canary data are covered.
This PR does not add command identity, webhook adoption, a migration, a compatibility writer, capacity/inventory, refund commands, provider configuration, or production testing. PAY-002B-D, PAY-003B, PAY-005, #113, and PAY-002A2 retain those boundaries.
Verification
Node 20 on exact commit
1db6fe3:npm --prefix functions run lint: passeddemo-rules-testwith Java 17: 305/305 passedState and deployment truth
runmprc.comverified: noOfficer impact: No current officer screen, payment flow, or procedure changes. Commerce remains NOT AVAILABLE YET.
Officer documentation: None — the library is not imported by a runtime endpoint and gives officers no usable action.
Deployment evidence: Source/tests and local isolated verification only. Website, Firebase, Stripe/provider, migration, and live behavior are intentionally unmodified/unverified at PR creation.