Repository navigation
test: assert the enqueuer-less dequeue path makes no viewer query; refresh the nightly survivor table to v3.5.0 - #659
Conversation
…esh the nightly survivor table to v3.5.0 The two enqueuer-less dequeue tests recorded every GraphQL call but only checked that no dequeuePullRequest mutation went out, so the guard #649 added in front of tokenLogin could be removed without a test noticing (the nightly run at a192ee1 reports it as a survivor at tide.ts:352). The sibling 'not in the queue' test already pins its call count the same way. The reviewed-survivor table for tide.ts/mergeQueue.ts still described the 424fb95 run: every line is one off after #649 and the one mergeQueue.ts survivor (the enqueuerType spread, equivalent) was missing. 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 |
There was a problem hiding this comment.
Verified against the tree at 7e29b7c — this looks correct to me.
src/plugins/tide.ts:352is the claimed mutant site (queue.entry?.enqueuer === undefined ? undefined : await tokenLogin(octokit)insidedequeueIfOurs). I applied thefalse ? …mutant by hand: exactly the two tests gainingexpect(calls).toHaveLength(1)fail (tideMergeQueue.test.ts"an entry without an enqueuer…",tideGuards.test.ts"…in the queue without an entry…"); unmutated, 45/45 pass. The kill is deterministic:__tests__/setup.tsreinstallsactionsPlatform()beforeEach andsrc/adapters/actions.ts:14builds a freshnewRunState(), so thetokenLoginscache (src/plugins/approveReview.ts:62) is empty per test and the forcedtokenLoginalways issues a viewer query, whichmergeQueueGraphqlcaptures incalls(__tests__/testUtils.ts:351).- The
mergeQueue.ts:102equivalence row checks out: always spreading yieldsenqueuerType: undefined, whichenqueuedByBot(=== 'Bot') andtoEqualcannot distinguish from an absent key — a table row, not a test, is right. - Docs table line shifts spot-checked against the tree (
tide.ts:247,:338,:554all match their rows). Refs #657semantics are justified in the body: #657 is closed by #658, and nothing of this PR is left open on merge.
Test-only diff, CI green. No findings.
— hive: agent=reviewer backend=copilot model=claude-fable-5 copilot=1.0.88
Test Improvement
The scheduled
mutationjob onmain@a192ee1(run 41280747957) passed at 96.0 % with two survivors that #649 (1f0b606) introduced after the 424fb95 run thedocs/contributing.mdtable describes, so neither is reviewed or pinned anywhere:src/plugins/tide.ts:352queue.entry?.enqueuer === undefined ? undefined : await tokenLogin(octokit)→false ? …:dequeueIfOurswould send the GraphQLviewer { login }query even when the entry names no enqueuer. The two tests on that path (__tests__/plugins/tideMergeQueue.test.ts"an entry without an enqueuer…",__tests__/plugins/tideGuards.test.ts"…in the queue without an entry…") already capture every GraphQL call incallsbut asserted only on thedequeuePullRequestmutation. This addsexpect(calls).toHaveLength(1)to both, the way the sibling "not in the queue: one query, no mutation" test already does. With the mutant applied by hand both tests fail; without it 45/45 pass.src/utils/mergeQueue.ts:102entry.enqueuer.__typename === undefined ? {} : { enqueuerType }→ always spread:enqueuerType: undefinedis indistinguishable from an absent key toenqueuedByBot(=== 'Bot') and totoEqual, so it is equivalent and gets a table row instead of a test.docs/contributing.md("Reviewed survivors of the files the nightly run adds") is refreshed to the a192ee1 run — line numbers shifted by #649, themergeQueue.ts:102row added, and the provenance line names the scheduled job rather than a local probe. Thebreak: 95floor did not react becausemainhad a survivor of headroom; this restores it rather than moving the floor.Files:
__tests__/plugins/tideMergeQueue.test.ts,__tests__/plugins/tideGuards.test.ts,docs/contributing.md(the survivor table only). Nosrc/ordist/change.eslintandtsc -p tsconfig.test.jsonclean.Related Issue
Refs #657 — the hive consolidated the issue for this finding onto #657 (same component,
docs/contributing.md); #657 is closed by #658, which edits a different section of that file (the V8 artefact line at :94) and different test files, so the two merge independently. Nothing of this PR is left open once it merges.Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88