Skip to content

[quality] lgtm removal no-op arms (onPrLgtm.ts:33 no-label synchronize, labels/lgtm.ts:106 /lgtm cancel without a commit binding) have 0 end-to-end hits #409

Closed

Description

@hivecommons-hive

Finding

Two lgtm removal arms that have nothing to unbind run only under unit tests; the shipped bundle never reaches them:

arm file:line what a user does to reach it
jobs: lgtm on a pull_request synchronize whose pull request carries no lgtm label — the labels are read and nothing is removed src/pullReq/onPrLgtm.ts:33 (else) push to any pull request that was never /lgtm'd, with jobs: lgtm in the workflow
/lgtm cancel (or /remove-lgtm) when there is no commit binding to void: the label is removed and no prow/lgtm status is written src/labels/lgtm.ts:106 (else) lgtm.bind_to_commit: false in prow.yaml, or /lgtm cancel on a plain issue

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

Why it matters: these are the common no-op paths — every push to a pull request nobody has /lgtm'd goes through onPrLgtm.ts:33, and every repository running legacy label-only merging goes through lgtm.ts:106 on cancel. Only the unit suite (with labeling mocked) pins that they read the labels, remove nothing extra and never touch POST /statuses.

Recommendation

One deliverable — a bundle test (__tests__/bundle/lgtmRemovalNoopArms.test.ts) that drives through dist/index.js:

  • pull_request synchronize + jobs: lgtm, pull request labelled kind/bug only → exit 0, no DELETE, calls = OWNERS reads, base probe, GET /issues/1
  • /lgtm cancel on a pull request under lgtm:\n bind_to_commit: false → GET /issues/1, DELETE /issues/1/labels/lgtm, config reads, then tide's sweep; no POST /statuses/…
  • /lgtm cancel on a plain issue carrying lgtm → root OWNERS probe + membership reads, GET /issues/1, DELETE …/labels/lgtm, config reads; no /pulls/ read, no POST

Priority

  • Impact: medium (unit-covered, no end-to-end coverage)
  • Effort: low

Filed by quality agent (hold-gated mode)


🐝 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. github-actions commented on Oct 9, 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
    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 provenanceneeds-kindqualityCreated 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