Fix test-improver workflow AI credits rate limit#8265
Merged
Conversation
… log Use the idiomatic Go %t format verb instead of %v for the boolean optional parameter in the NormalizeIntegrityLevel debug log message. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The Test Improver workflow was exceeding its default AI credits budget (used 2K of 1K max). Increase the limit to 2000 to prevent rate limit failures. Closes #8252 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adjusts the Test Improver agentic workflow’s AI credit budget to prevent failures caused by exceeding the default max-ai-credits guardrail.
Changes:
- Increased the Test Improver workflow
max-ai-creditsbudget to 2000. - Tweaked a Go debug log format string in guard policy normalization.
Show a summary per file
| File | Description |
|---|---|
internal/config/guard_policy.go |
Minor debug log formatting change (appears unrelated to the stated PR goal). |
.github/workflows/test-improver.md |
Increases workflow max-ai-credits to avoid AI credit rate-limit failures. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Low
- Increase max-ai-credits from 2000 to 2500 for headroom - Add DataOps steps to pre-compute test file inventory and existing PR check, saving agent tokens on file discovery - Remove references to unconfigured Serena tool that wasted agent tokens trying to invoke it - Trim verbose prompt (~340 lines → ~55 lines) to reduce input tokens - Scope coverage analysis to specific package instead of ./... - Reduce stability verification from 5 runs to 3 - Correct misleading 'project does NOT use testify' section (it does) Fixes #8252 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Summary
Fixes #8252 — the Test Improver workflow hit the AI credits rate limit (used 2K of 1K max).
Root Cause
Multiple factors drove up token consumption:
max-ai-credits: 2000was barely enough for a workflow that analyzes, modifies, and verifies test filesgo test ./...instead of targeting the specific packageChanges
max-ai-creditsto 2500Validation
Warnings are informational (shell injection protection auto-applied, /tmp path advisory).