Skip to content

[WIP] Test repair agent: Part1#6375

Draft
evgenyrp wants to merge 3 commits into
mozilla:masterfrom
evgenyrp:test_repair_agent
Draft

[WIP] Test repair agent: Part1#6375
evgenyrp wants to merge 3 commits into
mozilla:masterfrom
evgenyrp:test_repair_agent

Conversation

@evgenyrp

@evgenyrp evgenyrp commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Comment on lines +26 to +27
"mcp__firefox__evaluate_testcase",
"mcp__firefox__evaluate_js_shell",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These two likely won't be useful for this agent, they are not running the same test cases we run in CI.
If we want the agent to be able to run Firefox tests, we either need to add other tools, or we just let it discover by itself how to run them using bash and the AGENTS.md/CLAUDE.md in the Firefox repo.

Take into account many test failures are also platform specific, so for example we can't reproduce a win or mac failure if we are only running on linux (unless we run the tests on taskcluster)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, I wasn't sure about these either

Treat this as a genuine regression: a commit that landed since the test was last
green introduced the failure.

Failing test groups (manifests) and a representative failing test in each:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not passing all failing tests?

- analysis.md: the detailed reasoning, with evidence from the logs and diffs.
- verdict.json: an object with keys "culprit_commit" (a full sha from the
candidates above, or null if none is convincing), "culprit_bug" (integer or
null), "recommendation" ("backout" or "land_fix") and "confidence"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also have a recommendation to "rerun" in case the agent is not sure it is actually a real failure? Or just rely on confidence being low?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's an interesting idea

return None


def _last_green(branch: str, rev: str, group: str) -> str | None:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might want to do this at the test level instead of the group level, also we need to take into account the platform where the test run (e.g. if the test is only failing on linux, we risk last_green to find a commit where the test run and passed on win but didn't run on linux)

@evgenyrp evgenyrp changed the title Test repair agent: Part1 [WIP] Test repair agent: Part1 Jul 24, 2026
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