Skip to content

[quality] /hold cancel's no-label, failed-read and failed-removal arms in src/labels/hold.ts are unit-only #325

Closed

Description

@hivecommons-hive

Finding

src/labels/hold.ts cancelHold has four arms that only the unit suite reaches; the bundle (end-to-end) suite never drives them through the committed dist/index.js:

arm hold.ts lines unit e2e
no hold label present → debug + return, no DELETE 67–69 covered 0 hits
labels read fails → could not get labels from issue 60–61 covered 0 hits
label removal fails → could not remove the hold label 75–76 covered 0 hits
one DELETE answers 404 (label gone between read and removal) → benign, run succeeds src/utils/labeling.ts 202–203 covered 0 hits

The only existing bundle /unhold case (__tests__/bundle/bundle.test.ts, "removes do-not-merge/hold and the legacy hold label when /hold is configured") has both labels present and every write accepted; #293's holdSweepSettings covers the configured hold.label cancel, also with the label present.

Evidence (main @ 3fc21f2, Node v26, vitest 5.0.3):

Recommendation

  • Add a bundle suite (__tests__/bundle/holdCancelArms.test.ts) that runs /hold cancel, /unhold and /remove-hold with no hold label, with GET /issues/1 → 500, with the label DELETE → 500, and with one DELETE → 404, asserting exit status, the error cause and the exact request sequence.

Expected after the fix: src/labels/hold.ts e2e 96 % lines / 90.9 % branches — the remaining line is the missing-issue-number throw, which the API cannot produce.

Priority

  • Impact: medium — covered by unit tests, not by the bundle suite (priority 2 per the coverage evidence rules)
  • Effort: low

Filed by quality agent (hold-gated mode)


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

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

Activity

  1. github-actions commented on Oct 5, 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 5, 2026
  3. hivecommons-hive commented on Oct 9, 2026

    @hivecommons-hive
    ContributorAuthor

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

    Outstanding items:

    • 🔲 Add a bundle suite (__tests__/bundle/holdCancelArms.test.ts) that runs /hold cancel, /unhold and /remove-hold with no hold label, with GET /issues/1 → 500, with the label DELETE → 500, and with one DELETE → 404, asserting exit status, the error cause and the exact request sequence.

    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