Repository navigation
[quality] /test's empty-head _none_ row (trigger.ts:286) and null-name run path fallback (trigger.ts:272) are never driven through dist/index.js #417
Description
Finding
Two branches of /test in src/issueComment/trigger.ts depend on the shape of the run list GitHub returns, and nothing in the bundle suite ever produces those shapes:
| branch | file:line | when it fires |
|---|---|---|
rows.length > 0 ? rows : ['_none_ | |'] in runTable |
src/issueComment/trigger.ts:286 |
the head has no run other than the current Prow workflow (which headRuns drops), so /test, /test ? and /test all comment a table with the _none_ row |
(run.name ?? '') in matchesWorkflow |
src/issueComment/trigger.ts:272 |
a run whose name is null; GitHub's schema declares workflow-run.name?: string | null, and the run then matches (and is listed by runTable) by its workflow path |
Evidence (main @ 0328961, Node v26, vitest 5.0.3):
- Unit:
npx vitest run --coverage→trigger.ts100 % lines / branches, via the module-level mocks in__tests__/issueCommentTest/trigger.test.ts. - End-to-end:
npm run test:coverage:e2eon a scratch branch =origin/main+ the heads of all 17 open hold-gated bundle PRs (test(bundle): drive owners-label's early-return and failure arms through dist/index.js #298 … test(bundle): drive react()'s missing comment.id arm (trigger.ts:293) through dist/index.js #413; 61 files / 429 tests pass) →trigger.ts100 % lines, 97.7 % branches, uncovered branches272, 286. Every/testfixture in__tests__/bundle/triggerTestAndLgtmCancel.test.tsserves the same four named runs (CI,Lint,Prow,E2E), so the table is never empty and no run is nameless. - Reachability:
headRuns(trigger.ts:232-241) filters outrun.name === process.env.GITHUB_WORKFLOW; a pull request whose only run on the head is the Prow workflow itself therefore yields[].node_modules/@octokit/openapi-types/types.d.ts(workflow-run):name?: string | null.
Unit and e2e evidence are not line-mergeable (#235); they are stated separately.
Recommendation
One PR, one deliverable: a bundle suite __tests__/bundle/triggerTestListingArms.test.ts that drives, through dist/index.js against the fake GitHub:
-
/testand/test allon a head whose only run is the currentProwworkflow → comment carries the_none_ | |row (and forall, the "No completed … matchesall" prefix), no re-run, no rocket -
/test ?with aname: nullrun → listed as`.github/workflows/ci.yml` | completed | failure -
/test ci.ymlwith aname: nullrun → matched by path, re-run, rocket;/test lint→ not matched, table comment naming it by path
Expected result: trigger.ts 98.85 % branches on main alone, residual line 293 (react() missing comment.id) already claimed by #413.
Priority
- Impact: low
- Effort: low
Filed by quality agent (hold-gated mode)
🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5q9t | SHA: 0328961
— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88
Activity
github-actions commentedon Oct 9, 2026
Please add a kind label with
/kind failing-testor/kind cleanup.test(bundle): drive /test's empty-head _none_ row (trigger.ts:286) an…