Provision Autumn customers for orgs and self-heal customer_not_found - #1780
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
executor-marketing | 6813d37 | Commit Preview URL Branch Preview URL |
Aug 27 2026, 10:24 PM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
executor-cloud | 6813d37 | Aug 27 2026, 10:26 PM |
Contributor
Cloudflare previewTorn down — the PR is closed. |
@executor-js/cli
@executor-js/config
@executor-js/execution
@executor-js/sdk
@executor-js/codemode-core
@executor-js/runtime-quickjs
@executor-js/plugin-file-secrets
@executor-js/plugin-graphql
@executor-js/plugin-keychain
@executor-js/plugin-mcp
@executor-js/plugin-onepassword
@executor-js/plugin-openapi
executor
commit: |
RhysSullivan
force-pushed
the
fix/autumn-customer-provisioning
branch
from
August 27, 2026 20:26
8fd092c to
8f3317b
Compare
RhysSullivan
marked this pull request as ready for review
August 27, 2026 23:09
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
An organization created in the product was never registered as a customer with the billing provider, and both billing paths use non-creating endpoints (balance check, usage track). So for an affected org every billing call answered
404 customer_not_found, permanently: the balance gate failed open (correct for an outage, catastrophic as a steady state) and usage tracking is fire-and-forget, so the org ran unlimited executions and none of them ever reached the meter. Unbilled, and invisible from the product side.Nothing provisioned the customer on the way in: all three
customers.getOrCreatecall sites are conditional (over-free-org-limit check, member seats, the rate limiter's paid exemption), so an org that trips none of them stays unknown to billing forever.Fix
createOrganizationprovisions the org's billing customer up front. Non-fatal: a billing blip must not block signup.customer_not_foundis classified as its ownAutumnCustomerNotFoundError. The balance check and the usage track create the customer and retry once, so the usage lands instead of being lost. A genuine provider outage still surfaces asAutumnError, unretried, and still pages.nameis"", not nullish, so??left every billing call tracing as the bare spanautumn..Testing
New cloud e2e
e2e/cloud/billing-customer-provisioning.test.ts, black-box against the billing emulator's own state:customer_not_foundarmed on both billing endpoints, the execution still runs and still lands on the meter;customer_not_foundthe repair cannot close is attempted exactly twice (once, once after provisioning) and then given up on — the retry is bounded, not a loop in a forked, untimed fibre.Scenarios 1, 2 and 4 reproduce or bound the production symptom: on unmodified product code they fail (customer list empty; 0/1 usage events; no repair attempt at all) and pass with the fix. Scenario 3 is a guard and passes either way. Ledger assertions are attributed to the scenario's own organization, so another scenario's faulted call can't stand in for them. Existing metering and execution-limit e2e still green;
typecheck,lint,format:checkclean.