Repository navigation
test(bundle): serve a bodyless comment to approvalEvents through dist/index.js - #509
Open
hivecommons-hive[bot] wants to merge 1 commit into
Open
hivecommons-hive[bot] wants to merge 1 commit into
hivecommons-hive[bot] wants to merge 1 commit into
Conversation
…/index.js approvalEvents folds comment.body ?? '' (src/plugins/approve.ts:101) before reading a command, but every bundle scenario served a body on each listed comment, so the absent arm only ran in the unit suite. Two pull_request_review cases now list a comment with no body: alone it is not an approval and an approver is suggested; followed by /approve it is skipped and the approval lands. Signed-off-by: quality <280983584+hivecommons-hive[bot]@users.noreply.github.com>
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 Hive will keep the |
Contributor
|
Please add a kind label with |
This was referenced Oct 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Test Improvement
Files claimed:
__tests__/bundle/approveBodylessComment.test.ts(new, test-only). Function:src/plugins/approve.tsapprovalEvents(line 101,comment.body ?? ''). Nosrc/,dist/or workflow change.GitHub's REST
issue-commentschema typesbodyas optional, but every bundle scenario that listsGET /issues/1/commentsfor the approve plugin serves a body on each comment. Atmain@1062ce7,npm run test:coverage:e2ereports the absent arm with zero hits (coverage-e2e/lcov.info:BRDA:101,4,1,0underSF:src/plugins/approve.ts; the file at 96.62 % branches). The unit suite covers it (npx vitest run --coverage, same revision: 100 % lines / 98.87 % branches for the file).Re-checked on #508's head (bodyless comments for
comments.ts,requireMatchingLabel.ts,trigger.ts): still zero hits there, so this arm is disjoint from #508, and from #497 (effectiveKind/upsertNotifier, approve.ts 228/230/409/415), #498, #504 and #505.Two
pull_request_reviewcases, each listing a comment from an approver (bob) with nobody, drivingdist/index.jsagainst the fake api:approve: #1 is not approved; nobody approves sdk/x.go, no label write, notifier suggestsalice/approvefromalice: the bodyless one is skipped,approvedis added, notifier namesaliceonlyVerification (local, this branch,
main@1062ce7+ this commit)npx eslint __tests__/bundle/approveBodylessComment.test.tscleannpx vitest run __tests__/bundle/approveBodylessComment.test.ts: 2 passednpm run test:coverage:e2e: 78 → 79 files, 487 → 489 tests;BRDA:101,4,1,0→BRDA:101,4,1,2;src/plugins/approve.ts96.62 → 97.19 % branches; suite 97.96 → 98.02 % branches (lines unchanged at 99.95 %)Related Issue
Refs #499 — the hive folded this finding into #499 as a tracker; this PR lands only the
approve.ts:101e2e arm folded there. The threshold /docs/contributing.mddeliverables that #499 was opened for ship in #500.Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88