Repository navigation
fix(credits): name an empty balance, refuse runs it cannot finish - #625
Merged
Merged
Conversation
…Credit welcome - Insufficient Credits at reservation is INSUFFICIENT_CREDITS, not the catch-all BILLING_FAILED; the child relays the category so the parent shows the safe message and records credits_insufficient. - POST /backtest/run refuses a platform_credits run the balance cannot finish (402; 403 for a restricted account). - Welcome grant v2 = 8 Credits for new accounts; v1 holders keep 1.5. - Admit account_restricted / credits_insufficient in the analytics allow-list (account_restricted events were being dropped). Co-Authored-By: Claude Opus 5.5 <[email protected]>
…; pass model stops through the iFinD mapper Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Resolves the trace_lifecycle wrap in the backtest child and the parallel test additions; bumps app.js to v=159 since main independently reached 158. Co-Authored-By: Claude Opus 5.5 <[email protected]>
- Preflight counts the owner's running platform-credits runs (admitted estimate less settled spend) and re-checks under the slot-ledger lock, so concurrent launches cannot each pass against one balance (402). - Calls priced from NYSE sessions up to the settled end, not the weekday upper bound; per-model median output tokens instead of a flat 1000. - Prompt estimate adds step instructions/output formats, the single-prompt strategy text and carried upstream outputs; ceiling via the execution service's shared reservation_ceiling_micro_for (no copied constant). - 402 rounds the need up and the balance down so the figures never tie. - Model-failure slot errors are owner-only; others (and the legacy mirror) read a generic "the model run could not continue". - Child reports run_failed at the CLI boundary (setup + finalize too), naming the run's own error past a failed finalize; parser scans both streams past an unknown category. - account_restricted now blocks in analytics user state. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This branch was successfully deployed
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.
Prod 2026-10-07: a new account's GPT-5.5 / DJIA 30 backtest on ATL Credits died 39 bars in with "Model usage billing could not be completed." The 1.5-Credit welcome grant ran out. The store's
InsufficientCreditsErrorfell into_execute_platform's catch-allBILLING_FAILED.INSUFFICIENT_CREDITS("Not enough ATL Credits…"). The child printsERROR: llm.run_failed category=…at its CLI boundary, so setup andfinalize_runfailures are covered too. The parent shows the safe message instead of a traceback tail and records the realerror_category. Only the run's owner sees that message; anyone else reads a generic "the model run could not continue".POST /backtest/runrefuses a platform_credits run the balance cannot finish. It returns 402, or 403 for a restricted account. The estimate is the sum of typical calls plus the largest reservation ceiling. Calls are counted from NYSE sessions up to the settled end. Output tokens are the per-model prod median. The prompt includes step instructions, the strategy prompt and carried upstream outputs. The ceiling comes from the execution service's ownreservation_ceiling_micro_for. GPT-5.5 / DJIA 30 / one week comes out at about 1.79 Credits; prod observed about 1.81. The owner's running platform_credits runs (estimate minus settled spend) are set aside first, and this is re-checked under the slot-ledger lock. A failed balance read lets the run through; the per-call reservation remains the hard gate.default_signup_credits_v2. v1 holders keep their 1.5, so the boot backfill does not top up every existing account.account_restrictedandcredits_insufficientare added to the allow-list and both DDLs, and both now block in user state.formatBacktestErrorno longer rewrites Credits or model-stop messages as iFinD failures.app.js?v=159.🤖 Generated with Claude Code