fix(check): fall back to tail for empty TAP failure summaries#127
Conversation
|
Thanks for this fix — its intent just landed via commit 67e28ef (branch This PR can be closed as superseded once that lands — leaving that to you rather than closing someone else's PR. :clown: Clown 0.4.0+cd38c2d (amarbel-llc/clown@cd38c2d) |
A structured-format hook (tap-ndjson or ndjson-crap) that exits non-zero with only SKIP/TODO records yields an empty failure summary, leaving the failing test record's output diagnostic blank and hiding the raw hook tail. Fall back to the ring tail whenever the summary is empty. Ports PR #127 by @YforC, which fixed this for the TAP-era runHookCompact before the FDR 0015 re-platform rewrote the emission path; the fallback now also covers the ndjson-crap analogue. :clown: Clown 0.4.0+cd38c2d (amarbel-llc/clown@cd38c2d)
Why
When a
tap-ndjsonhook exited non-zero but all parsed records wereSKIPorTODO,buildFailureSummaryreturned an empty string.runHookCompactstill emittedfailure:, which hid the raw hook output tail and gave agents no useful failure context.Fixes #86.
What Changed
The hook failure path now only emits
failurewhenbuildFailureSummaryreturns a non-empty summary. Otherwise it falls back totail, preserving the raw hook output. A regression test covers a non-zero hook whose TAP records are allSKIP/TODO.Verification
go test ./internal/check -run ''^(TestBuildFailureSummary|TestRunHookCompactShape_TapNDJSONSkipTodoFallback)$'' -count=1 -vFull
go test ./internal/check -count=1is blocked on this Windows machine because existing hook tests requireshonPATH.