test: 11 packages ship with no test file, and the suite sits at 65.6% statement coverage #523
Labels
No labels
breaking
bug
documentation
enhancement
epic
good first issue
help wanted
refactoring
resolution/duplicate
resolution/invalid
resolution/wontfix
security
severity/critical
severity/high
severity/low
severity/medium
status/abandoned
status/blocked
status/needs-decision
status/needs-info
status/needs-verification
testing
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
sixfold-space/madtea#523
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The gap
Go's own coverage tooling answers "what do we not test". Two commands, no extra dependency:
Measured on
aed5df08(full suite green,covermode=atomic):scripts/gate.shnever builds a coverage profile, so none of this is visible in the gate or in CI. The number can drift in either direction and nothing says so.Packages with zero tests
internal/cmd/miscinternal/cmd/adrinternal/cmd/gpgkeyinternal/cmd/searchinternal/cmd/orchestrateinternal/cmd/packagesinternal/testutilinternal/cmd/openinternal/cmd/activitypubinternal/service/adr/madrinternal/cmd/serverinfointernal/testutilis test scaffolding, so it needs no tests of its own. The other ten are production code reachable from the CLI.Weakest covered packages
internal/service/issueis the one that worries me most. It is core business logic, not a thin CLI shell, and the whole issue surface sits at 0.0%:List,Create,Update,Close,Open,Comment,ListComments,EditComment,DeleteComment,ListDeps,AddDep,RemoveDep, the reaction calls, the attachment calls,Lock/Unlock, the subscription calls, andissue/develop.go:50 Develop. The package has aClientinterface built for exactly this kind of fake-backed test, so the cost per test is low.internal/cmd/*coverage is partly structural: acobrawiring file has few branchable statements. Flag parsing, argument validation, and the dual-mode JSON/text output path are still worth pinning, and those are where renames break.Acceptance criteria
internal/testutilis the one allowed exception, recorded as such.internal/service/issueandinternal/service's issue files reach at least 70% statements, with the fakeClientdriving the API calls.internal/cmd/adr,internal/cmd/search,internal/cmd/packages,internal/cmd/orchestrate,internal/cmd/gpgkey,internal/cmd/misc,internal/cmd/open,internal/cmd/activitypub,internal/cmd/serverinfo, andinternal/service/adr/madreach get tests over flag parsing, argument validation, and output shape.scripts/gate.shreports the total coverage number so a drop is visible. Whether it also fails below a floor is open, see below.go test ./...stays green and the gate stays clean.Open question
Should the gate fail below a coverage floor, or only print the number? A hard floor stops silent erosion but turns a legitimate refactor into a red gate. I am not deciding this inside the issue. Reporting the number (criterion 4) is safe either way and does not depend on the answer.