cli: parse_region_source's error vocabulary can drift from SourceArg #221
Labels
No labels
priority/P0
priority/P1
priority/P2
release/v0.1.0
status/blocked
status/planned
type/bug
type/design
type/test-gap
type/tracker
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
natsukium/felis#221
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
#187's plan asked for
parse_region_sourceto be replaced by theSourceArgValueEnum; the accepted deviation keeps it as a wrapper for thefelis bridgepath (cli_bridge.rs:1307and:1997both call it).Before #187 its message sat inside the same
matchthat defined the accepted spellings, so the two could not disagree. Now the vocabulary lives inSourceArg(cli_sessions.rs:471-478) whilecli_sessions.rs:496hand-spellsexpected visible, scrollback, command-output, or last-commandin amap_errthat never consultsSourceArg::value_variants().Nothing at HEAD pins the wrapper:
git grep "unknown source"matches only the literal itself, and the only bridge traffic carrying a source is one happy-path fixture with"scrollback"(crates/felis-cli/tests/schema_fixtures.rs:72).Failure mechanism: rename or add a
SourceArgvariant and--help, completions and the man page update automatically while the bridge's refusal keeps naming the old four — a machine client is told to send a spelling the parser now rejects, and the whole suite stays green.Correction: build the message from
SourceArg::value_variants()/to_possible_value()rather than a literal, or add a unit test asserting the four spellings round-trip throughparse_region_sourceand that its error text lists exactly the current variant names.Deferred from #187 because keeping
parse_region_sourceas a bridge-path wrapper is an already-accepted deviation from the AC's scope; a drift-detection test for it is new hardening the acceptance criteria never asked for.Split from #187.