feat(ci): add soft budget warnings to xtask ci plan#3767
Conversation
Builds on PR L (BudgetPolicy + load_budget_policy). The planner now
computes a Vec<BudgetWarning> and emits GitHub workflow commands
(::warning::, ::error::, ::notice::) so PR Plan annotates the run when
estimated LEM exceeds the configured thresholds.
Tiering (configurable via policy/ci-budget.toml):
- estimated > preferred_default_lem → notice
- estimated > default_limit_lem → warning
- estimated > elevated_limit_lem → warning (stronger language)
- estimated > hard_limit_lem → error
(downgraded to warning when
full-ci or ci-budget-override
label is present)
This PR is INFORMATIONAL ONLY:
- run() still returns Ok(()) regardless of warning level.
- PR Plan workflow has continue-on-error: true — even ::error:: does
not fail the job.
- Hard enforcement (failing the status check) is a deliberate future
change, gated on observed actuals from PR N (ci-actuals.yml).
Schema additions to ci-plan.json:
- "warnings": [{ "level": "notice"|"warning"|"error", "message": "..." }]
Step summary now includes a "Budget warnings" section with icons
(ℹ️ / ⚠️ / 🚨).
Tests added (5 new, 19 total passing):
- warnings_empty_for_pennies_band
- warnings_notice_above_preferred_default (turned into a warning
when 35 LEM threshold is crossed by Cargo.lock-only PRs)
- warnings_error_at_hard_ceiling_without_override
- warnings_emit_error_when_over_ceiling_without_label (using a
stricter policy fixture to verify error-tier without needing
a 125+ LEM real diff)
- ci_budget_override_label_downgrades_error_to_warning
Stacked on PR L (#3761) → K (#3758). Will rebase to main as the
stack lands.
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Builds on PR L (
BudgetPolicy+load_budget_policy). The planner now computes aVec<BudgetWarning>and emits GitHub workflow commands (::warning::,::error::,::notice::) so PR Plan annotates the run when estimated LEM exceeds the configured thresholds.This is PR O in the multi-PR CI roadmap. Stacked on PR L (#3761) → K (#3758); will retarget
mainas the stack lands.Tiering
Configurable via
policy/ci-budget.toml. Default thresholds:preferred_default_lem)default_limit_lem)noticeelevated_limit_lem)warninghard_limit_lem)warningerrorThe
errorlevel is downgraded towarningwhen the PR carries thefull-ciorci-budget-overridelabel.Informational only
PR O does not block merges:
run()still returnsOk(())regardless of warning level.continue-on-error: true— even::error::does not fail the job.ci-actuals.yml).Schema additions to
ci-plan.jsonStep summary now includes a "Budget warnings" section with icons (ℹ️ /⚠️ / 🚨).
Tests (5 new, 19 total passing)
warnings_empty_for_pennies_bandwarnings_notice_above_preferred_defaultCargo.lock-only PR crosses 35 → warning tierwarnings_error_at_hard_ceiling_without_overridefull-ci+ kernel diff crosses 125 with override → warningwarnings_emit_error_when_over_ceiling_without_labelci_budget_override_label_downgrades_error_to_warningci-budget-overridelabel downgrades the errorOut of scope
lane.stagetaxonomy from PR K).https://claude.ai/code/session_01S2yTnEYJcA3G2CyZn9bY4v
Generated by Claude Code