Repository navigation
[quality] plugin payload guards (requireMatchingLabel.ts:184, blunderbuss.ts:94, trigger.ts:188, tide.ts:489) have no end-to-end coverage #398
Copy link
Copy link
Closed
Labels
agent/qualityCreated by Hive for agent-filed issue provenanceCreated by Hive for agent-filed issue provenanceneeds-kindqualityCreated 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🐝 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
Description
Finding
Four plugin-side payload guards are reached by the unit suite only through hand-built contexts; nothing in __tests__/bundle drives them through dist/index.js:
| guard | file:line | event that reaches it |
|---|---|---|
github context payload missing issue or pull request |
src/plugins/requireMatchingLabel.ts:184 (subject) |
pull_request opened with no pull_request object |
github context payload missing pull request |
src/plugins/blunderbuss.ts:94 |
same payload |
github context payload missing pull request head |
src/issueComment/trigger.ts:188 (okToTestOnPullRequest) |
pull_request synchronize whose pull request carries ok-to-test but no head |
github context payload missing issue |
src/plugins/tide.ts:489 (tideOnComment) |
a label-writing comment command (/lgtm) on an issue_comment payload with no issue — the command's own number guard fires first, then the post-command sweep reaches tide's |
Evidence (main @ aa6a0f8, Node v26.10.0, vitest 5.0.3):
- Unit:
npx vitest run --coverage→ 100 % lines (132 files / 2057 tests); all four lines are green from the unit tests of their modules. - End-to-end:
npm run test:coverage:e2eon a scratch branch =origin/main+ the heads of all 37 open hold-gated bundle PRs (test(bundle): drive root-OWNERS authorization on an issue and the OWNERS-based /lgtm refusal through dist/index.js #283 … test(bundle): drive meow.ts:28 (strict /meow re-check after the dispatcher's generic match) through dist/index.js #397; 58 files / 433 tests pass) → 97.84 % lines ofsrc/. All four lines have 0 hits. The companion guards they sit beside —ownersLabel.ts:30,approve.ts:499,lgtmBinding.ts:168,tide.ts:520/578, and every command'smissing issue numberguard (test(bundle): drive the missing issue/pull number guards of every command handler and onPrLgtm through dist/index.js #343) — are already reached. - Unit and e2e data come from different transforms (vite vs. tsc+ncc) and are not combined; each is analyzed separately, as
vitest.e2e-coverage.config.mjsdocuments.
Recommendation
One bundle test file, three cases (one per payload shape above; the first reaches two guards), asserting the guard message by fragment so a wording fix does not break them.
- add
__tests__/bundle/pluginPayloadGuards.test.tsdriving the four lines throughdist/index.js
Priority
- Impact: low (defensive guards; the fixtures always carry the objects)
- Effort: low
Filed by quality agent (hold-gated mode)
🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5q9t | SHA: aa6a0f8
— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88
Metadata
Metadata
Assignees
Labels
agent/qualityCreated by Hive for agent-filed issue provenanceCreated by Hive for agent-filed issue provenanceneeds-kindqualityCreated 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🐝 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
Activity
github-actions commentedon Oct 8, 2026
Please add a kind label with
/kind failing-testor/kind cleanup.