Skip to content

feat(devops): add PR CI failure triage bot#41616

Open
Skn0tt wants to merge 3 commits into
mainfrom
skn0tt-ci-failure-triage-bot
Open

feat(devops): add PR CI failure triage bot#41616
Skn0tt wants to merge 3 commits into
mainfrom
skn0tt-ci-failure-triage-bot

Conversation

@Skn0tt

@Skn0tt Skn0tt commented Jul 3, 2026

Copy link
Copy Markdown
Member

Adds a Copilot triage step to create_test_report.yml. When a PR's test run reports failures, a new triage job asks Copilot for a verdict: are these failures likely caused by this PR, or pre-existing flakes / infra noise?

It reasons from the PR diff (does it reach the failing test?) and proves flakes from the aggregated CI results in the playwright-test-results DuckDB - it looks for the same test failing on other SHAs/PRs or flipping verdict across runs. No such evidence means it says "uncertain" rather than hand-waving.

  • Gated to an author allow-list, only runs on real failures.
  • Two jobs on purpose: triage runs untrusted PR code but only holds copilot-requests: write (no secrets, can't post); a separate post job holds issues: write, runs none of the PR's code, just comments the verdict. Same shape as triage.yml.
  • Reasoning lives in a reusable playwright-devops skill (pr-ci-triage.md), not baked into the workflow.

Also tacks a deterministic agent-run link onto triage.yml's posted comment, using the same post-job footer pattern.

Hand-run against live PRs to tune the flake bar. Two verdicts posted in context so you can see both colours:

  • 🔴 caused by this PR: #41680 - roots a Windows-only video test failure to a path.join() separator bug.
  • 🟢 pre-existing flakes: #41689 - test-only PR, both failures shown flaking elsewhere in the DB.

@Skn0tt Skn0tt requested a review from dgozman July 3, 2026 14:20
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

Skn0tt added 2 commits July 8, 2026 12:19
Runs Copilot on a PR's failing tests to judge whether they're caused by
the PR or pre-existing flakes, and posts the verdict as a comment.
…n link

Prove flakes from the playwright-test-results DuckDB instead of grepping
other PRs' report comments, add a 🔴/🟡/🟢 verdict format with a worked
example, and inject the agent-run link deterministically in the post job.
@Skn0tt Skn0tt force-pushed the skn0tt-ci-failure-triage-bot branch from 53580c3 to 5036ab4 Compare July 8, 2026 10:49
Same footer treatment as the CI triage bot - the post job appends the
agent-run link instead of relying on the agent to substitute it.
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Test results for "MCP"

4 failed
❌ [chrome] › mcp/annotate.spec.ts:447 › should switch screencast to -s session on show --annotate @mcp-macos-latest-chrome
❌ [chrome] › mcp/cli-killall.spec.ts:42 › kill-all kills filtered dashboard pid @mcp-ubuntu-latest-chrome
❌ [firefox] › mcp/annotate.spec.ts:447 › should switch screencast to -s session on show --annotate @mcp-macos-latest-firefox
❌ [msedge] › mcp/cli-save-as.spec.ts:41 › screenshot --hires @mcp-windows-latest-msedge

7705 passed, 1235 skipped


Merge workflow run.

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Test results for "tests 1"

3 flaky ⚠️ [chromium-library] › library/inspector/recorder-api.spec.ts:120 › should type `@frozen-time-library-chromium-linux`
⚠️ [chromium-library] › library/video.spec.ts:717 › screencast › should work with video+trace `@chromium-ubuntu-22.04-arm-node20`
⚠️ [chromium-library] › library/video.spec.ts:476 › screencast › should capture static page in persistent context @smoke `@chromium-ubuntu-22.04-node20`

49510 passed, 1164 skipped


Merge workflow run.

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.

1 participant