voyage/tests/validators
Kjell Tore Guttormsen 926b768543 fix(validators): brief-validator CLI no-flag invocation bailed to Usage
The documented `brief-validator.mjs <brief.md>` invocation (no flags) always
bailed to Usage/exit 2. Root cause: when --min-version is absent, minIdx is -1,
so the skip index minIdx+1 was 0 — excluding argv index 0, exactly where the
file positional sits in the no-flag case. Any leading flag (--soft, --json)
pushed the file to index >=1 and masked the bug, so the function-level tests
never caught it.

Guard the skip index to -1 when --min-version is absent. Add two CLI regression
tests (execFileSync, matching the next-session-prompt-validator pattern):
no-flag invocation reaches validation, and --min-version still skips its value
token to find the file. Suite 822 -> 824 (822/0/2).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WH1krHamUehZh6JqVqs85t
2026-06-30 09:48:28 +02:00
..
architecture-discovery.test.mjs feat(voyage)!: bulk content rewrite ultra -> voyage/trek prose [skip-docs] 2026-05-05 15:08:20 +02:00
brief-gate-coverage.test.mjs test(eval): two-sided gate coverage for BRIEF_* BLOCKERs 2026-06-26 11:57:10 +02:00
brief-validator.test.mjs fix(validators): brief-validator CLI no-flag invocation bailed to Usage 2026-06-30 09:48:28 +02:00
next-session-prompt-validator.test.mjs feat(voyage)!: rename produced_by field values + validator comments [skip-docs] 2026-05-05 14:42:21 +02:00
plan-validator-profile-drift.test.mjs feat(voyage): emit MANIFEST_PROFILE_DRIFT warning in plan-validator strict mode — brief assumption 7 2026-05-09 10:02:53 +02:00
plan-validator.test.mjs fix(voyage): S26 — parse plan_version prose form (S22 defect #2/#3) 2026-06-19 21:59:31 +02:00
profile-validator.test.mjs chore(voyage): S34 — V30 economy-profile self-declares experimental (uncalibrated Jaccard floor) 2026-06-20 10:18:38 +02:00
progress-validator.test.mjs feat(voyage): validate iterations_remaining in progress-validator 2026-06-20 21:26:22 +02:00
research-validator.test.mjs feat(voyage)!: rename type discriminators across validators + fixtures [skip-docs] 2026-05-05 14:40:25 +02:00
review-validator.test.mjs feat(voyage)!: rename type discriminators across validators + fixtures [skip-docs] 2026-05-05 14:40:25 +02:00
session-state-validator.test.mjs feat(voyage)!: bulk content rewrite ultra -> voyage/trek prose [skip-docs] 2026-05-05 15:08:20 +02:00