Description
Common CLI options are accepted without validating their documented domain. Unknown output formats fall through to text output, and parseInt partially accepts malformed numeric values before the command contacts the backend.
Steps to reproduce
- Run
ix doctor --format yaml.
- Run
ix inventory --kind file --limit 1e3.
- Run
ix search term --as-of abc and ix search term --as-of 1e3.
- Run
ix map --level nope, ix map --min-confidence 1.1, or ix map --sort newest.
- Run
ix savings --model unknown.
Expected behavior
Invalid choices and malformed numbers are rejected before any backend request, with a non-zero exit status and an option-specific error.
Actual behavior
The commands silently select another behavior. Examples include 1e3 becoming 1, an invalid revision being ignored or truncated, an unknown format rendering text, and an unknown pricing model using the default model.
CLI output
These invocations currently complete instead of reporting invalid arguments.
Environment
- OS: macOS
- Node: 22.x
- Ix version: 0.10.5 and current main (
3baa7dc)
Description
Common CLI options are accepted without validating their documented domain. Unknown output formats fall through to text output, and
parseIntpartially accepts malformed numeric values before the command contacts the backend.Steps to reproduce
ix doctor --format yaml.ix inventory --kind file --limit 1e3.ix search term --as-of abcandix search term --as-of 1e3.ix map --level nope,ix map --min-confidence 1.1, orix map --sort newest.ix savings --model unknown.Expected behavior
Invalid choices and malformed numbers are rejected before any backend request, with a non-zero exit status and an option-specific error.
Actual behavior
The commands silently select another behavior. Examples include
1e3becoming1, an invalid revision being ignored or truncated, an unknown format rendering text, and an unknown pricing model using the default model.CLI output
These invocations currently complete instead of reporting invalid arguments.
Environment
3baa7dc)