Repository navigation
test(bundle): drive pullRequestOwners' rename and base-tip-fallback arms and tide's fork 403 diagnosis arms through dist/index.js - #328
Conversation
…rms and tide's fork-workflows 403 arms through dist/index.js Adds __tests__/bundle/pullRequestOwnersArms.test.ts: seven runs of the committed bundle against the fake GitHub for arms no bundle suite reached. /approve on a pull request (src/utils/pullRequestOwners.ts): - a renamed file is owned under its previous name too: bob's approval of sdk/moved.go leaves olm/moved.go (olm/OWNERS, carol) unapproved - GET /branches/master answering 500 falls back to pull.base.sha with a warning; OWNERS are read from the snapshot tree schedule lgtm job, fork pull request refused with 403 (src/plugins/tide.ts explainForkWorkflows, src/utils/comments.ts createCommentOnce): - the explaining comment is posted once per head: a bot comment carrying the marker suppresses it, a human comment quoting it does not - a refused comment is a warning; the pull request is still skipped - no workflow files on either side, or an unreadable compare, leave the 403 a plain merge failure Signed-off-by: quality <quality@hive.kubestellar.io> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
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 |
|
🐝 Hive Agent: — hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
Test Improvement
Adds one file,
__tests__/bundle/pullRequestOwnersArms.test.ts(7 tests; nothing else touched — nohelpers.ts,fakeGithub.ts, source ordist/change). It runs the committeddist/index.jsagainst the fake GitHub for arms no bundle suite reached:issue_comment/approveon a pull request —src/utils/pullRequestOwners.tsprevious_filename(rename) is owned under both names: bob, approver ofsdk/moved.go, leaves the pull request NOT APPROVED becauseolm/moved.go(olm/OWNERS, carol,no_parent_owners) is still unapproved;approve: #1 is not approved; nobody approves olm/moved.goGET /branches/master→ 500:::warning::could not read the tip of master; reading OWNERS at snapshotsha, the tree is read once atpull.base.sha(snapshotsha), never atbasesha, and bob's approval still lands (L82–83)schedulelgtm job, fork pull request whose merge is refused with 403 —src/plugins/tide.tsexplainForkWorkflows,src/utils/comments.tscreateCommentOnce<!-- prow-github-actions/fork-workflows: <sha7> -->→ noPOST …/comments, pull request still skipped (comments.tsL58–60)isBotUserguard)POST …/comments→ 500 →::warning::could not comment on pr #2 about the workflow files: Error: could not add comment: …, still skipped, exit 0 (tide.tsL280,comments.tsL34).github/workflows/file in the compare or the pull request's files →could not merge pr #2: Resource not accessible by integration, exit 1, no comment read (tide.tsL265)GET /compare/{head}...master→ 500 → diagnosis dropped, same plain merge failure, nopulls/2/filesread (tide.tsL261–262)Evidence (
main@ 3fc21f2, Node v26.10.0, vitest 5.0.3,npm run test:coverage:e2e, 142 → 149 bundle tests):src/utils/comments.tse2e lines 70 % → 100 %src/plugins/tide.tse2e lines 81.02 % → 83.07 %; L261, 262, 265, 280 now hitsrc/utils/pullRequestOwners.tsL82–83 now hit (75.86 % → 79.31 % lines). L73–74 still report 0 hits, but that is a source-map artefact, not a gap: the remapped report records the L74 arrow function called 38× while its ternary statement/branch shows[0, 0]on every run, including the[f.filename]path every existing bundle test takes. The rename behaviour is asserted through the notifier instead.npx eslintclean;npx tsc --noEmitcleanNot claimed:
pullRequestOwners.tsL95–96 (#291'smax_request_countcase reachesrequested_reviewers) and L55–56 (resetPullRequestOwnersCache, test-only).Disjoint from every open held bundle PR: #289/#322 (tide gate and merge-queue arms), #318 (
lgtmBindingfailure arms, the stale-lgtm comment read failing), #320 (owners.tsprobes), #286 (approve.github_review).Related Issue
Closes #327
Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88