Skip to content
This repository was archived by the owner on Nov 11, 2026. It is now read-only.

feat: add inactive test checkout and durable Stripe intake - #47

Merged
IAMSamuelRodda merged 2 commits into
mainfrom
arc/stripe-checkout-44
Nov 9, 2026
Merged

IAMSamuelRodda merged 2 commits into
mainfrom
arc/stripe-checkout-44

Conversation

@IAMSamuelRodda

@IAMSamuelRodda IAMSamuelRodda commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

The console has no checkout, payment recovery or signed Stripe intake. This adds the first test-only source stage for console#44 and platform#818. Samuel directs checkout and backend work to proceed in parallel.

User Impact

The new public buy page can select an admitted test product and open Stripe Checkout. A protected recovery page reads current payment facts. A confirmed payment does not claim that a Gateway exists. No real catalogue, live key or deployed binding is included. Existing /api/* authentication stays unchanged.

Why This Change Was Made

One Worker owns intake and one D1 transaction owns the receipt/outbox. The outbox sends references through the existing provisioning queue. No second provisioner or copied entitlement ledger is added. The backend contract remains provisional. The backend must retrieve current Stripe facts and validate the order, catalogue and trusted tenant binding before any effect.

This is the smallest coherent payment-intake stage. It includes durable intent before Stripe, stable retry parameters, signed events and recovery after a lost response. Existing-account linkage, billing portal, resize, destroy and live mode remain separate. The simplification pass retained these boundaries and removed an unconditional effect counter from the wire fixture. The fixture now rejects changed parameters for a reused key.

Evidence

Candidate: 6b297da65ad75413ac5e119f8aa15dc68ec59830. Base: 8ef6f0f3586a9a04dfc25abe7e8241ffd3482762.

  • pnpm lint, pnpm format:check, pnpm test:worker, pnpm build, pnpm build:worker, git diff --check: pass. Worker suite: 29 tests. The build includes TypeScript checks. Worker build is dry-run only.
  • pnpm exec vitest run --project ui --browser.headless --maxWorkers=1 FILES: all 20 files and 73 tests pass in two bounded batches. The combined shell then exceeded the host memory bound before demo tests. No passing whole-command result is claimed.
  • Real workerd/Miniflare, D1, limiter and Queue proof covers protected API routes, public request guards, durable intent, repeated identical Stripe parameters, old-key refusal, current payment status, raw signature/body limits, transactional rollback, duplicate delivery and scheduled replay. Stripe and Turnstile HTTP are synthetic. This is not real provider acceptance.
  • The new disallowed-Origin assertion fails against the specified base (HTTP 200 instead of 403) and passes on this source. The archived-price recovery regression fails on the initial candidate (503 instead of 200) and passes after repair.
  • pnpm test:checkout: two active built-browser flows pass at desktop/mobile widths. The HTTPS harness uses the actual UI, Worker and D1. External Stripe and Turnstile remain synthetic. Missing, forged and invalidated cookies cause zero Stripe requests before creation and after uncertainty.
  • Demo report test passes. All three demo-state scenarios pass individually. The combined demo process exceeded the host memory bound.
  • Initial independent ClawSweeper found the archival recovery defect and capability/active-flow proof gaps. All three now have focused repairs and red/green or active-flow evidence. Restricted rk_test_ support also has positive/negative controls. Fresh full local ClawSweeper review completed on base 8ef6f0f3586a9a04dfc25abe7e8241ffd3482762 through final head 6b297da65ad75413ac5e119f8aa15dc68ec59830. Qualified upstream runner: 446dd257a7996b4b5226d20af42108e5a2f4e552. All 35 changed paths were covered. Result: patch correct; security cleared; shipped-entry proof sufficient; no actionable finding. Real provider and backend activation remain separate. The reviewer ran read-only source inspection, not target tests.
  • Actual built-app screens at 1280×900 and 390×900, light and dark: visual evidence. Initial screens show the empty catalogue and unavailable configuration. Additional active screens show synthetic selection, uncertain recovery and confirmed payment without a provisioning claim. Active flow and redacted traces. No customer data or provider key was used.

No real Stripe sandbox or Turnstile acceptance occurred. D1/Queue/cron, hosted Access bypass, trusted backend mapping and current-fact effect validation remain activation gates. Live mode is rejected in code. Live mode, the first live price and first live webhook retain separate Deploy records.

Related: arcforgelabs/platform#1026; arcforgelabs/platform#814; arcforgelabs/platform#815; arcforgelabs/platform#818.

Exact-head GitHub checks: six pass, zero pending or failed. CI run passed frozen install, lint, format, Worker/UI tests, both demo suites, both builds and the accounts theme build. Dependency review, PR context and CodeQL also passed. The live merge state is CLEAN for the reviewed head.

@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-09T08:33:03.633743Z
We couldn’t complete this review. Comment @codex review to try again.
6b297da PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@IAMSamuelRodda
IAMSamuelRodda merged commit 5d03001 into main Nov 9, 2026
7 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant