Skip to content

Test repair agent: Part1 - #6375

Merged
evgenyrp merged 8 commits into
mozilla:masterfrom
evgenyrp:test_repair_agent
Jul 30, 2026
Merged

Test repair agent: Part1#6375
evgenyrp merged 8 commits into
mozilla:masterfrom
evgenyrp:test_repair_agent

Conversation

@evgenyrp

@evgenyrp evgenyrp commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Analyzes test failure, identifies the culprit (including previous pushes), proposes a fix if it can and gives a recommendation what to do about it (back out, land fix, rerun etc.).

It follows the architecture of Build Repair Agent.

The most interesting parts are in "deterministic" code that prepares the data for the agent, as there might be bugs there. Still, we want to narrow it down for the agent to simplify it, make it less fragile, and spend fewer tokens.

The listener (Part 2) will filter non-regressions, intermittent failures etc., so that the API is triggered only for useful investigations.

I tested it on a few test failures locally, but we should deploy it and observe how it works with real-time failures in different environments.

Test runs in Weave (the last one with all the fixes)

#6399

Comment thread agents/test-repair/hackbot_agents/test_repair/config.py Outdated
Comment thread agents/test-repair/hackbot_agents/test_repair/prompts.py Outdated
Comment thread agents/test-repair/hackbot_agents/test_repair/prompts.py Outdated
Comment thread agents/test-repair/hackbot_agents/test_repair/resolve.py Outdated
@evgenyrp evgenyrp changed the title Test repair agent: Part1 [WIP] Test repair agent: Part1 Jul 24, 2026
@evgenyrp evgenyrp changed the title [WIP] Test repair agent: Part1 Test repair agent: Part1 Jul 27, 2026
@evgenyrp
evgenyrp marked this pull request as ready for review July 27, 2026 22:23
@evgenyrp
evgenyrp requested a review from a team as a code owner July 27, 2026 22:23
@evgenyrp
evgenyrp requested a review from marco-c July 27, 2026 22:23
Comment thread agents/test-repair/hackbot_agents/test_repair/prompts.py Outdated
Comment thread agents/test-repair/hackbot_agents/test_repair/prompts.py
Comment thread agents/test-repair/hackbot_agents/test_repair/resolve.py
Comment thread agents/test-repair/hackbot_agents/test_repair/resolve.py
@evgenyrp

evgenyrp commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

I think some complexity in deterministic code can go away by using Treeherder CLI and/or API, as it provides some of the things we do manually out of the box. I've already switched to the API in the listener. I propose doing it as a follow-up, though, as a part of #6417

@evgenyrp
evgenyrp merged commit 5aaf184 into mozilla:master Jul 30, 2026
7 checks passed
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.

2 participants