─── C3 fix: dual-path dedup ────────────────────────────────────── When the outbox flag is on, the API's publish helpers must NOT also fire the legacy publisher.Publish goroutine. Two writes to webhook_subscriber_deliveries — one from the outbox worker (with event_id set) and one from publisher.Pub
| 220 | // level tests. Records best-effort + PublishTx calls and lets the |
| 221 | // test toggle Enabled() to exercise the dedup branch. |
| 222 | type fakeAgentOutbox struct { |
| 223 | enabled bool |
| 224 | publishTxN int |
| 225 | publishTxErr error // simulate PublishTx failure for fallback tests |
| 226 | bestEffortN int |
| 227 | bestEffortWrote bool // simulate PublishBestEffortTx wrote=true |
| 228 | lastPublishTx webhookpub.Event |
| 229 | } |
| 230 | |
| 231 | func (f *fakeAgentOutbox) PublishTx(_ context.Context, _ pgx.Tx, e webhookpub.Event) error { |
| 232 | f.publishTxN++ |
nothing calls this directly
no outgoing calls
no test coverage detected