fix(plugins): skip stale outbox claims so a reply is not posted twice #768
No reviewers
Labels
No labels
backend
bug
chore
duplication
effort:complex
effort:medium
effort:trivial
enhancement
follow-up
frontend
fullstack
priority:high
ready-for-agent
refactor
security
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
dries/ocman!768
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/conversation-stale-claim"
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?
Summary
pumpConversationOutboxclaims rows without a lease. A pump that reads a row before a concurrent delivery acknowledges it can still pass the in-flight check after that delivery finishes, so it posts the reply a second time.deliverConversationReplynow re-checks before sending that the row is still pending, due, and has the same attempt count (PluginConversationReplyCurrent). A real at-least-once replay (acknowledgment lost) still happens, because that row stays pending.TestConversationUnavailableOutcomeReachesThreadflaky in CI ("redelivery produced 2 unavailable notices"), for example on PR #755.Testing
TestConversationStaleClaimIsNotResent: it failed before the fix (reply posted twice) and passes after it.go test ./internal/server ./internal/state,go vet, andgolangci-lintpass.47f5fc193ada4feed4caView command line instructions
Checkout
From your project repository, check out a new branch and test the changes.