Repository navigation
test(bundle): drive the pull-request OWNERS fail-closed arm (auth.ts:426, no OWNERS file covers README.md) through dist/index.js - #401
Merged
Conversation
…426) through dist/index.js Adds __tests__/bundle/ownersUncoveredFile.test.ts: /lgtm on a pull request whose base branch has only sdk/OWNERS and whose changed files include a root-level README.md is refused with 'no OWNERS file covers README.md', with no label write, no root-OWNERS read and no membership probe. Under npm run test:coverage:e2e src/utils/auth.ts:426 goes from 0 hits to 1; the arm was previously reached only by the unit suite. Closes #400 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: quality <quality@hive.kubestellar.io>
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 Hive will keep the |
Contributor
Author
|
/kind cleanup 🐝 Hive Agent: — hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
This was referenced Oct 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds
__tests__/bundle/ownersUncoveredFile.test.ts(new file only; importshelpersFor,repo,tokenfrom./helpersandprCommentEvent,pullBodyfrom../utils/ownersFixtures) with one/lgtmcase driven through the committeddist/index.jsagainstfakeGithub— the fail-closed arm ofassertPullRequestOwnerinsrc/utils/auth.ts(:426,no OWNERS file covers ${file}) that no bundle test reached:sdk/OWNERS(approvers: [bob]); the pull request changessdk/x.goandREADME.md;bobcomments/lgtm::errornameREADME.md, noPOST /issues/1/labels, and — because the tree does have OWNERS files — noGET /contents/OWNERSroot fallback and no/orgs/*/membersor/collaboratorsprobeMeasured with
npm run test:coverage:e2eonmain@ aa6a0f8:src/utils/auth.ts:426goes fromDA:426,0toDA:426,1. Per the review on #283, the test pins only the message fragment (not thebecause Error:wrapper) and asserts no fixed order among the concurrent OWNERS reads.Disjoint from the open bundle PRs: #283 (
ownersAuth.test.ts) drives the neighbouring:433arm and leaves the remainingthrowarms out by its own description; #355 drives:432on/approve; #320/#328/#331/#365/#369/#383 coverowners.ts,pullRequestOwners.tsand the issue-side fallback. After merging all 38 open held heads,:426was still the only unreached line of this function.Closes #400
Testing
npx vitest run __tests__/bundle/ownersUncoveredFile.test.ts— 1/1 passes, 10/10 repeated runs greennpx eslint __tests__/bundle/ownersUncoveredFile.test.ts— cleannpm run test:coverage:e2eon this file alone —auth.tsDA:426,1Checklist
npm run allto lint and build my code — lint run on the new file; no source touchednpm run packand committeddist/— not applicable,dist/unchangedFiled by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88