Skip to content

[feat] covcheck + footprint: test-coverage and binary-size gates#6

Merged
vt128 merged 1 commit into
masterfrom
feat/covcheck-footprint-gates
Jun 15, 2026
Merged

[feat] covcheck + footprint: test-coverage and binary-size gates#6
vt128 merged 1 commit into
masterfrom
feat/covcheck-footprint-gates

Conversation

@vt128

@vt128 vt128 commented Jun 15, 2026

Copy link
Copy Markdown
Member

What

Completes the trio of shared gate tools in meta, so every starpkg module enforces the same three standards from one central place:

Standard Tool Status
Doc coverage doccov merged (#5)
Test coverage covcheck this PR
Binary footprint footprint this PR

covcheck/

Parses the make ci coverage profile (coverage.txt), computes total statement coverage (same math as go tool cover -func), and fails below -min. Stdlib only. Used as a per-repo ratchet floor (each repo's cov-min set 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). -json emits a shields.io endpoint badge; -max-mb gates against silent dependency bloat.

go-ci.yml

New opt-in inputs on the coverage (floor) leg:

  • cov-min (number, gated on >0) → covcheck ratchet gate
  • footprint (bool) + footprint-max-mb (number) → footprint badge + bloat gate

Codecov upload stays for the dashboard + README coverage badge. Defaults keep core libs unaffected (chicken-egg avoided: the @master steps only run when a caller opts in).

selftest.yml

The meta-tools job runs go test -race ./... (doccov + covcheck + footprint).

Validation

  • go test -race ./... green for all three tools.
  • covcheck: cmd 80.7% (fails at -min 90).
  • footprint: sqlite +4.8 MB stripped (+53%) over a bare starlet host.

Rollout (next, per repo)

Set the ratchet cov-min, enable footprint + footprint-max-mb, and add the footprint + coverage badges to each README.

🤖 Generated with Claude Code

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>
@vt128 vt128 merged commit ad6a22e into master Jun 15, 2026
10 checks passed
@vt128 vt128 deleted the feat/covcheck-footprint-gates branch June 15, 2026 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant