Conversation
…ck races
Two Sentry issues were firing from development traffic without pointing
at a real bug:
- ODE-DEAMON-5 "This limiter has been stopped." — CoalescedUpdateQueue
fired jobs with `void limiter.schedule(...)`. When clear() called
`limiter.stop({ dropWaitingJobs: true })`, Bottleneck rejected the
dropped job promises, which then surfaced as unhandled rejections.
Attach a .catch handler that also resolves any still-pending enqueue
callers with undefined so they don't hang.
- ODE-DEAMON-2/3 "message_not_found" on Slack update/delete — these are
expected races (the status message was already deleted or replaced,
often during shutdown/finalization). Filter them out of the Sentry
delivery-failure hook while keeping the counters intact in
deliveryStats. Add the same filter for Discord `unknown_message` and
generic `not_found` on update/delete. Send failures and
channel_not_found are still captured.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Clean up two Sentry issues firing from
ode-deamonthat were not pointing at real bugs:This limiter has been stopped.— dropped Bottleneck jobs inCoalescedUpdateQueue.enqueuewere leaking as unhandled rejections on shutdown. Attach a.catchand resolve any still-pending enqueue callers withundefinedso they don't hang.message_not_foundonupdate/delete— expected race when the status message was already deleted or replaced (very common during shutdown/finalization). Filter these out of the Sentry delivery-failure hook while keeping counters indeliveryStatsintact. Same filter covers Discordunknown_messageand genericnot_foundon update/delete.Send failures and
channel_not_foundcontinue to surface in Sentry because those usually indicate a real permission/auth problem.Changes
packages/shared/queue/coalesced-update-queue.ts— replacevoid limiter.schedule(...)with a.catchthat also settles the enqueue promise.packages/core/observability/sentry.ts— newisBenignDeliveryFailure()helper, applied beforecaptureMessage.coalesced-update-queue.test.ts, newsentry.test.ts).Test Plan
Added tests reproduce the ODE-DEAMON-5 unhandled-rejection scenario and cover the benign-failure classification.
Sentry Issues Addressed