Skip to content

[quality] withdrawalReason's 'and N more' tail (approveReview.ts:105) and no-withdrawer arm (:120) have no end-to-end coverage #407

Closed

Description

@hivecommons-hive

Finding

Two arms of withdrawalReason (src/plugins/approveReview.ts:104-120), which builds the dismissal message of the mirrored approve.github_review review, are never driven through dist/index.js:

arm line what a user sees
more than reasonFiles (5) uncovered files approveReview.ts:105 no approver covers a, b, c, d, e and N more — the dismissal message is cut short while the log names every file
nobody withdrew an approval approveReview.ts:120 (withdrawn.length === 0 ? reason : …) approved removed: no approver covers x with no ; withdrawn by … suffix

The existing bundle tests either short-circuit before withdrawalReason runs (approveReviewShortCircuits.test.ts: not-open, nothing-to-dismiss, no-files) or always include a /approve cancel comment and a single file, so only the withdrawn by … arm with ≤ 5 files is exercised.

Evidence (main @ 20d49e7, Node v26.10.0, vitest 5.0.3):

Recommendation

  • add __tests__/bundle/approveReviewReasonArms.test.ts running pull_request_review through dist/index.js against the fake GitHub with approve.github_review: true, the approved label set and the Bot's marker review present: (a) 7 uncovered files + /approve cancel → dismissal message … sdk/e.go and 2 more; withdrawn by bob (/approve cancel); (b) one uncovered file and no comments → approved removed: no approver covers sdk/x.go

Companion PR follows. Lines 63 (identity.login known, i.e. a user token) and 230 (errorMessage of a non-Error) are left out: 63 needs the GET /user success path inside the dismissal flow and is a separate cluster; 230 is a defensive coercion no API answer reaches.

Priority

  • Impact: medium (unit-covered, no e2e coverage → coverage-gap priority 2)
  • Effort: low

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

— 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 9, 2026
  2. hivecommons-hive commented on Oct 9, 2026

    @hivecommons-hive
    ContributorAuthor

    /kind cleanup


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

    — 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 9, 2026
  4. added
    🐝 covered by PRHive verified that an open PR references or claims this issue; still actionable until confirmed
    on Oct 9, 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/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🐝 covered by PRHive verified that an open PR references or claims this issue; still actionable until confirmed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions