Stop reconciliation GraphQL spending after an observed reserve hold - #235
Merged
Conversation
Latch the existing sponsor budget assessment across concurrent crawl collectors, and defer held jobs without materializing or consuming a queue attempt. Co-Authored-By: GPT-6 Astra <noreply@openai.com>
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.
Summary
Stop an admitted reconciliation from starting more GraphQL requests after its sponsor's observed balance falls below the reserve. A held crawl skips materialization and defers its queue row to the observed reset deadline without consuming an attempt.
Related Issues and Pull Requests
Fixes #229
Changes
Testing
RETRY_SCHEDULEDinstead ofBUDGET_HELD. Each mutant was restored and its focused tests returned green.pnpm db:migrate && pnpm test --run && pnpm lint && pnpm typecheck && pnpm buildpassed in implementation and again in the independent final review: 118 files and 2,712 tests passed with zero skips; lint, typecheck, and production build passed.verifyandactionlinton exact head40b792fabddcb47ddac3088b76ac19d4e520f8f2.node:cryptobuild warnings in untouched modules; pnpm warned that four dependency build scripts were ignored; migration emitted existing-object notices.Follow-ups / Known Limitations
Requests already active when the hold is observed may settle and spend points; this does not guarantee an absolute global balance floor. Held retries restart collection rather than resuming a cursor. A held run uses the existing FAILED run status while its queue row is deferred with its attempt refunded.
Footer
Generated by GPT-5.6 Sol (brief, orchestration), GPT-6 Astra (discovery, implementation, testing, verification, review, scoring)