[omp major] PingHook runs full backlog in the request goroutine #155
Labels
No labels
actions
bug
cli
duplicate
enhancement
fork
forum
git storage
help wanted
insights
invalid
issues
moderation
oidc
ownership transfer
packages
pr/merge protection rules
projects
pull requests
question
releases
sponsorships
tags
webhooks
wiki
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
crueber/walhub#155
Loading…
Reference in a new issue
No description provided.
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?
[omp major]
PingHookruns full backlog in the request goroutineinternal/notify/webhooks.go:665: ping replays the full backlog synchronously — 256 events × 10s POST ≈ 43 min worst case, holding the admin's HTTP request open and racing background delivery for the same hook.Fix
Bound the ping (e.g. single synthetic
pingevent through the normal loop, or a capped recent-window replay with a short deadline), return promptly. Regression test (backlog present → ping returns fast, delivery proves URL+secret end to end). Coverage gate holds.Acceptance criteria
-race.Fix ready for review: PR #161 (branch fix/issue-155). PingHook now POSTs exactly the synthetic ping event instead of replaying the backlog in the request goroutine. internal/notify: -race green, coverage 96.0%, gofmt/vet clean.
Reviewed PR #161 (
e21a40c, fix for #155: bounded webhook ping) in scratch worktree /tmp/pr161 (removed afterward). Main worktree untouched (read-only).FINDINGS — all review criteria hold, no fixes needed:
VERIFICATION (scratch worktree @
e21a40c): go test -race -count=1 ./internal/notify/... -> ok (2.4s); -coverprofile -> 96.1% total; gofmt -l clean; go vet clean; -run TestPing -v -> all 7 PASS. No fixes pushed (nothing to fix). NOT merged, per instructions.MERGE RECOMMENDATION: ready to merge.
Fixed by PR #161 (review: contract preserved, backlog untouched, prompt return proven; 96.1% coverage), merged. Closing.