Skip to content

Feat/payment state durability - #110

Open
1amKhush wants to merge 3 commits into
ContextVM:masterfrom
1amKhush:feat/payment-state-durability
Open

1amKhush wants to merge 3 commits into
ContextVM:masterfrom
1amKhush:feat/payment-state-durability

Conversation

@1amKhush

Copy link
Copy Markdown
Contributor

Closes #109

Summary

Harden CEP-8 server payments against duplicate billing, stale verifier completions, and state loss across workers or restarts.

  • Add atomic admission, generation-fenced transitions, and single-use authorization claims.
  • Retain invoice bindings and replay records independently of verification expiry.
  • Support an injectable PostgreSQL backend alongside the in-memory default.
  • Validate quotes, amount units, processor output, and PMI compatibility.
  • Add canonical identity fixtures and PostgreSQL integration coverage in CI.

Compatibility

  • AuthorizationStore now uses async admit, transition, and read.
  • PostgreSQL is available through @contextvm/sdk/payments/postgres; call initialize() before injecting the store.
  • Invalid configuration, out-of-range quotes, and disjoint PMI sets are rejected.

Validation

  • 784 tests passed; 5 live-wallet tests skipped.
  • Covered concurrent workers, worker crash/restart, stale attempts, lost commit acknowledgements, and encrypted replay.
  • Typecheck, lint, build, export checks, and frozen lockfile validation passed.
  • Node 18 public API/lifecycle smoke tests and browser bundle checks passed.

Copilot AI balanced review requested due to automatic review settings October 18, 2026 18:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

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.

Harden server payment authorization and durability

2 participants