Skip to content

chore(deps): bump agcli from 0.17.0 to 0.19.0 - #2846

Merged
github-actions[bot] merged 3 commits into
mainfrom
dependabot/cargo/agcli-0.19.0
Nov 3, 2026
Merged

github-actions[bot] merged 3 commits into
mainfrom
dependabot/cargo/agcli-0.19.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Nov 2, 2026

Copy link
Copy Markdown
Contributor

Bumps agcli from 0.17.0 to 0.19.0.

Release notes

Sourced from agcli's releases.

v0.19.0

Breaking changes

On the wire, for agents and the programs that read agcli output:

  • A secret in argv is no longer echoed. The command field, and the error text that quotes an argument, mask the value of any flag the command's usage does not declare, in --flag=value, --flag value, -x=value and -x value: app run --passphrase=hunter2 reports app run --passphrase=<redacted>. The PARSE_ERROR for a malformed token such as -abc=5 quotes it as -abc=<redacted>, a line that fails to parse masks every token that is not a flag name or a command name, and the flag values in a raw command's tokens, and before its name, are masked. A token right after a masked bare flag is masked whole, even when it starts with a dash, and the flags it would set are left out of UNKNOWN_FLAG and PARSE_ERROR text. The type's own parse error is left out of arg_parse and flag_parse errors for a masked value, and error text that quotes a hook-rewritten argument shows <redacted>. A line that used to rerun as printed no longer does when it carried such a value: declare the flag in the usage (--passphrase=<value>) to keep its value in command.

    In Rust, Invocation::command_line returns the masked line inside a handler, as the envelope shows it; Invocation::parse still returns it verbatim.

  • A command's name is never a flag's value. A bare flag (no =) takes the next token as its value only when that token does not name a command where a command name can go; otherwise the flag is given no value and the token is the command. A flag misplaced before a command's name now gets the error that names it: app --max grep pat is INVALID_FLAG "flag --max does not reach raw command grep", app --bogus grep pat and calc --bogus add 1 2 are UNKNOWN_FLAG, and ops --lines logs app runs logs, which answers that --lines was given no value. All of these used to be UNKNOWN_COMMAND for the next word. Write --flag=value to pass a value spelled like a command.

    app --name status status, which set --name to status, becomes app --name=status status. Under without_reserved_flags(), app --profile grep grep pat now hands raw grep ["grep", "pat"], not ["pat"].

Added

  • Command::secret(name) masks a declared flag or positional as <redacted> in the command field and every error's text. The handler still reads the real value. name is how the usage spells it, without dashes or angle brackets.
  • AgentCli::redact_arg(hook) takes Fn(&str) -> Option<String>, applied to each argv element before an envelope echoes it, for patterns only the

... (truncated)

Changelog

Sourced from agcli's changelog.

0.19.0 - 2026-10-29

Breaking changes

On the wire, for agents and the programs that read agcli output:

  • A secret in argv is no longer echoed. The command field, and the error text that quotes an argument, mask the value of any flag the command's usage does not declare, in --flag=value, --flag value, -x=value and -x value: app run --passphrase=hunter2 reports app run --passphrase=<redacted>. The PARSE_ERROR for a malformed token such as -abc=5 quotes it as -abc=<redacted>, a line that fails to parse masks every token that is not a flag name or a command name, and the flag values in a raw command's tokens, and before its name, are masked. A token right after a masked bare flag is masked whole, even when it starts with a dash, and the flags it would set are left out of UNKNOWN_FLAG and PARSE_ERROR text. The type's own parse error is left out of arg_parse and flag_parse errors for a masked value, and error text that quotes a hook-rewritten argument shows <redacted>. A line that used to rerun as printed no longer does when it carried such a value: declare the flag in the usage (--passphrase=<value>) to keep its value in command.

    In Rust, Invocation::command_line returns the masked line inside a handler, as the envelope shows it; Invocation::parse still returns it verbatim.

  • A command's name is never a flag's value. A bare flag (no =) takes the next token as its value only when that token does not name a command where a command name can go; otherwise the flag is given no value and the token is the command. A flag misplaced before a command's name now gets the error that names it: app --max grep pat is INVALID_FLAG "flag --max does not reach raw command grep", app --bogus grep pat and calc --bogus add 1 2 are UNKNOWN_FLAG, and ops --lines logs app runs logs, which answers that --lines was given no value. All of these used to be UNKNOWN_COMMAND for the next word. Write --flag=value to pass a value spelled like a command.

    app --name status status, which set --name to status, becomes app --name=status status. Under without_reserved_flags(), app --profile grep grep pat now hands raw grep ["grep", "pat"], not ["pat"].

