Context
The CLI package owns argv parsing and side effects but currently has no test files. Some value flags can be omitted or followed by another flag without producing a clear usage error, which can silently fall back or skip configuration.
Acceptance criteria
- Reject missing values for value-taking flags such as
--store, --viewer, and --port with actionable English usage errors.
- Reject unknown flags for the affected commands instead of silently ignoring them.
- Validate arguments before filesystem, network, process, or server side effects begin.
- Introduce the smallest test seam needed to exercise parsing and output with synthetic temporary roots and injected I/O or dependencies.
- Cover representative
init, serve, and pr-comment argument cases without publishing comments or opening network listeners.
- Preserve documented valid command behavior.
- Pass targeted race tests and the repository-wide validation suite.
First safe step
Extract or wrap pure argument validation and add table-driven tests for missing values and unknown flags.
Non-goals
- Replacing the CLI framework wholesale.
- Publishing PR comments, using credentials, or changing production configuration.
Context
The CLI package owns argv parsing and side effects but currently has no test files. Some value flags can be omitted or followed by another flag without producing a clear usage error, which can silently fall back or skip configuration.
Acceptance criteria
--store,--viewer, and--portwith actionable English usage errors.init,serve, andpr-commentargument cases without publishing comments or opening network listeners.First safe step
Extract or wrap pure argument validation and add table-driven tests for missing values and unknown flags.
Non-goals