Skip to content

Next Release#2291

Open
github-actions[bot] wants to merge 8 commits into
masterfrom
develop
Open

Next Release#2291
github-actions[bot] wants to merge 8 commits into
masterfrom
develop

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot commented Jun 5, 2026

Feats

Fix

Other

  • refacto(cmds): strip decorator noise from filter output #2289

KuaaMU and others added 5 commits April 30, 2026 20:16
…mplate output

The helm filter had `max_lines = 40` which silently truncates output
from commands like `helm template` that legitimately produce hundreds
of lines of YAML manifests. This caused CI/CD pipelines to apply
incomplete sets of manifests (only first ~40 lines).

Other filter settings (strip_ansi, strip_lines_matching for blanks and
glog warnings, truncate_lines_at for individual line length) provide
sufficient output hygiene without capping total line count.

Added regression test verifying multi-document YAML output is preserved
in full without truncation.

Fixes #1626
The generic AWS handler (used for subcommands outside the hardcoded
specialized list) called json_cmd::filter_json_string, which extracts
a type-only schema and discards every value.

    $ rtk aws backup describe-global-settings --output json
    {
      GlobalSettings:
      {
        isCrossAccountBackupEnabled: string,
        isDelegatedAdministratorEnabled: string,
        isMpaEnabled: string
      }
      LastUpdateTime: string
    }

Callers got the schema instead of the data they asked for.

Swap to json_cmd::filter_json_compact, which preserves values while
still applying depth, string-length, and array-size truncation:

    $ rtk aws backup describe-global-settings --output json
    {
      GlobalSettings:
      {
        isCrossAccountBackupEnabled: "false",
        isDelegatedAdministratorEnabled: "false",
        isMpaEnabled: "false"
      }
      LastUpdateTime: "2026-05-28T09:52:17.525000+02:00"
    }

Affects every AWS subcommand not on the hardcoded list (backup,
route53, kms, ssm, apigateway, ...) when output is valid JSON
(explicit `--output json` or auto-injected for describe-/list-/get-/scan).
`rtk curl <binary-url>` silently corrupted any binary download
(tarballs, zip, png, pdf, ELF, ...) because the response body was
captured via `String::from_utf8_lossy` in `core::stream::exec_capture`.
Every non-UTF-8 byte got replaced with U+FFFD (3 bytes: 0xEF 0xBF 0xBD),
so gzip magic 1f 8b 08 00 arrived at downstream consumers as
1f ef bf bd 08 00 and `tar -xzf` complained "not in gzip format".

Now `rtk curl` runs `Command::output()` directly to keep stdout as
`Vec<u8>`, then checks `std::str::from_utf8(&bytes).is_err()`. If the
response is not valid UTF-8 (i.e. the lossy conversion would corrupt
it), raw bytes are written through to stdout via `write_all` and
tracking is recorded as passthrough (0% savings — token counts over
binary content have no meaning). The text/JSON code path is unchanged.

Verified live on 18 real binary formats (rtk's own release artifacts,
ripgrep, bat, fd, hyperfine, gh, tokei, kubectl ELF 51MB, rustup-init
20MB, W3C PDF, ISO 9899 PDF 4MB, GitHub avatar PNG, Wikimedia GIF,
WebP sample, MP3/MP4/WAV samples) — all byte-identical to raw curl.
10 text regression tests (JSON/HTML/Markdown/Cargo.toml/RFC) confirm
the text path keeps its existing behavior.

Closes #1087
Separator lines (═══, ---) and an emoji status marker cost tokens
without adding signal for the LLM — RTK output must never add noise
over raw. Semantic labels are kept; the emoji is swapped for plain
monochrome unicode.
refacto(cmds): strip decorator noise from filter output
aeppling added 3 commits June 7, 2026 15:20
fix(curl): passthrough binary downloads to prevent UTF-8 corruption (#1087)
…or-unsupported-subcommands

fix(aws): preserve values in JSON output for unsupported subcommands
fix(filters): remove max_lines cap from helm filter that truncates template output
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants