Assert the body a retry delivers, not only its status (closes #294) #450

Merged
clawbot merged 1 commits from issue-294-retry-body-assertions into next 2026-10-02 18:03:20 +02:00
Collaborator

TestProcessRetryTask_LargeBody_FetchFromDB and TestProcessRetryTask_SuccessfulRetry checked only that the delivery ended delivered. A retry that sent an empty or wrong body still passed them. Both now record the body the target received and compare it with the stored event body byte for byte. This is the same check TestProcessNewTask_LargeBody_FetchFromDB already makes on the new-delivery path.

I deleted the event-body fetch in processRetryTask by hand. Both tests then failed on the body comparison. I restored the fetch, and engine.go is unchanged in this PR.

Retry-path tests I left alone: TestProcessRetryTask_TargetPresent_StillDelivers and TestProcessRetryTask_TargetUnreadable_StillDelivers test the deleted-target check and count requests to the target, and TestWorkerLifecycle_ProcessesRetryChannel tests that the retry queue is consumed. None of them is about the body, so asserting it there would only duplicate this check.

Test change only. Closes #294.

Model: opus-5-5

`TestProcessRetryTask_LargeBody_FetchFromDB` and `TestProcessRetryTask_SuccessfulRetry` checked only that the delivery ended `delivered`. A retry that sent an empty or wrong body still passed them. Both now record the body the target received and compare it with the stored event body byte for byte. This is the same check `TestProcessNewTask_LargeBody_FetchFromDB` already makes on the new-delivery path. I deleted the event-body fetch in `processRetryTask` by hand. Both tests then failed on the body comparison. I restored the fetch, and `engine.go` is unchanged in this PR. Retry-path tests I left alone: `TestProcessRetryTask_TargetPresent_StillDelivers` and `TestProcessRetryTask_TargetUnreadable_StillDelivers` test the deleted-target check and count requests to the target, and `TestWorkerLifecycle_ProcessesRetryChannel` tests that the retry queue is consumed. None of them is about the body, so asserting it there would only duplicate this check. Test change only. Closes https://git.eeqj.de/sneak/webhooker/issues/294. Model: opus-5-5
clawbot self-assigned this 2026-10-02 17:33:18 +02:00
clawbot added 1 commit 2026-10-02 17:33:18 +02:00
TestProcessRetryTask_LargeBody_FetchFromDB and
TestProcessRetryTask_SuccessfulRetry checked only that the delivery
ended delivered, so a retry that sent an empty or wrong body still
passed. Both now compare the body received at the sink with the stored
event body, as the processNewTask large-body test already does.

Model: opus-5-5
clawbot added the needs-review label 2026-10-02 17:33:22 +02:00
Author
Collaborator

Review passed: both retry-path tests now compare the body the target received with the stored event body byte for byte, and both fail when the event-body fetch in processRetryTask is deleted.

Model: opus-5-5

Review passed: both retry-path tests now compare the body the target received with the stored event body byte for byte, and both fail when the event-body fetch in `processRetryTask` is deleted. Model: opus-5-5
clawbot merged commit 503c57efd9 into next 2026-10-02 18:03:20 +02:00
clawbot deleted branch issue-294-retry-body-assertions 2026-10-02 18:03:20 +02:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/webhooker#450