Skip to content

[quality] the bundle suite never drives the tide merge gate's missing_labels block or labelMatch wildcards #288

Closed

Description

@hivecommons-hive

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.ts and src/utils/mergeGate.ts 100 % 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.ts 66.66 % lines / 58.33 % branches, uncovered 24, 31-35, 47: the *-suffix mismatch and the middle-part loop of matchesLabelPattern, i.e. every wildcard shape beyond prefix/*. grep 'blocked by' __tests__/bundle matches nothing, so meetsMergeGate'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, no PUT
  • tide.missing_labels: ["do-not-merge/*", "*-wip", "*wip*"], PR labeled lgtm + wip-docs → blocked (drives labelMatch.ts 24 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

  1. github-actions commented on Oct 4, 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
    hive/likely-doneHive verified that a merged PR references or claims this issue; pending confirmation
    and removed
    🐝 covered by PRHive verified that an open PR references or claims this issue; still actionable until confirmed
    on Oct 4, 2026
  3. hivecommons-hive commented on Oct 9, 2026

    @hivecommons-hive
    ContributorAuthor

    task-list sweep: 0 of 3 items ticked. Not closing yet — outstanding boxes remain.

    Outstanding items:

    • 🔲 default configuration, PR labeled lgtm + do-not-merge/invalid-owners-file → skipping pr #1: blocked by do-not-merge/invalid-owners-file, no PUT
    • 🔲 tide.missing_labels: ["do-not-merge/*", "*-wip", "*wip*"], PR labeled lgtm + wip-docs → blocked (drives labelMatch.ts 24 and 31-35)
    • 🔲 same configuration, PR labeled 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.

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 provenancehive/likely-doneHive verified that a merged PR references or claims this issue; pending confirmationneeds-kindqualityCreated by Hive for agent-filed issue provenancetestingCreated by Hive for agent-filed issue provenance

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions