Skip to content

test(bundle): drive handlePullReq's unsupported-job and failed-lgtm-read arms through dist/index.js - #310

Open
hivecommons-hive[bot] wants to merge 1 commit into
mainfrom
quality/test-pullreq-jobs-arms
Open

hivecommons-hive[bot] wants to merge 1 commit into
mainfrom
quality/test-pullreq-jobs-arms

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Test Improvement

Adds __tests__/bundle/pullReqJobsArms.test.ts (new file; nothing else touched), driving the jobs-input arms of src/pullReq/handlePullReq.ts through the committed dist/index.js against the fake GitHub API:

  • a pull_request synchronize run with jobs: frobnicate fails with TypeError: error handling pull request: Error: could not execute frobnicate… after owners-label and approve's probe have run (lines 62-66 default, 75-80)
  • jobs: lgtm whose GET /issues/1 answers 500 fails with could not get labels from issue and sends no DELETE (onPrLgtm.ts line 30, handlePullReq.ts 61-63 catch)
  • jobs: lgtm frobnicate: the lgtm job removes the label, the unsupported job still fails the run

Measured with npm run test:coverage:e2e on main @ 3fc21f2: handlePullReq.ts 80.76 → 96.15 % lines (only the unreachable line 46 remains), onPrLgtm.ts 83.33 → 91.66 % (only the unreachable line 19 remains). Unit coverage of both files is already 100 %.

Cluster: handlePullReq jobs input / onPrLgtm failure — disjoint from the held bundle PRs (#242 cron jobs, #283–#308 issue_comment commands and plugins).

Related Issue

Closes #309


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

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

…ead arms through dist/index.js

Adds __tests__/bundle/pullReqJobsArms.test.ts: a pull_request synchronize run
with an unsupported `jobs` entry, one whose lgtm job's labels read answers
500, and one mixing a working lgtm job with an unsupported job. Covers
src/pullReq/handlePullReq.ts lines 62-66 and 75-80 and
src/pullReq/onPrLgtm.ts line 30 end-to-end (npm run test:coverage:e2e:
handlePullReq.ts 80.76 -> 96.15 % lines, onPrLgtm.ts 83.33 -> 91.66 %).

Signed-off-by: quality <quality@hive.kubestellar.io>
@hivecommons-hive
hivecommons-hive Bot requested a review from jpmcb as a code owner October 4, 2026 20:55
@hivecommons-hive hivecommons-hive Bot added the hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 4, 2026
@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.

@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

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

@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

build-test is red here for a baseline cause this PR's diff does not touch: all 81 test files pass, and the job exits 1 on a single vitest Unhandled Error — assert(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID") originating in __tests__/issueCommentTest/meow.test.ts (runs 37234002533, 37233899279 on 709cb6c). This PR only changes __tests__/bundle/pullReqJobsArms.test.ts.

Tracked as shared incident #294; fix is #287. Deferring — no re-runs or pushes to this branch until that lands.


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

— 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

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] handlePullReq's jobs-input error arms are never exercised end-to-end through dist/index.js

0 participants