[v0.1/CLI] Publish finite option values in help and completions and snapshot every visible help page #187

Closed
opened 2026-09-07 16:23:51 +09:00 by natsukium · 0 comments
Owner

Parent: #55 (CLI argument review). Tracker #55 cannot close because two of its closure criteria have no evidence on main; every child issue (#53, #54, #136, #141, #145) is closed and #29's goldens landed.

What is missing

  1. Finite option values do not appear in --help or the generated completions. --format still uses value_parser = parse_point_format / parse_stream_format (crates/felis-cli/src/cli_output.rs:77,91) and capture --source still uses value_parser = parse_region_source (crates/felis-cli/src/cli_sessions.rs:266). None is a clap ValueEnum, so clap publishes no possible values into --help, felis completions {fish,zsh,bash}, or __mangen. #23's accepted triage plan, item H, specified this change; #23's closing commit (54260ede) did not include it and no issue tracked the remainder.
  2. No help snapshot for the visible command set. #55 requires that every visible command's help is snapshot-tested; today only targeted assertions exist (crates/felis-cli/src/tests.rs, the_launch_verbs_help_says_where_the_globals_go) plus the argv matrix in crates/felis-cli/tests/cli_sessions.rs.

Acceptance criteria

  • parse_point_format / parse_stream_format are replaced by two ValueEnums (Human | Json, Human | Jsonl) converting into Format; parse_region_source is replaced by a ValueEnum mapping onto RegionSource. The clap error for a bad value lists the possible values; the existing unit test that asserted the parser's accepted spellings asserts the ValueEnum's variants instead.
  • A test asserts the generated zsh completion script contains the possible values for --format (human json, human jsonl) and the four --source values; --help for capture and one Point verb shows the possible values.
  • An insta snapshot test renders Cli::command().render_long_help() for the root and every visible subcommand (walk the command tree, skip hidden ones) so a help change is a reviewed snapshot change.
  • Docs cascade: docs/reference/cli.md names the possible values where it documents --format and --source (if it does not already); CHANGELOG.md Unreleased entry (help/completions now list the values; the error message for a bad value changes); skills/felis/SKILL.md unchanged unless a spelling changes (it must not).
  • After merge, #55's two remaining criteria are evidenced and the tracker can close.

Split from #23 (plan item H) and #55.

Parent: #55 (CLI argument review). Tracker #55 cannot close because two of its closure criteria have no evidence on `main`; every child issue (#53, #54, #136, #141, #145) is closed and #29's goldens landed. ## What is missing 1. **Finite option values do not appear in `--help` or the generated completions.** `--format` still uses `value_parser = parse_point_format` / `parse_stream_format` (`crates/felis-cli/src/cli_output.rs:77,91`) and `capture --source` still uses `value_parser = parse_region_source` (`crates/felis-cli/src/cli_sessions.rs:266`). None is a clap `ValueEnum`, so clap publishes no possible values into `--help`, `felis completions {fish,zsh,bash}`, or `__mangen`. #23's accepted triage plan, item H, specified this change; #23's closing commit (54260ede) did not include it and no issue tracked the remainder. 2. **No help snapshot for the visible command set.** #55 requires that every visible command's help is snapshot-tested; today only targeted assertions exist (`crates/felis-cli/src/tests.rs`, `the_launch_verbs_help_says_where_the_globals_go`) plus the argv matrix in `crates/felis-cli/tests/cli_sessions.rs`. ## Acceptance criteria - [ ] `parse_point_format` / `parse_stream_format` are replaced by two `ValueEnum`s (`Human | Json`, `Human | Jsonl`) converting into `Format`; `parse_region_source` is replaced by a `ValueEnum` mapping onto `RegionSource`. The clap error for a bad value lists the possible values; the existing unit test that asserted the parser's accepted spellings asserts the ValueEnum's variants instead. - [ ] A test asserts the generated zsh completion script contains the possible values for `--format` (`human json`, `human jsonl`) and the four `--source` values; `--help` for `capture` and one Point verb shows the possible values. - [ ] An insta snapshot test renders `Cli::command().render_long_help()` for the root and every visible subcommand (walk the command tree, skip hidden ones) so a help change is a reviewed snapshot change. - [ ] Docs cascade: `docs/reference/cli.md` names the possible values where it documents `--format` and `--source` (if it does not already); `CHANGELOG.md` Unreleased entry (help/completions now list the values; the error message for a bad value changes); `skills/felis/SKILL.md` unchanged unless a spelling changes (it must not). - [ ] After merge, #55's two remaining criteria are evidenced and the tracker can close. Split from #23 (plan item H) and #55.
Sign in to join this conversation.
No description provided.