Repository navigation
[quality] getArgumentLabels and anyLabelMatches have no production caller — only their unit tests keep them covered #366
Copy link
Copy link
Closed
Labels
agent/qualityCreated by Hive for agent-filed issue provenanceCreated by Hive for agent-filed issue provenancehive/covered-by-prHive verified that an open PR references or claims this issue; still actionable until confirmedHive verified that an open PR references or claims this issue; still actionable until confirmedhive/hosted-available-lke648397-260827-5q9tCreated by Hive for agent-filed issue provenanceCreated by Hive for agent-filed issue provenancekind/cleanupCategorizes issue or PR as related to cleaning up code, process, or technical debt.Categorizes issue or PR as related to cleaning up code, process, or technical debt.qualityCreated by Hive for agent-filed issue provenanceCreated by Hive for agent-filed issue provenancetestingCreated by Hive for agent-filed issue provenanceCreated by Hive for agent-filed issue provenance
Description
Activity
- addedqualityCreated by Hive for agent-filed issue provenanceCreated by Hive for agent-filed issue provenancetestingCreated by Hive for agent-filed issue provenanceCreated by Hive for agent-filed issue provenanceagent/qualityCreated by Hive for agent-filed issue provenanceCreated by Hive for agent-filed issue provenancehive/hosted-available-lke648397-260827-5q9tCreated by Hive for agent-filed issue provenanceCreated by Hive for agent-filed issue provenance
on Oct 7, 2026 hivecommons-hive commented
on Oct 7, 2026 ContributorAuthorMore actions/kind cleanup
🐝 Hive Agent:
quality| Instance:hosted-available-lke648397-260827-5q9t| SHA:3fc21f2— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88
- addedkind/cleanupCategorizes issue or PR as related to cleaning up code, process, or technical debt.Categorizes issue or PR as related to cleaning up code, process, or technical debt.and removed
on Oct 7, 2026 - addedhive/covered-by-prHive verified that an open PR references or claims this issue; still actionable until confirmedHive verified that an open PR references or claims this issue; still actionable until confirmed
on Oct 9, 2026 - added a commit that references this issue
on Oct 11, 2026
Metadata
Metadata
Assignees
Labels
agent/qualityCreated by Hive for agent-filed issue provenanceCreated by Hive for agent-filed issue provenancehive/covered-by-prHive verified that an open PR references or claims this issue; still actionable until confirmedHive verified that an open PR references or claims this issue; still actionable until confirmedhive/hosted-available-lke648397-260827-5q9tCreated by Hive for agent-filed issue provenanceCreated by Hive for agent-filed issue provenancekind/cleanupCategorizes issue or PR as related to cleaning up code, process, or technical debt.Categorizes issue or PR as related to cleaning up code, process, or technical debt.qualityCreated by Hive for agent-filed issue provenanceCreated by Hive for agent-filed issue provenancetestingCreated by Hive for agent-filed issue provenanceCreated by Hive for agent-filed issue provenance
Finding
Two exported helpers in
src/utils/have no production caller. The only code that invokes them is their own unit test, so they count toward the 100 % unit line coverage onmain@ 3fc21f2 while nothing the action ships ever runs them:getArgumentLabels(octokit, context, arg)src/utils/labeling.ts:47-60src/labels/prefixed.ts, removed in #137 (78b07b0) when the prefixed commands switched togetLabelConfig__tests__/utils/labeling.test.tsanyLabelMatches(patterns, labels)src/utils/labelMatch.ts:46-48f5d7bc3)__tests__/utils/labelMatch.test.tsEvidence:
grep -rn "getArgumentLabels\|anyLabelMatches" src/→ only the two definitions.git log -S"getArgumentLabels(" -- src→78b07b0deletes the import and call inprefixed.tsand keeps the export;git log -S"anyLabelMatches" -- src __tests__→ a single commit,f5d7bc3, introducing export and test together.npm run test:coverage:e2eon a scratch branch =origin/main(3fc21f2) + the heads of all 44 open hold-gated bundle PRs (chore(coverage): emit lcovonly and json-summary reporters from vitest.config.mjs #230…test(bundle): drive the OWNERS filters-ignored arm (owners.ts parseOwners) through dist/index.js #365, 48 files / 430 tests pass): 96.4 % statements; both functions have 0 hits (labeling.ts52–59,labelMatch.ts47 remain uncovered). Every other residual line in that run is a defensive throw on a malformed payload, a test-onlyreset*Cache()export, or already claimed by one of those PRs.grep -n "getArgumentLabels\|anyLabelMatches" dist/index.js→dist/index.js:41388,dist/index.js:43239(nccdoes not tree-shake them).Why it matters for the test suite rather than just tidiness: the unit report cannot distinguish "covered because it runs in the bundle" from "covered because a test calls it", so these two keep a green line over code that would silently rot —
getArgumentLabelsstill throws the pre-#137yaml malformed, expected '<arg>' top level keymessage that no user can reach.Recommendation
One PR, one deliverable (deleting both exports and their test blocks is a single mechanical change;
npm run packto drop them fromdist/):getArgumentLabelsfromsrc/utils/labeling.tsand itsdescribeblock in__tests__/utils/labeling.test.tsanyLabelMatchesfromsrc/utils/labelMatch.tsand its tests in__tests__/utils/labelMatch.test.ts(or wire it intomatchesAnyLabel-style call sites if a consumer was intended in feat!: do-not-merge/* label family; /hold applies do-not-merge/hold; configurable merge gate #154)npm run build && npm run packso the dist/ drift gate passesThis touches production source, so it is not a PR this lane opens; it is filed for a maintainer. Related, but deliberately not in this issue because it is a design choice rather than dead code:
repoHasOwners/defaultBranch(src/utils/owners.ts:282-284, 348-359) are reachable only when apull_requestpayload lacksbase.ref(approve.ts:504,tide.ts:543), so they too have 0 e2e hits.Priority
🐝 Hive Agent:
quality| Instance:hosted-available-lke648397-260827-5q9t| SHA:3fc21f2— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88