
cmux-test-bisect
Find when and why tests broke on main: bisect a Swift package suite on CI across old commits, read the failure matrix, and decide per test whether the test went stale or the code regressed. Use when a suite is red on main, when PR CI only ran filtered tests and the full suite has drifted, or when asked which PR broke a test.
- Installs
- 695
- Last 24h
- +17
- Trending rank
- #6514
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/manaflow-ai/cmux --skill cmux-test-bisect- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads cmux-test-bisect automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
cmux test bisect
PR CI runs selected tests, so a package suite can stay red on main for weeks with nobody noticing. This skill finds the commit behind each failure on CI, never on the Mac (no full cmux builds on laptops).
App-host (cmuxTests) failures on main have their own automatic bisect
(#14510). Use this skill for the SwiftPM package suites under Packages/iOS and Packages/Shared that test-ios.yml can run
(CMUXMobileCore, CmuxSyncStore, CmuxMobilePairedMac, CmuxMobileChanges,
CmuxMobileShell, CmuxMobileShellModel).
Before you start
- Get today's failing set from the red run:
gh run view <run> --repo manaflow-ai/cmux --log-failed, then grep✘ Test .* failed after. Run the full suite twice if you have not already. A test that appears in only one run is a flake candidate, not a regression. - Search for an existing fix:
gh search prs --repo manaflow-ai/cmux --state open '<test name>'. - Work in your own worktree from
upstream/main. Ifgit logstops at a recent commit, the checkout is shallow:git fetch --shallow-since=<date> upstream main.
Run the bisect
T=scripts/ci/package_bisect.py
python3 $T --package CmuxMobileShell start --points 6 <old-sha>..upstream/main
python3 $T --package CmuxMobileShell status --wait # up to 45 min
python3 $T --package CmuxMobileShell next --dispatch # split each break window
python3 $T --package CmuxMobileShell cleanup # delete probe branches
- Each probe pushes
bisect/<name>/<sha10>(the name defaults to the package): the old commit with today's iOS CI files laid over it and the package-lint gate dropped. Old commits carry old CI scripts, which is why a plain-f ref=<sha>dispatch fails early. - Probes leave the runner on
auto(idle owned mini first, Blacksmith overflow). Do not pin a runner. adopt <sha> <run-id>counts atest-ios.ymlrun withswift_package=<pkg>that already exists (a dispatch on main, or a probe run whose idstartcould not read) without dispatching again. Aci.ymlrun has no package job to read.--filter <regex>narrows the suite once you are chasing a few tests;--pathschanges which commits count as midpoint candidates (default: the iOS and Shared packages).--patch <sha>(repeatable) applies a fix commit to every probe. Use it when older commits hang or fail to build for a reason you already know: bisect the question you have, not the known break.--bisect <name>keeps a second experiment (for example the same commits with a--patch) beside the first.--packageand--bisectgo before the subcommand, and every later command for that bisect needs them too.- State is shared by every worktree of the checkout, in
<git-common-dir>/package-bisect/<name>.json. Finished job logs are cached beside it per run attempt, sostatus --refetchcosts one run lookup per probe and downloads only logs it has not seen.
Read the matrix
status prints one row per test and one column per probe, oldest first:
X failed, . passed, - never ran at that probe, ? pending, E no test
ran at all (compile or runner failure; check the log, rerun the run, then
status --refetch; a rerun is a new attempt, so its log is read fresh).
Check the probe list first. A probe marked INCOMPLETE never printed its
"Test run with" summary: the hung-test watchdog killed it or the job timed
out, so every test after that point shows -. A - is never a pass: a suite
that hangs early makes a whole cluster look like it "broke" at the commit that
fixed the hang. Probe those commits again in a second bisect with the hang fix
applied:
python3 $T --package <pkg> --bisect <pkg>-patched start --patch <hang fix> <shas>.
| Verdict | Meaning | Next |
|---|---|---|
broken by <sha> | Passed at the probe before, failed from here on | Read that PR's diff against the test |
broken in a..b (n watched commits) | Window not yet one commit wide | next --dispatch |
failing at the oldest probe | Older than the bisect | Start again further back, or trace with git log -S '<symbol>' |
fixed by / fixed in | Failed, then something fixed it | Usually ignore; next --fixed splits these too |
flaky | Passes between failures | Treat as a flake; confirm with a focused rerun before fixing |
Tests that break in the same window usually share one cause. Fix the cluster together.
Stale test or regression
Read the culprit PR, then decide per test:
- Stale test: the PR changed behavior on purpose and says so (PR body, code comments, or other tests it updated in the same direction). Fix the test to express its original intent under the new behavior. Do not delete the assertion. If the old fixture now models the other case, keep a test for each.
- Regression: the test's intent still holds and nothing in the PR argues it away. Fix the code, and keep the test as it was.
- When unsure, prefer the reading that keeps the test's name true, and say which reading you chose in the PR.
Land it
- One small PR per culprit or cluster, pushed to the org remote
(
git push mf <branch>,gh pr create --head <branch>). - Credit the PR that changed the behavior (link it, and mention its author).
- Prove it with the focused suites:
gh workflow run test-ios.yml --repo manaflow-ai/cmux --ref <branch> -f swift_package=<pkg> -f test_filter='<SuiteA|SuiteB>'. Finish with one full-suite run on the last PR. - Run
cleanupso nobisect/branches stay on the org remote.
FAQ
What does the cmux-test-bisect skill do?
Find when and why tests broke on main: bisect a Swift package suite on CI across old commits, read the failure matrix, and decide per test whether the test went stale or the code regressed. Use when a suite is red on main, when PR CI only ran filtered tests and the full suite has drifted, or when asked which PR broke a test.
How do I install cmux-test-bisect?
Run npx skills add https://github.com/manaflow-ai/cmux --skill cmux-test-bisect in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/cmux-test-bisect/ (personal) or .claude/skills/cmux-test-bisect/ (project).
Which AI agents can use cmux-test-bisect?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is cmux-test-bisect safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains cmux-test-bisect?
It is published by manaflow-ai/cmux in manaflow-ai/cmux. It has 695 recorded installs.
More from manaflow-ai/cmux
cmux
manaflow-ai/cmux
End-user control of cmux topology and routing (windows, workspaces, panes/surfaces, focus, moves, reorder, identify, trigger flash). Use when automation needs deterministic placement and navigation in a multi-pane cmux layout.
cmux-browser
manaflow-ai/cmux
End-user browser automation with cmux. Use when you need to open sites, inspect or interact with browser surfaces, wait for page state, and extract data without stealing focus.
cmux-markdown
manaflow-ai/cmux
Open markdown files in a formatted viewer panel with live reload. Use when you need to display plans, documentation, or notes alongside the terminal with rich rendering (headings, code blocks, tables, lists).
cmux-settings
manaflow-ai/cmux
View and edit cmux settings in /.config/cmux/cmux.json, including terminal, browser, Markdown, diff, notes, HTML, file preview, and sidebar-tool behavior. Use when the user wants to change cmux preferences, set a value by JSON path, validate the file, open it in an editor, or look up which keys cmux recognizes. Triggers on '/cmux-settings', 'change cmux setting', 'customize viewer', 'set in cmux', 'cmux config', 'cmux.json', or 'rebind a cmux shortcut'.
cmux-workspace
manaflow-ai/cmux
Work inside the current cmux workspace and terminal. Use for cmux workspace, current workspace, caller surface, panes, surfaces, socket targeting, and non-interfering cmux automation.
cmux-customization
manaflow-ai/cmux
Customize cmux for an end user, including terminal, browser, Markdown, diff, file preview, notes, HTML, and right-sidebar viewers. Use when changing cmux.json actions, custom commands, workspace layouts, plus-button behavior, surface tab bar buttons, Command Palette entries, Dock controls, sidebar and app settings, shortcuts, notifications, browser routing, examples-library presets, or Ghostty-backed terminal preferences.
Popular testing & qa skills
tdd
mattpocock/skills
Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.
grilling
mattpocock/skills
Grill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their thinking, or uses any 'grill' trigger phrases.
migrate-to-shoehorn
mattpocock/skills
Migrate test files from as type assertions to @total-typescript/shoehorn. Use when user mentions shoehorn, wants to replace as in tests, or needs partial test data.
run-train
lllllllama/rigorpilot-skills
Rigor Train skill for deep learning research repositories. Use when a documented or selected training command should be run conservatively for startup verification, short-run verification, full kickoff, or resume, with command, config, seed, log, checkpoint, status, and metric evidence written to standardized trainoutputs/. Do not use for environment setup, exploratory sweeps, speculative idea implementation, or end-to-end orchestration.
test-driven-development
obra/superpowers
Use when implementing any feature or bugfix, before writing implementation code
finishing-a-development-branch
obra/superpowers
Use when implementation is complete, all tests pass, and you need to decide how to integrate the work