Skip to content

chore(coverage): v8-ignore requireMatchingLabel's bundle-unreachable non-Error arm at the rule loop's catch - #549

Merged
mrbobbytables merged 1 commit into
mainfrom
quality/coverage-require-matching-label-non-error-arm
Oct 21, 2026
Merged

mrbobbytables merged 1 commit into
mainfrom
quality/coverage-require-matching-label-non-error-arm

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Coverage annotation

npm run test:coverage:e2e on main @ 88241f4 reports one zero-hit branch that no open held PR names: src/plugins/requireMatchingLabel.ts BRDA:167 — the : e arm of ${rule.missing_label}: ${e instanceof Error ? e.message : e} in requireMatchingLabel()'s per-rule catch. #548 identified it as bundle-unreachable and left it out of scope. This marks it with /* v8 ignore next -- … */, the form src/utils/config.ts:657 takes in #544 and src/utils/config.ts:219 already uses on main. No behaviour change; the unit test that drives the arm stays. dist/ repacked (comment lines only).

record arm why the bundle cannot reach it
src/plugins/requireMatchingLabel.ts BRDA:167 the rule loop's catch: the non-Error arm Every await in apply() rewraps its rejection in new Error(...) first: labelIssue (labeling.ts:66), removeLabels (labeling.ts:185), createComment (comments.ts:34), botCommentsWithMarker (requireMatchingLabel.ts:245) and deleteMissingComments (requireMatchingLabel.ts:233). evaluate, sameLabel and markerFor are pure.

Placement: the hint sits on the alternate operand of the ?:, so the Error arm stays measured. The unit lane keeps driving the alternate directly: reports a non-Error rejection from a rule verbatim (__tests__/plugins/requireMatchingLabel.test.ts:407) spies labeling.labelIssue to reject with the string 'rate limited'.

Files / functions claimed: src/plugins/requireMatchingLabel.ts (requireMatchingLabel, the per-rule catch), dist/index.js. Disjoint in src/ from every open held PR: #510 is auth.ts, #537 is lgtm.ts, #544 is run.ts / command.ts / config.ts, #530 is sweep.ts / blunderbuss.ts / config.ts; #520 touches only __tests__/plugins/requireMatchingLabel.test.ts. dist/index.js is shared with #510, #537 and #544; git merge-tree --write-tree HEAD pr-510|pr-537|pr-544|pr-520 exits 0 for each (no textual conflict).

Verification (this branch, local)

  • npm run build && npx eslint src/plugins/requireMatchingLabel.ts && npm run pack: clean; dist/index.js diff is the three comment lines
  • npm run test:coverage:e2e: 83 files / 502 tests pass; coverage-e2e/lcov.info now carries only BRDA:169,23,0,2 for this site (no zero-hit record); branches 1636/1656 (98.79 %) → 1636/1655 (98.85 %)
  • npm run test:coverage: 163 files / 2206 tests pass, 100 % lines / 99.75 % branches (1651/1655), thresholds met

Related Issue

None supplied for this kick; this PR is the finding and the fix for the one branch it names.


Filed by quality agent (hold-gated mode). Human review required.

— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88

…non-Error arm

Every await in apply() rewraps its rejection in new Error, so the
e instanceof Error ? e.message : e fold at the rule loop's catch can only
take its Error arm from dist/index.js. Mark the alternate with
/* v8 ignore next */, the form config.ts already uses, so the e2e lane stops
reporting a branch no bundle input can reach. The unit test that drives the
arm stays. dist/ repacked (comment lines only).

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 October 21, 2026 13:03
@hivecommons-hive hivecommons-hive Bot added the hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 21, 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

Copy link
Copy Markdown
Contributor

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

@mrbobbytables mrbobbytables left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Copilot review performed under the maintainer's explicit authorization to update, review, release reviewed holds, and merge eligible PRs in this cleanup.

Every awaited operation in apply wraps failures as Error before the rule-loop catch. The hint targets the primitive alternate only and retains the live Error arm and existing unit assertion.

Verified successful build-test, e2e-coverage and DCO results on head 839630c. Any folded issue findings remain assigned to the canonical destinations in the updated scope tables.

@mrbobbytables mrbobbytables 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 Oct 21, 2026
@mrbobbytables
mrbobbytables merged commit ee398e8 into main Oct 21, 2026
18 checks passed
mrbobbytables pushed a commit that referenced this pull request Oct 26, 2026
…overage work landed (#556)

Measured npm run test:coverage:e2e on main@e3119ad with #528, #537, #544,
#548 and #549 merged: 100 / 99.46 / 100 / 100 (1686/1695 branches). The
97 floor set at 1062ce7 (97.96 measured) now sits 2.46 pp under main;
98 keeps the same just-under-main convention. 99 was considered and not
taken: it would leave 8 branches of slack, two of which are already
consumed by the negative-count await artifacts at approve.ts:504 and
auth.ts:220 that no test can recover.

Closes #551

Signed-off-by: quality <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Co-authored-by: quality <280983584+hivecommons-hive[bot]@users.noreply.github.com>
@mrbobbytables
mrbobbytables deleted the quality/coverage-require-matching-label-non-error-arm branch October 26, 2026 20:19
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.

1 participant