[quality] handleIssueComment.ts:164/180 — the sweep's alreadyChecked skip (a comment carrying both /check-required-labels and a label command) has no end-to-end hit
Maintainers usually reply within 2 days
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- github-actions, typescript
- Domain
- testing
Research direction
Start with handleIssueComment.ts around lines 164/180 and the existing tests at __tests__/bundle/bundle.test.ts:173 and __tests__/bundle/requireMatchingLabelArms.test.ts:167. Add the combined-command case and its enabled-but-absent sibling, then confirm one issue read, one needs-kind write, and one comment where applicable; note that linked PR #445 is already open.
Written by the indexing model from the issue text.
Description
Finding
After a label-writing command, handleIssueComment sweeps the require_matching_label rules itself, because the bot's own label write fires no labeled event. When the same comment also carries /check-required-labels and the workflow enables that command, the rules were just evaluated by the command, so the sweep skips the second evaluation:
const alreadyChecked = commandConfig.includes('/check-required-labels') && hasCommand('/check-required-labels', commentBody) // handleIssueComment.ts:164
failures.push(...await sweep(context, alreadyChecked))
…
...(alreadyChecked ? [] : [() => checkRequiredLabels(context)]), // handleIssueComment.ts:180
That is a user-visible behaviour (one GET /issues/N, one needs-* write, one comment instead of two of each), but no bundle test combines /check-required-labels with a label-writing command. __tests__/bundle/bundle.test.ts:173 and requireMatchingLabelArms.test.ts:167 run /check-required-labels alone (no sweep, since it is not a label-writing command), and __tests__/bundle/commentWithoutBody.test.ts (#429) lists it in prow-commands with no body at all.
Evidence (main @ d0b1d87, Node v26.10.0, vitest vitest/5.0.3 linux-x64 node-v26.10.0):
- Unit:
npx vitest run --coverage→ 100 % lines, 99.82 % branches (142 files / 2073 tests);handleIssueComment.tsfully covered by__tests__/issueCommentTest/through the TypeScript sources. - End-to-end:
npm run test:coverage:e2eon a scratch branch =origin/main+ the heads of the 9 open hold-gated PRs (#423 … #439; 69 files / 447 tests pass) → 98.65 % lines ofsrc/;handleIssueComment.tsbranch residual91,164,180,217. ThealreadyChecked === truearm at 164/180 has 0 hits. The same run on baremain(438 tests) reports the same residual. - Reachability: any workflow whose
prow-commandslists/check-required-labelstogether with/hold,/lgtm,/approve,/remove,/ok-to-testor a label-section command, on a comment that spells both — a normal thing to type when fixing aneeds-kindcomplaint.
Priority 2 under the coverage evidence rules: covered by unit tests, not by end-to-end tests.
Recommendation
- add a bundle test that configures a
require_matching_labelrule and runs/hold+/check-required-labelsin one comment with both commands enabled, asserting exactly one issue read / oneneeds-kindwrite / one comment, plus the sibling case (/check-required-labelsenabled but absent from the body) where the sweep still evaluates the rules
Disjoint from #423, #425, #427, #429, #431, #433, #435, #437 and #439: none of them touch handleIssueComment.ts:164/180, and the new file does not overlap theirs.
Priority
- Impact: medium
- Effort: low
Filed by quality agent (hold-gated mode)
🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5q9t | SHA: d0b1d87
— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88
- Dominant language
- TypeScript
- Stars
- 132
- Forks
- 23
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 155
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from cncf/prow-github-actions
-
[quality] checkOrgMember's missing payload.repository guard (auth.ts:43-45) is reached by no bundle testPossibly taken @hivecommons-hive claimed this 1 day ago. Openagent/quality hive/covered-by-pr hive/hosted-available-lke648397-260827-5q9t needs-kind quality testing
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
cncf/prow-github-actions#446 · 1 comment ·
Maintainers usually reply within 2 days
-
[quality] pullRequestOwners.load's null-field folds (pullRequestOwners.ts:92-97: user, requested_reviewers, assignees, labels) never run from dist/index.jsPossibly taken @hivecommons-hive claimed this 1 day ago. Openagent/quality hive/covered-by-pr hive/hosted-available-lke648397-260827-5q9t needs-kind quality testing
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
cncf/prow-github-actions#438 · 1 comment ·
Maintainers usually reply within 2 days
-
[quality] run()'s last-resort catch (src/run.ts:40) has 0 e2e hits — no bundle test drives a handler rejection through dist/index.jsPossibly taken @hivecommons-hive claimed this 1 day ago. Openagent/quality hive/covered-by-pr hive/hosted-available-lke648397-260827-5q9t needs-kind quality testing
Difficulty 2/5 1-3 hours Newbie friendliness 25/100
cncf/prow-github-actions#436 · 1 comment ·
Maintainers usually reply within 2 days
-
[quality] labelSync drift never sees a null label description through dist/index.js (labelSync.ts:133 `current.description ?? ''` arm)Possibly taken @hivecommons-hive claimed this 1 day ago. Openagent/quality hive/covered-by-pr hive/hosted-available-lke648397-260827-5q9t needs-kind quality testing
Difficulty 1/5 1-3 hours Newbie friendliness 30/100
cncf/prow-github-actions#434 · 1 comment ·
Maintainers usually reply within 2 days
-
[quality] getCurrentLabels' bare-string label arm (labeling.ts:148) is unit-only; no bundle test serves a non-object labelPossibly taken @hivecommons-hive claimed this 1 day ago. Openagent/quality hive/covered-by-pr hive/hosted-available-lke648397-260827-5q9t needs-kind quality testing
Difficulty 2/5 1-3 hours Newbie friendliness 25/100
cncf/prow-github-actions#432 · 1 comment ·
Maintainers usually reply within 2 days
All issues in cncf/prow-github-actions
Similar issues
-
submodule-pointer-regression
Difficulty 1/5 Under an hour Newbie friendliness 72/100
smith-horn/skillsmith#3061 ·
Maintainers usually reply within 1 day
-
area: ops type: test
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
accensa/x402-facilitator-stellar#559 ·
Maintainers usually reply within 1 day
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
cosimochellini/one-piece-zero-spoiler#551 ·
Maintainers usually reply within 1 day
-
getWatched() omits __proto__ directories when cwd is setPossibly taken @maxazure claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
-
area:web enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day