Repository navigation
[quality] the bundle suite never drives the tide merge gate's missing_labels block or labelMatch wildcards #288
Description
Finding
The tide merge gate's missing_labels arm is never driven end-to-end. Every pull_request labeled lgtm case in __tests__/bundle/ either merges or stops on missing lgtm / missing approved; no bundle test produces skipping pr #N: blocked by <label>.
Evidence (main @ 3fc21f2, Node v26.10.0, vitest 5.0.3):
- Unit:
npx vitest run --coverage—src/utils/labelMatch.tsandsrc/utils/mergeGate.ts100 % lines (unit suite 1639 tests, 100 / 99.81 / 100 / 100). - End-to-end:
npm run test:coverage:e2e(the four__tests__/bundle/*.test.ts, 142 tests,src/77.9 % lines) —labelMatch.ts66.66 % lines / 58.33 % branches, uncovered 24, 31-35, 47: the*-suffix mismatch and the middle-part loop ofmatchesLabelPattern, i.e. every wildcard shape beyondprefix/*.grep 'blocked by' __tests__/bundlematches nothing, someetsMergeGate's second return is unit-only too. - Combined: both suites land in one istanbul map per test(coverage): add test:coverage:e2e to report the bundle suite's coverage of src/ #274, and the unit run already saturates these files, so this is a priority-2 (unit-covered, no e2e) gap, not a priority-1 one.
Why it matters: do-not-merge/* is the default that keeps held PRs out of the merge path (docs/automatic-merging.md), and the documented rule that a configured missing_labels list replaces the defaults has no shipped-bundle check either.
Recommendation
One new bundle file, __tests__/bundle/mergeGateLabels.test.ts, with three pull_request labeled lgtm runs through dist/index.js:
- default configuration, PR labeled
lgtm+do-not-merge/invalid-owners-file→skipping pr #1: blocked by do-not-merge/invalid-owners-file, noPUT -
tide.missing_labels: ["do-not-merge/*", "*-wip", "*wip*"], PR labeledlgtm+wip-docs→ blocked (driveslabelMatch.ts24 and 31-35) - same configuration, PR labeled
lgtm+needs-rebase→ merges (the configured list replaces the default one)
Note: anyLabelMatches (labelMatch.ts:46-48) has no caller under src/; it will stay unit-only.
Priority
- Impact: medium
- Effort: low
Filed by quality agent (hold-gated mode)
🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5q9t | SHA: 3fc21f2
— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88
Activity
github-actions commentedon Oct 4, 2026
Please add a kind label with
/kind failing-testor/kind cleanup.hivecommons-hive commentedon Oct 9, 2026
task-list sweep: 0 of 3 items ticked. Not closing yet — outstanding boxes remain.
Outstanding items:
lgtm+do-not-merge/invalid-owners-file→skipping pr #1: blocked by do-not-merge/invalid-owners-file, noPUTtide.missing_labels: ["do-not-merge/*", "*-wip", "*wip*"], PR labeledlgtm+wip-docs→ blocked (driveslabelMatch.ts24 and 31-35)lgtm+needs-rebase→ merges (the configured list replaces the default one)Merged PRs referencing this issue so far:
This comment is edited in place by the task-list sweep on every cycle; it is not duplicated.