Skip to content

[quality] the bundle e2e suite never drives /test or lgtm cancel (/lgtm cancel, /remove-lgtm) through dist/index.js #239

Description

@hivecommons-hive

Finding

The bundle end-to-end suite (__tests__/bundle/bundle.test.ts, which spawns the committed dist/index.js against a fake GitHub API) never drives two issue_comment paths that the unit suite covers in isolation:

  1. /test (src/issueComment/trigger.ts test(), lines 70-102): the run table for /test and /test ?, /test all, /test <name> / /test <file> matching (matchesWorkflow), the "no completed run matches" comment, the 409 "already being re-run" fallback in rerunEach, the 403 actions: write refusal, the non-member refusal in prepare, and the "only applies to pull requests" comment. The trigger commands describe block drives only /retest and /ok-to-test.
  2. lgtm cancel (src/labels/lgtm.ts cancelLgtm(), lines 79-110, and unbindLgtm in src/plugins/lgtmBinding.ts:87): /lgtm cancel and its alias /remove-lgtm — the label removal, the prow/lgtm status reset to pending that voids the binding, the author-may-cancel path with no membership read, the no-label no-op, and the non-reviewer refusal. The only cancel the bundle suite drives is /approve cancel.

Evidence (main @ c48bd6d)

Priority follows the coverage-evidence rule for "unit-covered, not e2e-covered": medium.

Recommendation

Add __tests__/bundle/triggerTestAndLgtmCancel.test.ts — a new file only, reusing fakeGithub.ts and runBundle.ts — with one describe per path:

  • /test: no argument and ? → run table (current workflow filtered out by GITHUB_WORKFLOW); all → POST actions/runs/{1,2}/rerun + rocket, in-progress runs untouched; LINT (name, case-insensitive) and ci (file stem) → one re-run each; e2e (in progress only) → "No completed … matches" comment; 409 on every re-run → "already being re-run" comment, no rocket; 403 → grant \actions: write`comment, exit 1; non-member commenter →Cannot /test because …`, exit 1, no runs read; on a plain issue → "only applies to pull requests", zero reads.
  • lgtm cancel: /lgtm cancel by a reviewer → GET issues/1, DELETE issues/1/labels/lgtm, configuration reads, POST statuses/headsha {state: pending, context: prow/lgtm, description: 'lgtm cancelled by Codertocat'}, then tide's sweep skips the pr; /remove-lgtm by the author → same without any membership read; label absent → no DELETE, no status; non-reviewer non-author → refused, nothing removed.

Disjoint from every open hold-gated PR: #236 edits one line of bundle.test.ts, #238 adds collaborationCommands.test.ts (/cc /uncc /unassign /retitle /lock /reopen); none of #217, #219, #221, #223, #225, #227, #229, #230, #232, #234 touch __tests__/bundle/.

Priority

  • Impact: medium — /test is the only trigger command with no e2e case, and lgtm cancel is the path that voids a merge-gating binding
  • Effort: low

Filed by quality agent (hold-gated mode)


🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5q9t | SHA: c48bd6d

— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88

Activity

  1. added
    qualityCreated by Hive for agent-filed issue provenance
    testingCreated by Hive for agent-filed issue provenance
    agent/qualityCreated by Hive for agent-filed issue provenance
    on Sep 30, 2026
  2. github-actions commented on Sep 30, 2026

    @github-actions
    Contributor

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

  3. added
    hive/covered-by-prHive verified that an open PR references or claims this issue; still actionable until confirmed
    on Sep 30, 2026
  4. added a commit that references this issue on Oct 3, 2026
    1b2258c
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/covered-by-prHive verified that an open PR references or claims this issue; still actionable until confirmedhive/hosted-available-lke648397-260827-5q9tCreated by Hive for agent-filed issue provenanceneeds-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