Standardizes Go test assertions on github.com/stretchr/testify. Across
all 172 test files, t.Fatal* maps to require.X (halts on failure) and
t.Error* maps to assert.X (continues on failure). Equality follows
testify's (want, got) convention.
internal/testutil/assert.go and internal/testutil/email's
AssertStringSliceEqual are removed in favor of calling testify directly.
MakeSet and other non-assertion helpers are kept.
Adds the testifyhelpercheck static analyzer (ported from middleman) to
enforce that assertion-heavy tests use local helpers (assert :=
assert.New(t), require := require.New(t)). All migrated tests are
refactored to satisfy this check: 798 scopes across 138 files have
helpers added, 5133 direct calls drop the t argument. Imports are
aliased to assertpkg/requirepkg to avoid package-vs-variable shadowing
in nested closures. The analyzer is wired into make lint-ci so CI
enforces the convention.
CLAUDE.md and AGENTS.md document testify as the standard. The nix
vendorHash is updated to match the new go.sum.
Summary
Standardizes Go tests on
github.com/stretchr/testify. All 172 test files now useassert.X/require.Xinstead oft.Errorf/t.Fatalf.What changed
t.Fatal*mapped torequire.X(halts on failure).t.Error*mapped toassert.X(continues on failure).(want, got)per testify convention.internal/testutil/assert.go(AssertEqual,MustNoErr, etc.) removed;MakeSetkept.internal/testutil/email/email.go::AssertStringSliceEqualremoved (unused after migration).testifypromoted to a direct dependency ingo.mod.CLAUDE.mdgains a## Testingsection documenting the convention.AGENTS.mdat the repo root reiterates the same rule for any AI coding agent.Coverage
Production-code coverage is unchanged. Total moves 56.8% → 57.0% (improvement comes from testutil helpers whose error branches are no longer uncovered). 46/46 packages pass; same set as before.
How to use
New tests:
Build tags
fts5 sqlite_vecare still required forgo test;make testsets them.