Surface hygiene: hide --rps/--impersonate/--no-cache, add --format (work-4uls)#13
Merged
Conversation
3 tasks
949f2a6 to
d87de40
Compare
ak2k
added a commit
that referenced
this pull request
May 17, 2026
`flight search --help` (and calendar/detail) now show flags grouped into
named panels: Itinerary / Filtering / Output / Backend & providers.
Same group names across commands so the user gets a consistent mental
map. Zero behavior change — pure rendering.
--slice parser now surfaces the specific failure mode instead of the
generic "should be ORIGIN-DEST:DATE[:r=...:e=...]":
- missing date → "missing date — expected ORIGIN-DEST:DATE..."
- malformed origin-dest → "missing '-' between origin and destination"
- empty origin/dest → "must both be non-empty"
- invalid date → "invalid date 'YYYY-MM-DD'"
- unknown key prefix → "unknown key prefix in 'r-LH+'; valid keys are
r=ROUTING and e=EXTENSION (note the '=')"
The unknown-key-prefix branch closes a silent-failure path: typing
`r-LH+` instead of `r=LH+` previously got dropped by the lookahead split
without warning, so the user got a search that ignored their routing.
10 new tests in tests/test_slice_diagnostics.py pin each error path.
Stacked on top of work-4uls (#13).
…ork-4uls)
Trims the per-command help output by hiding three implementation-detail
flags nobody touches in normal use, and front-doors output-format selection
behind a single --format flag.
Hidden flags (still work for one-off overrides; just not in --help):
--rps reads FLIGHT_RPS env / [http].rps config / default 1.0
--impersonate reads FLIGHT_IMPERSONATE / [http].impersonate / "chrome"
--no-cache reads FLIGHT_NO_CACHE / [cache].enabled inversion / off
Resolution order: explicit CLI flag wins, then env, then config.toml, then
hard-coded default. Bad env values raise a clear error rather than silent
fallback.
Output format:
--format {table,json} new front door; table is the default
--json deprecated alias for --format json; runtime
warning, conflicts with explicit --format X
for X != json
csv/tsv/yaml were in the original work-4uls plan but deferred to a follow-up:
the cash-itinerary shape isn't naturally tabular without a flattening pass
that deserves its own design. Filing a separate bd issue.
_config.py grew three new helpers (http_rps, http_impersonate, cache_disabled)
and three env-var constants. 28 new tests across test_runtime_knobs.py and
test_format_resolver.py. Pyright clean.
Stacked on top of work-4byx (#12).
7e9926a to
8409d8e
Compare
ak2k
added a commit
that referenced
this pull request
May 17, 2026
`flight search --help` (and calendar/detail) now show flags grouped into
named panels: Itinerary / Filtering / Output / Backend & providers.
Same group names across commands so the user gets a consistent mental
map. Zero behavior change — pure rendering.
--slice parser now surfaces the specific failure mode instead of the
generic "should be ORIGIN-DEST:DATE[:r=...:e=...]":
- missing date → "missing date — expected ORIGIN-DEST:DATE..."
- malformed origin-dest → "missing '-' between origin and destination"
- empty origin/dest → "must both be non-empty"
- invalid date → "invalid date 'YYYY-MM-DD'"
- unknown key prefix → "unknown key prefix in 'r-LH+'; valid keys are
r=ROUTING and e=EXTENSION (note the '=')"
The unknown-key-prefix branch closes a silent-failure path: typing
`r-LH+` instead of `r=LH+` previously got dropped by the lookahead split
without warning, so the user got a search that ignored their routing.
10 new tests in tests/test_slice_diagnostics.py pin each error path.
Stacked on top of work-4uls (#13).
ak2k
added a commit
that referenced
this pull request
May 17, 2026
* Help-screen grouping + better --slice diagnostics (work-ixhv)
`flight search --help` (and calendar/detail) now show flags grouped into
named panels: Itinerary / Filtering / Output / Backend & providers.
Same group names across commands so the user gets a consistent mental
map. Zero behavior change — pure rendering.
--slice parser now surfaces the specific failure mode instead of the
generic "should be ORIGIN-DEST:DATE[:r=...:e=...]":
- missing date → "missing date — expected ORIGIN-DEST:DATE..."
- malformed origin-dest → "missing '-' between origin and destination"
- empty origin/dest → "must both be non-empty"
- invalid date → "invalid date 'YYYY-MM-DD'"
- unknown key prefix → "unknown key prefix in 'r-LH+'; valid keys are
r=ROUTING and e=EXTENSION (note the '=')"
The unknown-key-prefix branch closes a silent-failure path: typing
`r-LH+` instead of `r=LH+` previously got dropped by the lookahead split
without warning, so the user got a search that ignored their routing.
10 new tests in tests/test_slice_diagnostics.py pin each error path.
Stacked on top of work-4uls (#13).
* ci: empty commit to retrigger checks after base retarget to main
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on top of #12 (work-4byx provider namespacing). Once #12 merges, retarget this PR's base to `main` (per gh_stacked_pr_base_branch_deletion, don't merge #12 with `--delete-branch` while this PR still depends on the branch).
Summary
Trims `flight` command help screens by hiding three implementation-detail flags users almost never touch, and front-doors output-format selection behind a single `--format` flag in preparation for future formats.
Closes the surface-hygiene half of bd `work-4uls`.
What changed
Hidden flags (still functional for one-off overrides; just removed from `--help` output):
Resolution order: explicit CLI flag wins, then env, then config.toml, then default. Bad env values (e.g. `FLIGHT_RPS=foo`) raise a clear error rather than silently falling through.
Output format:
Scope deferred
`csv` / `tsv` / `yaml` were listed in the original `work-4uls` bd body. After surveying the cash-itinerary shape (nested itinerary → slice → leg), they're more than just "add an emitter" — they need a flattening pass with deliberate column choices. I'm filing a separate bd issue for those rather than rushing them in this PR. The `--format` plumbing is the strategically important piece; emitters layer on later.
Test plan
Help-screen size
Before: 28 visible flags on `flight search --help`. After: 25 visible. Combined with the deprecations already landed in #12, the help screen is materially less crowded for the common-path user.