[codex] fix(bluebubbles): dedupe webhook replays without dropping edits#52239
Conversation
|
Closing this PR because the author has more than 10 active PRs in this repo. Please reduce the active PR queue and reopen or resubmit once it is back under the limit. You can close your own PRs to get back under the limit. |
Greptile SummaryThis PR refreshes the BlueBubbles webhook replay-dedupe branch off current Key changes:
Confidence Score: 5/5
Prompt To Fix All With AIThis is a comment left during a code review.
Path: extensions/bluebubbles/src/monitor.test.ts
Line: 254
Comment:
**Duplicate `resetBlueBubblesSelfChatCache` call in `beforeEach`**
`resetBlueBubblesSelfChatCache()` is called twice in a row at lines 253–254. The second call is a no-op (the cache is already empty), but it looks like an accidental copy-paste.
```suggestion
resetBlueBubblesSelfChatCache();
```
How can I resolve this? If you propose a fix, please make it concise.Reviews (1): Last reviewed commit: "fix(bluebubbles): dedupe webhook replays..." | Re-trigger Greptile |
| _resetBlueBubblesShortIdState(); | ||
| _resetBlueBubblesWebhookReplayState(); | ||
| resetBlueBubblesSelfChatCache(); | ||
| resetBlueBubblesSelfChatCache(); |
There was a problem hiding this comment.
Duplicate
resetBlueBubblesSelfChatCache call in beforeEach
resetBlueBubblesSelfChatCache() is called twice in a row at lines 253–254. The second call is a no-op (the cache is already empty), but it looks like an accidental copy-paste.
| resetBlueBubblesSelfChatCache(); | |
| resetBlueBubblesSelfChatCache(); |
Prompt To Fix With AI
This is a comment left during a code review.
Path: extensions/bluebubbles/src/monitor.test.ts
Line: 254
Comment:
**Duplicate `resetBlueBubblesSelfChatCache` call in `beforeEach`**
`resetBlueBubblesSelfChatCache()` is called twice in a row at lines 253–254. The second call is a no-op (the cache is already empty), but it looks like an accidental copy-paste.
```suggestion
resetBlueBubblesSelfChatCache();
```
How can I resolve this? If you propose a fix, please make it concise.There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 04ef85f768
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| "bluebubbles", | ||
| target.account.accountId, | ||
| eventType, | ||
| message.senderId, |
There was a problem hiding this comment.
Deduplicate equivalent
updated-message retries against new-message
If BlueBubbles replays a just-received new-message as an updated-message within the debounce window, this split key makes us process both payloads. buildInboundReplayKey() now bakes eventType into the replay cache key, and the production debouncer flushes the pending new-message before immediately forwarding the non-debounced updated-message (src/auto-reply/inbound-debounce.ts:102-107). In other words, the retry path this patch is trying to suppress still emits two inbound dispatches whenever the replay arrives before the original 500 ms debounce expires.
Useful? React with 👍 / 👎.
Summary
This refreshes the old BlueBubbles replay-dedupe PR as a clean branch off current
origin/main.The replacement carries forward the replay/edit handling work from the original branch:
updated-messageevents bypass debounce merging so rapid edits are not collapsed into one bodyupdated-messagewebhook noise still returns200 okinstead of creating retry churnIt also folds in the still-live review feedback from the old PR:
updated-messagepayloads are treated as conversational instead of being dropped as noisenew-messagereplay keyValidation
npx vitest run extensions/bluebubbles/src/monitor.test.ts -t "media-only updated-message|UUID edits when explicit edit metadata is present|text reversions back to the original body|canonical UUID churn text|text edits without explicit edit metadata when text changes"npx vitest run extensions/bluebubbles/src/monitor.test.ts -t "attachment identity changes|updated-message events that differ only by edit metadata|updated-message events when reply metadata appears later"pnpm check/ lint hooks passed duringgit commit