Name the reaper's hard delete in the eventBodyQuery comment (closes #455)
check / check (push) Waiting to run

The comment 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.

Model: opus-5-5
This commit is contained in:
2026-10-02 16:48:49 +00:00
committed by sneak
parent 40f59ec4d2
commit 0f04b8d9a0
+6 -4
View File
@@ -15,10 +15,12 @@ import (
// eventBodyQuery reads one event's stored body as bytes. The cast // eventBodyQuery reads one event's stored body as bytes. The cast
// to blob is what makes the driver hand back the stored bytes // to blob is what makes the driver hand back the stored bytes
// rather than a string conversion, so Content-Length taken from // rather than a string conversion, so Content-Length taken from
// the result matches what goes on the wire. The soft-delete // the result matches what goes on the wire. The retention reaper
// predicate is spelled out because Raw bypasses GORM's default // deletes event rows outright, so a reaped event is simply gone
// scope, and it is what stops a reaped event still being // and the query finds no row. The deleted_at predicate repeats
// downloadable. // the soft-delete scope GORM adds to its own queries, which Raw
// bypasses; nothing soft-deletes an event, so today it excludes
// nothing.
const eventBodyQuery = "SELECT cast(body as blob) " + const eventBodyQuery = "SELECT cast(body as blob) " +
"FROM events WHERE id = ? AND webhook_id = ? AND deleted_at IS NULL" "FROM events WHERE id = ? AND webhook_id = ? AND deleted_at IS NULL"