cli: build the bridge's source refusal from SourceArg #228
No reviewers
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!228
Loading…
Reference in a new issue
No description provided.
Delete branch "issue-221"
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?
SourceArgis the singlesourcevocabulary for--source, the completions, the man page and the published bridge schema, butparse_region_source(the wrapper thefelis bridgepath keeps) hand-spelled its refusal asexpected visible, scrollback, command-output, or last-command. Renaming or adding a variant would update every other consumer automatically while the bridge's refusal kept naming the old four, telling a machine client to send a spelling the parser now rejects, with the whole suite still green. The refusal now builds its list fromSourceArg::value_variants()through a newsource_names()helper, whichcli_schemareads too, so the published enum, the parser and the refusal share one source. The message text is byte-identical for today's vocabulary.Tests:
every_source_spelling_round_trips_through_parse_region_sourcepins that every advertised spelling parses into its ownRegionSource(and that no variant is hidden from the advertised list);the_source_refusal_names_exactly_the_current_vocabularypins the refusal's exact text plus the presence of every current variant name, so a rename that the message could not follow trips a test.just checkpasses in full (3429 tests, clippy, fmt, deny, proto-compat, release self-test).Fixes #221
dd06d0c0797a017a6df8