Follow-ups from the PR 251 review: two comments state the wrong mechanism, and the resubmit route's middleware is untested #252
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Non-blocking follow-ups from the review of #251. The behaviour is correct in every case below; these are accuracy and coverage gaps.
loadResubmitSourcecredits GORM's soft-delete scope for refusing a reaped event, but the retention reaper hard-deletes —internal/database/retention.go:288usesUnscoped(). Right behaviour, wrong stated mechanism, and a reader who trusts the comment will assume reaped events are still recoverable.createAndFanOut's comment claims it is "the only path by which an event and its deliveries are created". Per-delivery replay creates a delivery without an event, so the claim overreaches.HandleEventResubmit()directly, bypassing router middleware, so auth, CSRF, ownership and rate limiting have no CI coverage on this route. All four were verified live during review (unauthenticated 403, missing/garbage/foreign CSRF 403, foreignsourceID/eventID404, rate limit 429 at ~30 with replay's bucket spending independently), but nothing pins them against regression.Done when the two comments describe the actual mechanism and the route's middleware chain is covered by tests that go through the router.