# cmux-test-bisect

cmux-test-bisect is a Claude Code skill that finds which commit broke Swift package tests on CI, including when main is red or PR tests were filtered.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 635 installs · ★ 28847 repo stars
- Author: manaflow-ai
- License: GPL-3.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/manaflow-ai/cmux/tree/HEAD/skills/cmux-test-bisect/SKILL.md
- Updated: 2026-10-25
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/cmux-test-bisect

## What it does

When PR CI runs only filtered tests, a full suite on main can stay broken for weeks unnoticed. This skill runs a binary search across old commits directly on CI, tracking whether each test passed or failed at every step. It works with packages under `Packages/iOS` and `Packages/Shared` that `test-ios.yml` can execute: `CMUXMobileCore`, `CmuxSyncStore`, `CmuxMobilePairedMac`, `CmuxMobileChanges`, `CmuxMobileShell`, `CmuxMobileShellModel`.

The skill creates probe branches named `bisect/<name>/<sha10>` with working CI files layered over old commits, then runs tests through the dispatcher. Results display as a matrix: rows are tests, columns are probes; `X` marks failure, `.` marks pass, `-` means not run, `?` is pending. From the matrix you can see which commit window a test started failing, then decide whether it's stale (behavior changed intentionally) or a regression in the code.

Requires `git` with repository access, `python3`, permission to trigger CI workflows, and a mini-runner on `auto` or Blacksmith overflow. If `git log` stops early, run `git fetch --shallow-since=<date> upstream main` to fetch history.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add manaflow-ai/cmux --skill cmux-test-bisect -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/cmux-test-bisect/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/cmux-test-bisect/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add manaflow-ai/cmux --skill cmux-test-bisect -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/cmux-test-bisect/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add manaflow-ai/cmux --skill cmux-test-bisect -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/cmux-test-bisect/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install manaflow-ai/cmux skills/cmux-test-bisect
```

2. **Manually: put the files in place**
- File: `.github/skills/cmux-test-bisect/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add manaflow-ai/cmux --skill cmux-test-bisect -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/manaflow-ai/cmux --path skills/cmux-test-bisect
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/cmux-test-bisect/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add manaflow-ai/cmux --skill cmux-test-bisect -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/manaflow-ai/cmux/tree/HEAD/skills/cmux-test-bisect/SKILL.md

## When to use it
- Identify the commit where a test on main stopped passing
- Determine whether a test became stale or represents a code regression
- Narrow a wide failure window to a single commit using CI-based binary search
- Parse the result matrix to spot incomplete probes or hangs
- Apply patches to old commits to isolate the target failure from known breaks

## Example prompts
- Find when CMUXMobileShell tests started failing: `python3 scripts/ci/package_bisect.py --package CMUXMobileShell start --points 6 abc1234..upstream/main`
- Narrow down where TestSyncFlow broke: `python3 scripts/ci/package_bisect.py --package CMUXMobileShell --filter TestSyncFlow next --dispatch`
- Wait for results: `python3 scripts/ci/package_bisect.py --package CMUXMobileShell status --wait`

## Similar
- [git-bisect-helper](https://affpapa.org/en/nevibecode/commands/git-bisect-helper.md) — command · 163 installs
- [bisect-anything](https://affpapa.org/en/nevibecode/skills/bisect-anything.md) — skill · ★ 541 repo stars
- [test-suite-curation](https://affpapa.org/en/nevibecode/skills/test-suite-curation.md) — skill · 1300 installs
- [hunt](https://affpapa.org/en/nevibecode/skills/hunt.md) — skill · 15300 installs
- [fix-issue](https://affpapa.org/en/nevibecode/skills/orchestkit-fix-issue.md) — skill · 217 installs
- [regression-triage](https://affpapa.org/en/nevibecode/commands/regression-triage.md) — command · 25 installs

From the same set: [manaflow-ai/cmux](https://affpapa.org/en/nevibecode/by/manaflow-ai/cmux.md) — 25 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
