Skip to content

feat(hac): sync_cooldown_for_result in apps/sandbox-executor/src/sandbox_executor/preflight_coold... - #475

Open
thomashan wants to merge 9 commits into
mainfrom
I-1796253983-hac-model-scoped-cooldown/P-1796254006-CLA-CO5.5/E-1796254161-CLA-CO5.5/_
Open

thomashan wants to merge 9 commits into
mainfrom
I-1796253983-hac-model-scoped-cooldown/P-1796254006-CLA-CO5.5/E-1796254161-CLA-CO5.5/_

Conversation

@thomashan

Copy link
Copy Markdown
Collaborator

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

  • Implement 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.

References

None

Plan & Validation Metadata

  • Plan ID: P-1796254006-CLA-CO5.5
  • Expected Value (EV): 47.00
  • Agent: claude-agent
  • Model: claude-opus-5-5

Holon Intent Agent and others added 9 commits December 2, 2026 23:26
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant