Fix #155: bounded webhook ping #161

Merged
crueber merged 1 commit from fix/issue-155 into main 2026-09-05 21:20:57 +00:00
Owner

Bounded PingHook: appends the synthetic ping event and POSTs exactly that event through the normal postEvent path (URL + secret proof unchanged) instead of replaying the full backlog (up to 256 events x 10s POST) synchronously in the request goroutine, racing background delivery. Backlog and cursor stay with the background webhooks task; no-backlog ping still advances the cursor past the ping. Regression tests: 300-event backlog with 50ms/post sink returns promptly with exactly one ping POST and cursor unmoved; failure shapes (500, refused) stay (false, nil) with ring detail. internal/notify: gofmt/vet clean, -race green, coverage 96.0% (gate 95%). Doc: 06 §5.3 + Decisions entry.

Bounded PingHook: appends the synthetic ping event and POSTs exactly that event through the normal postEvent path (URL + secret proof unchanged) instead of replaying the full backlog (up to 256 events x 10s POST) synchronously in the request goroutine, racing background delivery. Backlog and cursor stay with the background webhooks task; no-backlog ping still advances the cursor past the ping. Regression tests: 300-event backlog with 50ms/post sink returns promptly with exactly one ping POST and cursor unmoved; failure shapes (500, refused) stay (false, nil) with ring detail. internal/notify: gofmt/vet clean, -race green, coverage 96.0% (gate 95%). Doc: 06 §5.3 + Decisions entry.
PingHook ran deliverHook (up to 256 events x 10s POST) synchronously in
the admin's request goroutine, racing background delivery for the same
hook. It now appends the ping event and POSTs exactly that event via
the same postEvent path (proof of URL + secret unchanged), leaving
backlog and cursor to the background webhooks task. 06 §5.3 + Decisions
updated in the same change.
Sign in to join this conversation.
No description provided.