Changelog
Nothing yet.
v3.4.0 — 2026-08-05
Section titled “v3.4.0 — 2026-08-05”FilterDetailedAndContentAPI — LikeFilterDetailedbut also returns the file content read during phase-2 detection. Content isnilwhen no read occurred (disabled filter, include/exclude pattern match, phase-1 filename match, or no content-check detectors enabled). When non-nil, the content was read exactly once from the filter’s filesystem and can be reused by callers for post-detection logic (e.g., classifying aReasonGenerichit into a specific generator category) without a double-read. Purely additive; no breaking changes to existing methods.
v3.3.3 — 2026-08-05
Section titled “v3.3.3 — 2026-08-05”- Content-only detection for filename-gated generators — SQLC, Templ, GoEnum, and Protobuf detectors had filename gates baked into their
checkContentfunctions, making phase-2 content detection ineffective for files with non-standard names (e.g., a sqlc-generatedrepository.goinstead ofmodels.go). Content-only wrappers (checkSQLCContent,checkTemplContent,checkGoEnumContent,checkProtobufContent) now use specific generation comment markers ("Code generated by sqlc","Code generated by templ", etc.). The publicIs*Generatedfunctions remain filename-gated for backward compatibility. flake.nixpackage description — Corrected from “Go struct field filter code generator” (copy-paste error from an unrelated project) to “Go library for detecting and filtering auto-generated code files”.
- Dynamic Open Graph image generation — Per-page OG images via
astro-og-canvasat/og/[...slug]. - Content-only detection test suite —
filter_content_only_test.goverifying misnamed generated files are caught by content, publicIs*Generatedfunctions still require correct filenames, and content-only checks produce no false positives on regular code.
Changed
Section titled “Changed”- Generator docs alignment — Updated templ and protobuf content detection descriptions in
generators.mdxto match actual markers (Code generated by templ,Code generated by protoc-gen-go) instead of generic patterns.
v3.3.2 — 2026-07-26
Section titled “v3.3.2 — 2026-07-26”- RELEASING.md — Full release runbook: quality gates, CHANGELOG sync, version bump, tag, push, verify, rollback procedure.
- Color system ADR (
docs/adr/001-color-system.md) — Decision record for the warm-stone + 3-color accent system (cyan/amber/emerald), WCAG AA contrast decisions, and a step-by-step guide for adding new accent colors. - Gendocs integration test (
cmd/gendocs/integration_test.go) — End-to-end test runninggo generate ./..., verifying all 5 output files contain expected content, and checking idempotency viagit diff --exit-code. - Gendocs unit tests — Idempotency proofs (
TestReplaceSectionIsIdempotent,TestReplaceSectionInlineIsIdempotent) and phantom-column regression guard (TestGeneratedTablesHaveNoPhantomColumns). - Markdown link checker (
scripts/check-markdown-links.py) — Validates all internal (relative) markdown links repo-wide; wired into CI as a quality gate. markdownRowhelper in gendocs — Joins table cells with proper pipe escaping, structurally preventing the||phantom-column bug at the helper level.formatMarkdownTablehelper in gendocs — Dynamic column-width calculation for all 4 markdown table outputs, replacing 3 hardcoded width constants (mdxNameWidth,mdxFilenameWidth,detectionFuncWidth).stripEmptyScriptHash()in CSP fix script — Removes the SHA-256 hash of an empty string fromscript-src(generated internally by Astro, present on all built pages).- Gendocs workflow section in CONTRIBUTING.md — Documents the
detectorstable as single source of truth, how to run gendocs, the 5 output files, and thewebsiteMetadatarequirement. - Nix flake app descriptions —
meta.descriptionon all 10 flake apps, eliminatingnix flake checkwarnings. - DOMAIN_LANGUAGE.md expanded — Added v3.2 entities (
ScanResult,GeneratedFile,Exclusion,ExclusionPattern,ScanProject,DetectReasonFile,FilterWithContent) and v3.3 entities (DetectorDoc,AllDetectorDocs,AllFilterOptions,AllFilterReasons,AllGeneratorOptions). - Archived stale planning docs — Moved
docs/planning/2026-05-*todocs/status/archive/; removed emptydocs/planning/directory.
- Broken OG image generation —
param: "slug"option wrongly removed fromOGImageRoute()during astro-og-canvas 0.13 migration; restored (was causingPrerenderDynamicEndpointPathCollidebuild error, blocking all website builds). - 3 website color-token bugs — (1)
--color-accent-dimlight mode wasrgba(8,145,178,0.1)(old accent) instead ofrgba(14,116,144,0.1)(current accent#0e7490); (2)--color-borderlight mode was cool zinc (rgba(228,228,231,...)) on a warm-stone palette, changed torgba(231,229,228,...); (3)--color-code-commentdead token (0 references outside CSS) deleted. - Newsletter CSP violation — Inline
onsubmithandler moved to Astro<script>block (bundled as external module, covered byscript-src 'self'). - Starlight meta description — Updated from stale “Detect and filter auto-generated Go code files” to current “Stop linting code no human wrote” positioning.
nix flake check— 3 latent bugs — (1) stalevendorHashaftergo.sumchange; (2) non-hermetic test (os.ReadFile("README.md")fails in Nix sandbox, fixed with//go:embed); (3)README.mdmissing fromlib.fileset.unionssource set.- Stale md-go-validator
vendorHash— Updated inflake.nixto match currentgo.sum. - Gendocs README table alignment — Tables were unaligned (cells not padded to column width);
formatMarkdownTabledynamically calculates column widths from the widest cell in each column. - Dependents page GitHub API 401 — Added 401 to rate-limit handling branch (was only catching 403); unauthenticated builds now degrade gracefully.
errorCodeMatchesrefactor — ThreeIs()methods inerrors.gonow share anerrorCodeMatches(code, target)helper that matches via theErrorCoderinterface, replacing three concrete type assertions.- Committed gendocs build binary untracked — The 3.5 MB compiled
gendocsbinary was accidentally committed to git; untracked and added to.gitignore.
Changed
Section titled “Changed”- Gendocs: all 4 table generators refactored to use
formatMarkdownTable(README generators table, README filter options table, detection.mdx per-generator table, generators.mdx detection table). - GITHUB_TOKEN wired into website CI —
npm run buildstep passesGITHUB_TOKENfor authenticated GitHub API calls on the dependents page (30 req/min vs 10 unauthenticated). - Lighthouse CI assertions — Correctness checks (errors-in-console, redirects, inspector-issues, viewport, image-aspect-ratio) upgraded from
warntoerror. - AGENTS.md policies revised — Removed “keep only 3 most recent reports” rule in favor of relevance/age-based pruning guidance; added 6 new Gotchas (Nix quality gates, sandbox testing, vendorHash maintenance, theme split-brain, astro-og-canvas param, BuildFlow auto-commit behavior).
- Markdown link checker wired into CI — New “Check internal markdown links” step in
.github/workflows/ci.yml.
v3.3.1 — 2026-07-24
Section titled “v3.3.1 — 2026-07-24”- README table consistency test (
readme_test.go) — Validates that all markdown tables in README.md have consistent column counts. Regression guard for the gendocs||phantom-column corruption that produced broken tables. - Nix flake configuration — Reproducible development environments via
flake.nixwith flake-parts architecture and treefmt-nix for formatting.
- README.md generator and filter-options tables — Rendered with phantom empty columns caused by a
||formatting bug in gendocs (cmd/gendocs/main.go). Tables now render correctly. - 3 integration tests — Failed after
testdata/templ/page_templ.gowas accidentally deleted; fixture restored from git history. - Benchmark CI workflow — Failed because
GOEXPERIMENT=jsonv2was missing (required bycmd/gendocs, which importsencoding/json/v2). - Firebase deploy in Website CI — Failed due to bash quote mangling when passing the service account JSON via
echo "${{ secrets.X }}". Switched to theenv:+printf '%s'pattern.
Changed
Section titled “Changed”- Inlined
isGeneratedByhelper — The unexportedisGeneratedBy(content, generator)function was inlined at all 5 call sites indetection.go, removing an unnecessary indirection layer. - Simplified slice construction in
scan.go—dirBasedExclusionsandExclusionPathsswitched from pre-allocated indexed assignment to idiomaticappendpattern. - Removed unused
filenameNoneconstant incmd/gendocs/main.go(dead code flagged by static analysis). - Website visual design overhaul — Three-color accent system (cyan/amber/emerald), funnel logo mark, dracula syntax highlighting theme, expanded call-to-action sections, and WCAG AA color contrast pass across all surfaces.
v3.3.0 — 2026-07-09
Section titled “v3.3.0 — 2026-07-09”AllDetectorDocs()function — Returns structured documentation metadata for all detectors, derived from thedetectorstable. Used by gendocs to generate documentation artifacts.DetectorDocstruct — Exported struct withOption,Reason,URL,FilenameDetection,ContentDetection,IsFuncName,HasFilenamePhase,HasContentPhasefields.isFuncNamefield ondetectorstruct — Records the exportedIs*Generatedfunction name for each detector, consumed by gendocs for the detection.mdx function table.doc.go— Dedicated package documentation file (standard Go convention), moved fromtypes.go.- Individual doc comments on all 21
FilterReasonconstants and all 8 sentinel error variables. - Documentation generation pipeline (
cmd/gendocs) — A Go binary that reads thedetectorstable fromdetection.goand generatesgenerators.json, README tables,generators.mdxdetection table + tool count,detection.mdxper-generator function table, anddoc.gogenerator list. Run viago generate ./.... CI enforces freshness withgit diff --exit-code. - CI docs freshness job — Fails when generated docs are stale. Runs
go generate ./...and checksgit diff --exit-codeon all generated files. websiteMetadatavalidation — gendocs fails at build time if a detector lacks website presentation data, making drift impossible when adding new generators.- Website Scan API reference page — Documents
ScanProject,ScanResult,GeneratedFile,Exclusion,ExclusionPaths,ExclusionPattern()(9 previously undocumented exported symbols). - Website API docs for
DetectReasonFile/DetectReasonFileFS,FilterWithContent/FilterDetailedWithContent,FilterResultstruct + methods,SQLCOperationtype + constants. - Missing
doc.goin 3 testdata directories (handwritten, wire, templ).
- Compile-breaking code examples — Package doc and
NewFilterexamples showedWithFilterOptionspassed inline toNewFilter, butWithFilterOptionsreturns(FilterConfig, error). All examples now show the correct two-step pattern. IsGenericGenerateddoc — Said “go generate”, actually catches any generator using the standard “Code generated by” comment.getFilenameBasedReasonWithTracedoc — Named wrong function (copy-paste error).FilterConfigtype doc — Clarified closure semantics; was misleading about error handling.- README mockgen description — Claimed
_mock.go/mock_prefix; actually_mock.gosuffix only (mock_belongs to mockery). - README gqlgen description — Claimed filename detection; actually content-only (filename matcher is
nil). - Website
SQLCConfigError.Operationtype — Documented asstring, actuallySQLCOperationsince v3.1.0. - Website
IsGqlgenGenerateddescription — Claimed filename + content; actually content-only.
Changed
Section titled “Changed”generators.ts— Rewritten from 50-line hand-maintained array to thin wrapper importing generatedgenerators.json.- README.md — Generator and filter options tables now generated between gendocs marker comments.
generators.mdx— Detection table and tool count now generated between gendocs marker comments.detection.mdx— Per-generator function table now generated between gendocs marker comments.doc.go— Generator list now generated between gendocs marker comments.- CONTRIBUTING.md — Updated “Adding a New Generator Detector” section with gendocs workflow steps.
- CI path filters — Added
website/**anddoc.goto push/PR triggers so docs freshness runs on any relevant change. .golangci.yamlGo version aligned to1.26.4(was1.26.3).- AGENTS.md Key Source Files table updated with
doc.go,scan.go, correct detector/constant counts.
v3.2.0 — 2026-06-11
Section titled “v3.2.0 — 2026-06-11”DetectReasonFile/DetectReasonFileFS— Two-phase detection in one call (filename + content)FilterWithContent/FilterDetailedWithContent— Filter methods accepting pre-read content to avoid double I/OScanProject— Walkfs.FS, detect all generated files, return structuredScanResultwith per-generator lists and exclusion patternsExclusionPattern()onFilterReason— Get regex patterns for generators with consistent filename conventions- 7 new detector entries (18 total): mockery, ent, gqlgen, easyjson, msgp, counterfeiter, go-swagger
- 7 new
Is*Generatedfunctions and 7 newFilterOption/FilterReasonconstants FilterResult.Is(reason)— Ergonomic reason checkString()onGeneratedFile,Exclusion,ScanResult— Debug/logging ergonomicsExclusionPaths()— Extract regex pattern strings from exclusions for golangci-lint
Changed
Section titled “Changed”ExclusionPattern()allocation-free — Package-level var avoids map allocation per calldetectReasonFromMapempty content guard — Skips content check when content is empty
- Absolute paths in content-based detection —
os.DirFSrejects absolute paths; addedreadFilefallback toos.ReadFile ScanProjectignored custom filesystems — Internal Filter now receivesWithFS()- mockgen/mockery prefix overlap — mockery exclusively owns
mock_prefix; mockgen only matches_mock.go - msgp
ExclusionPatternfalse positives —_gen.go$would excludewire_gen.go; removed from exclusion map
v3.1.0 — 2026-06-04
Section titled “v3.1.0 — 2026-06-04”SQLCOperationtyped constants —SQLCConfigError.Operationis nowSQLCOperationinstead ofstring, providing compile-time type safety for sqlc error handling. Five exported constants:OpSQLCFind,OpSQLCWalk,OpSQLCRead,OpSQLCCollect,OpSQLCParse.ExampleWithExcludePatterns_vendorAndTestdata— runnable example demonstrating vendor/testdata exclusion patterns.
Changed
Section titled “Changed”- Breaking:
SQLCConfigError.Operationfield type —string→SQLCOperation. Callers constructingSQLCConfigErrordirectly must useSQLCOperationconstants instead of raw strings. - Detection markers extracted to named constants — All content detection strings (
sqlcGenerateComment,templComponent,goEnumComment,mockgenGeneratorName, etc.) and filename suffixes (protobufFilenameSuffixes,sqlcCodePatternMarkers) are now named constants/vars instead of inline literals. errorPrefixFmtconstant — Branded error prefix"[gogenfilter:%s] "extracted from repeated inline format strings.filteredResult/notFilteredResultremoved — Helper functions replaced with inlineFilterResultstruct literals indetectReasonFSWithTrace.- Go 1.26.3 —
go.modupdated.
- Double-wrapped
sqlcFindError—FindSQLCConfigsreturnedsqlcFindError(path, err)which itself wrappederr, causing the same error to appear twice in the unwrap chain.
v3.0.2 — 2026-05-25
Section titled “v3.0.2 — 2026-05-25”Changed
Section titled “Changed”- Trace/non-trace detection unified —
*WithTracevariants are now canonical implementations; non-trace versions are thin wrappers. Eliminates the biggest source of code duplication. coverage_test.godissolved — Tests moved to their natural test files (errors_test.go,filter_test.go,pattern_test.go,sqlc_test.go,project_test.go).- Test string literals centralized — Repeated test constants extracted to
testhelpers/constants.goand named constants intestdata_test.go. FilterResultconstruction DRYed up —filteredResult()andnotFilteredResult()helpers eliminate repetitive struct literal construction.- Error system simplified — Removed
errorCodeDefstable,AllErrorCodes(),CodeHelp(),Helperinterface,CodeEqual[T]generic. KeptErrorCode,ErrorCoder, sentinel errors, branded prefix. - Phantom types removed —
StartPath,ConfigPath,Operation,ErrorMessagereplaced with plainstringfields. - Detection helpers unexported —
MatchesSQLCFilename,HasSQLCContent,HasSQLCCodePatterns→ unexported. UseDetectReason()orFilter. codeGeneratedPrefixmoved todetection.go— Only used there, not intypes.go.matchAnyContentPatternrenamed →matchesAnyContentPatternfor consistency.Filter.String()improved — Better debug output showing options, include, and exclude patterns.parseV1AsV2cleaned up — Removed zero-value noise from struct construction.validatableinterface removed — Dead code in production.- Plausible analytics removed from website — Tightened Content Security Policy.
- Flake configuration improved — Better nix build setup.
- Release workflow added — Tag-based GitHub release with automated tests, lint, and release notes.
- Website CI: checkout
pathparameter placement - Website CI: private repo access fallback
- Benchmark CI: missing
gh-pagesbranch - Lighthouse CI: budgets+assertions conflict
- Node.js 20 deprecation — updated
actions/setup-go@v5→@v6
v3.0.1 — 2026-05-04
Section titled “v3.0.1 — 2026-05-04”DetectReasonReader(filePath string, r io.Reader, opts ...FilterOption) (FilterReason, error)— detection from anio.ReaderFilter(filePath string) (bool, error)— replacesShouldFilterwith cleaner nameFilterResultstruct withFiltered,Reason,Path,TracefieldsFilterDetailed(filePath string) (FilterResult, error)— detailed result with trace infoFilterPathsDetailed(paths []string) ([]FilterResult, error)— batch detailed resultsAllGeneratorOptions()— enumerate detector options (excludesFilterAll)FilterResult.String()— human-readable representationFilter.FilterReasons()— returns theFilterReasonvalues this filter will detectFilter.String()— human-readable debug representation of filter state- Module path
/v3suffix for Go module convention compliance
Changed
Section titled “Changed”ShouldFilterrenamed toFilter— the methodShouldFilter(filePath string) (bool, error)is nowFilter(filePath string) (bool, error).Enabled()andDisabled()removed — filter is enabled by passing options toNewFilter();NewFilter()with no args is disabled.- Breaking:
Causefield renamed toErron all error types — follows Go stdlib convention (os.PathError.Err,net.OpError.Err). - Breaking:
FilterOption.Reason()returns(FilterReason, bool)— no panics onFilterAll. - Breaking:
WithFilterOptionsreturns(FilterConfig, error)— returns*FilterConfigErrorfor invalid options instead of panicking. - Breaking:
NewFilterreturns(*Filter, error)— useserrors.Join()to aggregate config errors. IsValid()methods derived from tables- SQLC patterns consolidated
WithFilterOptionsreusesoptionsMapslogdependency removedIsEnabled()derives state from configurationerrors.AsType[T]migration complete — Go 1.26 exclusively
- Silent misconfiguration —
NewFilter(WithFilterOptions(FilterAll))now works withoutEnabled() - Leaky
fs.FSabstraction —detectReasonFSno longer falls back toos.ReadFilefor custom filesystems - Website CI checkout path parameter placement
- Lighthouse CI budgets+assertions conflict
Removed
Section titled “Removed”- Metrics system —
Metrics,MetricsMixin,FilterStats,GetStats,FilteredBy,FilteredFiles,TotalFiltered,WithMetricsCap. Stats aggregation is the caller’s responsibility. - Phantom types —
StartPath,ConfigPath,Operation,ErrorMessage. All error struct fields are now plainstring. - Context methods —
FilterContext,FilterDetailedContext,FilterPathsContext. They promised cancellation over synchronous I/O. - Error system over-engineering —
errorCodeDefstable,AllErrorCodes(),CodeHelp(),Helperinterface,CodeEqual[T]generic,Causableinterface. - Detection helpers unexported —
MatchesSQLCFilename,HasSQLCContent,HasSQLCCodePatterns. TotalFilesCheckedphantom typeos.ReadFilefallback indetectReasonFSwarnMultipleSQLCConfigsfunction and allslogusagesqlcConfigError()bridge functionMustFilter/MustShouldFilterpanic-on-error variant- Plausible analytics
v3.0.0 — 2026-05-04
Section titled “v3.0.0 — 2026-05-04”FilterPaths(paths []string) ([]bool, error)— batch filtering; returns partial results on errorFilterConfigErrortype — returned when invalid filter options are provided; implementsErrorCoderandUnwrapErrInvalidFilterOptionsentinel error — forerrors.Is()matchingCodeInvalidFilterOptionerror code — for programmatic error handling
Changed
Section titled “Changed”- Breaking:
WithFilterOptionsreturns(FilterConfig, error)— previously panicked on invalid options - Breaking:
NewFilterreturns(*Filter, error)— previously returned*Filteronly - Breaking:
FilterConfigreturnserror— config functions now return error to support validation - Breaking:
Enabled()andDisabled()removed — filter is enabled when options are provided
- Silent misconfiguration —
NewFilter(WithFilterOptions(FilterAll))withoutEnabled()silently did nothing; now passing options automatically enables the filter
[0.1.0] — 2026-04-04
Section titled “[0.1.0] — 2026-04-04”- Initial release
- Two-phase detection: filename-based (zero I/O) then content-based
- 11 generator detectors: sqlc, templ, go-enum, protobuf, oapi-codegen, deepcopy-gen, wire, moq, mockgen, stringer, generic
- Functional options API:
WithFilterOptions(),WithFS(),WithIncludePatterns(),WithExcludePatterns() fs.FSabstraction for testing- SQLC config discovery
- Glob pattern matching with
**support - Branded error types with sentinel errors