[feat] covcheck + footprint: test-coverage and binary-size gates#6
Merged
Conversation
Adds the two remaining shared gate tools alongside doccov, so every starpkg module enforces the same three standards from one central place (meta). - covcheck/: parses the make-ci coverage profile, computes total statement coverage, fails below -min. Stdlib only. Used as a per-repo ratchet floor. - footprint/: builds a baseline starlet host vs the host + module (NewModule().LoadModule()) and reports the marginal binary size (default + stripped); -json emits a shields.io badge, -max-mb gates against bloat. - go-ci.yml: new opt-in inputs cov-min (ratchet, gated on >0), footprint, and footprint-max-mb, with steps on the coverage (floor) leg. Codecov upload stays for the dashboard/badge. - selftest.yml: the meta-tools job now runs `go test -race ./...` (doccov + covcheck + footprint). Validated locally: covcheck reports cmd 80.7% (fails at -min 90); footprint reports sqlite +4.8 MB stripped (+53%) over a bare starlet host. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
What
Completes the trio of shared gate tools in
meta, so every starpkg module enforces the same three standards from one central place:doccovcovcheckfootprintcovcheck/Parses the
make cicoverage profile (coverage.txt), computes total statement coverage (same math asgo tool cover -func), and fails below-min. Stdlib only. Used as a per-repo ratchet floor (each repo'scov-minset just below its current coverage → can only hold or improve).footprint/Builds a BASELINE (bare starlet host) vs WITH (host +
mod.NewModule().LoadModule()), so the module + its transitive SDKs link, and reports the marginal binary size (default + stripped).-jsonemits a shields.io endpoint badge;-max-mbgates against silent dependency bloat.go-ci.ymlNew opt-in inputs on the coverage (floor) leg:
cov-min(number, gated on>0) → covcheck ratchet gatefootprint(bool) +footprint-max-mb(number) → footprint badge + bloat gateCodecov upload stays for the dashboard + README coverage badge. Defaults keep core libs unaffected (chicken-egg avoided: the
@mastersteps only run when a caller opts in).selftest.ymlThe meta-tools job runs
go test -race ./...(doccov + covcheck + footprint).Validation
go test -race ./...green for all three tools.-min 90).Rollout (next, per repo)
Set the ratchet
cov-min, enablefootprint+footprint-max-mb, and add the footprint + coverage badges to each README.🤖 Generated with Claude Code