fix: increase max-ai-credits default for duplicate-code-detector workflow#7424
Merged
Conversation
…code-detector workflow The Duplicate Code Detector workflow failed because it used 1028.8 AI credits against a 1000 limit. Increasing the default to 2000 gives sufficient headroom for the workflow to complete successfully. Closes #7409
Copilot
AI
changed the title
[WIP] Update max AI credits for Duplicate Code Detector
fix: increase max-ai-credits default for duplicate-code-detector workflow
Jun 12, 2026
Collaborator
|
@copilot merge main |
Contributor
There was a problem hiding this comment.
Pull request overview
Increases the Duplicate Code Detector workflow’s fallback GH_AW_MAX_AI_CREDITS cap to avoid premature termination due to 429 Maximum AI credits exceeded, while still respecting the repo-level vars.GH_AW_DEFAULT_MAX_AI_CREDITS override when present.
Changes:
- Raise the fallback
GH_AW_MAX_AI_CREDITSdefault from1000to2000for the firewallawf-config.jsongeneration step. - Raise the fallback
GH_AW_MAX_AI_CREDITSdefault from1000to2000for thenotifyjob environment used in reporting.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/duplicate-code-detector.lock.yml |
Updates the workflow’s fallback AI credit cap to 2000 in both enforcement (awf-config) and reporting (notify env) locations. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 1/1 changed files
- Comments generated: 0
…-credits # Conflicts: # .github/workflows/duplicate-code-detector.lock.yml
Contributor
Author
Merged |
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.
The Duplicate Code Detector workflow was terminating early with a 429
Maximum AI credits exceedederror — it consumed 1028.8 credits against a hard 1000-credit cap, preventing analysis from completing.Changes
.github/workflows/duplicate-code-detector.lock.yml: Raised theGH_AW_MAX_AI_CREDITSfallback default from1000→2000in both locations where it's set:awf-config.jsongeneration step (used by the firewall API proxy to enforce the cap)notifyjob environment (used for post-run credit reporting)The value still respects
vars.GH_AW_DEFAULT_MAX_AI_CREDITSwhen set at the repo level;2000is only the per-workflow fallback when that variable is absent.