Repository navigation
feat(hac): sync_cooldown_for_result in apps/sandbox-executor/src/sandbox_executor/preflight_coold... - #475
Open
thomashan wants to merge 9 commits into
Conversation
Description: sync_cooldown_for_result in apps/sandbox-executor/src/sandbox_executor/preflight_cooldown.py currently writes provider-wide cooldown markers for all QUOTA_EXHAUSTED preflight failures, causing a claude-fable-5-2 monthly spend limit to block healthy fallback models such as claude-opus-5-5 for 300s. Goal: Classify org/account-wide spend limits as provider-scoped cooldowns and per-model spend/rate limits (including messages telling the user to switch to another model) as (provider, model)-scoped cooldowns using model_marker_path/record_model_cooldown/read_active_model_cooldown in apps/sandbox-executor/src/sandbox_executor/preflight_cooldown.py. Ensure a claude-fable-5-2 monthly spend limit blocks claude-fable-5-2 without blocking claude-opus-5-5, while an org-level spend limit still blocks all models for that provider. Add regression tests in apps/sandbox-executor/tests/test_preflight_cooldown.py. Verify with uv run task lint and uv run pytest. Code is self-explaining: no docstrings and no comments except '# why:' comments that record a reason the code cannot show. Generated by Holon Intent Agent at 2026-12-02T23:26:31Z
…odel-scoped-cooldown/P-1796254006-CLA-CO5.5/_
Action-Origin: pr_review Review-Iteration: 1 Review-Finding-Ids: R3-F1, FIND-CI-001 Review-Severity: important
Action-Origin: pr_review Review-Iteration: 1
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
sync_cooldown_for_result in apps/sandbox-executor/src/sandbox_executor/preflight_cooldown.py currently writes provider-wide cooldown markers for all QUOTA_EXHAUSTED preflight failures, causing a claude-fable-5-2 monthly spend limit to block healthy fallback models such as claude-opus-5-5 for 300s.
Goal:
Classify org/account-wide spend limits as provider-scoped cooldowns and per-model spend/rate limits (including messages telling the user to switch to another model) as (provider, model)-scoped cooldowns using model_marker_path/record_model_cooldown/read_active_model_cooldown in apps/sandbox-executor/src/sandbox_executor/preflight_cooldown.py. Ensure a claude-fable-5-2 monthly spend limit blocks claude-fable-5-2 without blocking claude-opus-5-5, while an org-level spend limit still blocks all models for that provider. Add regression tests in apps/sandbox-executor/tests/test_preflight_cooldown.py. Verify with uv run task lint and uv run pytest. Code is self-explaining: no docstrings and no comments except '# why:' comments that record a reason the code cannot show.
Key Changes
References
None
Plan & Validation Metadata
P-1796254006-CLA-CO5.547.00claude-agentclaude-opus-5-5