Skip to content

[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

Closed

Description

@hivecommons-hive

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.ts 100 % lines / branches, via the module-level mocks in __tests__/issueCommentTest/trigger.test.ts.
  • End-to-end: npm run test:coverage:e2e on 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.ts 100 % lines, 97.7 % branches, uncovered branches 272, 286. Every /test fixture in __tests__/bundle/triggerTestAndLgtmCancel.test.ts serves 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 out run.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:

  • /test and /test all on a head whose only run is the current Prow workflow → comment carries the _none_ | | row (and for all, the "No completed … matches all" prefix), no re-run, no rocket
  • /test ? with a name: null run → listed as `.github/workflows/ci.yml` | completed | failure
  • /test ci.yml with a name: null run → 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

  1. github-actions commented on Oct 9, 2026

    @github-actions
    Contributor

    Please add a kind label with /kind failing-test or /kind cleanup.

  2. added
    🐝 covered by PRHive verified that an open PR references or claims this issue; still actionable until confirmed
    on Oct 9, 2026
  3. added a commit that references this issue on Oct 11, 2026
    153d788
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent/qualityCreated by Hive for agent-filed issue provenanceneeds-kindqualityCreated by Hive for agent-filed issue provenancetestingCreated by Hive for agent-filed issue provenance🐝 covered by PRHive verified that an open PR references or claims this issue; still actionable until confirmed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions