* fix(#4709): retire the Gemini CLI reviewer lane
Google stopped serving Gemini CLI for the free/Pro/Ultra tiers on 2026-06-18 —
the same sunset that removed the gemini RUNTIME in #1928 (shipped 1.8.0). GSD
targets solo developers, so those tiers ARE the user path: the lane spawned
`gemini {{model}} -p -`, a binary that no longer answers for the majority of
users, and five locales documented it as a supported choice.
The lane was re-created after #1928 by the reviewer-lane-as-manifest-data work
(6a9babda69, #2798/#2837, ADR-2782). Per the maintainer that re-creation was an
error in that buildout rather than a considered decision, so this corrects a
mistake and needs no ADR-2782 amendment.
Reviewer roster: 12 lanes / 13 flags -> 11 lanes / 12 flags.
TWO sources of truth had to be removed, not one. Deleting
capabilities/gemini/capability.json left the capability registry at 11 lanes
while src/review-lane-descriptor.cts's hand-maintained REVIEWER_LANES array
still carried its own complete gemini entry at 12 — precisely the disagreement
checkReviewerLaneParity exists to catch. Both are gone; both parity checkers
now run clean against the real tree (lane parity ok/0 violations, docs parity
0 violations).
Surfaces stripped of the dead flag:
- capabilities/gemini/ deleted; registry and capability-matrix regenerated
- src/review-lane-descriptor.cts: REVIEWER_LANES entry, docblock count, and the
three doc comments that used --gemini as a live example
- commands/gsd/{review,plan-review-convergence,autonomous,progress}.md and the
four matching skills/*/SKILL.md: argument-hint frontmatter and flag bullets
- gsd-core/workflows/help/modes/{full,full.compact}.md: /gsd-help signatures,
the detected-CLI list, and the reviewer-title list
- gsd-core/workflows/settings-integrations.md: the integrations wizard no longer
offers "Gemini" as a model option, and the settable-keys list drops it
- gsd-core/workflows/review.md: the `command -v gemini` probe, the --gemini
flag, the roster frontmatter, the install pointer to the sunset repo, and the
jq-less / precedence / self-skip lane lists
- gsd-core/workflows/sync-skills.md: "two runtimes (grok, gemini) resolve to
ANOTHER runtime's skills root" is now one runtime; gemini never aliased
anything, it fell through canonicalizeRuntimeName to a fail-closed default
- docs/{CONFIGURATION,COMMANDS,CLI-TOOLS}.md, docs/reference/capability-matrix.md,
docs/how-to/set-up-cross-ai-review.md — including its `npm install -g
@google/gemini-cli` instruction and the two rows recommending --gemini
- docs/features/{cross-ai-peer-review,opt-in-parallel-reviewer-lanes}.md as the
generator inputs behind docs/FEATURES.md, plus the three locale FEATURES.md
signature lines the docs-parity gate covers (the #2781 class: a flag change
that never reaches the mirrors)
Counts reconciled against measurement rather than arithmetic: 8 timeout keys of
11 lanes, 11 budget keys, 9 model keys, and four hardcoded literals in
tests/reviewer-lane-declarations.test.cjs (NEW_LANE_ONLY_IDS 5->4, LITERAL_ROSTER
12->11, two roster counts 12->11).
BEHAVIOR CHANGE, accepted deliberately: `gsd config-set review.models.gemini`
now errors with "Unknown config key". An existing key already in
.planning/config.json still parses and is simply never read, so no project fails
to load. This is the repo's own documented policy for exactly this case
(docs/CONFIGURATION.md:327 — "a key left over from a removed reviewer validated
silently and was never read. Such a key is now rejected by config-set"), so no
installer migration ships. Note my first measurement of this was WRONG: I tested
config-get, which reads undeclared keys fine, and generalised. Read and write are
different surfaces and gave different answers.
Antigravity is untouched throughout — its --antigravity/--agy flags,
review.models.agy, ~/.gemini/antigravity configHome, ~/.gemini/config global
skills root (#3738), hookEvents "gemini", GEMINI.md instruction file, and every
gemini-* model id it actually runs on.
Refs #4709
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* chore(#4709): changeset for the reviewer-lane retirement
Type Removed: the --gemini flag and its three config keys are user-visible
surface that no longer exists.
Refs #4709
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* fix(#4709): close the 24 test failures and the locale-doc gap the gates found
An adversarial review and a full matrix run between them found substantially
more fallout than inspection had. All of it is this PR's own, and all of it is
fixed rather than waved off.
THE MATRIX RUN FOUND 24 FAILURES ACROSS 6 FILES. Inspection had predicted two.
The dominant class was a test helper that looks up a lane by slug and throws
`no declared lane 'gemini'`:
- tests/feat-2483-review-claude-mds-guard.test.cjs (6) — used gemini as the
"other declared first-party lane" to contrast against claude's env
suppression. Now qwen, verified from source as a lane that declares no `env`
(only claude does), so the contrast still holds.
- tests/review-lane-descriptor.test.cjs (6) — the duplicate-flag and
duplicate-section fixtures deliberately COLLIDED with a real declared lane to
prove the parity checker reports a duplicate. `--gemini`/`Gemini` no longer
collide with anything, so the checker reported
`descriptor_lane_not_in_registry:acme` instead and the tests proved nothing.
Now collide with `--codex`/`Codex`, reproduced against the real checker.
- tests/review-reviewer-selection.test.cjs (3) — these distinguish KNOWN-but-
undetected from UNKNOWN. gemini flipped categories, inverting what they
proved. The known case now uses qwen; `__nope__` stays the unknown fixture.
- tests/review-default-reviewers-resolution.test.cjs (2), and
tests/settings-integrations.test.cjs (3) — the wizard now offers three
reviewer CLIs, not four, so the test and its name say three.
- Two count assertions the earlier sweep missed outright:
reviewer-lane-declarations.test.cjs:359 (`length, 12`) and
reviewer-docs-parity.test.cjs:681 (`>= 12`).
THE LOCALE-DOC GAP, and why the parity gate stayed green over it. All four
locale mirrors still documented `--gemini` as a live reviewer flag. The
docs-parity checker asserts the PRESENCE of every current flag and never the
ABSENCE of a retired one, so "0 violations" was never evidence those files were
clean — my earlier reading of it as such was wrong. This is the #2781
locale-drift class in the opposite direction. Fixed across 12 locale files:
COMMANDS.md flag lists and table rows, CONFIGURATION.md `review.models.gemini`
rows and reviewer prose, CLI-TOOLS.md config examples, and
set-up-cross-ai-review.md including its install block and its
which-reviewer-to-choose row, which now recommends Antigravity.
ALSO FOUND, and instructive about my own method: docs/CONFIGURATION.md:297 still
carried a `review.models.gemini` row. My sweep had missed it because my grep
excluded lines matching `gemini-[0-9]` to spare Google's model ids — and that
row's example value is `"gemini-2.5-pro"` on the same line. The exclusion built
to avoid false positives created a false negative.
Remaining comment/example sites: src/review-reviewer-selection.cts:309 and
src/config.cts:598 named the dead flag and key as examples;
gsd-core/references/planning-config.md:269 likewise; and
review-reviewer-selection.cts:22 claimed in the PRESENT tense that gemini is a
lane-only reviewer capability. Line 38 of that same docblock says "Before this
phase the five non-runtime reviewers (gemini, ...)" and is left exactly as is —
that is past-tense history, and rewriting it would falsify the record.
Deliberately still deferred to Phase 4, because it is the RUNTIME axis rather
than the reviewer lane: the locale install-on-your-runtime.md `--gemini --global`
instructions, the USER-GUIDE colon-form notes, and the ARCHITECTURE
runtime-detection flag lists.
Both parity checkers green against the real tree; lint:ci exit 0.
Refs #4709
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* chore(#4709): backfill the changeset PR number
pr: 0 -> 4716, now that the PR exists. Never guessed ahead of the number.
Refs #4709
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
---------
Co-authored-by: sim <sim@local>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -104,7 +104,7 @@ describe('ADR-15: /gsd:progress --next --auto --converge (#1190)', () => {
|
||||
// They must now be DERIVED at runtime via `gsd_run review-lane flags`, not listed.
|
||||
const formerlyHardcodedLaneFlags = [
|
||||
'--codex',
|
||||
'--gemini',
|
||||
'--qwen',
|
||||
'--claude',
|
||||
'--opencode',
|
||||
'--ollama',
|
||||
|
||||
@@ -119,7 +119,7 @@ describe('autonomous --converge flag (#711)', () => {
|
||||
// They must now be DERIVED at runtime via `gsd_run review-lane flags`, not listed.
|
||||
const formerlyHardcodedLaneFlags = [
|
||||
'--codex',
|
||||
'--gemini',
|
||||
'--qwen',
|
||||
'--claude',
|
||||
'--opencode',
|
||||
'--ollama',
|
||||
|
||||
@@ -840,17 +840,17 @@ describe('config-set <key> null — unset/clear (#2046)', () => {
|
||||
afterEach(() => { cleanup(tmpDir); });
|
||||
|
||||
test('non-secret routing key: config-set <key> null removes the key (not the string "null")', () => {
|
||||
const setResult = runGsdTools('config-set review.models.gemini foo', tmpDir);
|
||||
const setResult = runGsdTools('config-set review.models.codex foo', tmpDir);
|
||||
assert.ok(setResult.success, `Command failed: ${setResult.error}`);
|
||||
assert.strictEqual(readConfig(tmpDir).review.models.gemini, 'foo');
|
||||
assert.strictEqual(readConfig(tmpDir).review.models.codex, 'foo');
|
||||
|
||||
const unsetResult = runGsdTools('config-set review.models.gemini null', tmpDir);
|
||||
const unsetResult = runGsdTools('config-set review.models.codex null', tmpDir);
|
||||
assert.ok(unsetResult.success, `Command failed: ${unsetResult.error}`);
|
||||
|
||||
const config = readConfig(tmpDir);
|
||||
assert.ok(
|
||||
!config.review || !config.review.models || !Object.prototype.hasOwnProperty.call(config.review.models, 'gemini'),
|
||||
'review.models.gemini must be absent on disk after unset, not the string "null"'
|
||||
!config.review || !config.review.models || !Object.prototype.hasOwnProperty.call(config.review.models, 'codex'),
|
||||
'review.models.codex must be absent on disk after unset, not the string "null"'
|
||||
);
|
||||
|
||||
// #2797: review.models.<slug> is federated to its lane capability now, and a
|
||||
@@ -859,7 +859,7 @@ describe('config-set <key> null — unset/clear (#2046)', () => {
|
||||
// instead of erroring. The property this test actually guards is unchanged
|
||||
// and asserted above: the key is REMOVED from disk, never persisted as the
|
||||
// literal string "null".
|
||||
const getResult = runGsdTools('config-get review.models.gemini', tmpDir);
|
||||
const getResult = runGsdTools('config-get review.models.codex', tmpDir);
|
||||
const shown = (getResult.output || '').trim();
|
||||
assert.ok(
|
||||
shown === '' || shown === '""' || shown === 'undefined',
|
||||
@@ -913,8 +913,8 @@ describe('config-set <key> null — unset/clear (#2046)', () => {
|
||||
});
|
||||
|
||||
test('literal-"null" guard: no config-set <key> null ever persists the literal string "null" on disk', () => {
|
||||
runGsdTools('config-set review.models.gemini foo', tmpDir);
|
||||
runGsdTools('config-set review.models.gemini null', tmpDir);
|
||||
runGsdTools('config-set review.models.codex foo', tmpDir);
|
||||
runGsdTools('config-set review.models.codex null', tmpDir);
|
||||
runGsdTools('config-set brave_search sk-test-1234', tmpDir);
|
||||
runGsdTools('config-set brave_search null', tmpDir);
|
||||
runGsdTools('config-set context dev', tmpDir);
|
||||
@@ -1078,17 +1078,17 @@ describe('config-set --dry-run (#4444)', () => {
|
||||
});
|
||||
|
||||
test('config-set <key> null --dry-run does not unset (dry-run covers the unset branch too)', () => {
|
||||
const seed = runGsdTools('config-set review.models.gemini foo', tmpDir);
|
||||
const seed = runGsdTools('config-set review.models.codex foo', tmpDir);
|
||||
assert.ok(seed.success, `seed failed: ${seed.error}`);
|
||||
|
||||
const dryRun = runGsdTools('config-set review.models.gemini null --dry-run', tmpDir);
|
||||
const dryRun = runGsdTools('config-set review.models.codex null --dry-run', tmpDir);
|
||||
assert.ok(dryRun.success, `Command failed: ${dryRun.error}`);
|
||||
const output = JSON.parse(dryRun.output);
|
||||
assert.strictEqual(output.dry_run, true);
|
||||
assert.strictEqual(output.would_unset, true);
|
||||
|
||||
// Still present on disk — the dry-run must not have unset it.
|
||||
assert.strictEqual(readConfig(tmpDir).review.models.gemini, 'foo');
|
||||
assert.strictEqual(readConfig(tmpDir).review.models.codex, 'foo');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
* That made it the only reviewer seeing anything beyond the prompt file: the prompt is assembled
|
||||
* once (PROJECT.md, the roadmap section, every PLAN file, CONTEXT.md, RESEARCH.md, REQUIREMENTS.md)
|
||||
* before any lane runs, gemini receives only that prompt, and codex runs `--ephemeral`. Beyond the
|
||||
* before any lane runs, qwen receives only that prompt, and codex runs `--ephemeral`. Beyond the
|
||||
* measured injection cost, the asymmetry cuts at the workflow's premise — "independent review"
|
||||
* meant something different for the claude lane than for the other two.
|
||||
*
|
||||
@@ -121,7 +121,7 @@ describe('#2483 the claude reviewer lane suppresses CLAUDE.md + auto-memory inje
|
||||
'the claude lane must declare BOTH CLAUDE_CODE_DISABLE_CLAUDE_MDS=1 and ' +
|
||||
'CLAUDE_CODE_DISABLE_AUTO_MEMORY=1 — CLAUDE.md loading and auto-memory are ' +
|
||||
'independently-toggled mechanisms, and a lane missing either re-inherits that half of the ' +
|
||||
'context, reintroducing the asymmetry against the prompt-fed gemini and codex lanes'
|
||||
'context, reintroducing the asymmetry against the prompt-fed qwen and codex lanes'
|
||||
);
|
||||
});
|
||||
|
||||
@@ -251,9 +251,9 @@ describe('#2483 the claude reviewer lane suppresses CLAUDE.md + auto-memory inje
|
||||
transport: 'spawn',
|
||||
flags: ['--evil-reviewer'],
|
||||
reviewsSection: 'Evil Review',
|
||||
probe: { ...laneFor('gemini').probe },
|
||||
probe: { ...laneFor('qwen').probe },
|
||||
timeoutFloorMs: 1000,
|
||||
emptyOutput: laneFor('gemini').emptyOutput,
|
||||
emptyOutput: laneFor('qwen').emptyOutput,
|
||||
requiresBinaries: [],
|
||||
handler: null,
|
||||
invoke: {
|
||||
@@ -513,9 +513,9 @@ describe('#2483 the claude reviewer lane suppresses CLAUDE.md + auto-memory inje
|
||||
// environment untouched rather than passing an empty object, which on some spawn wirings is
|
||||
// the difference between inheriting and being handed a stripped environment.
|
||||
const seen = [];
|
||||
await runLane(planFor('gemini'), spyDeps(seen), { repoRoot: ROOT });
|
||||
await runLane(planFor('qwen'), spyDeps(seen), { repoRoot: ROOT });
|
||||
const dispatch = seen.find((c) => !c.argv.includes('--help'));
|
||||
assert.ok(dispatch, 'the runner never reached the gemini dispatch');
|
||||
assert.ok(dispatch, 'the runner never reached the qwen dispatch');
|
||||
assert.ok(!('env' in dispatch.opts), 'an unguarded lane must not pass an env key to spawn');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -428,4 +428,104 @@ describe('#4709 no shipped surface mints a retired runtime id', () => {
|
||||
+ 'support. Labels must match the runtime label table (src/runtime-name-policy.cts '
|
||||
+ `RUNTIME_LABELS), so a retired runtime cannot linger here. Offenders:\n ${offenders.join('\n ')}`);
|
||||
});
|
||||
|
||||
/**
|
||||
* #4709 Phase 3 — the Gemini CLI reviewer lane is retired.
|
||||
*
|
||||
* #1928 removed the gemini RUNTIME in 1.8.0 after Google sunset Gemini CLI on 2026-06-18. The
|
||||
* reviewer lane was re-created afterwards by the reviewer-lane-as-manifest-data work (6a9babda69,
|
||||
* #2798/#2837) — per the maintainer that re-creation was an error in that buildout, not a
|
||||
* decision, so retiring it corrects a mistake and needs no ADR-2782 amendment.
|
||||
*
|
||||
* The lane spawned `gemini {{model}} -p -`, a binary Google no longer serves for the
|
||||
* free/Pro/Ultra tiers that ARE GSD's audience.
|
||||
*
|
||||
* Every assertion below is STRUCTURAL — a declared lane, an owned config key, a capability count.
|
||||
* None asserts that the string "gemini" is absent, because that string is load-bearing across
|
||||
* Antigravity's real on-disk contract (~/.gemini/antigravity, ~/.gemini/config, hookEvents
|
||||
* "gemini", GEMINI.md) and across Google's own model IDs. The Antigravity block below is the
|
||||
* negative space that keeps this removal from overreaching.
|
||||
*/
|
||||
describe('#4709 the Gemini CLI reviewer lane is retired', () => {
|
||||
const reviewerIds = () => Object.keys(registry.capabilities)
|
||||
.filter((id) => registry.capabilities[id] && registry.capabilities[id].reviewer);
|
||||
|
||||
test('capabilities/gemini/ no longer exists', () => {
|
||||
assert.strictEqual(
|
||||
fs.existsSync(path.join(ROOT, 'capabilities', 'gemini')),
|
||||
false,
|
||||
'the gemini capability directory must be deleted, not emptied',
|
||||
);
|
||||
});
|
||||
|
||||
test('no capability declares a gemini reviewer lane', () => {
|
||||
const offenders = reviewerIds().filter((id) => {
|
||||
const rev = registry.capabilities[id].reviewer;
|
||||
return id === 'gemini' || rev.slug === 'gemini' || (rev.flags || []).includes('--gemini');
|
||||
});
|
||||
assert.deepStrictEqual(
|
||||
offenders,
|
||||
[],
|
||||
'a reviewer lane still resolves for the retired Gemini CLI; --gemini would spawn a binary '
|
||||
+ `Google stopped serving on 2026-06-18. Offenders: ${offenders.join(', ')}`,
|
||||
);
|
||||
});
|
||||
|
||||
test('no config key is owned for the retired lane', () => {
|
||||
const offenders = Object.keys(registry.configKeys).filter((k) => /\.gemini$/.test(k));
|
||||
assert.deepStrictEqual(
|
||||
offenders,
|
||||
[],
|
||||
'the retired lane still owns config keys, so `gsd config-set` would accept settings for a '
|
||||
+ `lane that cannot run. Offenders:\n ${offenders.join('\n ')}`,
|
||||
);
|
||||
});
|
||||
|
||||
test('exactly 11 reviewer lanes remain', () => {
|
||||
// Counted from the registry, not hardcoded per-name, so adding a 12th lane later cannot
|
||||
// silently re-admit gemini under cover of the count still "looking right".
|
||||
const ids = reviewerIds().sort();
|
||||
assert.strictEqual(
|
||||
ids.length,
|
||||
11,
|
||||
`expected 11 reviewer lanes after retiring gemini, got ${ids.length}: ${ids.join(', ')}`,
|
||||
);
|
||||
assert.ok(!ids.includes('gemini'), 'gemini must not be among them');
|
||||
});
|
||||
|
||||
test("Antigravity's reviewer lane is untouched (negative space)", () => {
|
||||
const agy = registry.capabilities.antigravity;
|
||||
assert.ok(agy && agy.reviewer, 'antigravity must still declare a reviewer lane');
|
||||
assert.strictEqual(agy.reviewer.slug, 'antigravity');
|
||||
for (const flag of ['--antigravity', '--agy']) {
|
||||
assert.ok(
|
||||
(agy.reviewer.flags || []).includes(flag),
|
||||
`antigravity must keep its ${flag} flag`,
|
||||
);
|
||||
}
|
||||
// Its own keys survive, including the deliberately `agy`-suffixed model key.
|
||||
for (const key of [
|
||||
'review.models.agy',
|
||||
'review.timeouts.antigravity',
|
||||
'review.max_prompt_tokens_per_reviewer.antigravity',
|
||||
]) {
|
||||
assert.ok(
|
||||
Object.prototype.hasOwnProperty.call(registry.configKeys, key),
|
||||
`antigravity must still own ${key}`,
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
test('the other ten lanes are untouched (negative space)', () => {
|
||||
const expected = [
|
||||
'antigravity', 'claude', 'coderabbit', 'codex', 'cursor',
|
||||
'kimi-code', 'llama-cpp', 'lm-studio', 'ollama', 'opencode', 'qwen',
|
||||
];
|
||||
assert.deepStrictEqual(
|
||||
reviewerIds().sort(),
|
||||
expected,
|
||||
'retiring gemini must remove exactly one lane and disturb no other',
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -116,7 +116,7 @@ describe('plan-review-convergence command source (#2306)', () => {
|
||||
|
||||
test('command declares all reviewer flags in context', () => {
|
||||
assert.ok(command.includes('--codex'), 'must document --codex flag');
|
||||
assert.ok(command.includes('--gemini'), 'must document --gemini flag');
|
||||
assert.ok(command.includes('--coderabbit'), 'must document --coderabbit flag');
|
||||
assert.ok(command.includes('--claude'), 'must document --claude flag');
|
||||
assert.ok(command.includes('--opencode'), 'must document --opencode flag');
|
||||
assert.ok(command.includes('--all'), 'must document --all flag');
|
||||
@@ -272,10 +272,10 @@ describe('plan-review-convergence: --agy/--antigravity reviewer whitelist (#2293
|
||||
// invocation (no flag) MUST yield an empty REVIEWER_FLAGS here; the default
|
||||
// is resolved later in step 1.5 against review.default_reviewers.
|
||||
assert.strictEqual(run('5'), '', 'no reviewer flag → empty REVIEWER_FLAGS from parse (default applied in step 1.5 per #2315)');
|
||||
const mixed = run('5 --codex --gemini');
|
||||
assert.ok(mixed.includes('--codex') && mixed.includes('--gemini'), 'existing flags still recognized');
|
||||
const mixed = run('5 --codex --coderabbit');
|
||||
assert.ok(mixed.includes('--codex') && mixed.includes('--coderabbit'), 'existing flags still recognized');
|
||||
// --agy must not be spuriously matched by an unrelated flag (independence).
|
||||
assert.ok(!run('5 --gemini').includes('--agy'), '--gemini must not trip the --agy whitelist');
|
||||
assert.ok(!run('5 --coderabbit').includes('--agy'), '--coderabbit must not trip the --agy whitelist');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -377,7 +377,7 @@ describe('plan-review-convergence: #2315 respects review.default_reviewers (no-f
|
||||
// - bare + default_reviewers configured → empty REVIEWER_FLAGS (gsd-review applies default)
|
||||
// - bare + default_reviewers unset → --codex fallback (pre-fix behavior preserved)
|
||||
// - bare + empty-array default → --codex fallback (defensive — schema would reject)
|
||||
// - explicit --gemini + default set → --gemini wins (explicit flags unaffected, #2315 AC5)
|
||||
// - explicit --codex + default set → --codex wins (explicit flags unaffected, #2315 AC5)
|
||||
test('[behavioral] no-flag invocation resolves to default_reviewers when configured, --codex otherwise', (t) => {
|
||||
if (process.platform === 'win32') { t.skip('POSIX shell extraction; not run on Windows'); return; }
|
||||
if (!jqAvailable) { t.skip('jq not on PATH — workflow resolution block pipes through jq (production dependency, review.md:244); structural tests above still validate the fix'); return; }
|
||||
@@ -444,9 +444,9 @@ describe('plan-review-convergence: #2315 respects review.default_reviewers (no-f
|
||||
r = run({ args: '5', defaultReviewers: '[]' });
|
||||
assert.ok(/REVIEWER_FLAGS=\[--codex\]/.test(r), `empty-array default → --codex fallback, got: "${r}"`);
|
||||
|
||||
// AC5 (out of scope but must not regress): explicit --gemini overrides configured default.
|
||||
r = run({ args: '5 --gemini', defaultReviewers: '["claude"]' });
|
||||
assert.ok(/REVIEWER_FLAGS=\[.*--gemini.*\]/.test(r), `explicit flag wins over configured default, got: "${r}"`);
|
||||
// AC5 (out of scope but must not regress): explicit --codex overrides configured default.
|
||||
r = run({ args: '5 --codex', defaultReviewers: '["claude"]' });
|
||||
assert.ok(/REVIEWER_FLAGS=\[.*--codex.*\]/.test(r), `explicit flag wins over configured default, got: "${r}"`);
|
||||
});
|
||||
|
||||
// Property test — CLAUDE.md mandates at least one fast-check (fc) property
|
||||
|
||||
@@ -10,35 +10,35 @@ const {
|
||||
describe('review default reviewers resolution (#3079)', () => {
|
||||
test('no flags + config defaults selects configured subset', () => {
|
||||
const result = resolveReviewerSelection({
|
||||
detected: ['gemini', 'codex', 'claude'],
|
||||
detected: ['qwen', 'codex', 'claude'],
|
||||
explicitFlags: [],
|
||||
allFlag: false,
|
||||
configuredDefaultReviewers: ['gemini', 'codex'],
|
||||
configuredDefaultReviewers: ['qwen', 'codex'],
|
||||
});
|
||||
|
||||
assert.strictEqual(result.source, 'config_default');
|
||||
assert.deepStrictEqual(result.selected, ['codex', 'gemini']);
|
||||
assert.deepStrictEqual(result.selected, ['codex', 'qwen']);
|
||||
assert.deepStrictEqual(result.errors, []);
|
||||
});
|
||||
|
||||
test('--all ignores configured defaults', () => {
|
||||
const result = resolveReviewerSelection({
|
||||
detected: ['gemini', 'codex', 'claude'],
|
||||
detected: ['qwen', 'codex', 'claude'],
|
||||
explicitFlags: [],
|
||||
allFlag: true,
|
||||
configuredDefaultReviewers: ['gemini'],
|
||||
configuredDefaultReviewers: ['qwen'],
|
||||
});
|
||||
|
||||
assert.strictEqual(result.source, 'all_flag');
|
||||
assert.deepStrictEqual(result.selected, ['claude', 'codex', 'gemini']);
|
||||
assert.deepStrictEqual(result.selected, ['claude', 'codex', 'qwen']);
|
||||
});
|
||||
|
||||
test('explicit flags win over config defaults', () => {
|
||||
const result = resolveReviewerSelection({
|
||||
detected: ['gemini', 'codex', 'claude', 'cursor'],
|
||||
detected: ['qwen', 'codex', 'claude', 'cursor'],
|
||||
explicitFlags: ['cursor'],
|
||||
allFlag: false,
|
||||
configuredDefaultReviewers: ['gemini', 'codex'],
|
||||
configuredDefaultReviewers: ['qwen', 'codex'],
|
||||
});
|
||||
|
||||
assert.strictEqual(result.source, 'explicit_flags');
|
||||
@@ -47,7 +47,7 @@ describe('review default reviewers resolution (#3079)', () => {
|
||||
|
||||
test('unknown configured slugs warn and all-undetected known slugs error', () => {
|
||||
const result = resolveReviewerSelection({
|
||||
detected: ['gemini'],
|
||||
detected: ['qwen'],
|
||||
explicitFlags: [],
|
||||
allFlag: false,
|
||||
configuredDefaultReviewers: ['unknown_slug', 'codex'],
|
||||
|
||||
@@ -306,19 +306,19 @@ describe('reviewer lane parity — descriptor-internal uniqueness (ADR-2782 D8)'
|
||||
});
|
||||
|
||||
test('duplicate lane flags are a violation', () => {
|
||||
const clash = { ...fakeLane('acme'), flags: ['--gemini'] };
|
||||
const clash = { ...fakeLane('acme'), flags: ['--codex'] };
|
||||
const r = check({ descriptor: [...REVIEWER_LANES, clash] });
|
||||
assert.ok(
|
||||
reasons(r).includes(`${PARITY_VIOLATION.DUPLICATE_FLAG}:--gemini`),
|
||||
reasons(r).includes(`${PARITY_VIOLATION.DUPLICATE_FLAG}:--codex`),
|
||||
`expected a duplicate-flag violation, got: ${JSON.stringify(reasons(r))}`,
|
||||
);
|
||||
});
|
||||
|
||||
test('duplicate reviewsSection is a violation', () => {
|
||||
const clash = { ...fakeLane('acme'), reviewsSection: 'Gemini' };
|
||||
const clash = { ...fakeLane('acme'), reviewsSection: 'Codex' };
|
||||
const r = check({ descriptor: [...REVIEWER_LANES, clash] });
|
||||
assert.ok(
|
||||
reasons(r).includes(`${PARITY_VIOLATION.DUPLICATE_SECTION}:Gemini`),
|
||||
reasons(r).includes(`${PARITY_VIOLATION.DUPLICATE_SECTION}:Codex`),
|
||||
`expected a duplicate-section violation, got: ${JSON.stringify(reasons(r))}`,
|
||||
);
|
||||
});
|
||||
@@ -754,7 +754,7 @@ const {
|
||||
} = require('../gsd-core/bin/lib/review-lane-descriptor.cjs');
|
||||
|
||||
/** A first-party lane set small enough to read at a glance, but real-shaped. */
|
||||
const FP = REVIEWER_LANES.slice(0, 2); // gemini, claude
|
||||
const FP = REVIEWER_LANES.slice(0, 2); // claude, codex
|
||||
const FP_SLUGS = FP.map((l) => l.slug);
|
||||
|
||||
/** A valid overlay `reviewer` body, field-identical to a SpawnLane (ADR-2782 D1). */
|
||||
@@ -812,7 +812,7 @@ describe('mergeReviewerLanes (#2927)', () => {
|
||||
const merged = mergeReviewerLanes(FP, registry(reviewerCap(overlayLane())));
|
||||
const slugs = merged.map((l) => l.slug);
|
||||
assert.ok(slugs.includes('agy-revisor'), 'overlay slug admitted into merged set');
|
||||
assert.ok(slugs.includes('gemini'), 'first-party lanes preserved');
|
||||
assert.ok(slugs.includes('claude'), 'first-party lanes preserved');
|
||||
// the overlay body itself is the merged entry (no translation layer)
|
||||
const overlay = merged.find((l) => l.slug === 'agy-revisor');
|
||||
assert.ok(overlay, 'agy-revisor overlay lane should be present in merged set');
|
||||
|
||||
@@ -43,7 +43,6 @@ const FC = { seed: 42, numRuns: 200 };
|
||||
|
||||
/** Config with every model key set, so the model-bearing rows exercise the configured branch. */
|
||||
const FULL_CONFIG = {
|
||||
'review.models.gemini': 'G',
|
||||
'review.models.claude': 'C',
|
||||
'review.models.codex': 'X',
|
||||
'review.models.opencode': 'O',
|
||||
@@ -78,7 +77,6 @@ const FILE_REF = fileRefPrompt(`${RUN}/gsd-review-prompt.md`, ROOT);
|
||||
* each still gets its own named constant since each describes an
|
||||
* independently-configured external tool, not a shared internal class norm.
|
||||
*/
|
||||
const GEMINI_NATIVE_TIMEOUT_MS = 900000;
|
||||
const CLAUDE_NATIVE_TIMEOUT_MS = 1200000;
|
||||
const CODEX_NATIVE_TIMEOUT_MS = 1200000;
|
||||
const CODERABBIT_NATIVE_TIMEOUT_MS = 360000;
|
||||
@@ -98,7 +96,6 @@ const KIMI_CODE_NATIVE_TIMEOUT_MS = 900000;
|
||||
* effort available. `stdin` is the prompt path for a stdin lane, `null` otherwise.
|
||||
*/
|
||||
const GOLDEN = [
|
||||
{ slug: 'gemini', binary: 'gemini', argv: ['-m', 'G', '-p', '-'], stdin: true, out: 'stdout', timeout: GEMINI_NATIVE_TIMEOUT_MS },
|
||||
{ slug: 'claude', binary: 'claude', argv: ['--model', 'C', '--effort', 'high', '-p', '-'], stdin: true, out: 'stdout', timeout: CLAUDE_NATIVE_TIMEOUT_MS },
|
||||
{
|
||||
slug: 'codex',
|
||||
@@ -179,7 +176,7 @@ describe('#3274 — timeoutConfigKey resolves the outer wall-clock cap', () => {
|
||||
const r = resolve('antigravity', { config: { [AGY_KEY]: 900 } });
|
||||
// 900_000 here is the arithmetic result of this test's own input (900
|
||||
// configured seconds * 1000), not a reuse of any lane's *_NATIVE_TIMEOUT_MS
|
||||
// golden default -- it only coincidentally matches GEMINI/QWEN/CURSOR/
|
||||
// golden default -- it only coincidentally matches QWEN/CURSOR/
|
||||
// KIMI_CODE_NATIVE_TIMEOUT_MS (all 900000). antigravity's own native
|
||||
// default is ANTIGRAVITY_NATIVE_TIMEOUT_MS (600000), unrelated here.
|
||||
assert.equal(r.plan.timeoutMs, 900_000);
|
||||
@@ -208,7 +205,7 @@ describe('#3274 — timeoutConfigKey resolves the outer wall-clock cap', () => {
|
||||
});
|
||||
|
||||
test('a lane with no timeoutConfigKey field falls back like an unset key (row 7)', () => {
|
||||
const lane = { ...REVIEWER_LANES.find((l) => l.slug === 'gemini') };
|
||||
const lane = { ...REVIEWER_LANES.find((l) => l.slug === 'claude') };
|
||||
delete lane.timeoutConfigKey;
|
||||
const r = resolveLanePlan({ lane, configGet: () => 900, runDir: RUN, repoRoot: ROOT });
|
||||
assert.equal(r.ok, true);
|
||||
@@ -231,9 +228,9 @@ describe('#3274 — timeoutConfigKey resolves the outer wall-clock cap', () => {
|
||||
});
|
||||
|
||||
test("a non-antigravity lane's configured timeout does not touch argv (row 13)", () => {
|
||||
const key = REVIEWER_LANES.find((l) => l.slug === 'gemini').timeoutConfigKey;
|
||||
const unset = resolve('gemini', { config: {} });
|
||||
const configured = resolve('gemini', { config: { [key]: 300 } });
|
||||
const key = REVIEWER_LANES.find((l) => l.slug === 'claude').timeoutConfigKey;
|
||||
const unset = resolve('claude', { config: {} });
|
||||
const configured = resolve('claude', { config: { [key]: 300 } });
|
||||
assert.deepStrictEqual(configured.plan.argv, unset.plan.argv);
|
||||
assert.notEqual(configured.plan.timeoutMs, unset.plan.timeoutMs);
|
||||
});
|
||||
@@ -344,7 +341,7 @@ describe('reviewer lane invocation — model resolution', () => {
|
||||
// `"null"` is the four literal characters `config-get --raw` prints for a missing key — every
|
||||
// bash leg tested for it. A config written by an older workflow can still contain it.
|
||||
for (const bad of [undefined, null, '', ' ', 'null', 'undefined']) {
|
||||
const r = resolve('gemini', { config: { 'review.models.gemini': bad } });
|
||||
const r = resolve('claude', { config: { 'review.models.claude': bad }, effortArgs: [] });
|
||||
assert.deepStrictEqual(r.plan.argv, ['-p', '-'], `${JSON.stringify(bad)} must not reach argv`);
|
||||
}
|
||||
});
|
||||
@@ -353,15 +350,15 @@ describe('reviewer lane invocation — model resolution', () => {
|
||||
// String(0) would put "0" in as a model name. A wrong model silently reviewed is worse than no
|
||||
// override at all.
|
||||
for (const bad of [0, 1, true, false, [], {}, ['a']]) {
|
||||
const r = resolve('gemini', { config: { 'review.models.gemini': bad } });
|
||||
const r = resolve('claude', { config: { 'review.models.claude': bad }, effortArgs: [] });
|
||||
assert.deepStrictEqual(r.plan.argv, ['-p', '-'], `${JSON.stringify(bad)} must not reach argv`);
|
||||
}
|
||||
});
|
||||
|
||||
test('shell metacharacters in a model value stay a single inert argv element', () => {
|
||||
const hostile = '; rm -rf /; $(whoami) `id` && echo "x"';
|
||||
const r = resolve('gemini', { config: { 'review.models.gemini': hostile } });
|
||||
assert.deepStrictEqual(r.plan.argv, ['-m', hostile, '-p', '-']);
|
||||
const r = resolve('claude', { config: { 'review.models.claude': hostile }, effortArgs: [] });
|
||||
assert.deepStrictEqual(r.plan.argv, ['--model', hostile, '-p', '-']);
|
||||
// Nothing here builds a shell string; the runner spawns with shell:false and an argv array.
|
||||
assert.equal(r.plan.argv.filter((a) => a === hostile).length, 1);
|
||||
});
|
||||
|
||||
@@ -138,7 +138,7 @@ describe('runner — egress host re-verification (ADR-2782 D5 rules 2-4)', () =>
|
||||
|
||||
describe('runner — probe (ADR-2782 D7)', () => {
|
||||
test('command-exists both ways', async () => {
|
||||
const p = plan('gemini');
|
||||
const p = plan('cursor');
|
||||
assert.equal((await probeLane(p, deps({ hasBinary: () => true }))).available, true);
|
||||
const miss = await probeLane(p, deps({ hasBinary: () => false }));
|
||||
assert.equal(miss.available, false);
|
||||
@@ -182,7 +182,7 @@ describe('runner — probe (ADR-2782 D7)', () => {
|
||||
});
|
||||
|
||||
test('a missing required binary is named rather than left to fail obscurely', async () => {
|
||||
const p = { ...plan('gemini'), requiresBinaries: ['jq'] };
|
||||
const p = { ...plan('cursor'), requiresBinaries: ['jq'] };
|
||||
const r = await probeLane(p, deps({ hasBinary: (n) => n !== 'jq' }));
|
||||
assert.equal(r.available, false);
|
||||
assert.equal(r.reason, LANE_UNAVAILABLE.MISSING_REQUIRED_BINARY);
|
||||
@@ -208,7 +208,7 @@ describe('runner — probe (ADR-2782 D7)', () => {
|
||||
|
||||
describe('runner — empty-output policy (#2494 / #2605 / #2794)', () => {
|
||||
test('a real review is written verbatim', () => {
|
||||
const p = plan('gemini');
|
||||
const p = plan('cursor');
|
||||
const d = deps();
|
||||
const r = writeReviewOrStub(p, '## Findings\nreal', d);
|
||||
assert.equal(r.stubbed, false);
|
||||
@@ -216,8 +216,8 @@ describe('runner — empty-output policy (#2494 / #2605 / #2794)', () => {
|
||||
});
|
||||
|
||||
test('empty output writes a stub carrying the captured stderr', () => {
|
||||
const p = plan('gemini');
|
||||
const d = deps({ files: { [`${RUN}/gsd-review-gemini.err`]: 'auth failed' } });
|
||||
const p = plan('cursor');
|
||||
const d = deps({ files: { [`${RUN}/gsd-review-cursor.err`]: 'auth failed' } });
|
||||
const r = writeReviewOrStub(p, '', d);
|
||||
assert.equal(r.stubbed, true);
|
||||
assert.ok(d.files[p.reviewPath].includes('failed or returned empty output'));
|
||||
@@ -226,7 +226,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 ['gemini', 'claude', 'codex', 'qwen', 'cursor']) {
|
||||
for (const slug of ['antigravity', 'claude', 'codex', 'qwen', 'cursor']) {
|
||||
const p = plan(slug);
|
||||
const d = deps();
|
||||
assert.equal(writeReviewOrStub(p, ' \n', d).stubbed, true, `${slug} accepted whitespace`);
|
||||
@@ -316,9 +316,9 @@ describe('runner — empty-output policy (#2494 / #2605 / #2794)', () => {
|
||||
});
|
||||
|
||||
test('#4255 — a lane that sent no effort argument says so, rather than naming a level', () => {
|
||||
// gemini declares no effort channel, so `plan.effort` is null. Printing a level there would
|
||||
// cursor declares no effort channel, so `plan.effort` is null. Printing a level there would
|
||||
// be a lie about what reached the CLI; the stub says the CLI's own configuration applied.
|
||||
const p = plan('gemini');
|
||||
const p = plan('cursor');
|
||||
const d = deps();
|
||||
writeReviewOrStub(p, '', d, undefined, { status: 0 });
|
||||
const out = d.files[p.reviewPath];
|
||||
@@ -337,7 +337,7 @@ describe('runner — empty-output policy (#2494 / #2605 / #2794)', () => {
|
||||
|
||||
test('the stub is distinguishable from a real review', () => {
|
||||
// The ambiguity between "failed" and "ran cleanly with nothing to report" IS the defect.
|
||||
const p = plan('gemini');
|
||||
const p = plan('cursor');
|
||||
const d = deps();
|
||||
writeReviewOrStub(p, '', d);
|
||||
assert.ok(/failed or returned empty output/.test(d.files[p.reviewPath]));
|
||||
@@ -355,7 +355,7 @@ describe('runner — empty-output policy (#2494 / #2605 / #2794)', () => {
|
||||
|
||||
test('a filesystem write failure degrades rather than crashing the run', () => {
|
||||
// Injected by making the seam throw — never chmod 0o000, which root bypasses.
|
||||
const p = plan('gemini');
|
||||
const p = plan('cursor');
|
||||
const d = deps({ writeFile: () => { throw new Error('EROFS'); } });
|
||||
assert.throws(() => writeReviewOrStub(p, 'x', d), /EROFS/);
|
||||
});
|
||||
@@ -732,7 +732,7 @@ describe('runner — openai-compatible handler', () => {
|
||||
|
||||
describe('runner — orchestration', () => {
|
||||
test('an unavailable lane requested EXPLICITLY is surfaced (D4 carve-out)', async () => {
|
||||
const p = plan('gemini');
|
||||
const p = plan('cursor');
|
||||
const d = deps({ hasBinary: () => false });
|
||||
const r = await runLane(p, d, { repoRoot: ROOT, explicitlyRequested: true });
|
||||
assert.equal(r.ok, false);
|
||||
@@ -740,7 +740,7 @@ describe('runner — orchestration', () => {
|
||||
});
|
||||
|
||||
test('an unavailable lane nobody asked for is quiet but still reported', async () => {
|
||||
const p = plan('gemini');
|
||||
const p = plan('cursor');
|
||||
const d = deps({ hasBinary: () => false });
|
||||
const r = await runLane(p, d, { repoRoot: ROOT, explicitlyRequested: false });
|
||||
assert.equal(r.ok, false);
|
||||
@@ -762,14 +762,14 @@ describe('runner — orchestration', () => {
|
||||
});
|
||||
|
||||
test('stderr is always captured to the sidecar, never discarded', async () => {
|
||||
const p = plan('gemini');
|
||||
const p = plan('cursor');
|
||||
const d = deps({ spawn: () => ({ status: 0, stdout: 'R', stderr: 'a warning' }) });
|
||||
await runLane(p, d, { repoRoot: ROOT });
|
||||
assert.equal(d.files[p.errPath], 'a warning');
|
||||
});
|
||||
|
||||
test('the prompt reaches stdin for a stdin lane', async () => {
|
||||
const p = plan('gemini');
|
||||
const p = plan('qwen');
|
||||
const d = deps({
|
||||
files: { [`${RUN}/gsd-review-prompt.md`]: 'THE PLAN' },
|
||||
spawn: (b, a, o) => { d.spawns.push({ b, a, o }); return { status: 0, stdout: 'R', stderr: '' }; },
|
||||
@@ -808,7 +808,7 @@ describe('runner — orchestration', () => {
|
||||
|
||||
describe('runner — #3086: spawn errorCode surfaced in err file', () => {
|
||||
test('a spawn ENOENT writes the error code to the err file', async () => {
|
||||
const p = plan('gemini');
|
||||
const p = plan('cursor');
|
||||
const d = deps({
|
||||
spawn: () => ({ status: null, stdout: '', stderr: '', errorCode: 'ENOENT' }),
|
||||
});
|
||||
@@ -830,7 +830,7 @@ describe('runner — #3086: spawn errorCode surfaced in err file', () => {
|
||||
});
|
||||
|
||||
test('a successful spawn with stderr does NOT add a spawn error marker', async () => {
|
||||
const p = plan('gemini');
|
||||
const p = plan('cursor');
|
||||
const d = deps({
|
||||
spawn: () => ({ status: 0, stdout: '## Review\nok', stderr: 'some warning', errorCode: undefined }),
|
||||
});
|
||||
@@ -919,7 +919,7 @@ describe('#2494 — a failed lane writes a diagnosable stub, not a zero-byte fil
|
||||
}
|
||||
|
||||
test('a successful review passes through untouched', async () => {
|
||||
const p = planFor('gemini');
|
||||
const p = planFor('cursor');
|
||||
const d = deps({ status: 0, stdout: 'Looks good.\n', stderr: '' });
|
||||
const r = await runLane(p, d, { repoRoot: ROOT });
|
||||
|
||||
@@ -1148,7 +1148,7 @@ describe('#2794 qwen reviewer stderr capture', () => {
|
||||
});
|
||||
|
||||
// #3194 — a source-grounded lane's grounding is VERIFIED from its review output, never trusted
|
||||
// from its declaration. The gemini lane declares evidenceClass 'source-grounded', but nothing at
|
||||
// from its declaration. The cursor lane declares evidenceClass 'source-grounded', but nothing at
|
||||
// invocation obliged grounding and nothing verified it, so measured plan-only reviews (zero real
|
||||
// file:line citations, invented PLAN-line references) rode the declared class at full consensus
|
||||
// weight — the weakest review getting the strongest weight, silently. The fix stamps a
|
||||
@@ -1224,8 +1224,8 @@ describe('#3194 — evidence grounding is verified from review output, not decla
|
||||
});
|
||||
|
||||
describe('runLane — the stamp reaches {run_dir}/gsd-review-<slug>.md', () => {
|
||||
test('gemini: zero citations → the review file carries the down-weight marker', async () => {
|
||||
const p = plan('gemini');
|
||||
test('cursor: zero citations → the review file carries the down-weight marker', async () => {
|
||||
const p = plan('cursor');
|
||||
const d = deps({ spawn: () => ({ status: 0, stdout: PLAN_ONLY, stderr: '' }) });
|
||||
await runLane(p, d, { repoRoot: ROOT });
|
||||
assert.ok(
|
||||
@@ -1234,8 +1234,8 @@ describe('#3194 — evidence grounding is verified from review output, not decla
|
||||
);
|
||||
});
|
||||
|
||||
test('gemini: one citation → full weight, no marker', async () => {
|
||||
const p = plan('gemini');
|
||||
test('cursor: one citation → full weight, no marker', async () => {
|
||||
const p = plan('cursor');
|
||||
const d = deps({ spawn: () => ({ status: 0, stdout: CITED, stderr: '' }) });
|
||||
await runLane(p, d, { repoRoot: ROOT });
|
||||
assert.ok(!d.files[p.reviewPath].includes(MARKER));
|
||||
@@ -1281,7 +1281,7 @@ describe('#3194 — evidence grounding is verified from review output, not decla
|
||||
test('the resolved plan carries the declared evidenceClass (#3194 seam)', () => {
|
||||
// The runner gates the stamp on this field; before #3194 the plan did not carry it at all,
|
||||
// so the executor had no access to the declaration it was supposed to verify.
|
||||
assert.equal(plan('gemini').evidenceClass, 'source-grounded');
|
||||
assert.equal(plan('cursor').evidenceClass, 'source-grounded');
|
||||
assert.equal(plan('ollama').evidenceClass, 'source-grounded');
|
||||
assert.equal(plan('coderabbit').evidenceClass, 'diff-only');
|
||||
});
|
||||
@@ -1521,29 +1521,29 @@ describe('#2295 — parseTranscriptModel', () => {
|
||||
|
||||
describe('#2295 — resolveLanePlan records only a model that was APPLIED', () => {
|
||||
test('a configured model that reached argv is recorded on the plan', () => {
|
||||
const p = plan('gemini', { 'review.models.gemini': 'gemini-3-pro' });
|
||||
assert.equal(p.model, 'gemini-3-pro');
|
||||
assert.ok(p.argv.includes('gemini-3-pro'), 'and it really is in argv');
|
||||
const p = plan('cursor', { 'review.models.cursor': 'cursor-3-pro' });
|
||||
assert.equal(p.model, 'cursor-3-pro');
|
||||
assert.ok(p.argv.includes('cursor-3-pro'), 'and it really is in argv');
|
||||
});
|
||||
|
||||
test('an unset config yields no plan model', () => {
|
||||
assert.equal(plan('gemini').model, null);
|
||||
assert.equal(plan('cursor').model, null);
|
||||
});
|
||||
|
||||
test('a lane declaring no modelConfigKey records no model', () => {
|
||||
assert.equal(plan('cursor').model, null);
|
||||
assert.equal(plan('qwen').model, null);
|
||||
assert.equal(plan('coderabbit').model, null);
|
||||
});
|
||||
|
||||
test('the unset sentinels do not become a model', () => {
|
||||
for (const v of ['', ' ', 'null', 'undefined']) {
|
||||
assert.equal(plan('gemini', { 'review.models.gemini': v }).model, null, `sentinel ${JSON.stringify(v)}`);
|
||||
assert.equal(plan('cursor', { 'review.models.cursor': v }).model, null, `sentinel ${JSON.stringify(v)}`);
|
||||
}
|
||||
});
|
||||
|
||||
test('a non-string config value is not coerced into a model', () => {
|
||||
for (const v of [0, 42, true, { id: 'x' }, ['x']]) {
|
||||
assert.equal(plan('gemini', { 'review.models.gemini': v }).model, null);
|
||||
assert.equal(plan('cursor', { 'review.models.cursor': v }).model, null);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1552,12 +1552,12 @@ describe('#2295 — resolveLanePlan records only a model that was APPLIED', () =
|
||||
// argument that carries it. The CLI then reviews with its own default while the config says
|
||||
// otherwise. Recording the config value here would assert a model that never ran — the
|
||||
// inverse of the very failure #2295 exists to end.
|
||||
const gemini = REVIEWER_LANES.find((l) => l.slug === 'gemini');
|
||||
const cursor = REVIEWER_LANES.find((l) => l.slug === 'cursor');
|
||||
const lane = {
|
||||
...gemini,
|
||||
...cursor,
|
||||
slug: 'noarg',
|
||||
modelConfigKey: 'review.models.noarg',
|
||||
invoke: { ...gemini.invoke, modelArg: null },
|
||||
invoke: { ...cursor.invoke, modelArg: null },
|
||||
};
|
||||
const r = resolveLanePlan({
|
||||
lane,
|
||||
@@ -1578,10 +1578,10 @@ describe('#2295 — resolveLanePlan records only a model that was APPLIED', () =
|
||||
|
||||
describe('#2295 — runLane reports the resolved model', () => {
|
||||
test('a pinned spawn model is reported as pinned', async () => {
|
||||
const p = plan('gemini', { 'review.models.gemini': 'gemini-3-pro' });
|
||||
const p = plan('cursor', { 'review.models.cursor': 'cursor-3-pro' });
|
||||
const d = deps({ spawn: () => ({ status: 0, stdout: 'a review with src/x.ts:10 evidence', stderr: '' }) });
|
||||
const r = await runLane(p, d, { repoRoot: ROOT });
|
||||
assert.deepEqual(r.model, { value: 'gemini-3-pro', source: MODEL_SOURCE.PINNED });
|
||||
assert.deepEqual(r.model, { value: 'cursor-3-pro', source: MODEL_SOURCE.PINNED });
|
||||
});
|
||||
|
||||
test('a file-output lane recovers its model from the stdout banner', async () => {
|
||||
@@ -1617,7 +1617,7 @@ describe('#2295 — runLane reports the resolved model', () => {
|
||||
test('a STDOUT lane never parses its own review text as a banner', async () => {
|
||||
// The headline negative. A stdout lane's review lands in exactly the buffer the banner scan
|
||||
// would read, so a review that DISCUSSES a model would be recorded as that lane's model.
|
||||
const p = plan('gemini');
|
||||
const p = plan('cursor');
|
||||
const d = deps({
|
||||
spawn: () => ({ status: 0, stdout: 'model: gpt-5 is the wrong choice, see src/x.ts:10', stderr: '' }),
|
||||
});
|
||||
@@ -1626,7 +1626,7 @@ describe('#2295 — runLane reports the resolved model', () => {
|
||||
});
|
||||
|
||||
test('an unavailable lane reports unknown and still reports its reason', async () => {
|
||||
const p = plan('gemini');
|
||||
const p = plan('cursor');
|
||||
const r = await runLane(p, deps({ hasBinary: () => false }), { repoRoot: ROOT });
|
||||
assert.equal(r.ok, false);
|
||||
assert.equal(r.reason, LANE_UNAVAILABLE.MISSING_BINARY);
|
||||
@@ -1653,15 +1653,15 @@ describe('#2295 — runLane reports the resolved model', () => {
|
||||
assert.deepEqual(r.model, { value: 'does-not-exist', source: MODEL_SOURCE.PINNED });
|
||||
});
|
||||
|
||||
test('a review.models.gemini configured with an embedded newline records UNRESOLVED_MODEL, not pinned', async () => {
|
||||
test('a review.models.cursor configured with an embedded newline records UNRESOLVED_MODEL, not pinned', async () => {
|
||||
// `configString` (review-lane-invocation.cjs) is pre-existing and out of scope — it does not
|
||||
// strip control characters, so `plan.model` itself still carries the hostile value. The
|
||||
// rejection MUST happen at the `resolveSpawnModel` pinned arm, the one choke point every
|
||||
// recorded model routes through, so a control character configured into `review.models.<slug>`
|
||||
// never reaches the REVIEWS.md frontmatter as a `pinned` value.
|
||||
const NL = String.fromCharCode(10);
|
||||
const hostile = `gemini-3-pro${NL}reviewers: [forged]`;
|
||||
const p = plan('gemini', { 'review.models.gemini': hostile });
|
||||
const hostile = `cursor-3-pro${NL}reviewers: [forged]`;
|
||||
const p = plan('cursor', { 'review.models.cursor': hostile });
|
||||
assert.equal(p.model, hostile, 'the pre-existing configString gate is unchanged — out of scope here');
|
||||
const d = deps({ spawn: () => ({ status: 0, stdout: 'a review citing src/x.ts:10', stderr: '' }) });
|
||||
const r = await runLane(p, d, { repoRoot: ROOT });
|
||||
@@ -1700,8 +1700,8 @@ describe('#2295 — resolveLanePlan records effort only when it actually expande
|
||||
});
|
||||
|
||||
test('a lane whose effortChannel is not argv records no effort, even with an effortValue passed', () => {
|
||||
const lane = REVIEWER_LANES.find((l) => l.slug === 'gemini');
|
||||
assert.equal(lane.invoke.effortChannel, 'none', 'gemini must declare no argv effort channel for this test to be meaningful');
|
||||
const lane = REVIEWER_LANES.find((l) => l.slug === 'cursor');
|
||||
assert.equal(lane.invoke.effortChannel, 'none', 'cursor must declare no argv effort channel for this test to be meaningful');
|
||||
const r = resolveLanePlan({
|
||||
lane,
|
||||
configGet: () => undefined,
|
||||
@@ -1732,11 +1732,11 @@ describe('#2295 — the recorded model carries an applied reasoning effort', ()
|
||||
}
|
||||
|
||||
test('a lane with no applied effort records the bare model id, unchanged (regression guard)', async () => {
|
||||
const p = plan('gemini', { 'review.models.gemini': 'gemini-3-pro' });
|
||||
const p = plan('cursor', { 'review.models.cursor': 'cursor-3-pro' });
|
||||
assert.equal(p.effort, null);
|
||||
const d = deps({ spawn: () => ({ status: 0, stdout: 'a review with src/x.ts:10 evidence', stderr: '' }) });
|
||||
const r = await runLane(p, d, { repoRoot: ROOT });
|
||||
assert.deepEqual(r.model, { value: 'gemini-3-pro', source: MODEL_SOURCE.PINNED });
|
||||
assert.deepEqual(r.model, { value: 'cursor-3-pro', source: MODEL_SOURCE.PINNED });
|
||||
});
|
||||
|
||||
test('a pinned codex model plus an applied effort records "o4-mini (reasoning=low)"', async () => {
|
||||
@@ -1993,7 +1993,7 @@ describe('#2295 — properties (pinned seed, bounded runs)', () => {
|
||||
test('every reported spawn model satisfies the value-source biconditional', () => {
|
||||
fc.assert(
|
||||
fc.property(
|
||||
fc.constantFrom('gemini', 'codex', 'antigravity', 'cursor', 'coderabbit'),
|
||||
fc.constantFrom('claude', 'codex', 'antigravity', 'cursor', 'coderabbit'),
|
||||
fc.option(fc.string(), { nil: undefined }),
|
||||
fc.string(),
|
||||
(slug, configured, stdout) => {
|
||||
|
||||
@@ -27,17 +27,6 @@ describe('review.models.<cli> config key', () => {
|
||||
cleanup(tmpDir);
|
||||
});
|
||||
|
||||
test('isValidConfigKey accepts review.models.gemini', () => {
|
||||
// Exercised via config-set, which calls isValidConfigKey internally and
|
||||
// errors out if the key is not valid.
|
||||
const result = runGsdTools(
|
||||
['config-set', 'review.models.gemini', 'gemini-3.1-pro-preview'],
|
||||
tmpDir,
|
||||
{ HOME: tmpDir, USERPROFILE: tmpDir }
|
||||
);
|
||||
assert.ok(result.success, `config-set should succeed for review.models.gemini: ${result.error}`);
|
||||
});
|
||||
|
||||
test('isValidConfigKey accepts review.models.codex', () => {
|
||||
const result = runGsdTools(
|
||||
['config-set', 'review.models.codex', 'gpt-5-codex'],
|
||||
@@ -94,21 +83,21 @@ describe('review.models.<cli> config key', () => {
|
||||
|
||||
test('round-trip: config-set then config-get for a model ID', () => {
|
||||
const setResult = runGsdTools(
|
||||
['config-set', 'review.models.gemini', 'gemini-3.1-pro-preview'],
|
||||
['config-set', 'review.models.codex', 'gpt-5.6-sol'],
|
||||
tmpDir,
|
||||
{ HOME: tmpDir, USERPROFILE: tmpDir }
|
||||
);
|
||||
assert.ok(setResult.success, `config-set failed: ${setResult.error}`);
|
||||
|
||||
const getResult = runGsdTools(
|
||||
['config-get', 'review.models.gemini', '--raw'],
|
||||
['config-get', 'review.models.codex', '--raw'],
|
||||
tmpDir,
|
||||
{ HOME: tmpDir, USERPROFILE: tmpDir }
|
||||
);
|
||||
assert.ok(getResult.success, `config-get failed: ${getResult.error}`);
|
||||
assert.strictEqual(
|
||||
getResult.output,
|
||||
'gemini-3.1-pro-preview',
|
||||
'gpt-5.6-sol',
|
||||
'config-get should return the value set via config-set'
|
||||
);
|
||||
});
|
||||
@@ -121,14 +110,14 @@ describe('review.models.<cli> config key', () => {
|
||||
// review.md:259) treats the resulting empty read as "no override → use the
|
||||
// reviewer's default", exactly as it treated the old "null" sentinel.
|
||||
const setResult = runGsdTools(
|
||||
['config-set', 'review.models.gemini', 'gemini-3.1-pro-preview'],
|
||||
['config-set', 'review.models.codex', 'gpt-5.6-sol'],
|
||||
tmpDir,
|
||||
{ HOME: tmpDir, USERPROFILE: tmpDir }
|
||||
);
|
||||
assert.ok(setResult.success, `config-set failed: ${setResult.error}`);
|
||||
|
||||
const clearResult = runGsdTools(
|
||||
['config-set', 'review.models.gemini', 'null'],
|
||||
['config-set', 'review.models.codex', 'null'],
|
||||
tmpDir,
|
||||
{ HOME: tmpDir, USERPROFILE: tmpDir }
|
||||
);
|
||||
@@ -140,17 +129,17 @@ describe('review.models.<cli> config key', () => {
|
||||
const config = JSON.parse(rawText);
|
||||
assert.ok(
|
||||
!config.review || !config.review.models ||
|
||||
!Object.prototype.hasOwnProperty.call(config.review.models, 'gemini'),
|
||||
`review.models.gemini must be absent after clear, got: ${rawText}`
|
||||
!Object.prototype.hasOwnProperty.call(config.review.models, 'codex'),
|
||||
`review.models.codex must be absent after clear, got: ${rawText}`
|
||||
);
|
||||
assert.doesNotMatch(rawText, /"gemini":\s*"null"/,
|
||||
'must never persist review.models.gemini as the literal string "null"');
|
||||
assert.doesNotMatch(rawText, /"codex":\s*"null"/,
|
||||
'must never persist review.models.codex as the literal string "null"');
|
||||
|
||||
// config-get on the removed key yields EMPTY (the review workflow reads it as
|
||||
// `... 2>/dev/null || echo ""` → empty → the `[ -n "$VAR" ]` guard falls back
|
||||
// to the reviewer default).
|
||||
//
|
||||
// #2797: this key is now federated to the `gemini` lane capability, and a
|
||||
// #2797: this key is now federated to the `codex` lane capability, and a
|
||||
// federated key always resolves to its declared default — so config-get exits
|
||||
// 0 with empty output rather than exiting non-zero with "Key not found". The
|
||||
// WORKFLOW outcome is unchanged: the guard above sees empty either way, which
|
||||
@@ -160,7 +149,7 @@ describe('review.models.<cli> config key', () => {
|
||||
// must never yield the literal string "null", which would be handed to the
|
||||
// CLI as a model name.
|
||||
const getResult = runGsdTools(
|
||||
['config-get', 'review.models.gemini', '--raw'],
|
||||
['config-get', 'review.models.codex', '--raw'],
|
||||
tmpDir,
|
||||
{ HOME: tmpDir, USERPROFILE: tmpDir }
|
||||
);
|
||||
|
||||
@@ -285,12 +285,16 @@ describe('resolveReviewerSelection — discovery paths stay lenient (ADR-2782 D4
|
||||
});
|
||||
|
||||
test('a configured default that is undetected stays an info, not an error', () => {
|
||||
// `qwen` is a genuinely KNOWN lane (REVIEWER_LANES) that is simply absent from `detected` here —
|
||||
// the shape this test needs. `gemini` no longer works as this fixture: it was retired from
|
||||
// REVIEWER_LANES by #4709, so it now falls into the UNKNOWN-slug branch (a warning) instead of
|
||||
// the known-but-undetected branch (an info) this test exists to prove.
|
||||
const r = resolveReviewerSelection({
|
||||
detected: ['gemini'],
|
||||
configuredDefaultReviewers: ['gemini', 'codex'],
|
||||
detected: ['qwen'],
|
||||
configuredDefaultReviewers: ['qwen', 'codex'],
|
||||
});
|
||||
assert.equal(r.source, 'config_default');
|
||||
assert.deepStrictEqual(r.selected, ['gemini']);
|
||||
assert.deepStrictEqual(r.selected, ['qwen']);
|
||||
assert.deepStrictEqual(r.errors, [], 'a preference miss must not become an error');
|
||||
assert.ok(
|
||||
r.infos.some((i) => i.includes('codex')),
|
||||
@@ -299,9 +303,13 @@ describe('resolveReviewerSelection — discovery paths stay lenient (ADR-2782 D4
|
||||
});
|
||||
|
||||
test('an unknown configured slug stays a warning', () => {
|
||||
// `qwen` here plays the genuinely KNOWN, detected lane so `selected`/`errors` behave as expected;
|
||||
// `__nope__` remains the genuinely UNKNOWN slug under test — `gemini` would ALSO now be a valid
|
||||
// fixture for the unknown branch (retired from REVIEWER_LANES by #4709), but `__nope__` already
|
||||
// names that branch unambiguously without relying on retirement history.
|
||||
const r = resolveReviewerSelection({
|
||||
detected: ['gemini'],
|
||||
configuredDefaultReviewers: ['gemini', '__nope__'],
|
||||
detected: ['qwen'],
|
||||
configuredDefaultReviewers: ['qwen', '__nope__'],
|
||||
});
|
||||
assert.deepStrictEqual(r.errors, []);
|
||||
assert.ok(r.warnings.some((w) => w.includes('__nope__')));
|
||||
|
||||
@@ -33,7 +33,6 @@ const { REVIEWER_LANES } = require('../gsd-core/bin/lib/review-lane-descriptor.c
|
||||
|
||||
/** Keys that moved to a lane capability, with the lane that must own each. */
|
||||
const FEDERATED = {
|
||||
'review.models.gemini': 'gemini',
|
||||
'review.models.claude': 'claude',
|
||||
'review.models.codex': 'codex',
|
||||
'review.models.opencode': 'opencode',
|
||||
|
||||
@@ -25,7 +25,7 @@ const {
|
||||
|
||||
const ROOT = path.join(__dirname, '..');
|
||||
|
||||
/** Every declared flag, in descriptor order (13 across 12 lanes — antigravity carries two). */
|
||||
/** Every declared flag, in descriptor order (12 across 11 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);
|
||||
@@ -77,11 +77,11 @@ describe('reviewer docs parity — flag arm', () => {
|
||||
});
|
||||
|
||||
test('every missing flag is named, not just the first', () => {
|
||||
const missing = ALL_FLAGS.filter((f) => f !== '--gemini' && f !== '--qwen');
|
||||
const missing = ALL_FLAGS.filter((f) => f !== '--codex' && f !== '--qwen');
|
||||
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, ['--gemini', '--qwen']);
|
||||
assert.deepStrictEqual(subjects, ['--codex', '--qwen']);
|
||||
for (const v of r.violations) {
|
||||
assert.strictEqual(v.reason, DOCS_PARITY_VIOLATION.DOC_FLAG_MISSING);
|
||||
}
|
||||
@@ -115,11 +115,11 @@ describe('reviewer docs parity — flag arm', () => {
|
||||
});
|
||||
|
||||
test('bracketed flags satisfy the gate too', () => {
|
||||
const rest = ALL_FLAGS.filter((f) => f !== '--gemini');
|
||||
const rest = ALL_FLAGS.filter((f) => f !== '--codex');
|
||||
const doc = [
|
||||
'### `/gsd-review`',
|
||||
'',
|
||||
`Reviewer flags: [--gemini] ${backtickAll(rest)}`,
|
||||
`Reviewer flags: [--codex] ${backtickAll(rest)}`,
|
||||
'',
|
||||
].join('\n');
|
||||
const r = checkReviewerDocsParity({ descriptor: REVIEWER_LANES, docs: { d: doc } });
|
||||
@@ -132,12 +132,12 @@ describe('reviewer docs parity — signature arm', () => {
|
||||
const doc = [
|
||||
backtickAll(ALL_FLAGS),
|
||||
'',
|
||||
'**Command:** `/gsd-review --phase N [--gemini] [--all]`',
|
||||
'**Command:** `/gsd-review --phase N [--codex] [--all]`',
|
||||
'',
|
||||
`**Purpose:** ${ALL_TITLES.join(', ')}.`,
|
||||
].join('\n');
|
||||
const r = checkReviewerDocsParity({ descriptor: REVIEWER_LANES, docs: { d: doc } });
|
||||
const omitted = ALL_FLAGS.filter((f) => f !== '--gemini');
|
||||
const omitted = ALL_FLAGS.filter((f) => f !== '--codex');
|
||||
assert.strictEqual(r.violations.length, omitted.length);
|
||||
assert.ok(r.violations.every((v) => v.reason === DOCS_PARITY_VIOLATION.SIGNATURE_FLAG_MISSING));
|
||||
assert.deepStrictEqual(
|
||||
@@ -582,7 +582,7 @@ describe('reviewer docs parity — independence and properties', () => {
|
||||
});
|
||||
|
||||
test('verdict is independent of doc key insertion order', () => {
|
||||
const dirty = commandsDoc(ALL_FLAGS.filter((f) => f !== '--gemini'));
|
||||
const dirty = commandsDoc(ALL_FLAGS.filter((f) => f !== '--codex'));
|
||||
const clean = commandsDoc(ALL_FLAGS);
|
||||
const forward = checkReviewerDocsParity({ descriptor: REVIEWER_LANES, docs: { a: dirty, b: clean } });
|
||||
const reversed = checkReviewerDocsParity({ descriptor: REVIEWER_LANES, docs: { b: clean, a: dirty } });
|
||||
@@ -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 >= 12, 'expected at least the 12 shipped lanes');
|
||||
assert.ok(REVIEWER_LANES.length >= 11, 'expected at least the 11 shipped lanes');
|
||||
});
|
||||
|
||||
test('the shipped docs satisfy reviewer lane parity', () => {
|
||||
|
||||
@@ -85,8 +85,13 @@ const capabilityRegistry = require('../gsd-core/bin/lib/capability-registry.cjs'
|
||||
|
||||
const ROOT = path.join(__dirname, '..');
|
||||
|
||||
/** The five net-new lane-only `role:"reviewer"` capabilities (ADR-2782 D3). */
|
||||
const NEW_LANE_ONLY_IDS = ['gemini', 'coderabbit', 'ollama', 'lm-studio', 'llama-cpp'];
|
||||
/**
|
||||
* The four net-new lane-only `role:"reviewer"` capabilities (ADR-2782 D3).
|
||||
*
|
||||
* Was five: `gemini` was retired by #4709 (Google sunset Gemini CLI 2026-06-18, the same sunset
|
||||
* that removed the gemini RUNTIME in #1928/1.8.0), so `capabilities/gemini/` no longer exists.
|
||||
*/
|
||||
const NEW_LANE_ONLY_IDS = ['coderabbit', 'ollama', 'lm-studio', 'llama-cpp'];
|
||||
|
||||
/** The six pre-existing dual-purpose `role:"runtime"` capabilities. */
|
||||
const RUNTIME_REVIEWER_IDS = ['antigravity', 'claude', 'codex', 'cursor', 'opencode', 'qwen'];
|
||||
@@ -98,7 +103,7 @@ const RUNTIME_REVIEWER_IDS = ['antigravity', 'claude', 'codex', 'cursor', 'openc
|
||||
* refactor would otherwise sail through.
|
||||
*/
|
||||
const LITERAL_ROSTER = [
|
||||
'antigravity', 'claude', 'coderabbit', 'codex', 'cursor', 'gemini',
|
||||
'antigravity', 'claude', 'coderabbit', 'codex', 'cursor',
|
||||
// `kimi-code` joined in Phase 5b (#2799, closes #2718) — see
|
||||
// kimiCodeIsDeclaredAndInvocableInThisPhase for why it landed here and not in 5a.
|
||||
'kimi-code',
|
||||
@@ -212,8 +217,8 @@ describe('A. The five new lane-only capabilities', () => {
|
||||
`"${expectedSlug}" would fail KEBAB_RE as a folder/id — that is exactly the trap this row guards`,
|
||||
);
|
||||
}
|
||||
// The other three new capabilities are single-word and unaffected: id === slug.
|
||||
for (const id of ['gemini', 'coderabbit', 'ollama']) {
|
||||
// The other two new capabilities are single-word and unaffected: id === slug.
|
||||
for (const id of ['coderabbit', 'ollama']) {
|
||||
const cap = SHIPPED.capMap.get(id);
|
||||
assert.ok(KEBAB_RE.test(id), `capability id "${id}" must satisfy KEBAB_RE`);
|
||||
assert.equal(cap.reviewer.slug, id, `single-word capability "${id}" must have a matching slug`);
|
||||
@@ -351,7 +356,7 @@ describe('C. Roster derivation — src/review-reviewer-selection.cts', () => {
|
||||
// KEYSTONE. This row is GREEN before and after #2801 — it is the invariant
|
||||
// the phase must not break, not a red row. The literal list is never
|
||||
// computed by the machinery under test.
|
||||
assert.equal(KNOWN_REVIEWER_SLUGS.length, 12, 'roster must be exactly 12 — not 11, not 13');
|
||||
assert.equal(KNOWN_REVIEWER_SLUGS.length, 11, 'roster must be exactly 11 — not 10, not 12');
|
||||
assert.deepEqual(
|
||||
[...KNOWN_REVIEWER_SLUGS].sort(), LITERAL_ROSTER,
|
||||
`roster must be exactly the declared lane set, got: ${JSON.stringify(KNOWN_REVIEWER_SLUGS)}`,
|
||||
@@ -590,13 +595,13 @@ describe('D. Cross-phase invariants that must not regress', () => {
|
||||
// derivation would also surface here — normalizeReviewerInstances /
|
||||
// resolveReviewerSelection gate config_default membership on
|
||||
// KNOWN_REVIEWER_SLUGS.includes(...).
|
||||
const detected = ['gemini', 'claude', 'qwen'];
|
||||
const detected = ['codex', 'claude', 'qwen'];
|
||||
|
||||
const explicit = resolveReviewerSelection({
|
||||
detected, explicitFlags: ['gemini'], allFlag: true, configuredDefaultReviewers: ['claude'],
|
||||
detected, explicitFlags: ['codex'], allFlag: true, configuredDefaultReviewers: ['claude'],
|
||||
});
|
||||
assert.equal(explicit.source, 'explicit_flags');
|
||||
assert.deepEqual(explicit.selected, ['gemini']);
|
||||
assert.deepEqual(explicit.selected, ['codex']);
|
||||
|
||||
const allFlagResult = resolveReviewerSelection({
|
||||
detected, explicitFlags: [], allFlag: true, configuredDefaultReviewers: ['claude'],
|
||||
@@ -633,8 +638,8 @@ describe('E. Lane fidelity — no translation layer', () => {
|
||||
}
|
||||
}
|
||||
|
||||
assert.equal(REVIEWER_LANES.length, 12, 'expected exactly 12 declared descriptor lanes');
|
||||
assert.equal(bySlug.size, 12, `expected exactly 12 capabilities declaring a reviewer body, got: ${bySlug.size}`);
|
||||
assert.equal(REVIEWER_LANES.length, 11, 'expected exactly 11 declared descriptor lanes');
|
||||
assert.equal(bySlug.size, 11, `expected exactly 11 capabilities declaring a reviewer body, got: ${bySlug.size}`);
|
||||
|
||||
// Top-level scalar/array fields compared whole; the two fields that are
|
||||
// themselves nested objects (probe, invoke) are compared sub-field-by-
|
||||
@@ -712,8 +717,8 @@ describe('F. Isolated-security-review regressions', () => {
|
||||
test('slugIsTrimmedRatherThanDropped', () => {
|
||||
// The fix must NOT discard a slug that merely carries incidental whitespace.
|
||||
assert.deepEqual(
|
||||
deriveReviewerSlugs({ capabilities: { x: { reviewer: { slug: ' gemini ' } } } }),
|
||||
['gemini'],
|
||||
deriveReviewerSlugs({ capabilities: { x: { reviewer: { slug: ' codex ' } } } }),
|
||||
['codex'],
|
||||
);
|
||||
});
|
||||
|
||||
@@ -746,7 +751,7 @@ describe('F. Isolated-security-review regressions', () => {
|
||||
// The module under test already imported successfully above; assert the
|
||||
// derived roster is a usable array rather than a partially-initialised value.
|
||||
assert.ok(Array.isArray([...KNOWN_REVIEWER_SLUGS]), 'roster must be iterable after module load');
|
||||
assert.equal(KNOWN_REVIEWER_SLUGS.length, 12, 'the real registry still yields the twelve lanes');
|
||||
assert.equal(KNOWN_REVIEWER_SLUGS.length, 11, 'the real registry still yields the eleven lanes');
|
||||
// And the derivation itself is total over the shapes JSON can express.
|
||||
for (const hostile of [null, undefined, [], 0, 'x', { capabilities: null }, { capabilities: [] }]) {
|
||||
assert.doesNotThrow(
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* Covers:
|
||||
* - Artifacts exist (command, workflow, skill stub) with correct frontmatter
|
||||
* - Workflow references the four search API key fields
|
||||
* - Workflow exposes review.models.{claude,codex,gemini,opencode} routing
|
||||
* - Workflow exposes review.models.{claude,codex,opencode} routing
|
||||
* - Workflow exposes agent_skills.<agent-type> injection input
|
||||
* - #3651: workflow states the registry-derived review.models settable rule (no
|
||||
* dynamic-pattern claim) and enumerates exactly the registry's settable lanes
|
||||
@@ -101,9 +101,13 @@ describe('#2529 workflow — search integrations', () => {
|
||||
// ─── Content: review.models routing ──────────────────────────────────────────
|
||||
|
||||
describe('#2529 workflow — review.models routing', () => {
|
||||
test('workflow references all four reviewer CLIs', () => {
|
||||
test('workflow references all three reviewer CLIs', () => {
|
||||
// #4709: the gemini reviewer lane was retired (Google sunset Gemini CLI), and the
|
||||
// integrations wizard's AskUserQuestion options dropped its "Gemini" choice along with it —
|
||||
// the workflow's `AskUserQuestion` block at settings-integrations.md:198-200 now offers
|
||||
// exactly Claude, Codex, OpenCode.
|
||||
const src = fs.readFileSync(WORKFLOW_PATH, 'utf-8');
|
||||
for (const cli of ['claude', 'codex', 'gemini', 'opencode']) {
|
||||
for (const cli of ['claude', 'codex', 'opencode']) {
|
||||
assert.ok(
|
||||
src.includes(`review.models.${cli}`),
|
||||
`workflow must reference review.models.${cli}`
|
||||
@@ -115,7 +119,9 @@ describe('#2529 workflow — review.models routing', () => {
|
||||
// #3651: these pass because the capability registry federates each lane's
|
||||
// modelConfigKey into the valid-key set — NOT via a dynamicKeyPatterns regex
|
||||
// (no such pattern exists; see the #3651 describe below).
|
||||
for (const cli of ['claude', 'codex', 'gemini', 'opencode']) {
|
||||
// #4709: gemini dropped from this list along with the retired lane — review.models.gemini
|
||||
// no longer validates because REVIEWER_LANES no longer declares a gemini modelConfigKey.
|
||||
for (const cli of ['claude', 'codex', 'opencode']) {
|
||||
assert.ok(
|
||||
isValidConfigKey(`review.models.${cli}`),
|
||||
`review.models.${cli} must pass isValidConfigKey`
|
||||
|
||||
Reference in New Issue
Block a user