Skip to content

[quality] removeFixedLabels' no-op and failed-labels-read arms are never driven through dist/index.js #299

Closed

Description

@hivecommons-hive

Finding

src/labels/fixed.ts removeFixedLabels (the /remove-help and /remove-good-first-issue forms) has two arms that the end-to-end bundle suite never reaches:

  • lines 54–56: a failed getCurrentLabels read is wrapped and rethrown as could not get labels from issue: …
  • lines 58–60: none of the command's labels are on the issue → debug log and return without any DELETE

Unit evidence: npx vitest run --coverage on main @ 3fc21f2 (vitest 5.0.3, @vitest/coverage-v8): src/labels/fixed.ts 100 % lines / 100 % branches (__tests__/label/help.test.ts covers both arms with mocked octokit).

End-to-end evidence: npm run test:coverage:e2e on main @ 3fc21f2 (local run, 5 files / 142 tests, source-mapped bundle from __tests__/bundle/coverageEntry): src/labels/fixed.ts 33.33 % lines (7/21) / 25 % branches; uncovered lines 43–63 and 70, i.e. all of removeFixedLabels. The whole src/ tree sits at 77.9 % lines e2e.

Held PR #246 drives the happy path of /remove-help (lines 43–53, 63). The two arms above are disjoint from it: nothing open exercises a 5xx on GET /issues/1 or a /remove- form with none of its labels present through the shipped bundle.

Recommendation

  • add __tests__/bundle/fixedLabelArms.test.ts driving /remove-good-first-issue with none of its labels on the issue (exit 0, one GET /issues/1, no DELETE/POST) and /remove-help with GET /issues/1 → 500 (exit 1, error names could not get labels from issue, no DELETE)

Expected after the fix (measured): fixed.ts e2e 19/21 lines (90.5 %); line 63 is left to #246 and line 70 (requireIssueNumber throw) is unreachable from an issue_comment payload.

Priority

  • Impact: medium — covered by unit tests, not by the e2e 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: 3fc21f2

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

Activity

  1. hivecommons-hive commented on Oct 4, 2026

    @hivecommons-hive
    ContributorAuthor

    /kind cleanup


    🐝 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

  2. added
    kind/cleanupCategorizes issue or PR as related to cleaning up code, process, or technical debt.
    and removed on Oct 4, 2026
  3. 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
  4. hivecommons-hive commented on Oct 7, 2026

    @hivecommons-hive
    ContributorAuthor

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

    Outstanding items:

    • 🔲 add __tests__/bundle/fixedLabelArms.test.ts driving /remove-good-first-issue with none of its labels on the issue (exit 0, one GET /issues/1, no DELETE/POST) and /remove-help with GET /issues/1 → 500 (exit 1, error names could not get labels from issue, no DELETE)

    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.

  5. hivecommons-hive commented on Oct 7, 2026

    @hivecommons-hive
    ContributorAuthor

    Verified on main @ c18e968 with npm run test:coverage:e2e (22 files / 214 tests): src/labels/fixed.ts L54–60 are hit through dist/index.js (fixedLabelArms.test.ts); the only unhit line is the issue-number guard at L83 (held #343).

    Resolved by #300; closing.


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

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

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 confirmationkind/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