Skip to content

Disable daily AI credits guardrail for Expert Code Review workflow - #14314

Merged
ViktorHofer merged 2 commits into
mainfrom
copilot/aw-raise-daily-limit
Jul 9, 2026
Merged

Disable daily AI credits guardrail for Expert Code Review workflow#14314
ViktorHofer merged 2 commits into
mainfrom
copilot/aw-raise-daily-limit

Conversation

Copilot AI commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

The Expert Code Review (command) agentic workflow hit its per-workflow daily AI Credits guardrail (5.7K used vs. the 5K default cap), blocking /review runs until the 24h window resets. Per the remediation steps in the failure issue, disable the guardrail for this workflow.

Context

  • The guardrail is a per-workflow 24h AIC spending cap defaulting to 5K (GH_AW_DEFAULT_MAX_DAILY_AI_CREDITS).
  • This workflow is slash-command triggered (/review), so runs are already opt-in and bounded by the shared PAT pool budget, making the fixed daily cap unnecessarily restrictive.

Changes Made

  • review.agent.md: added max-daily-ai-credits: -1 to the frontmatter to explicitly disable the guardrail.
  • review.agent.lock.yml: regenerated via gh aw compile (v0.79.8), removing the guardrail wiring:
    • activation-job Check daily workflow token guardrail step, its GH_AW_MAX_DAILY_AI_CREDITS env, and daily_ai_credits_* outputs
    • daily_ai_credits_exceeded gating on the agent and conclusion jobs, plus the safe-output-artifact-client condition and GH_AW_DAILY_AI_CREDITS_* conclusion env
    • updated frontmatter_hash metadata to match the new source
timeout-minutes: 60

max-daily-ai-credits: -1

Testing

  • Regenerated the lock file with the pinned compiler; confirmed the diff against the original is limited strictly to guardrail wiring plus the frontmatter hash, and the result is valid YAML.

Notes

  • Scoped to review.agent only; other agentic workflows retain the default cap.
  • The lock file was regenerated offline by building gh-aw@v0.79.8 from source (the gh aw extension cannot be installed in the sandbox); a maintainer re-running gh aw compile should produce an identical result.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Hello @copilot, I noticed that you’re changing an .swr file or any file under src/Package/MSBuild.VSSetup.. Please make sure to validate this change by an experimental VS insertion. This is accomplished by pushing to an exp/* branch, which requires write permissions to this repo.

Co-authored-by: JanProvaznik <25267098+JanProvaznik@users.noreply.github.com>
Copilot AI changed the title [WIP] Update daily AI credits budget for expert code review Disable daily AI credits guardrail for Expert Code Review workflow Jul 9, 2026
Copilot AI requested a review from JanProvaznik July 9, 2026 15:41
@JanProvaznik

JanProvaznik commented Jul 9, 2026

Copy link
Copy Markdown
Member

@ViktorHofer let's do either this PR or set the GH_AW_DEFAULT_MAX_DAILY_AI_CREDITS repo variable to something higher like 100000
we're hitting this every day

@ViktorHofer
ViktorHofer marked this pull request as ready for review July 9, 2026 19:39
Copilot AI review requested due to automatic review settings July 9, 2026 19:39
@ViktorHofer
ViktorHofer requested a review from a team as a code owner July 9, 2026 19:39
@ViktorHofer
ViktorHofer merged commit ad7e074 into main Jul 9, 2026
14 checks passed
@ViktorHofer
ViktorHofer deleted the copilot/aw-raise-daily-limit branch July 9, 2026 19:39
@ViktorHofer

Copy link
Copy Markdown
Member

Cool, I didn't know about this credits cap. Thanks

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Disables the per-workflow 24h “daily AI Credits” spending cap for the Expert Code Review (command) slash-command workflow (/review), addressing the guardrail exhaustion reported in #14312 by explicitly opting out via frontmatter and updating the compiled lock workflow accordingly.

Changes:

  • Add max-daily-ai-credits: -1 to review.agent.md frontmatter to disable the per-workflow daily AI Credits guardrail.
  • Regenerate review.agent.lock.yml to remove the guardrail job wiring (activation guardrail step, related outputs/env, and downstream gating).
Show a summary per file
File Description
.github/workflows/review.agent.md Adds frontmatter setting to disable the daily AI Credits guardrail for the /review workflow.
.github/workflows/review.agent.lock.yml Updates the compiled workflow to remove the daily AI Credits guardrail step/outputs and related gating logic.

Copilot's findings

  • Files reviewed: 2/2 changed files
  • Comments generated: 0

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.

[aw] Expert Code Review (command) exceeded daily AI credits budget

4 participants