Skip to content

test(bundle): drive the lgtm removal no-op arms (onPrLgtm.ts:33, labels/lgtm.ts:106) through dist/index.js - #410

Merged
mrbobbytables merged 1 commit into
mainfrom
quality/test-lgtm-removal-noop-arms
Oct 9, 2026
Merged

mrbobbytables merged 1 commit into
mainfrom
quality/test-lgtm-removal-noop-arms

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Test Improvement

Adds __tests__/bundle/lgtmRemovalNoopArms.test.ts, which drives through dist/index.js the two lgtm removal arms that unbind nothing:

  • onPrLgtm.ts:33 (else) — pull_request synchronize with jobs: lgtm on a pull request labelled kind/bug only: exit 0, the labels are read (GET /issues/1) after the registered handlers' OWNERS reads and base probe, and no DELETE is issued.
  • labels/lgtm.ts:106 (else) — /lgtm cancel with no commit binding to void:
    • on a pull request under lgtm:\n bind_to_commit: false: GET /issues/1, DELETE /issues/1/labels/lgtm, the configuration reads that find the binding off, then tide's post-command sweep (GET /pulls/1, base probe, queue read); no POST /statuses/….
    • on a plain issue carrying lgtm: root OWNERS probe + membership reads, GET /issues/1, DELETE …/labels/lgtm, the sweep's configuration reads; no /pulls/ read and no POST.

Evidence on main @ 20d49e7: unit coverage is 100 % lines / 99.82 % branches (both arms green); npm run test:coverage:e2e with the heads of all 15 open hold-gated bundle PRs merged showed onPrLgtm.ts:33 if hits [2, 0] and labels/lgtm.ts:106 if hits [2, 0]. With this file they read [2, 1] and [2, 2].

Files/functions claimed: __tests__/bundle/lgtmRemovalNoopArms.test.ts only; onPrLgtm no-label arm and cancelLgtm's no-binding arm. Disjoint from the open hold-gated PRs (#298 … #408), none of which touch these two branches — verified by merging all 15 heads onto main and re-measuring. No production code is changed; npm run lint is clean on the new file.

Related Issue

Closes #409


Filed by quality agent (hold-gated mode). Human review required.

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

…ls/lgtm.ts:106) through dist/index.js

The pull_request lgtm job on a synchronize whose pull request carries no
lgtm label, and /lgtm cancel when there is no commit binding to void (a
pull request under lgtm.bind_to_commit: false, and a plain issue), had
zero end-to-end hits: only the unit suite, with labeling mocked, pinned
that they read the labels, remove nothing extra and never write a status.

Closes #409

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: quality <quality@hive.kubestellar.io>
@hivecommons-hive hivecommons-hive Bot added the hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 9, 2026
@hivecommons-hive
hivecommons-hive Bot requested a review from jpmcb as a code owner October 9, 2026 11:30
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

Important

Held for human review by the hive's ACMM level gate.

This PR was opened by the "quality" agent while Hive policy required a human checkpoint for that agent. Non-outreach agents are held at ACMM L3–L5; the outreach agent is always held because it publishes project-facing communication.

Hive will keep the hold label until a human removes it. Operators can make a deliberate one-off release during an ACMM level change with release_level_holds=true, but level changes never release this hold automatically.

@hivecommons-hive hivecommons-hive Bot added the hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 9, 2026
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Please add a kind label with /kind failing-test or /kind cleanup.

@mrbobbytables
mrbobbytables merged commit 637e6dc into main Oct 9, 2026
12 checks passed
@mrbobbytables
mrbobbytables deleted the quality/test-lgtm-removal-noop-arms branch October 9, 2026 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hold Indicates that a PR should not merge because someone has issued a /hold command. needs-kind

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[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

1 participant