# gotestyourself/gotestsum — codebase unpack

> Canonical page: https://codevetter.com/unpack/gotestsum

This is a deterministic Repo Unpack scan of gotestyourself/gotestsum — a structural map, not a review, security audit, or maintainer-endorsed description.

- Scanned commit: 3cf14356a16c7931cfeacd7dfee585527618df3d (2026-04-14)
- Last upstream commit: Merge pull request #563 from alexandear-org/refactor/remove-unused-go-version
- Generated by codevetter 1.15.0 on 2026-10-02
- 164 files scanned · 766 KB

Source inspection; upstream code and tests were not executed.

## Languages

- Go: 67 files
- YAML: 5 files
- Markdown: 2 files
- HTML: 1 files

## Repository structure

- testjson/ — 72 files
- cmd/ — 43 files
- internal/ — 26 files
- contrib/ — 8 files
- .project/ — 4 files
- .github/ — 2 files
- .circleci/ — 1 files

Probable source entrypoint: `main.go` (inferred from the tree, not upstream docs)

## Source layout — cmd/

- cmd/internal/ — 1 file
- cmd/testdata/ — 25 files
- cmd/tool/ — 7 files
- cmd/flags.go — 1 file
- cmd/flags_test.go — 1 file
- cmd/handler.go — 1 file
- cmd/handler_test.go — 1 file
- cmd/main.go — 1 file
- cmd/main_e2e_test.go — 1 file
- cmd/main_test.go — 1 file
- cmd/rerunfails.go — 1 file
- cmd/rerunfails_test.go — 1 file
- cmd/watch.go — 1 file

## Package

- go.mod: gotest.tools/gotestsum — 0 declared dependencies

## Structural health signals

Average score 9.8/10 across 67 files; 0 hotspots. These are deterministic review leads, not proof of a bug.

## Recent history

- 3cf14356a16c (2026-04-14) Merge pull request #563 from alexandear-org/refactor/remove-unused-go-version
- c4163c359334 (2026-04-10) Remove unused Go version checks and related test data
- 06f60b324991 (2025-09-16) Merge pull request #528 from alebcay/configurable-version
- 47842dbc0c69 (2025-09-11) Allow version to be configured at build time
- c4a0df2e75a2 (2025-09-10) Merge pull request #526 from gotestyourself/dependabot/go_modules/golang.org/x/sync-0.17.0

## Overview

gotestsum is a Go test runner and reporting CLI for local development and CI. It wraps go test -json, turns test events into configurable terminal output and summaries, and exports JSON or JUnit reports. Its distinctive capabilities include targeted failure reruns, file watching with debugger shortcuts, slow-test analysis and source rewriting, and timing-based CI matrix generation.

## System map

