Duplicate intent reached the gateway
UI-only disabling is too late when two calls enter before the pending state is rendered. The test sends both calls during the same in-flight window.
SELF-OWNED ENGINEERING PROOF · ISSUE ISOLATION
Two near-simultaneous checkout actions could cross the payment boundary before the interface reflected its busy state. This record shows the reproduction, failure boundary, focused correction, and regression evidence.
FAILURE BOUNDARY
DIAGNOSIS
UI-only disabling is too late when two calls enter before the pending state is rendered. The test sends both calls during the same in-flight window.
The checkout boundary had no shared record of an active charge. Each caller could create its own promise and side effect.
The controller stores the request promise by cart ID before the charge begins, returns it to duplicates, and clears it in a finalizer.
This client boundary contains concurrent calls in one runtime. A real payment API should also enforce a server-side idempotency key across retries and devices.
VERIFICATION EVIDENCE
Run with Node.js only. No application framework, payment credentials, or external service is required.
$ node --test issue-isolation-proof/checkout-controller.test.mjs
✔ concurrent submissions for the same cart create one charge
✔ a failed charge releases the cart for a clean retry
tests 2 pass 2 fail 0
BUYER HANDOFF
Provide the affected workflow and repository or staging access. The output is a reproduction record, failure boundary, implementation path, acceptance condition, and the regression path that matters.
Open Upwork profile