Skip to content

Deduplicate durable webhook entries before dispatch - #90

Merged
trakhimenok merged 6 commits into
mainfrom
agent/webhook-update-inbox
Jul 25, 2026
Merged

Deduplicate durable webhook entries before dispatch#90
trakhimenok merged 6 commits into
mainfrom
agent/webhook-update-inbox

Conversation

@trakhimenok

@trakhimenok trakhimenok commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

What changed

  • Add an explicit DurableWebhookEntry capability for stable provider delivery IDs.
  • Claim one leased inbox record per provider entry, process all sibling inputs under that lease, then complete once.
  • Fail the lease when input processing fails or panics; live lease contention returns a generic 503 so the provider retries.
  • Respect the HTTP envelope commit boundary: a 503 is written only before a platform response commits; committed responses are never appended or double-written.
  • Treat nil, empty, and conventional zero IDs as “no durable ID” for legacy adapters.
  • Persist only normalized safe failure classes through the store contract.

Why

Webhook delivery is at least once. Deduplicating per input would incorrectly skip sibling inputs in a provider batch; guessing durable IDs from any can collapse unrelated legacy updates.

Validation

  • go test ./...
  • go test -race ./...
  • go vet ./...
  • Router-backed multi-input claim/complete/fail lifecycle regressions
  • Pre-commit 503 and post-commit no-double-write retry regressions

Dependencies

Stacked directly on #88 (agent/sanitize-webhook-panic-response). Also depends on bots-go-framework/bots-fw-store#9; the DALgo adapter is bots-go-framework/bots-fw-store-dalgo#4. Telegram #152 and the Sneat-Go adopter follow. Draft only; do not merge out of order.

@trakhimenok
trakhimenok force-pushed the agent/webhook-update-inbox branch from 5d84b2f to 6e34262 Compare July 25, 2026 16:26
@trakhimenok
trakhimenok changed the base branch from main to agent/sanitize-webhook-panic-response July 25, 2026 16:26
@trakhimenok
trakhimenok changed the base branch from agent/sanitize-webhook-panic-response to main July 25, 2026 19:10
@trakhimenok
trakhimenok marked this pull request as ready for review July 25, 2026 19:12
@trakhimenok
trakhimenok merged commit dad6e92 into main Jul 25, 2026
8 checks passed
@trakhimenok
trakhimenok deleted the agent/webhook-update-inbox branch August 19, 2026 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant