Find the commit that broke a test
bisect-failureFind the commit that broke a test by binary-searching git history between a good and bad commit, running the test in a temporary worktree so your checkout stays untouched.
Instructions
Find the commit that broke a test: binary-search the git history between a good and a bad commit, running the test at each step in a temporary worktree (your checkout is untouched), and report the first bad commit with its diff summary and failure. good defaults to the newest commit where the run history saw the test pass.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bad | No | A commit or ref where it fails (default HEAD) | |
| good | No | A commit or ref where the test passed. Defaults to the newest commit in the run history where it passed | |
| grep | No | Test title (or part of it) to run inside the file; keeps the search on one test | |
| test | Yes | The failing spec file, e.g. "tests/cart.spec.ts" (a :line suffix also works, but lines move between commits; prefer grep) | |
| config | No | playwright.config path or 1-based index | |
| repeat | No | Run the test this many times per commit; any failure marks the commit bad (default 1; raise it for a flaky failure) | |
| project | No | Playwright project name to run in | |
| maxSteps | No | Most commits to test besides the two ends (default 12, enough for 4,000 commits) | |
| projectRoot | No | Project directory (inside a git repository); defaults to the server working directory | |
| stepTimeoutMs | No | Time limit for each test run (default 180000) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | false when the call failed (see error) or the tests it ran failed | |
| error | No | ||
| steps | No | ||
| status | No | ||
| firstBad | No |