refactor: drop 12 runtimes, keep Claude, Codex, OpenCode, Cursor, ZCode, Antigravity

Removes kilo, kimi, kimi-code, copilot, windsurf, augment, trae, qwen, hermes,
cline, codebuddy and pi end to end: capability descriptors, installer branches
and converters (bin/install.js 14.9k -> 11.2k lines), TypeScript converters,
hook surfaces and runtime homes, review lanes qwen/kimi-code, the two pi
migrations, Kimi payload normalization in the hook guards, dead hostBehaviors
vocabulary, launcher home probes, fixtures, runtime-specific tests and the
prose that presented them as supported.

Installer output for the six kept runtimes is byte-identical to before the
prune. The Kimi tool-vocabulary tests in workflow-guard, read-guard and
read-injection-scanner are left in place pending a decision.
This commit is contained in:
Jakub Zych
2026-10-06 20:02:40 +02:00
parent 12ee75a509
commit 6cfa0c55d2
509 changed files with 1869 additions and 47737 deletions

View File

@@ -128,7 +128,7 @@ describe('runner — egress host re-verification (ADR-2782 D5 rules 2-4)', () =>
});
test('a spawn lane skips the host check entirely', async () => {
const p = plan('qwen');
const p = plan('cursor');
const d = deps({ spawn: () => ({ status: 0, stdout: 'review', stderr: '' }) });
// A stale host on a spawn lane must be inert, not a block.
const r = await runLane(p, d, { consentedHost: 'http://stale.example', repoRoot: ROOT });
@@ -137,6 +137,13 @@ describe('runner — egress host re-verification (ADR-2782 D5 rules 2-4)', () =>
});
describe('runner — probe (ADR-2782 D7)', () => {
// A cursor plan carrying a `command-capability` probe: no shipped lane declares that kind any more.
const CAPABILITY_PROBE_BOUND_MS = 5000; // the declared bound a real lane would carry; asserted only as > 0
const capabilityPlan = () => ({
...plan('cursor'),
probe: { kind: 'command-capability', binary: 'capable-cli', needle: '--output-format', timeoutMs: CAPABILITY_PROBE_BOUND_MS },
});
test('command-exists both ways', async () => {
const p = plan('cursor');
assert.equal((await probeLane(p, deps({ hasBinary: () => true }))).available, true);
@@ -146,16 +153,17 @@ describe('runner — probe (ADR-2782 D7)', () => {
});
test('command-capability accepts the right tool and REJECTS the wrong one', async () => {
// This is the entire reason D7 ships wider than existence: `kimi` is claimed by both Kimi Code
// CLI and the legacy Python kimi-cli, and an existence-only probe registers the wrong tool.
const p = plan('kimi-code');
// This is the entire reason D7 ships wider than existence: one binary name can be claimed by
// more than one tool, and an existence-only probe registers the wrong one. No shipped lane
// declares this probe kind today, so a synthetic plan exercises the (still supported) runner arm.
const p = capabilityPlan();
const real = await probeLane(p, deps({
spawn: () => ({ status: 0, stdout: 'usage: kimi --output-format json -p', stderr: '' }),
spawn: () => ({ status: 0, stdout: 'usage: capable-cli --output-format json -p', stderr: '' }),
}));
assert.equal(real.available, true);
const legacy = await probeLane(p, deps({
spawn: () => ({ status: 0, stdout: 'usage: kimi --print --work-dir DIR', stderr: '' }),
spawn: () => ({ status: 0, stdout: 'usage: capable-cli --print --work-dir DIR', stderr: '' }),
}));
assert.equal(legacy.available, false);
assert.equal(legacy.reason, LANE_UNAVAILABLE.PROBE_FAILED);
@@ -164,7 +172,7 @@ describe('runner — probe (ADR-2782 D7)', () => {
test('a capability probe that times out reports unavailable, never hangs', async () => {
// The original probe (closed PR #2776) was an unbounded `kimi --help | grep` that ran on EVERY
// review regardless of flags — a live instance of the named Unbounded Subprocesses defect.
const p = plan('kimi-code');
const p = capabilityPlan();
const r = await probeLane(p, deps({
spawn: () => ({ status: null, stdout: '', stderr: '', errorCode: 'ETIMEDOUT' }),
}));
@@ -173,7 +181,7 @@ describe('runner — probe (ADR-2782 D7)', () => {
});
test('the capability probe passes the declared bound to the spawn', async () => {
const p = plan('kimi-code');
const p = capabilityPlan();
const d = deps({ spawn: (b, a, o) => { d.spawns.push({ b, a, o }); return { status: 0, stdout: '--output-format', stderr: '' }; } });
await probeLane(p, d);
const call = d.spawns[d.spawns.length - 1];
@@ -226,7 +234,7 @@ describe('runner — empty-output policy (#2494 / #2605 / #2794)', () => {
test('whitespace-only output is stubbed on every lane', () => {
// Before this, `[ ! -s file ]` counted bytes so " " rendered as a clean review on five lanes.
for (const slug of ['antigravity', 'claude', 'codex', 'qwen', 'cursor']) {
for (const slug of ['antigravity', 'claude', 'codex', 'cursor']) {
const p = plan(slug);
const d = deps();
assert.equal(writeReviewOrStub(p, ' \n', d).stubbed, true, `${slug} accepted whitespace`);
@@ -769,7 +777,7 @@ describe('runner — orchestration', () => {
});
test('the prompt reaches stdin for a stdin lane', async () => {
const p = plan('qwen');
const p = plan('codex');
const d = deps({
files: { [`${RUN}/msd-review-prompt.md`]: 'THE PLAN' },
spawn: (b, a, o) => { d.spawns.push({ b, a, o }); return { status: 0, stdout: 'R', stderr: '' }; },
@@ -868,7 +876,7 @@ describe('#2494 — a failed lane writes a diagnosable stub, not a zero-byte fil
function deps(spawnResult, files = {}) {
return {
files,
// `kimi-code` declares a `command-capability` probe, so the runner spawns `--help` BEFORE the
// A lane declaring a `command-capability` probe has the runner spawn `--help` BEFORE the
// review. Answer that separately or the probe fails and the lane never reaches the invocation
// this test is about.
spawn: (binary, argv) =>
@@ -1071,13 +1079,13 @@ describe('#2605 local OpenAI-compatible lanes produce diagnosable output', () =>
});
});
// Folded from tests/fix-2794-review-qwen-empty-guard.test.cjs (#3334/H3).
// Folded from tests/fix-2794-review-qwen-empty-guard (qwen retired; cursor stands in).test.cjs (#3334/H3).
//
// #2794 — the qwen reviewer leg was the last one still sending stderr to /dev/null. Every other lane
// captured stderr to a `.err` sidecar and appended it to the stub (#2494/#2605); qwen wrote a bare
// "failed or returned empty output." with no diagnostic at all, so a missing binary, an auth prompt
// and a rate-limit were indistinguishable from each other AND from a clean empty review.
describe('#2794 qwen reviewer stderr capture', () => {
describe('#2794 cursor reviewer stderr capture', () => {
function planFor(slug) {
const lane = REVIEWER_LANES.find((l) => l.slug === slug);
const r = resolveLanePlan({ lane, configGet: () => undefined, runDir: RUN, repoRoot: ROOT });
@@ -1101,34 +1109,34 @@ describe('#2794 qwen reviewer stderr capture', () => {
}
test('writes the review on success', async () => {
const p = planFor('qwen');
const d = deps({ status: 0, stdout: '## Qwen findings\nall good\n', stderr: '' });
const p = planFor('cursor');
const d = deps({ status: 0, stdout: '## Cursor findings\nall good\n', stderr: '' });
const r = await runLane(p, d, { repoRoot: ROOT });
assert.equal(r.stubbed, false);
assert.ok(d.files[p.reviewPath].includes('## Qwen findings'));
assert.ok(d.files[p.reviewPath].includes('## Cursor findings'));
});
test('a failed lane surfaces its stderr in the review stub', async () => {
const p = planFor('qwen');
const d = deps({ status: 1, stdout: '', stderr: 'auth required: run `qwen login`' });
const p = planFor('cursor');
const d = deps({ status: 1, stdout: '', stderr: 'auth required: run `cursor-agent login`' });
await runLane(p, d, { repoRoot: ROOT });
assert.ok(d.files[p.reviewPath].includes('auth required'),
'the diagnostic must reach the review, not just the sidecar');
assert.equal(d.files[p.errPath], 'auth required: run `qwen login`');
assert.equal(d.files[p.errPath], 'auth required: run `cursor-agent login`');
});
test('a silently empty lane still produces a diagnosable stub', async () => {
const p = planFor('qwen');
const p = planFor('cursor');
const d = deps({ status: 0, stdout: '', stderr: '' });
const r = await runLane(p, d, { repoRoot: ROOT });
assert.equal(r.stubbed, true);
assert.ok(d.files[p.reviewPath].includes('failed or returned empty output'));
});
test('a missing qwen binary reports unavailable rather than an empty review', async () => {
test('a missing cursor binary reports unavailable rather than an empty review', async () => {
// Stronger than the original: the lane is now reported with a TYPED reason before it is ever
// spawned, instead of producing a stub that looked the same as every other failure.
const p = planFor('qwen');
const p = planFor('cursor');
const d = deps({ status: 0, stdout: '', stderr: '' }, {}, () => false);
const r = await runLane(p, d, { repoRoot: ROOT });
assert.equal(r.ok, false);
@@ -1531,7 +1539,6 @@ describe('#2295 — resolveLanePlan records only a model that was APPLIED', () =
});
test('a lane declaring no modelConfigKey records no model', () => {
assert.equal(plan('qwen').model, null);
assert.equal(plan('coderabbit').model, null);
});