Repository navigation
Conversation
There was a problem hiding this comment.
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.
|
Verified locally beyond the PR's claims: full suite against a live Postgres 17.7 (784 pass / 0 fail, matching CI), lint/typecheck clean, and we confirmed the load-bearing behaviors empirically — concurrent two-worker transparent delivery produces exactly one One structural decision before merge, plus smaller items: 1. Defer the PostgreSQL backend — split the PR. The state machine + in-memory store fixes every #109 bug within a process (~1,300 lines). Postgres (+CI service, migrations, 2. Document the constraint the split creates: one paying server identity = one process. Without that sentence in the 3. Ticket: expired-grant retention horizon. A paid grant that expires unclaimed (user pays, misses the 5-min 4. Still needed on the core: the PMI grammar decision is now centralized in One deliberate divergence worth a code comment: payment records use Verdict: request changes for 1 (split), 2, and 4 — all cheap. The core is the right foundation; keep it. |
Related: #109. Depends on #108.
Summary
Prevent duplicate payment offers and stale authorization changes using canonical invocation identity, atomic admission/claim operations, generation fencing, and retained transparent-request replay records.
PaymentStateStorefor application-provided backends; bundle onlyInMemoryPaymentStateStore, with no added storage dependencies, database export, migration, or database CI service.Compatibility
AuthorizationStorereplaces its synchronous grant/claim/pending/clear API with asynchronousadmit,transition, andread. Configure capacity and replay admission throughPaymentStatePolicy; inject a shared instance throughServerPaymentsOptions.stateStore.The default store loses state on process/store restart. Persistence and cross-process coordination require an application-provided implementation; the application owns dependencies, initialization, atomicity, and shutdown. Backend errors propagate without fallback to fresh memory. PostgreSQL PR #116 is closed and is not a prerequisite.
Unclaimed expired grants remain retained pending explicit recovery/retention policy (#114). Server outcomes and result recovery follow in #112.
Validation
No live-wallet settlement runs were performed. Work notes and ticket drafts are excluded from Git.