Repository navigation
test(pullRequestOwners): omit draft/state/labels for real, pin the rename dedupe and the repository-keyed pull and tip memos - #533
Conversation
…name dedupe and the repository-keyed pull and tip memos The 'defaults ... when the pull omits them' test served the shared pullBody, which already carries draft: false and labels: [], so the draft and labels half of its title never ran. Pass undefined overrides so JSON drops the keys, add the positive draft/open case, a rename whose previous_filename another entry reuses (the Set dedupe), and a second repository for the pull memo and the base-tip memo. Each of those expressions survived deletion under both vitest suites before this change. Signed-off-by: quality <280983584+hivecommons-hive[bot]@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. Agent PRs are held at ACMM L3–L5; an Hive will keep the |
|
Please add a kind label with |
mrbobbytables
left a comment
There was a problem hiding this comment.
Copilot review performed under the maintainer's explicit authorization to update, review, release reviewed holds, and merge eligible PRs in this cleanup.
The default-field fixture truly omits the fields; rename overlap is deduplicated; pull and branch-tip memo tests distinguish repositories sharing the same identifiers.
Verified successful build-test, e2e-coverage and DCO results on head cfae542. Any folded issue findings remain assigned to the canonical destinations in the updated scope tables.
Test Improvement
src/utils/pullRequestOwners.tsis at 100 % lines and branches under both suites, but four of its expressions survive deletion unnoticed (details and the mutation probe in #532). This pins them, all in__tests__/utils/pullRequestOwners.test.ts:pullBody, which already carriesdraft: falseandlabels: [], so itsdraft/labelshalf was vacuous. It now passesundefinedoverrides foruser,draft,state,requested_reviewers,assignees,labels(JSON drops them) and assertsdraft: false,open: false,labels: [].draft/openpositive case —draft: true, state: 'open'→{ draft: true, open: true };state: 'closed'→open: false. Killspull.draft === true→!== false.a.go → b.goplus a newa.go:filesis['b.go', 'a.go'],perFile.sizeis 2. Kills thenew Set(...)removal.MockContextforOther/Repo: the same pull number is fetched again, and the same base branch name is read again. Kills dropping${owner}/${repo}from either memo key (loadPullRequestOwnersline 44,baseBranchTipline 109).Files:
__tests__/utils/pullRequestOwners.test.tsonly. Nosrc/,dist/or docs change. Disjoint from every open hold PR: #525 touches__tests__/utils/owners.test.ts,ownersAuth.test.ts,repoHasOwners.test.ts, not this file; none of #510–#531 touchespullRequestOwners.Verification (this branch, local)
npx vitest run __tests__/utils/pullRequestOwners.test.ts: 17/17 pass (was 13)draftfold,Setdedupe, both memo keys,labels ?? []default) applied tosrc/utils/pullRequestOwners.tsnow fails at least one test in this file; onmaineach passed the full unit selector and the 502-test__tests__/bundlesuite against a repackeddist/index.jsnpm run test:coverage: 163 files, 2210 passed, thresholds hold (100 / 99.75 / 100 / 100)npx eslint __tests__/utils/pullRequestOwners.test.ts: clean::warning:: … Cannot bypass a requestline in this file's output is pre-existing onmain(the forces a fresh fetch case serves no branch handler) and is unchanged hereNot in this PR
The memo keys cannot be exercised from
dist/index.js(one repository per process), and the bundlerouteOwnershelper only serves string filenames, so the rename case has no e2e twin either. Both stay unit-suite pins.Related Issue
Fixes #532
Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88