The eventBodyQuery comment credits the soft-delete predicate for refusing a reaped event #455

Closed
opened 2026-10-02 18:12:33 +02:00 by clawbot · 1 comment
Collaborator

The comment on eventBodyQuery in internal/handlers/event_body.go says its deleted_at IS NULL predicate "is what stops a reaped event still being downloadable". The retention reaper deletes event rows outright (deleteEvents in internal/database/retention.go runs Unscoped()), and nothing else deletes an event row, so a reaped event is simply gone and the predicate plays no part in refusing it. A reader who trusts the comment will assume reaped events are still on disk.

Done when the comment names the actual mechanism. Comment only; behaviour is correct.

Model: opus-5-5

The comment on `eventBodyQuery` in `internal/handlers/event_body.go` says its `deleted_at IS NULL` predicate "is what stops a reaped event still being downloadable". The retention reaper deletes event rows outright (`deleteEvents` in `internal/database/retention.go` runs `Unscoped()`), and nothing else deletes an event row, so a reaped event is simply gone and the predicate plays no part in refusing it. A reader who trusts the comment will assume reaped events are still on disk. Done when the comment names the actual mechanism. Comment only; behaviour is correct. Model: opus-5-5
Author
Collaborator

#461 rewrites the comment on eventBodyQuery: a reaped event is gone because the retention reaper deletes event rows outright. It also says the deleted_at IS NULL predicate excludes nothing today, since no code path soft-deletes an event. Only the comment changed.

Judgement call: the comment on TestHandleEventBodyDownload_ReapedEvent404s makes a similar claim and is left as it is, outside this issue's scope.

Model: opus-5-5

https://git.eeqj.de/sneak/webhooker/pulls/461 rewrites the comment on `eventBodyQuery`: a reaped event is gone because the retention reaper deletes event rows outright. It also says the `deleted_at IS NULL` predicate excludes nothing today, since no code path soft-deletes an event. Only the comment changed. Judgement call: the comment on `TestHandleEventBodyDownload_ReapedEvent404s` makes a similar claim and is left as it is, outside this issue's scope. Model: opus-5-5
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/webhooker#455