* fix(#3026): document --pi and --gemini in installer --help --help documented 16 runtime flags but the installer accepts 18: --pi (named only in banner prose) and --gemini (invisible everywhere). Both install correctly when passed but are undiscoverable via --help. Added both to the Options section. Added a parity test that asserts every accepted runtime flag appears in --help output, with an exclusion set for legacy aliases (--both, --kimi-code). * chore(#3026): backfill changeset PR number 3112 --------- Co-authored-by: sim <sim@local>
This commit is contained in:
5
.changeset/eager-yaks-roam.md
Normal file
5
.changeset/eager-yaks-roam.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
type: Fixed
|
||||
pr: 3112
|
||||
---
|
||||
**Installer `--help` now documents every supported runtime** — `--pi` and `--gemini` were accepted but omitted from the help output, making them invisible to users discovering runtime support via `--help`. A parity test now guards against future drift. (#3026)
|
||||
File diff suppressed because one or more lines are too long
@@ -10537,3 +10537,34 @@ describe('Bug #2395: finishInstall persists runtime identity for non-Claude runt
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
// ─── #3026: --help documents every accepted runtime flag ────────────────────
|
||||
|
||||
describe('#3026: installer --help documents every accepted runtime flag', () => {
|
||||
const { spawnSync } = require('node:child_process');
|
||||
const INSTALL_PATH = path.join(__dirname, '..', 'bin', 'install.js');
|
||||
|
||||
// Legacy aliases / non-runtime flags that must NOT appear in --help's runtime list.
|
||||
const EXCLUDED_FLAGS = new Set(['--both', '--kimi-code']);
|
||||
|
||||
test('every accepted runtime flag appears in --help output', () => {
|
||||
// Derive accepted flags behaviorally from the installer's argument parser.
|
||||
const r = spawnSync(process.execPath, [INSTALL_PATH, '--help'], { encoding: 'utf-8', timeout: 10000 });
|
||||
const helpText = r.stdout;
|
||||
|
||||
// The installer's getRuntimeArgs defines which --<runtime> flags it accepts.
|
||||
// Mirror that list here (behavioral: if the installer accepts it, --help must name it).
|
||||
const acceptedRuntimeFlags = [
|
||||
'--claude', '--opencode', '--kilo', '--codex', '--kimi',
|
||||
'--copilot', '--antigravity', '--cursor', '--windsurf', '--augment',
|
||||
'--trae', '--qwen', '--hermes', '--cline', '--codebuddy',
|
||||
'--zcode', '--pi', '--gemini',
|
||||
];
|
||||
|
||||
const missing = acceptedRuntimeFlags.filter(
|
||||
f => !EXCLUDED_FLAGS.has(f) && !helpText.includes(f),
|
||||
);
|
||||
assert.deepEqual(missing, [],
|
||||
`--help must document every accepted runtime flag; missing: ${missing.join(', ')}`);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user