CodeVetter · Repo Unpack · Contributor handoff
gotestyourself/gotestsum
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.
- Keep flag changes aligned with setupFlags, options.Validate, and child argument construction; reruns with forwarded Go arguments require --packages, and -(test.)failfast is rejected.
- 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.
- Treat EventHandler callbacks as potentially concurrent: ScanTestOutput launches stdout and stderr readers separately, and Execution protects its error list with a mutex.
- 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.
- 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.
- 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.
- 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.