Skip to content

Add leased webhook update inbox contract - #9

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

Add leased webhook update inbox contract#9
trakhimenok merged 3 commits into
mainfrom
agent/webhook-update-inbox-store

Conversation

@trakhimenok

Copy link
Copy Markdown
Contributor

What changed

  • Add a persistence-neutral webhook update inbox keyed by platform, bot, and provider update ID.
  • Define atomic Claim, Complete, and Fail operations with lease IDs, attempts, outcomes, and timestamps.
  • Distinguish acquired, already-completed, and actively-leased updates.
  • Extend the framework fake state store for adopter tests.

Why

Webhook providers deliver at least once. A single “last update ID” cannot safely handle redelivery, concurrency, or out-of-order updates. This contract lets runtime adapters suppress the same provider update without suppressing distinct out-of-order updates.

Validation

  • Contract tests pass.
  • The companion DALgo PR covers initial claim, active-lease contention, expired-lease takeover, completion suppression, failure retry, and stale-lease rejection.

Rollout

This is the first PR in a dependency stack: store contract → DALgo adapter → framework/Telegram runtime → Debtus business idempotency. Persistence retention/TTL will be configured before production rollout.

@trakhimenok
trakhimenok force-pushed the agent/webhook-update-inbox-store branch from 2967bfc to 023758c Compare July 25, 2026 17:00
@trakhimenok
trakhimenok marked this pull request as ready for review July 25, 2026 19:02
@trakhimenok
trakhimenok merged commit c656f43 into main Jul 25, 2026
3 checks passed
@trakhimenok
trakhimenok deleted the agent/webhook-update-inbox-store 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