Added

  • Command::secret(name) masks a declared flag or positional as <redacted> in the command field and every error's text. The handler still reads the real value. name is how the usage spells it, without dashes or angle brackets.
  • AgentCli::redact_arg(hook) takes Fn(&str) -> Option<String>, applied to each argv element before an envelope echoes it, for patterns only the

... (truncated)

Commits
  • ad546b2 chore: release v0.19.0
  • a322304 fix: error text shows <redacted> for a hook-rewritten argument
  • 28e93ca fix: close the leaks a review found in argv masking
  • c5ea249 feat!: mask secrets in argv before any envelope echoes them
  • 8139fa5 fix!: a command's name is never a flag's value
  • cb2c06f chore: release v0.18.0
  • cc9bc81 test: pin raw-prefix flag precedence and the compact-select guards
  • f3e9e1d fix: a nested --select emptied by --compact warns, and a raw command's own fl...
  • f4bb07e fix: the framework owns every token before a raw command's name, and three sm...
  • 28fb52b docs: README and CHANGELOG for the review, and the Beautiful Rust pass
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot Bot added the dependencies Pull requests that update a dependency label Nov 2, 2026
@dependabot
dependabot Bot requested a review from a team as a code owner November 2, 2026 15:48
@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

Shape rustledger beancount Speedup RSS (rledger / beancount)
simple 38.1ms ± 0.4ms 569.8ms ± 1.7ms 14.9x 34.6 MB / 51.0 MB
investment 58.7ms ± 1.5ms 2140.9ms ± 5.8ms 36.5x 43.6 MB / 59.1 MB
fifo 56.1ms ± 0.3ms 11762.0ms ± 330.8ms 209.7x 41.0 MB / 58.9 MB

vs base, measured in this run

Shape base this PR Change RSS base → PR
simple 37.9ms ± 0.5ms 38.1ms ± 0.4ms +0.6% ✅ within noise 34.9 MB → 34.6 MB (-1.0%)
investment 58.0ms ± 0.4ms 58.7ms ± 1.5ms +1.2% ✅ within noise 44.3 MB → 43.6 MB (-1.5%)
fifo 55.9ms ± 0.4ms 56.1ms ± 0.3ms +0.4% ✅ within noise 40.6 MB → 41.0 MB (+0.9%)

A difference counts only when it clears the combined spread of the two measurements, per shape (2σ: simple 0.3ms, investment 0.7ms, fifo 0.3ms), and is at least 5%.
10,000 transactions per shape · 20 runs, 3 warmup · hyperfine

