Repository navigation
fix(message): enforce outbound queue capacity and horizon - #36
Merged
Merged
Conversation
Neup123
force-pushed
the
fix/outbound-queue-capacity-worker
branch
from
September 23, 2026 13:10
9ae494f to
c046947
Compare
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.
Fixes #35\n\n## What changed\n- enforce sent + pending/processing capacity for instance and recipient minute/day limits\n- enforce unique new/dormant outreach daily capacity\n- reject a new queued item when its calculated send time is more than the configurable queue-tail gap\n- add OUTBOUND_QUEUE_MAX_TAIL_GAP_SECONDS (default 120)\n- return detailed 429 capacity/horizon fields\n- add worker delivery/reschedule/failure logs\n- add regression tests and documentation\n- bump Evolution API to 5.5.1\n\n## Live diagnosis\nThe v5.5.0 worker did run at the due time. It delivered one of 60 queued outreach messages and rescheduled 59 after the current outreach quota allowed only one slot. The primary defects were over-admission and poor observability.\n\n## Verification\n- npm run test:outbound-queue\n- npm run test:outbound-safety\n- npm run lint:check\n- npm run build\n- database-backed test runs in CI with provisioned PostgreSQL