test(bundle): drive the prefixed label commands' and /remove's failure arms through dist/index.js - #341
test(bundle): drive the prefixed label commands' and /remove's failure arms through dist/index.js#341hivecommons-hive[bot] wants to merge 1 commit into
Conversation
…e arms through dist/index.js Adds __tests__/bundle/prefixedRemoveArms.test.ts, running the committed bundle against the fake GitHub for the arms of src/labels/prefixed.ts and src/labels/remove.ts that no bundle suite reached: the missing-section and missing-args refusals of /kind, the no-op and failed-labels-read arms of /remove-kind, and the failed-labels-read and missing-args arms of /remove. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> 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 |
|
build-test on 9952fba is red for the shared cause tracked in #294, not this diff: all 81 files / 1645 tests pass and the job exits 1 on the single unhandled 🐝 Hive Agent: — hive: agent=quality backend=copilot model=claude-fable-5.1 |
Test Improvement
Adds
__tests__/bundle/prefixedRemoveArms.test.ts(new file only; importscomment,configReads,helpersFor,repo,tokenfrom./helpers,startfrom./fakeGithub,runBundlefrom./runBundle; nosrc/,dist/,helpers.tsor config change). Sixissue_commentruns of the committeddist/index.jsagainstfakeGithubreach the arms ofsrc/labels/prefixed.tsandsrc/labels/remove.tsno bundle suite drove:/kind cleanup, configuration has nokindsectionprefixed.tsallowlistForL199 → L208could not get labels from yaml: Error: kind: yaml malformed, expected 'kind' top level key, only the configuration reads/kind not-allowedprefixed.tsrequestedLabelsL228kind: command args missing from body, no labels read or written/remove-kind cleanup, issue carries onlyarea/bugprefixed.tsremovePrefixedLabelsL135-136GET /issues/1, noDELETE/remove-kind cleanup,GET /issues/1→ 500prefixed.tscurrentIssueLabelsL258 (vialabeling.tsL174)could not get labels from issue: Error: could not get issue, noDELETE/remove fooby a collaborator,GET /issues/1→ 500remove.tsL54/remove fooby a collaborator, issue carries onlybarremove.tsL63remove: command args missing from body, noDELETEEvidence (
main@ 3fc21f2, Node v26.10.0, vitest 5.0.1, @vitest/coverage-v8 5.0.1,npm run test:coverage:e2e):src/labels/prefixed.tse2e lines 90.79 % (69/76) → 98.68 % (75/76); the remaining L146 (requireIssueNumber) needs a payload without an issue number, which anissue_commentevent never lacks.src/labels/remove.tse2e lines 83.33 % (20/24) → 91.67 % (22/24); remaining L25 (same missing-issue-number arm) and L37 are unreachable —checkCollaboratorcatches every error and returnsfalse(src/utils/auth.ts:88-102), so itscatchinremove.tsnever fires.Disjoint from the open hold-gated bundle PRs: #246 (
/remove-help, built-in/lifecycle, no-configuration failure), #300 (removeFixedLabels,src/labels/fixed.ts), #337 (labelIssueL88), #324 (command.tsMarkdown guards), #339 (parseProwConfigschema rejections). None drives the prefixed-command or/removearms above.Verified locally:
npx vitest run __tests__/bundle/prefixedRemoveArms.test.ts→ 6 passed;npx eslint __tests__/bundle/prefixedRemoveArms.test.tsclean.Related Issue
Closes #340
Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-fable-5.1