Repository navigation
Conversation
`rtk go test` reported the failing assertion of a fuzz target but dropped the two lines Go adds after it: the path the failing input was written to and the `go test -run=...` command that reproduces it. Both are outside `select_go_test_failure_lines`, so the agent had to open the tee log to reproduce the failure or hand the corpus file over. Mark both lines as fuzz re-run markers so the pair survives, and pin it with a test on the event stream of a failing fuzz run.
|
|
📊 Automated PR Analysis
SummaryFixes a Go test output filter that stripped the 'To re-run:' line and its associated 'go test -run=...' command when a fuzz test fails, while keeping the 'Failing input written to' corpus path. The fix treats the rerun marker and its following command line as a unit so both survive the filter, and adds a test covering the go test -json event stream for a failing fuzz run. Review Checklist
Linked issues: #4434 Analyzed automatically by wshm · This is an automated analysis, not a human review. |
|
Closing this in favour of #4438, which fixes the same #4434 fuzz-failure filtering in go_cmd.rs with the same approach. It was kept because its CLA is signed and its test reproduces a real Go 1.26 fuzz crash stream, including the blank separator line. Review or comments are welcome on #4438, or reply here if your change covers something it does not. |
Summary
Failing input written to testdata/fuzz/...line and theTo re-run:/go test -run=...pair inrtk go testoutput when a fuzz target fails. Fixes rtk go test: a failing fuzz run drops the failing-input path and the re-run command #4434.select_go_test_failure_linesdropped them because they match neitheris_go_test_location_linenoris_go_test_failure_line;To re-run:is only a label for the command on the next line, so the two are treated as a unit now.go test -jsonevent stream of a failing fuzz run.Before:
After:
(Context left in the tee log so the agent can still reach the rest.)
Test plan
cargo fmt --all --check,cargo clippy --all-targets, andcargo test—fmtandclippyclean,cargo test4113 passed / 0 failed.developwith exactly the reported symptom (the corpus path survived as context butTo re-run:and thego test -run=...line were gone) and passes with the change.-fuzzrun: I have no machine with Go installed here, so the re-run is pinned to the event stream transcribed in the issue rather than a livego test -fuzzinvocation.AI disclosure
This change was written with the assistance of an AI agent. The root-cause analysis, the exact output shape, and the reproduction transcription in issue #4434 came from the human reporter, and I verified the before/after behaviour against the repo's own test fixtures rather than asserting it.