The executable is a thin router over the main test-running command and two analysis tools. Test execution crosses a subprocess boundary, while parsing and reporting operate on an in-memory Execution model. Integration centers on terminal output, report files, executable hooks, and filesystem notifications. Build and release definitions describe a portable CLI binary rather than a hosted service.
- main calls route(os.Args), preserves errors implementing ExitCode(), and exits with status 3 for other command errors. — [main.go#L13-L38](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/main.go#L13-L38) [cmd/main.go#L481-L501](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/main.go#L481-L501)
- toolRun dispatches slowest and ci-matrix explicitly; help and ? are handled by both the root router and tool router. — [main.go#L28-L38](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/main.go#L28-L38) [main.go#L53-L77](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/main.go#L53-L77)
- cmd.Run owns flag parsing, logging setup, build-version reporting, watch dispatch, and ordinary execution. — [cmd/main.go#L24-L50](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/main.go#L24-L50)
- The module declares Go 1.24.0 and dependencies for flags, colors, filesystem notifications, shell-like argument splitting, concurrent scanning, and Go package loading. — [go.mod#L1-L16](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/go.mod#L1-L16)
- testjson exposes ScanTestOutput, ScanConfig, and EventHandler; Execution owns package maps and a separately locked error list. — [testjson/doc.go#L2-L20](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/testjson/doc.go#L2-L20) [testjson/execution.go#L373-L383](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/testjson/execution.go#L373-L383) [testjson/execution.go#L729-L765](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/testjson/execution.go#L729-L765)
- cmd's event handler bridges parsed events to terminal formatters and JSON files; final JUnit generation is delegated to internal/junitxml. — [cmd/handler.go#L16-L56](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/handler.go#L16-L56) [cmd/handler.go#L136-L157](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/handler.go#L136-L157)
- ./do provides binary, binary-static, lint, and golden-update tasks; GitHub Actions builds the executable and uses it to run the repository with race detection. — [do#L6-L22](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/do#L6-L22) [.github/workflows/ci.yaml#L23-L28](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/.github/workflows/ci.yaml#L23-L28)
- GoReleaser builds CGO-disabled binaries for five operating systems and multiple architectures, embeds cmd.version, and defines checksums; CircleCI publishes on matching version tags. — [.project/goreleaser.yml#L9-L24](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/.project/goreleaser.yml#L9-L24) [.project/goreleaser.yml#L49-L50](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/.project/goreleaser.yml#L49-L50) [.circleci/config.yml#L16-L21](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/.circleci/config.yml#L16-L21) [.circleci/config.yml#L62-L75](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/.circleci/config.yml#L62-L75)

## Feature catalog

The primary feature is configurable presentation of Go test events with a final failure-oriented summary. Automation features export reports, retry failed tests, limit failures, and invoke external commands. Local workflows include file watching, debugger integration, and desktop notification examples. Two tool commands consume historical event data for slow-test analysis and CI partition planning.
- NewEventFormatter supports package, test-name, testdox, dots, standard quiet/verbose/JSON, GitHub Actions, debug, and none formats, including compatibility aliases. — [testjson/format.go#L423-L454](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/testjson/format.go#L423-L454)
- --format-icons selects default, hivis, text, codicons, octicons, or emoticons; --format-hide-empty-pkg applies to supported compact formats, and --no-color controls global color output. — [cmd/main.go#L68-L90](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/main.go#L68-L90) [testjson/format.go#L278-L322](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/testjson/format.go#L278-L322) [cmd/main.go#L272-L277](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/main.go#L272-L277)
- --hide-summary selectively hides skipped, failed, errors, or output sections; PrintSummary still prints the final test-count and elapsed-time line. — [cmd/flags.go#L30-L43](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/flags.go#L30-L43) [testjson/summary.go#L67-L89](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/testjson/summary.go#L67-L89)
- --jsonfile records raw events, --jsonfile-timing-events records terminal events, and --junitfile supports project naming, name/classname formatting, and empty/skipped filtering. — [cmd/main.go#L84-L89](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/main.go#L84-L89) [cmd/main.go#L108-L123](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/main.go#L108-L123) [cmd/handler.go#L38-L46](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/handler.go#L38-L46)
- --rerun-fails defaults to two reruns when supplied without a value, limits initial failures to ten by default, supports root-test reruns and a report file, and optionally aborts on data races; --max-fails stops scanning at a failure threshold. — [cmd/main.go#L105-L106](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/main.go#L105-L106) [cmd/main.go#L125-L137](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/main.go#L125-L137) [cmd/handler.go#L53-L55](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/handler.go#L53-L55)
- --raw-command runs a supplied executable instead of prepending go test; documented uses include stdin replay and compiled test binaries through test2json, with GOVERSION available when Go is absent. — [cmd/main.go#L350-L366](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/main.go#L350-L366) [README.md#L283-L285](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/README.md#L283-L285) [README.md#L312-L332](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/README.md#L312-L332) [.project/docs/running-without-go.md#L26-L32](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/.project/docs/running-without-go.md#L26-L32)
- --watch reruns changed packages, supports screen clearing and per-package working directories, and offers Unix r/d/a/l/u shortcuts; post-run hooks can invoke notification examples backed by platform-specific executables. — [cmd/main.go#L97-L104](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/main.go#L97-L104) [internal/filewatcher/term_unix.go#L84-L107](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/internal/filewatcher/term_unix.go#L84-L107) [cmd/watch.go#L45-L59](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/watch.go#L45-L59) [README.md#L160-L174](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/README.md#L160-L174)
- tool slowest prints median-based slow-test timings or inserts --skip-stmt into source; tool ci-matrix reads package names from stdin and timing-file globs to emit a GitHub Actions matrix. — [cmd/tool/slowest/slowest.go#L118-L133](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/tool/slowest/slowest.go#L118-L133) [internal/aggregate/slowest.go#L10-L39](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/internal/aggregate/slowest.go#L10-L39) [cmd/tool/matrix/matrix.go#L60-L71](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/tool/matrix/matrix.go#L60-L71) [cmd/tool/matrix/matrix.go#L92-L109](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/tool/matrix/matrix.go#L92-L109)

## Data flow

Arguments and environment defaults determine the executable, package selectors, formatter, and report destinations. Subprocess stdout supplies JSON events while stderr supplies displayed diagnostics and selected execution errors. Execution accumulates test state before handlers render or persist events. Reports and analysis tools reuse this event model, but raw JSON persistence and synthesized state have different contents.
- setupFlags disables interspersed parsing; cmd.Run stores remaining arguments for the child, and package selection prioritizes rerun package, --packages, TEST_DIRECTORY, then a supplied default. — [cmd/main.go#L24-L34](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/main.go#L24-L34) [cmd/main.go#L62-L64](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/main.go#L62-L64) [cmd/main.go#L390-L400](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/main.go#L390-L400)
- startGoTest connects inherited stdin, captures stdout/stderr pipes, applies an optional child working directory, and starts the executable using exec.CommandContext. — [cmd/main.go#L450-L478](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/main.go#L450-L478)
- ScanTestOutput reads stdout and stderr in two errgroup goroutines; readStdout attaches RunID and updates Execution before invoking Handler.Event. — [testjson/execution.go#L778-L799](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/testjson/execution.go#L778-L799) [testjson/execution.go#L810-L833](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/testjson/execution.go#L810-L833)
- Execution routes build-output into errors, package events into Package.addEvent, and named test events into Package.addTestEvent; test instances receive package-local IDs, RunID, timestamps, and attributes. — [testjson/execution.go#L385-L414](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/testjson/execution.go#L385-L414) [testjson/execution.go#L435-L483](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/testjson/execution.go#L435-L483)
- Output is indexed by test ID with package output at ID 0; successful root tests release output, while subtest and skipped-output retention supports attribution workarounds. — [testjson/execution.go#L91-L98](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/testjson/execution.go#L91-L98) [testjson/execution.go#L187-L212](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/testjson/execution.go#L187-L212) [testjson/execution.go#L243-L251](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/testjson/execution.go#L243-L251) [testjson/execution.go#L507-L518](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/testjson/execution.go#L507-L518)
- Err receives stderr before filtering; module-download messages, GODEBUG cache messages, and warning-prefixed lines are excluded from Execution.Errors, while other lines are retained. — [testjson/execution.go#L841-L891](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/testjson/execution.go#L841-L891)
- eventHandler writes original JSON bytes before formatting, excludes artificial events with empty bytes, syncs logs before finishRun, and supplies report paths plus execution counts to postRunHook. — [cmd/handler.go#L38-L81](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/handler.go#L38-L81) [cmd/main.go#L304-L315](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/main.go#L304-L315) [cmd/handler.go#L160-L180](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/handler.go#L160-L180)
- ci-matrix scans each matched report into package elapsed times, selects the nearest-rank 85th percentile, greedily assigns packages to the least-loaded bucket, and serializes include entries with estimatedRuntime and package strings. — [cmd/tool/matrix/matrix.go#L146-L181](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/tool/matrix/matrix.go#L146-L181) [cmd/tool/matrix/matrix.go#L190-L218](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/tool/matrix/matrix.go#L190-L218) [cmd/tool/matrix/matrix.go#L226-L263](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/tool/matrix/matrix.go#L226-L263)

## Behavior traces

Source inspection followed startup and ordinary execution, targeted reruns, report persistence, watch-triggered execution, and both analysis tools. The normal path separates stream scanning from process waiting and final reporting. Reruns preserve historical Execution state while tracking only current retry failures for continuation. Watch mode follows its own execution path and therefore has different option behavior.
- Startup follows main → route → cmd.Run → setupFlags → Parse → setupLogging; version requests return early, watch requests call runWatcher, and other requests call run. — [main.go#L13-L38](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/main.go#L13-L38) [cmd/main.go#L24-L50](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/main.go#L24-L50)
- Ordinary execution follows run → Validate → goTestCmdArgs → startGoTestFn → newEventHandler → ScanTestOutput → Flush → Wait; without arguments it constructs go test -json with ./... unless package selection overrides it. — [cmd/main.go#L279-L315](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/main.go#L279-L315) [cmd/main.go#L350-L366](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/main.go#L350-L366) [cmd/main.go#L390-L400](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/main.go#L390-L400)
- Malformed stdout normally causes readStdout to fail and stopOnError to cancel the child; ignore mode forwards malformed lines to Err, while FAIL-prefixed bad events are handled by a separate continue branch. — [testjson/execution.go#L802-L837](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/testjson/execution.go#L802-L837) [testjson/execution.go#L894-L907](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/testjson/execution.go#L894-L907)
- After a failed initial process, run checks hasErrors and the initial failure limit, then rerunFailed filters failures, builds escaped anchored -test.run expressions, starts each retry, scans into shared Execution with a new RunID, and records remaining failures. — [cmd/main.go#L317-L335](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/main.go#L317-L335) [cmd/rerunfails.go#L54-L92](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/rerunfails.go#L54-L92) [cmd/rerunfails.go#L98-L108](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/rerunfails.go#L98-L108) [cmd/rerunfails.go#L128-L156](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/rerunfails.go#L128-L156)
- Persistence completes through handler.Flush → finishRun → PrintSummary → writeJUnitFile → junitxml.Write → postRunHook; JUnit or hook errors replace the pending process error, otherwise finishRun returns it. — [cmd/main.go#L304-L315](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/main.go#L304-L315) [cmd/main.go#L338-L347](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/main.go#L338-L347) [cmd/handler.go#L136-L181](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/handler.go#L136-L181) [internal/junitxml/report.go#L95-L100](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/internal/junitxml/report.go#L95-L100)
- Watch execution follows runWatcher → filewatcher.Watch → loadPaths → handleEvent → runTests → watchRuns.run → runSingle; changed .go paths trigger package runs, and watch-chdir sets the child directory and selector ./. — [cmd/watch.go#L14-L19](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/watch.go#L14-L19) [internal/filewatcher/watch.go#L41-L63](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/internal/filewatcher/watch.go#L41-L63) [internal/filewatcher/watch.go#L244-L276](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/internal/filewatcher/watch.go#L244-L276) [cmd/watch.go#L45-L95](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/watch.go#L45-L95)
- Slow-test analysis follows slowest.Run → run → jsonfileReader → ScanTestOutput → aggregate.Slowest; --skip-stmt adds parseSkipStatement → writeTestSkip → packages.Load → rewriteAST → writeFile instead of printing. — [cmd/tool/slowest/slowest.go#L15-L25](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/tool/slowest/slowest.go#L15-L25) [cmd/tool/slowest/slowest.go#L104-L144](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/tool/slowest/slowest.go#L104-L144) [cmd/tool/slowest/ast.go#L17-L53](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/tool/slowest/ast.go#L17-L53) [cmd/tool/slowest/ast.go#L64-L74](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/tool/slowest/ast.go#L64-L74)
- Matrix generation follows matrix.Run → run → readPackages → readTimingReports → packageTiming → packagePercentile → bucketPackages → writeMatrix; fewer than two partitions or an empty timing pattern fails before reading inputs. — [cmd/tool/matrix/matrix.go#L20-L31](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/tool/matrix/matrix.go#L20-L31) [cmd/tool/matrix/matrix.go#L80-L109](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/tool/matrix/matrix.go#L80-L109)

## Testing signals

Tests and CI were inspected, not executed; no passing result is asserted. The inspected suite uses Go testing with gotest.tools assertions, golden files, filesystem fixtures, subprocess helpers, and go-cmp. It combines event-log regressions with selected real subprocess and filesystem integration tests. Coverage observations are bounded to the files examined, and platform exclusions or short-mode skips materially limit some paths.
- cmd's integration suite uses testing, gotest.tools/v3 assert/env/fs/golden/icmd/poll/skip, while event-state tests additionally use go-cmp; these declarations and assertions were inspected only. — [cmd/main_e2e_test.go#L3-L20](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/main_e2e_test.go#L3-L20) [testjson/execution_test.go#L3-L14](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/testjson/execution_test.go#L3-L14)
- execution_test.go exercises minimal scanning, Stop invocation on handler error, raw-event parsing, synthesized missing failures, non-JSON tolerance, and GODEBUG filtering. — [testjson/execution_test.go#L40-L93](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/testjson/execution_test.go#L40-L93) [testjson/execution_test.go#L160-L236](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/testjson/execution_test.go#L160-L236)
- Formatter tests replay stored stdout/stderr through fakeHandler and compare golden output; fixtures are documented as generated from tagged test packages, with coverage, shuffle, panic, and timeout variants. — [testjson/format_test.go#L12-L38](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/testjson/format_test.go#L12-L38) [testjson/format_test.go#L66-L85](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/testjson/format_test.go#L66-L85)
- cmd tests cover failure-limit rejection, build-error and panic rerun guards, stdin replay, pre-hook JSON synchronization, and timing-only JSON output; the synchronization test skips Windows. — [cmd/main_test.go#L340-L405](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/main_test.go#L340-L405) [cmd/main_test.go#L412-L479](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/main_test.go#L412-L479) [cmd/main_test.go#L482-L551](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/main_test.go#L482-L551)
- Rerun integration cases exercise eventual success, continued failure, and build-error aborts; short mode skips them, and the interrupt test skips Windows while asserting exit status 130. — [cmd/main_e2e_test.go#L29-L104](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/main_e2e_test.go#L29-L104) [cmd/main_e2e_test.go#L150-L191](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/main_e2e_test.go#L150-L191)
- JUnit tests use deterministic timestamps and GOVERSION for golden comparisons of ordinary output, empty-package filtering, skipped-test filtering, and test attributes. — [internal/junitxml/report_test.go#L18-L84](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/internal/junitxml/report_test.go#L18-L84)
- Unix Watch integration checks filesystem-triggered events and a/r/d/u controls without running actual test subprocesses; matrix tests cover percentile/bucketing and serialized output, while the inspected slowest tests cover help and the preset statement rather than end-to-end rewriting. — [internal/filewatcher/watch_unix_test.go#L18-L87](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/internal/filewatcher/watch_unix_test.go#L18-L87) [cmd/tool/matrix/matrix_test.go#L18-L71](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/tool/matrix/matrix_test.go#L18-L71) [cmd/tool/matrix/matrix_test.go#L176-L221](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/tool/matrix/matrix_test.go#L176-L221) [cmd/tool/slowest/ast_test.go#L12-L21](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/tool/slowest/ast_test.go#L12-L21)
- Inspected GitHub Actions runs build plus race-enabled tests across stable/oldstable Go on Linux, Windows, and macOS; CircleCI defines lint and release builds. Their configuration is evidence of intended checks, not executed CI success. — [.github/workflows/ci.yaml#L7-L28](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/.github/workflows/ci.yaml#L7-L28) [.circleci/config.yml#L47-L75](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/.circleci/config.yml#L47-L75) [.circleci/config.yml#L78-L95](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/.circleci/config.yml#L78-L95)

## Risk map

Security-sensitive boundaries are primarily local executable invocation and user-selected filesystem paths. Source observations identify report truncation, scanner limits, mutable reporting state, and differences between ordinary and watch execution. Release tooling also downloads external programs or scripts. These are source-level observations and explicitly labeled hypotheses, not confirmed vulnerabilities or runtime reproductions.
- Raw commands, hooks, and Delve execute user-selected or PATH-resolved programs with local process privileges; hooks inherit os.Environ, and commandValue uses shlex.Split without automatically invoking a shell. — [cmd/main.go#L450-L457](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/main.go#L450-L457) [cmd/flags.go#L99-L103](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/flags.go#L99-L103) [cmd/handler.go#L160-L180](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/handler.go#L160-L180) [cmd/watch.go#L125-L138](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/watch.go#L125-L138)
- JSON, timing, JUnit, and rerun-report paths are passed to os.Create, which truncates existing files; the inspected writers do not constrain destinations to the repository root. — [cmd/handler.go#L118-L141](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/handler.go#L118-L141) [cmd/rerunfails.go#L196-L203](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/rerunfails.go#L196-L203)
- --skip-stmt rewrites package-loader source paths directly with os.Create, promotes slow subtests to root functions, and does not add imports; earlier file writes can precede a final missing-test error. — [cmd/tool/slowest/ast.go#L41-L53](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/tool/slowest/ast.go#L41-L53) [cmd/tool/slowest/ast.go#L64-L74](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/tool/slowest/ast.go#L64-L74) [cmd/tool/slowest/ast.go#L117-L138](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/tool/slowest/ast.go#L117-L138) [cmd/tool/slowest/slowest.go#L83-L84](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/tool/slowest/slowest.go#L83-L84)
- Both stream readers use bufio.NewScanner without increasing its token buffer; sufficiently large event or diagnostic lines can therefore terminate scanning with the wrapped scanner error. — [testjson/execution.go#L810-L837](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/testjson/execution.go#L810-L837) [testjson/execution.go#L841-L858](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/testjson/execution.go#L841-L858)
- JUnit HideSkippedTests mutates each Execution-owned Package by decrementing Total and clearing Skipped; because the hook runs afterward, its TESTS_TOTAL and TESTS_SKIPPED can reflect filtered state rather than the summary printed earlier. — [internal/junitxml/report.go#L124-L133](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/internal/junitxml/report.go#L124-L133) [testjson/execution.go#L561-L564](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/testjson/execution.go#L561-L564) [cmd/main.go#L338-L345](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/main.go#L338-L345) [cmd/handler.go#L175-L179](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/handler.go#L175-L179)
- Hypothesis: handler initialization errors deserve process/resource-cleanup review because run starts the child before creating the handler, returns before Wait on initialization failure, and defers handler.Close only after successful creation. (inferred) — [cmd/main.go#L287-L296](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/main.go#L287-L296) [cmd/handler.go#L118-L131](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/handler.go#L118-L131)
- Watch runSingle explicitly lacks rerun-fails support and omits IgnoreNonJSONOutputLines and the ordinary signal-derived exit-code branch; Unix Watch tests exclude Windows, whose terminal adapter disables shortcuts. — [cmd/watch.go#L62-L95](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/watch.go#L62-L95) [cmd/main.go#L297-L315](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/main.go#L297-L315) [internal/filewatcher/watch_unix_test.go#L1-L2](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/internal/filewatcher/watch_unix_test.go#L1-L2) [internal/filewatcher/term_windows.go#L5-L19](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/internal/filewatcher/term_windows.go#L5-L19)
- CircleCI verifies the downloaded GoReleaser archive checksum but pipes a remote lint installer into sh; the development Dockerfile also uses a remote installer and defaults to Go 1.18 despite go.mod requiring 1.24.0. — [.circleci/config.yml#L35-L42](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/.circleci/config.yml#L35-L42) [.circleci/config.yml#L85-L95](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/.circleci/config.yml#L85-L95) [.project/Dockerfile#L2-L15](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/.project/Dockerfile#L2-L15) [go.mod#L1-L3](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/go.mod#L1-L3)

## Extension points

Extension mechanisms are explicit Go interfaces, factories, and command switches. The reusable event parser allows callers to provide readers, callbacks, cancellation, and existing execution state. Reporting and automation extensions fit through formatters, JUnit configuration, and post-run executables. New commands require direct router and help integration.
- Add a tool command through main.toolRun's dispatch switch and usage text, following the existing Run(name, args) interface used by slowest and matrix. — [main.go#L53-L77](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/main.go#L53-L77) [cmd/tool/slowest/slowest.go#L15-L25](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/tool/slowest/slowest.go#L15-L25) [cmd/tool/matrix/matrix.go#L20-L31](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/tool/matrix/matrix.go#L20-L31)
- New terminal formats plug into EventFormatter.Format and NewEventFormatter's explicit factory switch; unknown names return nil and become a command error. — [testjson/format.go#L404-L454](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/testjson/format.go#L404-L454) [cmd/handler.go#L100-L104](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/handler.go#L100-L104)
- EventHandler.Event and Err support custom consumers, with an Event error stopping scanning; ScanConfig accepts custom readers, Stop callbacks, RunID, and an existing Execution. — [testjson/execution.go#L729-L758](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/testjson/execution.go#L729-L758) [testjson/execution.go#L802-L805](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/testjson/execution.go#L802-L805)
- A caller can omit Handler and Stderr for standalone log parsing; ScanTestOutput supplies a no-op handler and empty stderr reader. — [testjson/doc.go#L7-L20](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/testjson/doc.go#L7-L20) [testjson/execution.go#L765-L776](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/testjson/execution.go#L765-L776)
- JUnit Config accepts FormatFunc callbacks for suite names and testcase classnames, with identity defaults; CLI full/relative/short options adapt these callbacks. — [internal/junitxml/report.go#L80-L93](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/internal/junitxml/report.go#L80-L93) [internal/junitxml/report.go#L153-L163](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/internal/junitxml/report.go#L153-L163) [cmd/flags.go#L55-L72](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/flags.go#L55-L72)
- --post-run-command integrates external automation through argument parsing, output writers, report paths, elapsed time, and TESTS_* counters; notification examples consume those counters. — [cmd/flags.go#L90-L114](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/flags.go#L90-L114) [cmd/handler.go#L160-L181](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/handler.go#L160-L181) [contrib/notify/notify_linux.go#L11-L15](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/contrib/notify/notify_linux.go#L11-L15) [contrib/notify/notify_linux.go#L50-L56](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/contrib/notify/notify_linux.go#L50-L56)
- filewatcher.Watch accepts a run(Event) callback, separating filesystem/keyboard event detection from command execution; Event carries package path, appended arguments, and debug mode. — [internal/filewatcher/watch.go#L21-L41](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/internal/filewatcher/watch.go#L21-L41) [cmd/watch.go#L14-L19](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/watch.go#L14-L19)
- ByElapsed accepts a timing-reduction function, slowest supports custom parsed Go statements, and rerunFailsFilter selects either root cases or FilterFailedUnique; these are concrete policy seams for aggregation, rewriting, and retries. — [internal/aggregate/slowest.go#L42-L63](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/internal/aggregate/slowest.go#L42-L63) [cmd/tool/slowest/ast.go#L77-L93](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/tool/slowest/ast.go#L77-L93) [cmd/rerunfails.go#L37-L51](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/rerunfails.go#L37-L51)

## Contributor handoff

Begin with the executable router, command lifecycle, event model, and handler boundaries before changing behavior. Preserve test-instance identity, compatibility workarounds, and distinctions between raw event logs and synthesized failures. Tests and CI were inspected, not executed; future execution requires authorization beyond this read-only investigation. Use the bounded evidence here as navigation, then inspect the affected implementation and adjacent tests.
- Read README.md, go.mod, main.go, cmd/main.go, cmd/handler.go, and testjson/execution.go first to establish user contracts, toolchain requirements, routing, execution ordering, and event state. — [README.md#L15-L34](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/README.md#L15-L34) [go.mod#L1-L16](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/go.mod#L1-L16) [main.go#L28-L38](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/main.go#L28-L38) [cmd/main.go#L279-L347](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/main.go#L279-L347)
- Keep flag changes aligned with setupFlags, options.Validate, and child argument construction; reruns with forwarded Go arguments require --packages, and -(test.)failfast is rejected. — [cmd/main.go#L53-L64](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/main.go#L53-L64) [cmd/main.go#L223-L235](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/main.go#L223-L235) [cmd/main.go#L350-L387](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/main.go#L350-L387)
- Preserve ID and RunID semantics for repeated tests and reruns; JSON export uses original event bytes, so synthetic EOF failures appear in state and summaries but are deliberately omitted from JSON files. — [testjson/execution.go#L280-L305](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/testjson/execution.go#L280-L305) [testjson/execution.go#L334-L352](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/testjson/execution.go#L334-L352) [cmd/handler.go#L59-L68](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/handler.go#L59-L68)
- Treat EventHandler callbacks as potentially concurrent: ScanTestOutput launches stdout and stderr readers separately, and Execution protects its error list with a mutex. — [testjson/execution.go#L785-L791](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/testjson/execution.go#L785-L791) [testjson/execution.go#L667-L681](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/testjson/execution.go#L667-L681)
- Review both run and runSingle when changing lifecycle or option propagation; watch execution is a documented copy without retry support, and Windows keyboard handling differs from Unix. — [cmd/watch.go#L62-L95](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/watch.go#L62-L95) [cmd/main.go#L279-L335](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/main.go#L279-L335) [internal/filewatcher/term_windows.go#L5-L19](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/internal/filewatcher/term_windows.go#L5-L19)
- For separately authorized validation, target the affected Go package first, then consider CI's build and ./gotestsum -f testname -- ./... -race -count=1 sequence; this investigation inspected those tests and CI definitions without executing them. — [.github/workflows/ci.yaml#L23-L28](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/.github/workflows/ci.yaml#L23-L28) [cmd/main_e2e_test.go#L29-L32](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/main_e2e_test.go#L29-L32) [testjson/execution_test.go#L40-L60](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/testjson/execution_test.go#L40-L60)
- Golden fixtures encode output contracts, and ./do update-golden writes expected results; slowest's --skip-stmt also writes source, so neither belongs in a read-only verification pass. — [testjson/format_test.go#L74-L81](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/testjson/format_test.go#L74-L81) [do#L16-L18](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/do#L16-L18) [cmd/tool/slowest/ast.go#L64-L74](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/tool/slowest/ast.go#L64-L74)
- Resolve documentation drift from implementation: README lists GOTESTSUM_FORMAT among hook variables, but postRunHook does not explicitly inject it; Docker's default Go version also predates the module directive. — [README.md#L139-L151](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/README.md#L139-L151) [cmd/handler.go#L170-L180](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/handler.go#L170-L180) [.project/Dockerfile#L2-L3](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/.project/Dockerfile#L2-L3) [go.mod#L1-L3](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/go.mod#L1-L3)

Source repository: https://github.com/gotestyourself/gotestsum
Full evidence corpus: https://github.com/Codevetter/codevetter/tree/main/benchmarks/repo-unpacks/gotestsum.json

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
