Skip to content

rtk pipe -f go-test reports plain-text go test output as "No tests found" #4418

Closed

Description

@KuSh

rtk pipe -f go-test only understands go test -json events. Plain-text go test output has no JSON lines, so nothing is counted and the filter reports an empty run whatever the real result:

$ go test ./... > plain.txt     # 25 `ok  	example.com/proj/pkgN	0.00Ns` lines, then `--- FAIL: TestX`, `FAIL	example.com/proj/zz	0.01s`
$ rtk pipe -f go-test < plain.txt
Go test: No tests found

A green plain-text run gets the same answer. Reproduced on develop 7efbaef (rtk 0.49.0, Go 1.24.6).

phpstan_wrapper and pint_wrapper in src/cmds/system/pipe_cmd.rs already choose a parser from the content; go_test_wrapper could do the same and pass input that is not JSON events through unchanged (or a tail) instead of No tests found.

Related: #1444 changes the same function; its non-JSON branch only reaches this input.

Activity

  1. rtk-wshm-sync-bot commented on Oct 3, 2026

    @rtk-wshm-sync-bot

    wshm · Automated triage by AI

    🔍 Automated Triage

    🐛 Category bug
    🟠 Priority high
    🎯 Confidence 93%

    Summary

    rtk pipe -f go-test only parses go test -json events, so plain-text go test output is misreported as "No tests found" regardless of actual pass/fail result.

    This looks like a simple fix that could be auto-resolved. Repo maintainers can use /wshm fix to attempt it.

    📁 Relevant files
    • src/cmds/system/pipe_cmd.rs

    Suggested Actions

    1. Fix go_test_wrapper in src/cmds/system/pipe_cmd.rs to detect non-JSON input like phpstan_wrapper/pint_wrapper do
    2. Pass through plain-text (or tailed) output instead of printing 'No tests found' when no JSON events are present
    3. Coordinate with fix(go): keep the final fuzz stats in the go test summary #1444, which touches the same function's non-JSON branch
    4. Add a regression test with a mixed ok/FAIL plain-text go test sample as input

    Triaged automatically by wshm · This is an automated analysis, not a human review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:cliarea:testingbuggood first issuepriority:high

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions