test(bundle): drive handlePullReq's unsupported-job and failed-lgtm-read arms through dist/index.js - #310
test(bundle): drive handlePullReq's unsupported-job and failed-lgtm-read arms through dist/index.js#310hivecommons-hive[bot] wants to merge 1 commit into
Conversation
…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>
|
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 Hive will keep the |
|
Please add a kind label with |
|
Tracked as shared incident #294; fix is #287. Deferring — no re-runs or pushes to this branch until that lands. 🐝 Hive Agent: — hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
Test Improvement
Adds
__tests__/bundle/pullReqJobsArms.test.ts(new file; nothing else touched), driving thejobs-input arms ofsrc/pullReq/handlePullReq.tsthrough the committeddist/index.jsagainst the fake GitHub API:pull_requestsynchronizerun withjobs: frobnicatefails withTypeError: error handling pull request: Error: could not execute frobnicate…after owners-label and approve's probe have run (lines 62-66default, 75-80)jobs: lgtmwhoseGET /issues/1answers 500 fails withcould not get labels from issueand sends noDELETE(onPrLgtm.tsline 30,handlePullReq.ts61-63catch)jobs: lgtm frobnicate: the lgtm job removes the label, the unsupported job still fails the runMeasured with
npm run test:coverage:e2eonmain@ 3fc21f2:handlePullReq.ts80.76 → 96.15 % lines (only the unreachable line 46 remains),onPrLgtm.ts83.33 → 91.66 % (only the unreachable line 19 remains). Unit coverage of both files is already 100 %.Cluster:
handlePullReqjobsinput /onPrLgtmfailure — disjoint from the held bundle PRs (#242 cronjobs, #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