What do these numbers mean?
  • simple — Two-posting transfers, one currency. The historical workload — keep as the floor, not as the benchmark.
  • investment — Cost specs, per-unit prices and lot reductions. Exercises booking and inventory, which simple leaves at 0.3%.
  • fifo — Bare {} reductions against a FIFO account — how FIFO sells are normally written. The other four shapes reach the ordered-selection path twice in 2k transactions between them, so it was effectively unprofiled until it turned out to be quadratic (plan_ordered scans every lot per reduction: FIFO ledgers are quadratic (8.8s at 20k transactions) #2083).
  • vs base: the PR and the base-branch commit it is built on, built and measured in the same job
  • RSS: peak resident set size, a single sample — reported without a verdict because there is no spread to test it against
  • A shape with no beancount column is one bean-check reports errors on; it is timed for rledger only

@github-actions
github-actions Bot enabled auto-merge (squash) November 2, 2026 16:02
@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

✅ Compatibility Test Results

Metric Result
Check Compatibility 100%
BQL Compatibility 100% (raw 93%, 179 masked)
Full AST Match 100%
Total Files 821
What's tested
  • Check: Exit codes and error counts match bean-check
  • BQL: Query results match bean-query
    The headline is the EFFECTIVE rate, after pairs where beanquery
    itself is wrong are masked. raw is the same run with nothing
    masked. A widening gap means the registry grew, not that rledger
    changed.
  • Files: ~800 test files downloaded from 10+ beancount repositories

Full results available in workflow artifacts

rustledger-bot Bot and others added 2 commits November 2, 2026 16:03
agcli 0.18 redesigned its Rust API and 0.19 tightened the audit:

- ExecutionContext and run_argv_with_context are gone: main calls
  `run(args)` (argv is rewritten for config aliases first, so not
  `run_env`). `run` installs no panic hook, so a handler panic is caught
  as a task panic and still answered with one HANDLER_PANIC envelope,
  exit code 1, as 0.17 did.
- Handlers take an owned CommandRequest and return a Send future:
  `|req, _ctx| { ..; Box::pin(async move { .. }) }` becomes
  `|req| { ..; async move { .. } }`, and parse_request takes
  `&CommandRequest` (no lifetime).
- CommandError::new takes the ErrorCode first; a local `command_error`
  keeps the message/code/fix order at the call sites.
- ExitCode is a u8 newtype: `exit_code(0)` is `ExitCode::SUCCESS`,
  refusal_fix returns ExitCode, and a command status converts with
  `try_from`.
- parse_invocation is `Invocation::parse(args, |_| false)` in the tests.
- 0.19's audit refuses a usage that names another command
  (USAGE_PATH_MISMATCH): an alias (`c`, `q`, `fmt`, ...) now advertises
  its own name, and the unsupported command's usage names itself.

One test passed `--yes` twice; agcli 0.18 makes a repeated flag a
PARSE_ERROR, so the duplicate is dropped.

Wire changes from agcli itself: the `command` field is shell-quoted, a
repeated flag is a PARSE_ERROR, and the value of a flag the usage does
not declare is shown as `<redacted>` in `command` (e.g. the spaced short
report flags such as `-a Assets`); handlers still read the real value.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@codecov

codecov Bot commented Nov 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 76.64975% with 46 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
crates/rustledger/src/bin/ag-rledger.rs 76.64% 46 Missing ⚠️

📢 Thoughts on this report? Let us know!

@github-actions
github-actions Bot merged commit 595b34f into main Nov 3, 2026
51 of 52 checks passed
robcohen added a commit that referenced this pull request Nov 4, 2026
…-flag echo after agcli 0.19 (#2859)

* fix(ag-rledger): restore the panic envelope, repeated flags and short-flag echo after agcli 0.19

Three regressions from the agcli 0.19 port (#2846):

- A handler panic was answered for the wrong command: the fallback parsed
  argv with `Invocation::parse` after skipping the program name, so the
  command word became the program (`check f.beancount` gave exit 2
  UNKNOWN_COMMAND "Valid commands: f.beancount."). The fallback is now the
  real command tree (`build_cli_with`) with every handler replaced, so
  agcli resolves the command, redacts and picks its next actions as in
  the run that panicked, whatever precedes the command word. The envelope
  is HANDLER_PANIC, exit 1, with agcli 0.17's fix text.
- agcli 0.18 refuses any repeated flag (PARSE_ERROR), but rledger's list
  flags (--plugin, --native-plugin, --include-rules, --exclude-rules,
  --investments/-i, --income/-n, --wasm-importer, --wasm-importer-dir,
  --mapping/-m) take repeats. A repeated one is merged into one
  comma-joined flag before dispatch (`merge_repeated_value_flags`), which
  `flag_values` already splits on commas. Short forms merge only for the
  command that owns them; a flag given once and repeated switches are
  left as written.
- agcli masks the value of an undeclared flag in `command`, and reads
  `--account/-a <ACCOUNT>` as declaring --account only, so every short
  value flag echoed `<redacted>`. Short forms are now their own usage
  tokens, in the report flags and the command usage strings. config -f,
  read as both --format and --force, is left as it was.

Also moves usage_for's doc comment off with_globals.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(ag-rledger): find the command word as agcli does, and declare every flag a handler reads

Review of #2859:

- The command word was the first non-flag argument after the global value
  flags, so a value flag before it hid it: `--format json report l
  returns -i A -i B` merged no short forms and failed as "given twice".
  It is now the first argument that names a registered command
  (COMMAND_NAMES, checked against the root tree) or a config alias, as
  agcli finds it; expand_config_aliases and the merge use that rule.
- agcli 0.19 never takes a command's name as a bare flag's value, so
  `-P x check l.beancount` ran the `x` alias (extract) on `check`.
  Declaring -P does not change that rule, so a global value flag before
  the command word is now passed with its value attached (`-P=x`).
- Value flags the handlers read but the usage did not declare still
  echoed `<redacted>`: check --plugin, --include-rules, --exclude-rules,
  --cache-filename, --lint-min-confidence, --file, --show-summary;
  extract --wasm-importer, --wasm-importer-dir, --delimiter,
  --importers-config and its column, format and ledger flags; price
  --source-meta; add -q. All are declared now, and a unit test fails when
  a handler reads a flag its command's usage does not declare.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
@robcohen
robcohen deleted the dependabot/cargo/agcli-0.19.0 branch November 26, 2026 04:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant