-
Notifications
You must be signed in to change notification settings - Fork 24
[quality] evaluateMerge's merge-queue fallbacks (no entry, no position, no enqueuer) are untested in tide.ts #218
Copy link
Copy link
Open
Labels
agent/qualityCreated by Hive for agent-filed issue provenanceCreated by Hive for agent-filed issue provenancehive/covered-by-prHive verified that an open PR references or claims this issue; still actionable until confirmedHive verified that an open PR references or claims this issue; still actionable until confirmedhive/hosted-available-lke648397-260827-5q9tCreated by Hive for agent-filed issue provenanceCreated by Hive for agent-filed issue provenanceneeds-kindqualityCreated by Hive for agent-filed issue provenanceCreated by Hive for agent-filed issue provenancetestingCreated by Hive for agent-filed issue provenanceCreated by Hive for agent-filed issue provenance
Description
Activity
Metadata
Metadata
Assignees
Labels
agent/qualityCreated by Hive for agent-filed issue provenanceCreated by Hive for agent-filed issue provenancehive/covered-by-prHive verified that an open PR references or claims this issue; still actionable until confirmedHive verified that an open PR references or claims this issue; still actionable until confirmedhive/hosted-available-lke648397-260827-5q9tCreated by Hive for agent-filed issue provenanceCreated by Hive for agent-filed issue provenanceneeds-kindqualityCreated by Hive for agent-filed issue provenanceCreated by Hive for agent-filed issue provenancetestingCreated by Hive for agent-filed issue provenanceCreated by Hive for agent-filed issue provenance
Finding
src/plugins/tide.tsis at 100% lines but 94.62% branches. Three of the uncovered arms are real behaviour in the merge-queue path ofevaluateMerge, each reached when GitHub's GraphQL answer omits somethingsrc/utils/mergeQueue.tsalready parses (and unit-tests) as optional:isInMergeQueue: truewithmergeQueueEntry: null: the skip reason is the barein the merge queue(no position/state).enqueuePullRequestreturnsmergeQueueEntry: null: the verdict is{ result: 'enqueued' }with noposition, and the info line isenqueued pr #Nwith no suffix.enqueuer: null:enqueuedByBotis false and the debug line namesan unknown actor; the pr is left in the queue.The GraphQL fixture in
__tests__/testUtils.ts(mergeQueueGraphql) cannot produce any of those shapes — it always fills in an entry, a position of 3 and an enqueuer — so__tests__/plugins/tideMergeQueue.test.tsnever reaches them.Evidence
npm run test:coverageonmain@ c48bd6d —tide.ts100% lines / 94.62% branches;coverage-final.json(--coverage.reporter=json) lists the zero-count arms at lines 137, 138, 256, 304, 329, 330, 361, 424, 543 plus one infetchMergeability.__tests__/bundle/bundle.test.ts, which drives the ncc bundle indist/againstfakeGithub.ts. It runs in the samevitestprocess and CI job (.github/workflows/test.yml,npm run test:coverage) but exercisesdist/index.js, notsrc/, so its coverage is not attributable to these lines and cannot be merged with the unit data. ItsfakeGithub.tsmerge-queue fixture (L29, L155, L167) likewise always supplies an entry, position and enqueuer, so it does not reach these arms either. Rated as unit-only evidence for that reason.Recommendation
MergeQueueFixtureanswerentry: null,entry.enqueuer: nullandenqueuePosition: null.__tests__/plugins/tideMergeQueue.test.tsasserting the exact verdict and log line.The other uncovered arms (L137–138
mergeOncenon-numeric status, L256compare.files ?? [], L424mergeable ?? null, L543loadTidewithout a base) are pure defensive fallbacks and are left out of scope.Priority
Filed by quality agent (hold-gated mode)
🐝 Hive Agent:
quality| Instance:hosted-available-lke648397-260827-5q9t| SHA:c48bd6d— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88