Skip to content

Avenger: enforce 8-minute runtime budget and failure-driven repair flow - #53021

Merged
pelikhan merged 2 commits into
mainfrom
copilot/fix-github-actions-job
Aug 16, 2026
Merged

Avenger: enforce 8-minute runtime budget and failure-driven repair flow#53021
pelikhan merged 2 commits into
mainfrom
copilot/fix-github-actions-job

Conversation

Copilot AI commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

The Avenger workflow was failing in the agent job because the prompt encouraged broad, long-running local checks that exceeded the execution window. This update tightens the prompt so Avenger finishes within 8 minutes by triaging from the failing CI run first and only running targeted remediation.

  • Problem framing

    • Shifted Avenger from “run broad maintenance steps” to “inspect failing CI signal, then apply smallest matching fix.”
  • Prompt changes for bounded execution

    • Added a hard runtime requirement: complete within 8 minutes.
    • Added explicit prohibitions on expensive/unbounded patterns:
      • go build ./...
      • direct go test ./... / go test ./pkg/...
      • background polling loops (sleep + pgrep + repeated tail).
  • Failure-driven repair sequence

    • Added a mandatory step to inspect ${{ needs.check_ci_status.outputs.ci_run_id }} first.
    • Made fmt/wasm/lint/test steps conditional on the detected failure category instead of running unconditionally.
    • Added early noop exit for non-actionable infra/transient failures.
  • Compiled workflow parity

    • Regenerated avenger.lock.yml to keep compiled workflow metadata and prompt body in sync.
## Runtime Budget (Hard Requirement)

- Finish the entire run (analysis + fix + validation + PR/noop) within **8 minutes**.
- Keep commands targeted to the failing CI signal.
- Never run `go build ./...` or `go test ./...`/`go test ./pkg/...` directly.
- Never run background long-running checks with polling loops (`sleep` + `pgrep` + repeated `tail`).

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failing GitHub Actions job by analyzing logs and implementing fix Avenger: enforce 8-minute runtime budget and failure-driven repair flow Aug 16, 2026
Copilot AI requested a review from pelikhan August 16, 2026 03:20
@pelikhan
pelikhan marked this pull request as ready for review August 16, 2026 03:20
Copilot AI balanced review requested due to automatic review settings August 16, 2026 03:20
@pelikhan
pelikhan merged commit f279ad1 into main Aug 16, 2026
3 checks passed
@pelikhan
pelikhan deleted the copilot/fix-github-actions-job branch August 16, 2026 03:22

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

Updates Avenger toward failure-driven CI repairs with an eight-minute prompt budget.

Changes:

  • Adds targeted CI-failure inspection and conditional remediation.
  • Prohibits broad or long-running validation commands.
  • Regenerates compiled workflow metadata.
Show a summary per file
File Description
.github/workflows/avenger.md Revises Avenger’s repair prompt and runtime guidance.
.github/workflows/avenger.lock.yml Synchronizes generated metadata and description.

Review details

Suppressed comments (1)

.github/workflows/avenger.md:195

  • The mandatory failure triage is still Step 3, after the checkout has been merged and the potentially broad recompile step has been considered. Because the execution guidelines explicitly say to process steps in sequence, this does not implement the PR's stated “inspect the failing CI signal first, then remediate” flow. Move this inspection directly after Step 0 and perform merge/recompile only after an actionable failure category is known.
## Step 3: Inspect the failing CI run first (mandatory)

Use the CI Run ID from pre-check and identify the first failed job and failing signal before running any local validation:
  • Files reviewed: 2/2 changed files
  • Comments generated: 2
  • Review effort level: Balanced


## Runtime Budget (Hard Requirement)

- Finish the entire run (analysis + fix + validation + PR/noop) within **8 minutes**.
- **Be efficient**: Avoid verbose analysis; act directly.
- **One issue at a time**: Confirm the current step passes before moving to the next.
- **Token Budget Awareness**: Hard limit is 50 turns. If approaching the limit, commit what you have and create the PR.
- **Runtime Budget Awareness**: Hard limit is 8 minutes. Prefer a small complete fix over broad validation.
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.87.1

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