Skip to content

Fix false ET budget exhaustion classification in workflow failure handling#31127

Merged
pelikhan merged 11 commits intomainfrom
copilot/aw-fix-skills-reviewer-workflow
May 9, 2026
Merged

Fix false ET budget exhaustion classification in workflow failure handling#31127
pelikhan merged 11 commits intomainfrom
copilot/aw-fix-skills-reviewer-workflow

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 9, 2026

  • Inspect branch state, recent commits, and repo build/test commands
  • Check recent GitHub Actions runs and failures for context
  • Fetch latest main and determine whether another merge/recompile is needed
  • Merge latest main and recompile if the branch is behind
  • Run targeted validation and secret scanning for any new changes
  • Reply to the actionable PR comment with the addressing commit hash or status
  • Run final validation and summarize any remaining issues

Copilot AI linked an issue May 9, 2026 that may be closed by this pull request
Copilot AI and others added 7 commits May 9, 2026 02:38
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix Matt Pocock Skills Reviewer workflow failure due to token budget issue Fix false ET budget exhaustion classification in workflow failure handling May 9, 2026
Copilot AI requested a review from pelikhan May 9, 2026 02:46
@pelikhan pelikhan marked this pull request as ready for review May 9, 2026 02:53
Copilot AI review requested due to automatic review settings May 9, 2026 02:53
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes a false-positive “Effective Token Budget Exhausted” classification by reconciling rate-limit signals with actual effective-token usage vs configured maximum before surfacing the failure state.

Changes:

  • Added budget-math reconciliation for effective-tokens rate-limit reporting (requires effectiveTokens >= maxEffectiveTokens when both are known).
  • Normalized/validated env fallback values so invalid token counts are treated as missing.
  • Added targeted unit tests covering below-budget suppression, at-budget confirmation, missing/invalid max, and no-signal behavior.
Show a summary per file
File Description
actions/setup/js/effective_tokens_context.cjs Adds BigInt-based comparison and gating logic for ET budget exhaustion; validates env fallbacks before ET math.
actions/setup/js/handle_agent_failure.test.cjs Adds regression tests for resolveEffectiveTokensFailureState() scenarios around ET budget exhaustion classification.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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

Comment on lines +1950 to +1954
it("keeps ET budget exhaustion when the rate-limit signal is present but no max is available", () => {
process.env.GH_AW_EFFECTIVE_TOKENS = "2097968";
process.env.GH_AW_EFFECTIVE_TOKENS_RATE_LIMIT_ERROR = "true";

expect(resolveEffectiveTokensFailureState()).toEqual({
@pelikhan
Copy link
Copy Markdown
Collaborator

pelikhan commented May 9, 2026

@copolilot merge main and recompile

@pelikhan
Copy link
Copy Markdown
Collaborator

pelikhan commented May 9, 2026

@copilot Merge main and recompile

Copilot AI and others added 2 commits May 9, 2026 03:17
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 9, 2026

@copilot Merge main and recompile

Addressed in e05c1dc by merging main and recompiling the workflow outputs.

@pelikhan
Copy link
Copy Markdown
Collaborator

pelikhan commented May 9, 2026

@copilot Merge main and recompile

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 9, 2026

@copilot Merge main and recompile

Addressed in 8971f25 by merging the latest main and recompiling the workflow outputs.

@pelikhan pelikhan merged commit 238e01d into main May 9, 2026
@pelikhan pelikhan deleted the copilot/aw-fix-skills-reviewer-workflow branch May 9, 2026 03:50
Copilot AI added a commit that referenced this pull request May 9, 2026
…dling (#31127)

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
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] Matt Pocock Skills Reviewer failed

3 participants