Skip to content

feat: track cap-exceeded failures via centralized rollup issue, raise cap to 50/24h#37273

Draft
Copilot wants to merge 3 commits into
mainfrom
copilot/update-agent-failure-handling
Draft

feat: track cap-exceeded failures via centralized rollup issue, raise cap to 50/24h#37273
Copilot wants to merge 3 commits into
mainfrom
copilot/update-agent-failure-handling

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jun 6, 2026

When a failure category hits the 24h issue cap, the conclusion job silently warned and dropped the event. These failures were invisible unless you caught the workflow log. The cap was also set too low at 25.

Changes

handle_agent_failure.cjs

  • Raise FAILURE_ISSUE_CATEGORY_DAILY_CAP 25 → 50
  • Add DAILY_CAP_ROLLUP_TITLE / DAILY_CAP_ROLLUP_LABEL constants for the new centralized issue
  • Add findOrCreateDailyCapRollupIssue(owner, repo) — finds or creates a single open [aw] Daily failure issue cap exceeded issue (non-fatal; errors logged as warnings)
  • Replace the warning-only early return with: emit warning → find/create rollup issue → post a comment containing workflow name, run URL, and capped category counts
// Before: silently dropped
core.warning(`Daily per-category issue cap reached for ${summary}.`);
return;

// After: still tracked in a centralized issue
const rollupIssue = await findOrCreateDailyCapRollupIssue(owner, repo);
if (rollupIssue) {
  await github.rest.issues.createComment({ issue_number: rollupIssue.number, body: commentBody });
}
return;

handle_agent_failure.test.cjs

  • Update existing cap test: asserts rollup issue is created and comment is posted to it
  • Add test for rollup-reuse path: existing rollup found → no new issue created, comment posted to existing

Copilot AI and others added 2 commits June 6, 2026 05:51
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
…, bump cap to 50/24h

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title feat: create centralized rollup issue when daily failure cap exceeded, bump cap to 50/24h feat: track cap-exceeded failures via centralized rollup issue, raise cap to 50/24h Jun 6, 2026
Copilot AI requested a review from pelikhan June 6, 2026 05:57
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