Skip to content

Re-arm the post-checkout billing poll across effect recycles - #1750

Merged
RhysSullivan merged 1 commit into
mainfrom
fix/billing-checkout-spa-poll
Aug 26, 2026
Merged

Re-arm the post-checkout billing poll across effect recycles#1750
RhysSullivan merged 1 commit into
mainfrom
fix/billing-checkout-spa-poll

Conversation

@RhysSullivan

Copy link
Copy Markdown
Collaborator

Fixes the billing-trial-checkout-stale failure on cloud 15of16 that has been red on every run containing #1748 (SPA mode), including main.

The post-checkout reconciliation poll lived entirely inside a single-shot effect keyed on the URL return marker. Under SPA mode the shell re-runs effects shortly after mount (auth seeds a frame after first paint), and the re-run saw the already-stripped marker: the cleanup killed the interval and nothing re-armed it. The page sat on "Activating" forever — the server log for a failing run shows zero /api/billing requests after the return load.

Now only the marker consumption is single-shot; the poll keys off the surviving finalizingPlan state, so an effect recycle re-arms it. The timeout is anchored to when the marker was consumed (recycles cannot extend it), and refetch goes through a ref so the interval always calls the current billing client.

Checks: lint, typecheck, focused cloud/billing-trial-checkout-stale.test.ts (reproduced failing on eb34d049d, passes with the fix; server log shows the poll ticking again).

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 26, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
executor-cloud 5018043 Aug 26 2026, 04:27 AM

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 26, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
executor-marketing 5018043 Commit Preview URL

Branch Preview URL
Aug 26 2026, 04:26 AM

@github-actions

github-actions Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Cloudflare preview

Torn down — the PR is closed.

@pkg-pr-new

pkg-pr-new Bot commented Aug 26, 2026

Copy link
Copy Markdown

Open in StackBlitz

@executor-js/cli

npm i https://pkg.pr.new/@executor-js/cli@1750

@executor-js/config

npm i https://pkg.pr.new/@executor-js/config@1750

@executor-js/execution

npm i https://pkg.pr.new/@executor-js/execution@1750

@executor-js/sdk

npm i https://pkg.pr.new/@executor-js/sdk@1750

@executor-js/codemode-core

npm i https://pkg.pr.new/@executor-js/codemode-core@1750

@executor-js/runtime-quickjs

npm i https://pkg.pr.new/@executor-js/runtime-quickjs@1750

@executor-js/plugin-file-secrets

npm i https://pkg.pr.new/@executor-js/plugin-file-secrets@1750

@executor-js/plugin-graphql

npm i https://pkg.pr.new/@executor-js/plugin-graphql@1750

@executor-js/plugin-keychain

npm i https://pkg.pr.new/@executor-js/plugin-keychain@1750

@executor-js/plugin-mcp

npm i https://pkg.pr.new/@executor-js/plugin-mcp@1750

@executor-js/plugin-onepassword

npm i https://pkg.pr.new/@executor-js/plugin-onepassword@1750

@executor-js/plugin-openapi

npm i https://pkg.pr.new/@executor-js/plugin-openapi@1750

executor

npm i https://pkg.pr.new/executor@1750

commit: 5018043

@RhysSullivan
RhysSullivan marked this pull request as ready for review August 26, 2026 05:12
@RhysSullivan
RhysSullivan merged commit b429102 into main Aug 26, 2026
44 checks passed
@RhysSullivan
RhysSullivan deleted the fix/billing-checkout-spa-poll branch August 26, 2026 05:12
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.

1 participant