feat(ci): add fix-flakes workflow to auto-fix flaky tests#41692
Open
Skn0tt wants to merge 1 commit into
Open
Conversation
A scheduled workflow that fights CI flakiness end to end, in three jobs: - triage: an agent queries the test-results DB and picks the single OS/config most worth booting a runner for, or bails if nothing is actionable. - fix: on the chosen runner, an agent reproduces one flaky/red test and either fixes the root cause or scopes a fixme, handing the result off as one commit whose message becomes the PR. - open_pr: a trusted job reapplies that commit and opens a PR against main via the playwright automation app, requesting a review. Adds the playwright-fix-flakes skill that drives the fix agent, and teaches the playwright-test-results skill to query the DuckDB database through the @duckdb/node-api binding.
Member
Author
|
Discussed. An alternative approach came up: First agent turning flaky db into issues, second agent spinning up upon issue creation to fix them. Decoupled from one another. |
Contributor
Test results for "MCP"2 failed 7713 passed, 1242 skipped Merge workflow run. |
Contributor
Test results for "tests 1"7 flaky49500 passed, 1162 skipped Merge workflow run. |
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.
Adds a scheduled workflow that fixes one flaky or red test per weekday run, end to end. It works in three jobs:
fixme. It hands the result off as exactly one commit whose message becomes the PR.main.The fix agent holds no write token - a separate deterministic
open_prjob is the only thing that can push or open a PR, and it does that through the playwright automation app. So a prompt-injected agent can't do anything worse than write a commit that a human then reviews.#41691 is a real PR it produced end to end.
One temporary thing: review requests currently go to
skn0ttwhile I build trust in it. The agent still works out the real reviewer and names them via aSuggested-reviewertrailer; once I trust it, I'll drop the override and let it request them directly.