Skip to content

test: drive the v3.5.0 failure arms end-to-end and the three unit-only misses - #658

Merged
jeefy merged 1 commit into
mainfrom
quality/test-e2e-drift-after-638-649
Nov 1, 2026
Merged

jeefy merged 1 commit into
mainfrom
quality/test-e2e-drift-after-638-649

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Test Improvement

The fix PRs in v3.5.0 (#638, #639, #640) added src/ arms no bundle scenario reached, and the e2e-coverage run 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 b exclusive refusal (prefixed.ts:99), bare /remove (remove.ts:46), both milestone PATCH failures (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-branch setup: failure over two pull requests sharing a base (sweep.ts:139-141).
  • __tests__/plugins/approveEvents.test.ts: labeled approved with no sender is evaluated without a viewer query (approve.ts:502-503, unit DA 0 on main).
  • __tests__/plugins/approveReview.test.ts: tokenLogin hands the second caller the first promise (approveReview.ts:65 memo arm).
  • __tests__/plugins/blunderbuss.test.ts: a review with user: null counts for nobody (blunderbuss.ts:253).
  • docs/contributing.md:94: the documented V8 await artefact moved from approve.ts:502 to :516 in 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.ts deferred arm and resumeRequiredLabels, platform/index.ts:61) and cannot be driven through dist/index.js — see #657 for why they are left as they are. Changed unit files pass under --sequence.shuffle; npm run typecheck and eslint are clean. No src/ or dist/ 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

…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>
@hivecommons-hive
hivecommons-hive Bot requested a review from jpmcb as a code owner November 1, 2026 03:22
@hivecommons-hive hivecommons-hive Bot added the hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 1, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

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 outreach PR that targets a repository this hive does not manage is held at every level because it publishes project-facing communication into someone else's project.

Hive will keep the hold label until a human removes it. Operators can make a deliberate one-off release during an ACMM level change with release_level_holds=true, but level changes never release this hold automatically.

@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Please add a kind label with /kind feature, /kind failing-test or /kind cleanup.

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-99 throws takes one value; got … on an exclusive family before any label read/write; remove.ts:46 throws remove: command args missing from body; milestone.ts:54 / :83 wrap the two issues.update failures as could not clear/set milestone; blunderbuss.ts:214-227 falls back to requestEach only on a 422 and fails the run when accepted is empty (:224-226), warning per refused reviewer (:240); sweep.ts:132-141 collects the per-base setup: 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-503 returns false for a non-string sender without ever calling tokenLogin, so the no-viewer-query assertion is the right probe; approveReview.ts:61-70 memoizes the viewer promise per API base URL and normalizeLogin lowercases, so second === first and 'prow-bot' are both correct; blunderbuss.ts:253 flat-maps user?.login === undefined to [], so a user: null review leaves every candidate eligible.
  • Memo-test isolation. The tokenLogin test depends on an empty tokenLogins map; __tests__/setup.ts:55 installs a fresh actionsPlatform() (fresh newRunState(), src/adapters/actions.ts:14) in a global beforeEach, so it is order-independent — consistent with the shuffle job passing.
  • Docs fix is right. approve.ts:516 is now the if (!hasOwners) with its condition assigned from an awaited ternary (:515) — exactly the implicit-else-after-await artefact docs/contributing.md:94 documents; :502 no 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

@jeefy jeefy added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. and removed hold Indicates that a PR should not merge because someone has issued a /hold command. needs-kind labels Nov 1, 2026
@jeefy
jeefy merged commit ea58d5d into main Nov 1, 2026
18 checks passed
@jeefy
jeefy deleted the quality/test-e2e-drift-after-638-649 branch November 1, 2026 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[quality] Bundle e2e coverage drifted 100 % → 99.19 % lines across the v3.5.0 fix PRs; the 99 floor did not notice

1 participant