Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[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

Open
#444 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

@hivecommons-hive is already working on this.

Since Oct 10, 2026.

  • #445 by @hivecommons-hive — open

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

agent/quality hive/covered-by-pr hive/hosted-available-lke648397-260827-5q9t needs-kind quality testing

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.ts fully covered by __tests__/issueCommentTest/ through the TypeScript sources.
  • End-to-end: npm run test:coverage:e2e on a scratch branch = origin/main + the heads of the 9 open hold-gated PRs (#423 … #439; 69 files / 447 tests pass) → 98.65 % lines of src/; handleIssueComment.ts branch residual 91,164,180,217. The alreadyChecked === true arm at 164/180 has 0 hits. The same run on bare main (438 tests) reports the same residual.
  • Reachability: any workflow whose prow-commands lists /check-required-labels together with /hold, /lgtm, /approve, /remove, /ok-to-test or a label-section command, on a comment that spells both — a normal thing to type when fixing a needs-kind complaint.

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_label rule and runs /hold + /check-required-labels in one comment with both commands enabled, asserting exactly one issue read / one needs-kind write / one comment, plus the sibling case (/check-required-labels enabled 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

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from cncf/prow-github-actions

All issues in cncf/prow-github-actions

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.