Repository navigation
fix(dream): pay the verify allowance twice so a costly first call cannot starve the second - #24209
Merged
Merged
Conversation
…not starve the second Readback after #24193 (rev 908206a, 02:10-03:23Z 11-01): the allowance rescued overshot passes (02:21Z, 3 edits verified), but 12 edits on two passes were still unverified: the first verifier call spent past the reserve's estimate and the second was refused. Pay the reserve twice (only spend is charged) and log the reserve (owed) and the verifier's spend (verify_used) to calibrate the factor. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…in spend The 192k evidence floor capped a large doubled reserve; verify_chain never reported its spend; verify_used was missing when no verifier ran (Luna R1). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
Why
#24193 gives Dream's second check (the verifier) its own allowance after a main turn overspends the pass budget. Readback after it went live (revision
908206a, ro-proddream_passlines, 11-01 02:10–03:23Z):dismiss_personedits verified on a pass that had gone over budget.budget_tokens). On those, the first verifier call cost more than the reserve's per-call estimate, and the second call was refused.What
VERIFY_ALLOWANCE_FACTOR = 2). The allowance is a cap, so only what the calls actually spend is charged.verify_needalso takes the doubled reserve on a served hold. Before this, the 192k evidence floor capped a reserve above 96k.levers.verify_hold.owedrecords the reserve.levers.verify_hold.verify_usedrecords what the verifier actually spent, on both the two-verifier path and the chain path, and 0 when no verifier ran.Spend
Rollout
DREAM_VERIFY_HOLD_MODE=shadow(oroff) removes the hold, the allowance and the doubling.verify_reasons.budget_tokensper day should fall from ~250/day (10-31) toward 0, with no rise in failed passes or indream_lever_error lever=verify_holderrors.verify_used / owed.Tests
backend/tests/unit/test_dream_verify_hold.py. Each one fails when its fix is reverted:tests/unit/test_dream*.pyfiles pass viatest.shunderomi-heavy.Failure-Class: none
Line-Count-Exception: backend/utils/dream_agent.py | 1598 -> 1606 | the allowance factor and its calibration fields sit with the verify hold they size; splitting the pass loop is out of scope for this fix
🤖 Generated with Claude Code