Skip to content

fix(cli): refuse missing validator flag values by name - #412

Merged
StepenkoAnatoli merged 1 commit into
mainfrom
fix/issue-288-validator-flag-values
Oct 14, 2026
Merged

StepenkoAnatoli merged 1 commit into
mainfrom
fix/issue-288-validator-flag-values

Conversation

@StepenkoAnatoli

Copy link
Copy Markdown
Owner

Bare or empty value flags in path-authority and researcher-release previously reached Node path resolution and leaked an internal message or TypeError stack. Both CLIs now refuse the value by name with usage and exit 2 before reading input.

Fixes #288

what changed: path-authority and researcher-release now check value tokens before their handwritten parsers consume them. Missing, empty or next-flag tokens produce a named usage error on stderr with exit 2, before path resolution or input reading. Added a regression table in each CLI's existing validator test file for --file, --schema and --root at the end of the command or before --json.

why: A bare --file reached path.resolve(undefined), surfacing a Node internal message or stack trace and, for researcher-release, exit 1 instead of a usage refusal (#288). Apply the existing usage-error boundary; no alternative design was set aside.

what it touched: the two validator CLI parsers, path-authority/release-validator tests, their architecture descriptions, changelog and README test inventory. Repeated --file values remain supported; validation statuses and their exit-code mapping are unchanged.

what you verified: verified - red-first 38 passed and two expected failures, reproducing the path-authority JSON-READ/paths[0] message and researcher-release TypeError/exit 1. Then path-authority, release-validator and support-policy passed 40 tests with zero failures in 210.9 seconds, including named exit-2 refusals and normal CLI conformance/validation. Architecture-map passed 21 tests; handoff OK (33 ledger entries, 27 evidence rows), preflight PASS (28 passing, one warning, no blockers), doctor READY collector/firecrawl-cli. After refresh onto merged main 82a02cb, the same 40 focused tests passed with zero failures and zero unsupported cases in 14.5 seconds. The patch was then advanced to main 194bcfb after PR411 landed; staged code/test blobs match the focused-tested source, while shared documentation includes that fix and the 1,838-test inventory. The normal full-suite commit gate accepted 3770719 on Windows / Node 24.20.0, with its documented local unsupported-capability allowance. GitHub CI will verify the published head before merge.

what you got wrong and fixed: nothing to report.

Fixes #288

what changed: path-authority and researcher-release now check value tokens before their handwritten parsers consume them. Missing, empty or next-flag tokens produce a named usage error on stderr with exit 2, before path resolution or input reading. Added a regression table in each CLI's existing validator test file for --file, --schema and --root at the end of the command or before --json.

why: A bare --file reached path.resolve(undefined), surfacing a Node internal message or stack trace and, for researcher-release, exit 1 instead of a usage refusal (#288). Apply the existing usage-error boundary; no alternative design was set aside.

what it touched: the two validator CLI parsers, path-authority/release-validator tests, their architecture descriptions, changelog and README test inventory. Repeated --file values remain supported; validation statuses and their exit-code mapping are unchanged.

what you verified: verified - red-first 38 passed and two expected failures, reproducing the path-authority JSON-READ/paths[0] message and researcher-release TypeError/exit 1. Then path-authority, release-validator and support-policy passed 40 tests with zero failures in 210.9 seconds, including named exit-2 refusals and normal CLI conformance/validation. Architecture-map passed 21 tests; handoff OK (33 ledger entries, 27 evidence rows), preflight PASS (28 passing, one warning, no blockers), doctor READY collector/firecrawl-cli. After refresh onto merged main 82a02cb, the same 40 focused tests passed with zero failures and zero unsupported cases in 14.5 seconds. The patch was then advanced to main 194bcfb after PR411 landed; staged code/test blobs match the focused-tested source, while shared documentation includes that fix and the 1,838-test inventory. The normal full commit gate runs before acceptance; GitHub CI must verify the published head before merge.

what you got wrong and fixed: nothing to report.
@StepenkoAnatoli
StepenkoAnatoli merged commit 2d80715 into main Oct 14, 2026
7 checks passed
@StepenkoAnatoli
StepenkoAnatoli deleted the fix/issue-288-validator-flag-values branch October 14, 2026 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

path-authority and researcher-release: a value flag given last on the line reads undefined and surfaces as a Node TypeError or a stack trace

1 participant