Repository navigation
test(app): pin that a seen-only delivery store logs no store error on the done and forget arms - #663
Merged
Conversation
… the done and forget arms receiveWebhook settles a claimed delivery through store.done?.() and store.forget?.(), which DeliveryStore declares optional. The test that named this case asserted only that the handled promise resolved, so dropping either optional call (Stryker OptionalChaining survivors at webhook.ts:97 and :105) still passed: settle() catches the TypeError and emits 'delivery store: done failed: store.done is not a function' at error level on every successful delivery. The test now drives both arms with a seen-only store and asserts the sink carries no error line. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> 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 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
receiveWebhook(src/adapters/app/webhook.ts:97,105) settles a claimed delivery throughstore.done?.(id)andstore.forget?.(id), whichDeliveryStoredeclares optional. The existing test "handles a delivery with a store that records neither outcome" asserted only thathandledresolved, so a Stryker probe oversrc/adapters/app/{webhook,dedupe,scope}.ts+src/utils/{octokit,base64,comments}.tsat a192ee1 (187 mutants, 7 survived) showed bothOptionalChainingmutants surviving: with the?.dropped,settle()catches theTypeErrorand emitsdelivery store: done failed: store.done is not a functionat error level on every successful delivery, and the test still passed.This PR changes only
__tests__/adapters/app/webhook.test.ts: that test now installs a recording sink, drives the done arm (accepted delivery) and the forget arm (unusable installation → 400) against a seen-only store, and asserts no error-level line is logged. Verified locally: 19/19 pass on main's source; applying either mutant fails the test with the exact spurious error line.The other five survivors were read and judged equivalent, so no test was added for them:
new Response(…, { status: 200 })→{}×2 (200 isResponse's default),comments.ts:57(comment.body ?? '')→ filler string (the marker is never a substring of it),comments.ts:58debug text (unasserted log text, same class as the documentedhold.ts:71survivor),comments.ts:77/\[bot\]$/→/\[bot\]/(a GitHub login carries[bot]only as a suffix). These files are outside the nightly Stryker set by design (stryker.config.mjs: bounded merge-decision set,--mutatefor anything else), so no survivor-table entry indocs/contributing.mdapplies.Disjoint from held #658–#662: none of them touch
webhook.test.tsorwebhook.ts.Related Issue
None — found by a local mutation probe this session; the fix is one test, so no issue was opened for it.
Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88