Skip to content

fix: increase max-ai-credits default for duplicate-code-detector workflow#7424

Merged
lpcox merged 3 commits into
mainfrom
copilot/update-max-ai-credits
Jun 12, 2026
Merged

fix: increase max-ai-credits default for duplicate-code-detector workflow#7424
lpcox merged 3 commits into
mainfrom
copilot/update-max-ai-credits

Conversation

Copilot AI commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

The Duplicate Code Detector workflow was terminating early with a 429 Maximum AI credits exceeded error — it consumed 1028.8 credits against a hard 1000-credit cap, preventing analysis from completing.

Changes

  • .github/workflows/duplicate-code-detector.lock.yml: Raised the GH_AW_MAX_AI_CREDITS fallback default from 10002000 in both locations where it's set:
    • The awf-config.json generation step (used by the firewall API proxy to enforce the cap)
    • The notify job environment (used for post-run credit reporting)

The value still respects vars.GH_AW_DEFAULT_MAX_AI_CREDITS when set at the repo level; 2000 is only the per-workflow fallback when that variable is absent.

GitHub Advanced Security started work on behalf of lpcox June 12, 2026 13:46 View session
GitHub Advanced Security finished work on behalf of lpcox June 12, 2026 13:47
…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
GitHub Advanced Security started work on behalf of lpcox June 12, 2026 13:52 View session
Copilot finished work on behalf of lpcox June 12, 2026 13:52
Copilot AI requested a review from lpcox June 12, 2026 13:52
GitHub Advanced Security finished work on behalf of lpcox June 12, 2026 13:54
@lpcox lpcox marked this pull request as ready for review June 12, 2026 15:11
Copilot AI review requested due to automatic review settings June 12, 2026 15:11
@lpcox

lpcox commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

@copilot merge main

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

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_CREDITS default from 1000 to 2000 for the firewall awf-config.json generation step.
  • Raise the fallback GH_AW_MAX_AI_CREDITS default from 1000 to 2000 for the notify job 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

Copilot AI commented Jun 12, 2026

Copy link
Copy Markdown
Contributor Author

@copilot merge main

Merged main into this branch. There was one conflict in the awf-config.json generation step (main had upgraded to v0.27.2 schema/image tags while keeping the 1000 default). Resolved by keeping our 2000 value and taking main's updated schema URL and image hashes (commit cd200e4b).

GitHub Advanced Security started work on behalf of lpcox June 12, 2026 15:16 View session
Copilot finished work on behalf of lpcox June 12, 2026 15:16
GitHub Advanced Security finished work on behalf of lpcox June 12, 2026 15:17
@lpcox lpcox merged commit 5ce1a7c into main Jun 12, 2026
27 checks passed
@lpcox lpcox deleted the copilot/update-max-ai-credits branch June 12, 2026 15:19
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.

3 participants