Repository navigation
test: drive the v3.5.0 failure arms end-to-end and the three unit-only misses - #658
Conversation
…y misses The fix PRs that shipped in v3.5.0 (#638, #639, #640, #649) added src/ arms the bundle suite never reached, and the e2e run dropped from 100 % to 99.19 % lines without failing its 99 floor. Add one bundle scenario per reachable arm (exclusive-family refusal, bare /remove, the two milestone write failures, blunderbuss's per-reviewer retry after a 422, the sweep's per-base setup failure) and unit tests for the three branches only the bundle reached (labeledBySelf without a sender, the tokenLogin memo hit, a review whose user is gone). #649 moved the documented await artefact in approve.ts from line 502 to 516; the contributing guide now points at the right line. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> 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.
Read the diff against the tree at 341cff1; every cited src/ arm checks out. Test-only change (+211/−2, no src/ or dist/ edits), CI green including e2e-coverage and shuffle. Looks correct to me.
What I verified:
- Bundle scenarios match the arms they claim.
prefixed.ts:98-99throwstakes one value; got …on an exclusive family before any label read/write;remove.ts:46throwsremove: command args missing from body;milestone.ts:54/:83wrap the twoissues.updatefailures ascould not clear/set milestone;blunderbuss.ts:214-227falls back torequestEachonly on a 422 and fails the run whenacceptedis empty (:224-226), warning per refused reviewer (:240);sweep.ts:132-141collects the per-basesetup:error once (memoized tree listing) and returns early per PR. The new test assertions (request counts, bodies, error strings) line up with each of those paths. - Unit additions hit real DA-0 arms.
approve.ts:501-503returnsfalsefor a non-string sender without ever callingtokenLogin, so the no-viewer-query assertion is the right probe;approveReview.ts:61-70memoizes the viewer promise per API base URL andnormalizeLoginlowercases, sosecond === firstand'prow-bot'are both correct;blunderbuss.ts:253flat-mapsuser?.login === undefinedto[], so auser: nullreview leaves every candidate eligible. - Memo-test isolation. The
tokenLogintest depends on an emptytokenLoginsmap;__tests__/setup.ts:55installs a freshactionsPlatform()(freshnewRunState(),src/adapters/actions.ts:14) in a globalbeforeEach, so it is order-independent — consistent with the shuffle job passing. - Docs fix is right.
approve.ts:516is now theif (!hasOwners)with its condition assigned from an awaited ternary (:515) — exactly the implicit-else-after-await artefactdocs/contributing.md:94documents;:502no longer is.
PR body matches the diff; the coverage numbers claimed are plausible given the arms added, and the four remaining App-only lines are out of scope per #657. This is hold-gated for human review; nothing here blocks it from my side.
— hive: agent=reviewer backend=copilot model=claude-fable-5 copilot=1.0.88
Test Improvement
The fix PRs in v3.5.0 (#638, #639, #640) added
src/arms no bundle scenario reached, and thee2e-coveragerun slid from 100 % to 99.19 % lines without crossing its 99 floor — the floor bounds drift, it does not catch single arms, as its own comment says. This adds the scenarios so the floor's headroom is restored rather than lowered.Files and what each claims:
__tests__/bundle/releaseV350FailureArms.test.ts(new):/level a bexclusive refusal (prefixed.ts:99), bare/remove(remove.ts:46), both milestonePATCHfailures (milestone.ts:55,:84), blunderbuss's 422 → per-reviewer retry with one accepted and with none (blunderbuss.ts requestEach), and the sweep's per-base-branchsetup:failure over two pull requests sharing a base (sweep.ts:139-141).__tests__/plugins/approveEvents.test.ts:labeled approvedwith nosenderis evaluated without a viewer query (approve.ts:502-503, unit DA 0 onmain).__tests__/plugins/approveReview.test.ts:tokenLoginhands the second caller the first promise (approveReview.ts:65memo arm).__tests__/plugins/blunderbuss.test.ts: a review withuser: nullcounts for nobody (blunderbuss.ts:253).docs/contributing.md:94: the documented V8 await artefact moved fromapprove.ts:502to:516in fix(app): resolve the bot's own identity instead of assuming github-actions[bot] #649; the stale reference was sitting on a genuine miss.Measured locally on this branch with
npm run test:coverage:e2e: 2613/2617 lines (99.84 %), 1768/1779 branches, 587/591 functions; 580/580 bundle tests. The four lines still unreached are App-only (requireMatchingLabel.tsdeferred arm andresumeRequiredLabels,platform/index.ts:61) and cannot be driven throughdist/index.js— see #657 for why they are left as they are. Changed unit files pass under--sequence.shuffle;npm run typecheckandeslintare clean. Nosrc/ordist/change.Related Issue
Closes #657
Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88