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

@@ -5,7 +5,7 @@
*
* `checkReviewerDocsParity` answers a different question than its sibling
* `checkReviewerLaneParity`: not "what runs" but "what is documented". #2781 was a real
* regression this gate exists to prevent — `--kimi-code` landed in `docs/COMMANDS.md` and never
* regression this gate exists to prevent — `--opencode` landed in `docs/COMMANDS.md` and never
* reached its four locale mirrors. Every synthetic-divergence row below feeds a targeted defect
* to the pure checker and asserts the specific typed violation, per CONTRIBUTING.md "Tests assert
* on typed structured values" — never on rendered prose.
@@ -25,7 +25,7 @@ const {
const ROOT = path.join(__dirname, '..');
/** Every declared flag, in descriptor order (12 across 11 lanes — antigravity carries two). */
/** Every declared flag, in descriptor order (10 across 9 lanes — antigravity carries two). */
const ALL_FLAGS = REVIEWER_LANES.flatMap((l) => l.flags);
/** Every declared reviewsSection title. */
const ALL_TITLES = REVIEWER_LANES.map((l) => l.reviewsSection);
@@ -68,20 +68,20 @@ describe('reviewer docs parity — flag arm', () => {
});
test('the shipped locale drift is detected', () => {
const missing = ALL_FLAGS.filter((f) => f !== '--kimi-code');
const missing = ALL_FLAGS.filter((f) => f !== '--opencode');
const r = checkReviewerDocsParity({ descriptor: REVIEWER_LANES, docs: { d: commandsDoc(missing) } });
assert.deepStrictEqual(
r.violations,
[{ reason: DOCS_PARITY_VIOLATION.DOC_FLAG_MISSING, doc: 'd', subject: '--kimi-code' }],
[{ reason: DOCS_PARITY_VIOLATION.DOC_FLAG_MISSING, doc: 'd', subject: '--opencode' }],
);
});
test('every missing flag is named, not just the first', () => {
const missing = ALL_FLAGS.filter((f) => f !== '--codex' && f !== '--qwen');
const missing = ALL_FLAGS.filter((f) => f !== '--codex' && f !== '--cursor');
const r = checkReviewerDocsParity({ descriptor: REVIEWER_LANES, docs: { d: commandsDoc(missing) } });
assert.strictEqual(r.violations.length, 2);
const subjects = r.violations.map((v) => v.subject).sort();
assert.deepStrictEqual(subjects, ['--codex', '--qwen']);
assert.deepStrictEqual(subjects, ['--codex', '--cursor']);
for (const v of r.violations) {
assert.strictEqual(v.reason, DOCS_PARITY_VIOLATION.DOC_FLAG_MISSING);
}
@@ -201,12 +201,12 @@ describe('reviewer docs parity — title arm', () => {
});
test('the purpose-line drift is detected', () => {
const titles = ALL_TITLES.filter((t) => t !== 'Kimi Code');
const titles = ALL_TITLES.filter((t) => t !== 'OpenCode');
const doc = featuresDoc({ titles });
const r = checkReviewerDocsParity({ descriptor: REVIEWER_LANES, docs: { d: doc } });
const titleViolations = r.violations.filter((v) => v.reason === DOCS_PARITY_VIOLATION.DOC_TITLE_MISSING);
assert.deepStrictEqual(titleViolations, [
{ reason: DOCS_PARITY_VIOLATION.DOC_TITLE_MISSING, doc: 'd', subject: 'Kimi Code' },
{ reason: DOCS_PARITY_VIOLATION.DOC_TITLE_MISSING, doc: 'd', subject: 'OpenCode' },
]);
});
@@ -243,9 +243,9 @@ describe('reviewer docs parity — table row arm', () => {
test('deletingALaneTableRowIsCaughtEvenWhenAForwardingRowListsEveryFlag', () => {
// Regression fixture for #2781: `docs/COMMANDS.md` and its locale mirrors carry a forwarding
// row that lists every flag in its THIRD cell, satisfying the file-wide flag arm on its own.
// The actual per-lane table row is what documents a lane, and deleting it — here `--kimi-code`
// The actual per-lane table row is what documents a lane, and deleting it — here `--opencode`
// — is exactly the regression this arm exists to catch.
const laneRows = REVIEWER_LANES.filter((l) => l.slug !== 'kimi-code').map(
const laneRows = REVIEWER_LANES.filter((l) => l.slug !== 'opencode').map(
(l) => `| ${l.flags.map((f) => `\`${f}\``).join(' / ')} | ${l.reviewsSection} review |`,
);
const doc = [
@@ -262,7 +262,7 @@ describe('reviewer docs parity — table row arm', () => {
(v) => v.reason === DOCS_PARITY_VIOLATION.TABLE_ROW_MISSING,
);
assert.deepStrictEqual(tableRowViolations, [
{ reason: DOCS_PARITY_VIOLATION.TABLE_ROW_MISSING, doc: 'd', subject: '--kimi-code' },
{ reason: DOCS_PARITY_VIOLATION.TABLE_ROW_MISSING, doc: 'd', subject: '--opencode' },
]);
});
@@ -331,8 +331,8 @@ describe('reviewer docs parity — combination', () => {
});
test('flag and title violations coexist', () => {
const titles = ALL_TITLES.filter((t) => t !== 'Qwen');
const doc = featuresDoc({ sigFlags: ALL_FLAGS.filter((f) => f !== '--qwen'), titles });
const titles = ALL_TITLES.filter((t) => t !== 'Cursor');
const doc = featuresDoc({ sigFlags: ALL_FLAGS.filter((f) => f !== '--cursor'), titles });
const r = checkReviewerDocsParity({ descriptor: REVIEWER_LANES, docs: { d: doc } });
const reasons = r.violations.map((v) => v.reason);
assert.ok(reasons.includes(DOCS_PARITY_VIOLATION.DOC_FLAG_MISSING));
@@ -408,23 +408,23 @@ describe('reviewer docs parity — HTML comment stripping (CodeQL js/incomplete-
// sanitization) applied to HTML comments instead of script tags. The fix iterates the same
// regex to a fixed point, then treats anything still starting with a bare `<!--` as an
// unterminated opener carried forward via `inComment`.
const NON_KIMI_ROWS = ALL_FLAGS.filter((f) => f !== '--kimi-code').map((f) => `| \`${f}\` | d |`);
const NON_VICTIM_ROWS = ALL_FLAGS.filter((f) => f !== '--opencode').map((f) => `| \`${f}\` | d |`);
test('aNestedCommentCannotSmuggleAFlagPastTheStrip', () => {
// `<!-` + `<!--DUMMY-->` + `-| `--kimi-code` | d |-->`: one pass strips the self-contained
// `<!-` + `<!--DUMMY-->` + `-| `--opencode` | d |-->`: one pass strips the self-contained
// `<!--DUMMY-->` in the middle, which joins the leftover `<!-` and `-` into a brand-new
// `<!--` opener immediately followed by the kimi-code row and a real `-->` closer. A
// single-pass strip leaves that whole new span — row included — untouched in the output, so
// the row reads as documented. Regressed exactly here: verified against the pre-fix
// single-pass implementation, only `TABLE_ROW_MISSING` fired and `DOC_FLAG_MISSING` did not.
const joinLine = '<!-<!--DUMMY-->-| `--kimi-code` | d |-->';
const doc = ['### `/msd-review`', '', ...NON_KIMI_ROWS, '', joinLine, ''].join('\n');
const joinLine = '<!-<!--DUMMY-->-| `--opencode` | d |-->';
const doc = ['### `/msd-review`', '', ...NON_VICTIM_ROWS, '', joinLine, ''].join('\n');
const r = checkReviewerDocsParity({ descriptor: REVIEWER_LANES, docs: { d: doc } });
const kimi = r.violations.filter((v) => v.subject === '--kimi-code');
const kimi = r.violations.filter((v) => v.subject === '--opencode');
assert.ok(
kimi.some((v) => v.reason === DOCS_PARITY_VIOLATION.DOC_FLAG_MISSING)
|| kimi.some((v) => v.reason === DOCS_PARITY_VIOLATION.TABLE_ROW_MISSING),
'--kimi-code must still be reported missing once the join-trick comment is fully stripped',
'--opencode must still be reported missing once the join-trick comment is fully stripped',
);
});
@@ -432,15 +432,15 @@ describe('reviewer docs parity — HTML comment stripping (CodeQL js/incomplete-
const doc = [
'### `/msd-review`',
'',
...NON_KIMI_ROWS,
...NON_VICTIM_ROWS,
'',
'<!-- open, never closed',
'| `--kimi-code` | d |',
'| `--opencode` | d |',
'',
].join('\n');
const r = checkReviewerDocsParity({ descriptor: REVIEWER_LANES, docs: { d: doc } });
const kimi = r.violations.filter((v) => v.subject === '--kimi-code');
assert.ok(kimi.length > 0, '--kimi-code sits inside an open comment and must be reported missing');
const kimi = r.violations.filter((v) => v.subject === '--opencode');
assert.ok(kimi.length > 0, '--opencode sits inside an open comment and must be reported missing');
});
test('aCommentClosedOnALaterLineResumesCorrectly', () => {
@@ -449,24 +449,24 @@ describe('reviewer docs parity — HTML comment stripping (CodeQL js/incomplete-
const doc = [
'### `/msd-review`',
'',
...NON_KIMI_ROWS,
...NON_VICTIM_ROWS,
'',
'<!-- opening',
'hidden line',
'-->',
'| `--kimi-code` | d |',
'| `--opencode` | d |',
'',
].join('\n');
const r = checkReviewerDocsParity({ descriptor: REVIEWER_LANES, docs: { d: doc } });
const kimi = r.violations.filter((v) => v.subject === '--kimi-code');
const kimi = r.violations.filter((v) => v.subject === '--opencode');
assert.deepStrictEqual(kimi, [], 'content after a real comment close must not be treated as commented out');
});
test('multipleIndependentCommentsOnOneLineAreAllStripped', () => {
const line = 'A <!-- first --> B <!-- | `--kimi-code` | d | -->';
const doc = ['### `/msd-review`', '', ...NON_KIMI_ROWS, '', line, ''].join('\n');
const line = 'A <!-- first --> B <!-- | `--opencode` | d | -->';
const doc = ['### `/msd-review`', '', ...NON_VICTIM_ROWS, '', line, ''].join('\n');
const r = checkReviewerDocsParity({ descriptor: REVIEWER_LANES, docs: { d: doc } });
const kimi = r.violations.filter((v) => v.subject === '--kimi-code');
const kimi = r.violations.filter((v) => v.subject === '--opencode');
assert.ok(kimi.length > 0, 'both independent comment spans on one line must be stripped');
});
});
@@ -512,7 +512,7 @@ describe('reviewer docs parity — hostile and malformed input', () => {
});
test('a DOC_UNREADABLE violation never masks a real one', () => {
const missing = ALL_FLAGS.filter((f) => f !== '--kimi-code');
const missing = ALL_FLAGS.filter((f) => f !== '--opencode');
const r = checkReviewerDocsParity({
descriptor: REVIEWER_LANES,
docs: { bad: null, good: commandsDoc(missing) },
@@ -521,7 +521,7 @@ describe('reviewer docs parity — hostile and malformed input', () => {
r.violations,
[
{ reason: DOCS_PARITY_VIOLATION.DOC_UNREADABLE, doc: 'bad', subject: 'object' },
{ reason: DOCS_PARITY_VIOLATION.DOC_FLAG_MISSING, doc: 'good', subject: '--kimi-code' },
{ reason: DOCS_PARITY_VIOLATION.DOC_FLAG_MISSING, doc: 'good', subject: '--opencode' },
],
);
});
@@ -563,11 +563,11 @@ describe('reviewer docs parity — cross-platform (CRLF)', () => {
});
test('a divergence is still caught under CRLF', () => {
const missing = ALL_FLAGS.filter((f) => f !== '--kimi-code');
const missing = ALL_FLAGS.filter((f) => f !== '--opencode');
const crlf = commandsDoc(missing).split('\n').join('\r\n');
const r = checkReviewerDocsParity({ descriptor: REVIEWER_LANES, docs: { d: crlf } });
assert.strictEqual(r.violations.length, 1);
assert.strictEqual(r.violations[0].subject, '--kimi-code');
assert.strictEqual(r.violations[0].subject, '--opencode');
});
});
@@ -678,7 +678,7 @@ describe('reviewer docs parity — the shipped repo', () => {
test('the shipped descriptor is non-empty', () => {
// Guards the vacuous-truth failure mode: an empty roster trivially satisfies every check below.
assert.ok(REVIEWER_LANES.length >= 11, 'expected at least the 11 shipped lanes');
assert.ok(REVIEWER_LANES.length >= 9, 'expected at least the 9 shipped lanes');
});
test('the shipped docs satisfy reviewer lane parity', () => {