You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
coverage: pkg/archive's metadata index construction is unreached by internal/archive #360
Surfaced while fixing #199 (PR #359). pkg/archive has no tests of its own and no floor, and #359's header entry now records why: its statements run under internal/archive, which imports it from five files. Measured with -coverpkg, that reaches 48.6% of it.
The other half is the point of this issue. pkg/archive/metadata.go's index construction — roughly 19 statements — is not exercised by any consumer. internal/archive uses the ArchiveFormat table and IsArchive; nothing builds an index and reads it back.
Two ways to close it, and the choice is worth making deliberately rather than by whichever is easier:
Test pkg/archive directly and give it a floor. That's the ordinary answer, and it makes the package's contract independent of whichever consumer happens to call it.
Reach it from internal/archive if the index is genuinely part of what that package does. If it isn't reachable from there, that is itself worth knowing — an exported index builder no consumer constructs is a surface decision, not a coverage gap.
Either way .coverage-floors should end with a floor and a per-floor note for pkg/archive, and its # no-floor: entry deleted. #359's TestUnfloorablePackagesAreExplained fails if the entry is left behind, so that half cannot be forgotten.
Not urgent: nothing here is a defect, and 48.6% of it is exercised on every run. But "no floor because a consumer covers it" is a weaker position than "no floor because there is nothing to cover", and only the first applies.
Activity
test: give pkg/archive tests of its own and sdks/c a floor (#360, #361)…