rtk-ai/rtk

feat: add bats/TAP test runner filter

Open

#1.908 geöffnet am 16. Mai 2026

Auf GitHub ansehen
 (1 Kommentar) (0 Reaktionen) (0 zugewiesene Personen)Rust (2.914 Forks)batch import
area:clienhancementhelp wantedpriority:medium

Repository-Metriken

Stars
 (48.085 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 11T 1h) (45 gemergte PRs in 30 T)

Beschreibung

Problem

bats (Bash Automated Testing System) outputs TAP (Test Anything Protocol) format. It is the highest-volume unhandled command in real-world Claude Code sessions — 353 calls/month per rtk discover --all across 1,178 sessions and 15,483 Bash commands. Currently passes through unfiltered.

TAP Output Format

1..5
ok 1 - test basic install
ok 2 - test git config
not ok 3 - test brew install
# (from function `assert' in file test_helper.bash, line 12)
#   `assert_success' failed
ok 4 - test skills deploy
ok 5 - test status

Proposed Filter

  • Strip blank lines and bare # comment lines (noise on passing tests)
  • Preserve TAP plan (1..N), passing ok lines, and all failure details (including # context lines)
  • max_lines = 60 to cap runaway output on large suites
  • on_empty = "bats: ok" for empty output

Expected Token Savings

~75% on typical passing runs (blank-line noise removed). Failure output preserved in full — critical for Claude to understand what broke.

Contributor Guide