feat(rtk): exclude informationally critical commands from RTK output filtering#461
feat(rtk): exclude informationally critical commands from RTK output filtering#461paolomainardi wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates Sparkdock’s RTK hook configuration to prevent RTK output filtering from altering/truncating the output of “informationally critical” commands (where inaccurate output is worse than verbose output), aligning with the rationale in issue #460.
Changes:
- Expanded
config/rtk/exclude-commands.tomlwith additional exclude patterns for critical read/inspection commands (git diff/log/status, tsc, helm template, ls, pip list) and organized the list into two commented sections. - Added a CHANGELOG entry documenting the expanded exclusion set and rationale.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| config/rtk/exclude-commands.toml | Adds and documents new exclude patterns for informationally critical commands, while keeping destructive-operation exclusions intact. |
| CHANGELOG.md | Records the RTK exclude expansion as a “Changed” item. |
Validation: all 7 exclusions confirmed on RTK v0.39.0Tested each command on this machine ( 1.
|
| Metric | Raw | RTK |
|---|---|---|
| Line count | 1005 | 110 |
| Content | Full diff | 720 lines silently truncated |
RTK appends [full diff: rtk git diff --no-compact] but an agent doesn't know to use that flag.
2. git log — CONFIRMED: caps at 10 commits, truncates lines
| Metric | Raw | RTK |
|---|---|---|
| Commits shown | 25 | 10 |
| Line length | Full | Truncated at ~80 chars with ... |
3. git status — CONFIRMED: rewrites detached HEAD, truncates file lists
Detached HEAD:
- Raw:
HEAD detached at 2eff3e3 - RTK:
* HEAD (no branch)— SHA lost, "detached" warning gone
File lists: 30 untracked files → RTK shows 10, hides 20 with ... +20 more
4. tsc --pretty — CONFIRMED: fabricates success message
$ rtk npx tsc --noEmit --pretty
TypeScript: No errors found ← LIE
exit: 2 ← actual exit code says errors exist
Without --pretty, RTK correctly shows errors. The bug is specifically in ANSI-colored output parsing.
5. helm template — CONFIRMED: caps at 40 lines
| Metric | Raw | RTK |
|---|---|---|
| Line count | 220 | 41 |
| Templates visible | 10 of 10 | 2 of 10 |
8 Kubernetes resources silently dropped.
6. ls — CONFIRMED: hides 13 directories via NOISE_DIRS
Hidden: .env/, .git/, node_modules/, __pycache__/, .venv/, dist/, build/, .cache/, .idea/, .vscode/, coverage/, target/. Only vendor/ survived from 14 directories.
Files (.env.production, .env_file) are shown — the filter targets directory names.
7. pip list — CONFIRMED: truncates per letter group
210 packages total, but groups capped at 10 entries each:
[P]group: shows 10, hides 42 (including mostpy*packages)[A]group: shows 10, hides 6[S]group: shows 10, hides 10
The Reddit post's claim of "2 packages" was wrong for v0.39.0, but truncation is still significant.
…filtering Refs: #460 Assisted-by: opencode/github-copilot/claude-opus-4.6
e484488 to
6b71d58
Compare
Summary
exclude_commandspatterns for 7 informationally critical commands where RTK's output filtering silently loses or rewrites data that AI agents rely onExcluded Commands
git diffgit log--no-merges, hides merge commitsgit statustschelm templatelspip listFollow-up
Tracking issue to remove patterns once upstream fixes land: #464
Refs: #460