fix(filter-quality): preserve error signal in go test/vet/golangci filters#2311
Open
aeppling wants to merge 1 commit into
Open
fix(filter-quality): preserve error signal in go test/vet/golangci filters#2311aeppling wants to merge 1 commit into
aeppling wants to merge 1 commit into
Conversation
…lters Every retry these filters caused had the same root: RTK kept the cosmetic summary but dropped the one actionable line (the error/failure message), then advertised a verbose tee-log -- so agents retried and pulled back more bytes than the unfiltered output. - go test: drop the tee for 'go test'. The [full output: ...go_test.log] pointer handed out the raw 'go test -json' dump (3-8x verbose); agents cat'd it on failure. Build errors and per-test failures are already inline. - go vet: keep every finding line, not just '.go:' lines. Location-less compiler/cgo failures (fatal error: pcap.h: No such file or directory) were dropped, then reported as 'No issues found' on a hard failure. Stop truncating the message tail mid-line. - golangci-lint: emit standard 'file:line:col: message (linter)' findings. The violation message (Text) was parsed and discarded, leaving only counts. - golangci-lint: passthrough verbatim when the user supplies --out-format / --output.* instead of force-parsing JSON and emitting a parse-error string that reads as a tool failure. Savings stay high vs raw (golangci 78-84%); go vet passes tiny failures through by design (compressing 323 B is negative value).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
These three Go filters all caused agent retries with the same root cause: RTK kept the cosmetic summary but dropped the one actionable line (the error/failure message), then advertised a verbose tee-log. So agents retried —
cat/tail/grep-ing the firehose or re-running with--out-formatoverrides — pulling back more bytes than the unfiltered output.Fixes (all in
src/cmds/go/)[full output: …go_test.log]pointer to the rawgo test -jsondump (3–8× verbose); agentscat'd it on failure.go:lines kept → location-lessfatal error: pcap.h: No such file or directorydropped, then "No issues found" on a hard failure; message truncated mid-lineText) was parsed and discardedfile:line:col: message (linter)findings, linter counts as a header--out-format, emittinggolangci-lint (JSON parse failed: …)(reads as a tool failure)--out-format/--output.*flagsCompression
Savings stay high vs raw — golangci 78–84% (was a misleading ~93% that omitted the message).
go vetpasses tiny failures through at ~0% by design: compressing 323 B costs a retry turn for no gain.go testcompression slightly improved (pointer removed). The lost percentage points are repaid many times over by eliminating the 12–169 KB retry reads the missing signal caused.Out of scope
Cross-cutting idempotency items (pipe-awareness, re-run escalation, full-path basename matching) live in the hook/rewrite + session-state layer, not these filters — left for a follow-up.
Testing
cargo fmt --all·cargo clippy --all-targets(clean) ·cargo test --all→ 2073 passed, 0 failed, 7 ignored