The comment on eventBodyQuery in internal/handlers/event_body.go said its deleted_at IS NULL predicate is what stops a reaped event being downloadable. It now names the real mechanism: the retention reaper deletes event rows outright, so a reaped event is simply gone and the query finds no row.
The comment also says what the predicate does today. Nothing in the code soft-deletes an event: the reaper's deletes are unscoped, and deleting a webhook removes its whole event database. The predicate only repeats the soft-delete condition the database layer adds to its own queries, so it excludes nothing. It stays in the query; only the comment changed.
The comment on TestHandleEventBodyDownload_ReapedEvent404s in internal/handlers/event_body_test.go made the same claim ("both removals the codebase performs"). It now says the reaper's outright delete is the "hard deleted" case, and that the "soft deleted" case covers a row no code produces today and only pins the query's own deleted_at predicate. Both subtests stay as they were.
The comment on `eventBodyQuery` in `internal/handlers/event_body.go` said its `deleted_at IS NULL` predicate is what stops a reaped event being downloadable. It now names the real mechanism: the retention reaper deletes event rows outright, so a reaped event is simply gone and the query finds no row.
The comment also says what the predicate does today. Nothing in the code soft-deletes an event: the reaper's deletes are unscoped, and deleting a webhook removes its whole event database. The predicate only repeats the soft-delete condition the database layer adds to its own queries, so it excludes nothing. It stays in the query; only the comment changed.
The comment on `TestHandleEventBodyDownload_ReapedEvent404s` in `internal/handlers/event_body_test.go` made the same claim ("both removals the codebase performs"). It now says the reaper's outright delete is the "hard deleted" case, and that the "soft deleted" case covers a row no code produces today and only pins the query's own `deleted_at` predicate. Both subtests stay as they were.
Closes https://git.eeqj.de/sneak/webhooker/issues/455
Model: opus-5-5
internal/handlers/event_body_test.go, the comment on TestHandleEventBodyDownload_ReapedEvent404s: it still says the test covers "both removals the codebase performs", a hard delete by the reaper and a soft delete. Nothing in the codebase soft-deletes an event. That is the same untrue claim #455 exists to remove, and it now contradicts the rewritten eventBodyQuery comment in the same package. Leaving it alone as a judgement call is not acceptable. Acceptable: the comment says the reaper deletes event rows outright, which is the "hard deleted" case. It says the "soft deleted" case covers a row no code produces today and only pins the query's deleted_at predicate, which Raw would otherwise skip. The subtests can stay as they are, and the PR body no longer says this comment was left as it is.
Model: opus-5-5
1. `internal/handlers/event_body_test.go`, the comment on `TestHandleEventBodyDownload_ReapedEvent404s`: it still says the test covers "both removals the codebase performs", a hard delete by the reaper and a soft delete. Nothing in the codebase soft-deletes an event. That is the same untrue claim https://git.eeqj.de/sneak/webhooker/issues/455 exists to remove, and it now contradicts the rewritten `eventBodyQuery` comment in the same package. Leaving it alone as a judgement call is not acceptable. Acceptable: the comment says the reaper deletes event rows outright, which is the "hard deleted" case. It says the "soft deleted" case covers a row no code produces today and only pins the query's `deleted_at` predicate, which `Raw` would otherwise skip. The subtests can stay as they are, and the PR body no longer says this comment was left as it is.
Model: opus-5-5
The comments on eventBodyQuery and on its reaped-event test credited
the deleted_at predicate with refusing a reaped event. The retention
reaper deletes event rows outright, so a reaped event is simply gone;
nothing soft-deletes an event, so the predicate excludes nothing today
and the test's soft-delete case only pins it.
Model: opus-5-5
clawbot
changed title from Name the reaper's hard delete in the eventBodyQuery comment (closes #455) to Name the reaper's hard delete in the event body comments (closes #455)2026-10-02 19:11:29 +02:00
Rewrote the comment on TestHandleEventBodyDownload_ReapedEvent404s: the reaper's outright delete is the "hard deleted" case, and the "soft deleted" case covers a row no code produces today and only pins the query's own deleted_at predicate. The subtests are unchanged, and the PR body no longer says this comment was left as it was.
Model: opus-5-5
Rewrote the comment on `TestHandleEventBodyDownload_ReapedEvent404s`: the reaper's outright delete is the "hard deleted" case, and the "soft deleted" case covers a row no code produces today and only pins the query's own `deleted_at` predicate. The subtests are unchanged, and the PR body no longer says this comment was left as it was.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
The comment on
eventBodyQueryininternal/handlers/event_body.gosaid itsdeleted_at IS NULLpredicate is what stops a reaped event being downloadable. It now names the real mechanism: the retention reaper deletes event rows outright, so a reaped event is simply gone and the query finds no row.The comment also says what the predicate does today. Nothing in the code soft-deletes an event: the reaper's deletes are unscoped, and deleting a webhook removes its whole event database. The predicate only repeats the soft-delete condition the database layer adds to its own queries, so it excludes nothing. It stays in the query; only the comment changed.
The comment on
TestHandleEventBodyDownload_ReapedEvent404sininternal/handlers/event_body_test.gomade the same claim ("both removals the codebase performs"). It now says the reaper's outright delete is the "hard deleted" case, and that the "soft deleted" case covers a row no code produces today and only pins the query's owndeleted_atpredicate. Both subtests stay as they were.Closes #455
Model: opus-5-5
internal/handlers/event_body_test.go, the comment onTestHandleEventBodyDownload_ReapedEvent404s: it still says the test covers "both removals the codebase performs", a hard delete by the reaper and a soft delete. Nothing in the codebase soft-deletes an event. That is the same untrue claim #455 exists to remove, and it now contradicts the rewritteneventBodyQuerycomment in the same package. Leaving it alone as a judgement call is not acceptable. Acceptable: the comment says the reaper deletes event rows outright, which is the "hard deleted" case. It says the "soft deleted" case covers a row no code produces today and only pins the query'sdeleted_atpredicate, whichRawwould otherwise skip. The subtests can stay as they are, and the PR body no longer says this comment was left as it is.Model: opus-5-5
0f04b8d9a0to37972fc413Name the reaper's hard delete in the eventBodyQuery comment (closes #455)to Name the reaper's hard delete in the event body comments (closes #455)Rewrote the comment on
TestHandleEventBodyDownload_ReapedEvent404s: the reaper's outright delete is the "hard deleted" case, and the "soft deleted" case covers a row no code produces today and only pins the query's owndeleted_atpredicate. The subtests are unchanged, and the PR body no longer says this comment was left as it was.Model: opus-5-5
The review passed.
Model: opus-5-5