Skip to content

feat(cli): accept --all on lists that return every item at once - #94

Merged
thebrandonlucas merged 1 commit into
feat/cli-wallet-flag-as-idfrom
feat/cli-list-all-hint
Oct 22, 2026
Merged

thebrandonlucas merged 1 commit into
feat/cli-wallet-flag-as-idfrom
feat/cli-list-all-hint

Conversation

@thebrandonlucas

@thebrandonlucas thebrandonlucas commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

A list that returns every item in one response, such as wallets list, now accepts --all and ignores it. Before, it rejected --all, and clap suggested --wallet:

$ voltage wallets list --all      # before: error: unexpected argument '--all' found ... tip: a similar argument exists: '--wallet'
Command kind --all
A list that takes --limit (payments list, quotes list, …) pages through every page, as before
A list without paging (wallets list, webhooks list, assets list, credit-lines list) accepted; help says "No effect: this list returns every item in one response"
Anything else (wallets get, …) still rejected

An agent that asks for "all" gets what it asked for, without a failed call. wallets list --help still lists --all-orgs for other organizations.

In the CLI benchmark, this happened in 2 of the 6 CLI runs of "list every wallet". Closes #82.

Stack: 5 of 6, on #93. It doesn't depend on the PRs below it.

  • User-visible change: a CHANGELOG.md (Unreleased) line is added. The flag's help text documents it; no guide lists --all for these commands.
  • The verification gate passes: fmt, clippy, machete, cargo test (260 tests) and check-coverage.py.
  • Reviewed against feat(cli): accept --wallet as the wallet a wallet command acts on #93. Unit tests: Operation::lists_everything_at_once is true for wallets list and webhooks list, and false for a paginated list, a read and a create. wallets list --all and webhooks list --all parse with all = false, payments list --all still pages, and wallets get --all is still rejected.
  • CRAP on 2ae32e0: 0 functions at or above 20. The highest is wait_for_payment at 19.60. The list flags moved into list_args (3.0), so endpoint drops from 18.0 to 17.0; lists_everything_at_once is 4.0.
  • Checks not run: none. This assumes the contract is right that these lists have no paging parameter.

@tee8z tee8z left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved 30481de against feat/cli-wallet-flag-as-id (#93 b3df4d0). The patch matches 980dac6, and only the CHANGELOG context changed in the rebase.

  • lists_everything_at_once matches the contract. The four list operations without a limit parameter (wallets, webhooks, assets, credit-lines) each return a whole array and take no other paging parameter, so --all has nothing to page. Its help says it has no effect.
  • A paged list still sets all, and a non-list such as wallets get --all is still rejected. The tests cover all three cases.

Validation: on 980dac6, the same patch, the full gate passed in nix develop (140 unit, 122 integration), and CRAP measured 630 functions with none at or above 20 (highest wait_for_payment at 19.60). On this head, cargo fmt --check, cargo clippy --locked --all-targets -- -D warnings and cargo machete --with-metadata passed. Its cargo test did not finish: #75's login_on_a_terminal_reports_why_no_profile_was_saved_and_still_succeeds hung for 28 minutes, and I stopped it. This PR does not touch that test. CI is green.

@thebrandonlucas
thebrandonlucas merged commit 08b4f37 into master Oct 22, 2026
8 of 14 checks passed
@thebrandonlucas
thebrandonlucas deleted the feat/cli-list-all-hint branch October 22, 2026 21:53
thebrandonlucas added a commit that referenced this pull request Nov 4, 2026
…ist (#120)

These local lists return every item at once but rejected --all, unlike the
API lists fixed in #94. They now accept it and ignore it, through the same
argument. A test walks the command tree so a new list cannot miss --all.

Closes #119.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

wallets list --all is rejected; say how to list every item

2 participants