Repository navigation
Conversation
|
I checked this on current
The Q1, Q2, Q3 FIFO test is a good invariant test and can move over as is, next to the other tests in After those changes it is a small, focused diff. I have not opened a competing PR, so this one can carry the fix. |
|
I reproduced the recursion-cap overwrite on current |
58a2cd5 to
bea3d26
Compare
|
@Adolanium thanks, that was exactly the right pointer. I ported the fix to the split modules and force-pushed the branch (rebased on current
Local run of the 8 affected gateway test files: 37 passed, 0 failed. Diff is 3 files, +64/-4. @driptothebone thanks for reproducing this and for the offer. I've just finished the port myself, but your real runner/adapter tests (ten messages through the depth cap, separate text/photo/document payloads) would be a valuable addition. Feel free to open a PR against my branch |
|
@Adolanium thanks again for the pointer. The port to the split modules is in ( |
|
FIFO/requeue review: the updated split-module port preserves event identity instead of feeding the recursion-cap item back through merge semantics. |
What does this PR do?
Prevents accepted
/queueturns from being silently dropped when the gateway reaches its interrupt recursion cap.The failure occurs after the current FIFO head has been drained and
_promote_queued_event()has already staged the next item in the adapter's single pending slot. The recursion-cap path then requeues the current event by merging it into that same slot, overwriting the staged successor.Example state transition before this fix:
This PR restores the unprocessed current event at the FIFO head while first moving any staged successor back to the front of overflow:
Each accepted queue item therefore remains a separate full turn in original arrival order.
Related Issue / PR overlap
No dedicated issue found.
The recursion-cap behavior also appears inside broader platform-specific PRs #72674 (Email boundaries) and #76818 (Slack recovery). This PR intentionally isolates the generic message-loss fix and regression test on current
main, without taking either PR's unrelated Email or Slack changes.Type of Change
Changes Made
gateway/run.py_requeue_event_at_front()to restore the drained event without overwriting an already promoted successor.merge_pending_message_event().tests/gateway/test_queue_consumption.pyQ1 → Q2 → Q3regression that reproduces drain, promotion, recursion-cap requeue, and complete FIFO consumption.How to Test
Local result on Linux:
git diff --check: passedThe full repository suite was started successfully but not completed locally because it currently contains more than 20,000 tests; the focused Gateway regression set above was run through the canonical wrapper.
Checklist
Code
Documentation & Housekeeping
cli-config.yaml.example: N/A; no config keys changedCONTRIBUTING.md/AGENTS.md: N/A; existing FIFO architecture is preserved