Skip to content

[quality] bundle e2e never drives plain /close or the /milestone refusals through dist/index.js #295

Closed

Description

@hivecommons-hive

Finding

Cluster: src/issueComment/close.ts and src/issueComment/milestone.ts, end-to-end arms only. Disjoint from every open hold-gated bundle PR (#242 cron jobs input, #244 /meow, #246 fixed/prefixed labels, #283 OWNERS, #286 approve review, #289 tide, #291 blunderbuss, #293 hold/sweep): none of their diffs touch /close, /milestone or these two files.

Unit evidence: npx vitest run --coverage on main @ 3fc21f2 (Node v26.10.0, vitest 5.0.1, @vitest/coverage-v8 5.0.1): 100 % lines (2382/2382), 99.81 % branches, 100 % functions. Both files are fully unit-covered (__tests__/issueCommentTest/close.test.ts, milestone.test.ts).

End-to-end evidence: npm run test:coverage:e2e (the source-mapped bundle run added by #274) on the same revision, __tests__/bundle only (5 files / 142 tests): src/ at 77.9 % lines / 70.82 % branches. Per file, from coverage-final.json:

file e2e lines e2e branches lines never reached from dist/
src/issueComment/close.ts 80 % 66.66 % 24, 39, 56-60, 64
src/issueComment/milestone.ts 73.07 % 53.84 % 28, 40, 44, 52, 71-73

What that means in behaviour:

  • plain /close (lines 56-60, the else of not-planned) — the command's primary form — is never run through the bundle. bundle.test.ts drives only the non-collaborator no-op and /close not-planned. The author shortcut (isAuthor → no collaborator read, line 33) is likewise never exercised e2e.
  • /close whose PATCH /issues/1 fails never surfaces could not close issue (line 64).
  • /milestone <title> that matches no milestone never produces the milestone "…" not found. Available milestones: … failure and never proves no PATCH is sent (lines 71-73).
  • /milestone with no argument (line 52, please provide a milestone to add) and by a non-collaborator (line 44, commenter is not authorized to set a milestone) are never refused through the bundle.

Lines 24/28 (payload without an issue number) and 39/40 (checkCollaborator rejecting) are not reachable from an issue_comment payload over HTTP — checkCollaborator swallows non-404 errors and returns false — so they are not part of this gap.

Recommendation

Add __tests__/bundle/closeMilestone.test.ts (new file, same shape as collaborationCommands.test.ts: start() a fake GitHub, comment()/helpersFor() from ./helpers, assert the exact request list) covering:

  • plain /close by the issue author: no collaborator read, one PATCH /issues/1 with { state: 'closed' } and no state_reason
  • /close whose PATCH returns 500: run fails and errors names could not close issue
  • /milestone v9 with milestones v1.0, Sprint 2: run fails naming milestone "v9" not found and the available titles; no PATCH
  • /milestone with no argument: run fails with please provide a milestone to add after only the collaborator read
  • /milestone v1.0 by a non-collaborator: run fails with commenter is not authorized to set a milestone; no milestones read, no PATCH

Priority

  • Impact: medium — covered by unit tests, not by the bundle suite (coverage-gap priority 2 under the unit-but-not-e2e rule)
  • 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. 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 Oct 4, 2026
  2. hivecommons-hive commented on Oct 4, 2026

    @hivecommons-hive
    ContributorAuthor

    /kind cleanup


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

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

  3. added
    kind/cleanupCategorizes issue or PR as related to cleaning up code, process, or technical debt.
    and removed on Oct 4, 2026
  4. added
    hive/covered-by-prHive verified that an open PR references or claims this issue; still actionable until confirmed
    on Oct 4, 2026
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 provenancekind/cleanupCategorizes issue or PR as related to cleaning up code, process, or technical debt.qualityCreated 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