fix: reconcile regression gate test scope with documented full-suite policy#641
Open
dennisonbertram wants to merge 1 commit into
Open
Conversation
…policy
Change PKG_PATTERNS default from ./internal/... ./cmd/... to ./... so
the regression script enforces the full-suite test policy documented in
docs/runbooks/testing.md.
- PKG_PATTERNS now defaults to ./... and is derived with go list ${PKG_PATTERNS}
- Added COVER_PKG_PATTERNS (defaults to ./internal/... ./cmd/...) so the
coverage gate stays practical on the core packages while tests run on the
full module.
- Added drift tests in internal/quality/repostructure/regression_scope_test.go
that assert the script and docs agree on scope, preventing silent drift.
Co-Authored-By: Claude <noreply@anthropic.com>
9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Reconciles the regression test gate scope with the documented full-suite policy in
docs/runbooks/testing.md.Problem
scripts/test-regression.shused hardcoded./internal/... ./cmd/...as its test scopedocs/runbooks/testing.mddocumented the regression gate as enforcinggo test ./...Solution
scripts/test-regression.sh: ChangedPKG_PATTERNSdefault from./internal/... ./cmd/...to./..., derived viago list ${PKG_PATTERNS}. Kept the variable overridable for flexibility.COVER_PKG_PATTERNS(defaults to./internal/... ./cmd/...) so the coverage gate remains practical on core packages while tests run against the full module.internal/quality/repostructure/regression_scope_test.gothat:./...go test ./...Test Results
go test ./internal/quality/repostructure -count=1-- all 6 tests PASS (including 4 new drift tests)go test ./cmd/coveragegate -count=1-- all 5 tests PASSgo test ./internal/... ./cmd/... -count=1-- all packages PASSgo test ./... -count=1-- all packages PASS./scripts/test-regression.sh--go testandgo test -racesteps PASS on full./...scope; coverage gate reports pre-existing zero-coverage functions (not caused by this change).Design Decisions
./...to match documented full-suite policy./internal/... ./cmd/...to keep the 80% threshold practicalCloses #568
🤖 Generated with Claude Code