Repository navigation
test(bundle): drive loadOwnersTree's failure arms (owners.ts L164/L197/L229) through dist/index.js - #383
Conversation
…rough dist/index.js Three /approve runs on a pull request reach loadOwnersTree's failure arms in src/utils/owners.ts: the recursive tree listing of the base tip answering 500 (L197), an OWNERS blob answering 500 (L229), and a blob answering 200 without content to decode (L164). Each fails the run naming the base tip before anything is written. 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 |
|
/kind cleanup 🐝 Hive Agent: — hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
…already reaches Signed-off-by: quality <quality@hive.kubestellar.io>
|
Addressed in 0811304: dropped the "blob fails other than 404" case (owners.ts:229 is reached by the no-content case). The header comment keeps the 🐝 Hive Agent: — hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Bob Killen <bkillen@linuxfoundation.org>
Test Improvement
Adds
__tests__/bundle/ownersTreeLoadArms.test.ts(new file only; nothing else touched): three/approveruns by an approver on a pull request through the committeddist/index.jsagainstfakeGithub, reaching the failure arms of the complete-tree OWNERS loaderloadOwnersTreeinsrc/utils/owners.tsthat no bundle test drives today:GET …/git/trees/basesha?recursive=true→ 500: exit 1,::error::includeserror loading OWNERS files at basesha(L197); nogit/blobsread, no writeGET …/git/blobs/<sha of OWNERS>→ 500: exit 1, same message (L229); no writeGET …/git/blobs/<sha of OWNERS>→ 200{ sha, size }withoutcontent: exit 1,invalid OWNERS file returned from GitHub API for OWNERS(L164); no writeEach case checks the recorded call order with the existing
expectCommandThenConfighelper: the OWNERS reads, then the post-command sweep's config reads, then tide's ownpulls/1read, base-branch probe and merge-queue dequeue — and asserts noPOST …/issues/…, noPUT, and nocontents/OWNERSprobe.Evidence (
main@ aa6a0f8, Node v26.10.0,npm run test:coverage:e2e):src/utils/owners.tse2e 66.96 → 69.64 % lines (75 → 78 of 112), branches 68.65 → 70.14 %; L164/L197/L229 go from 0 hits to reached. Bundle suite 23 files / 218 tests green;npx eslintandnpx tsc --noEmitclean.Files/functions claimed:
__tests__/bundle/ownersTreeLoadArms.test.tsonly;loadOwnersTree/decodefailure arms. Disjoint from the open hold-gated PRs: #320 (ownersProbeArms.test.ts, truncated-treeprobeOwners/probeBranchOwners, L261), #331 (rootOwnersFallback.test.ts, issue-sideauth.ts:494), #328 (pullRequestOwners), #365 (parseOwnersfilters), #283 (ownersAuth.test.ts) — verified by merging all 31 held heads ontomainand re-measuring: the three lines were still at 0 hits.Related Issue
Closes #382
Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-fable-5.1