You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR stops the gateway from emitting a possible duplicate send warning merely because a stream consumer object exists. It keeps the diagnostic when the turn has actual streaming-delivery evidence that was not reconciled with the normal final send.
✅ Bug fix (non-breaking change that fixes an issue)
Changes Made
gateway/run_turn.py — require delivery evidence before logging the duplicate-send diagnostic.
tests/gateway/test_stream_delivery_warning.py — cover the all-false Telegram-like consumer and retain coverage for an unconfirmed preview mismatch.
How to Test
scripts/run_tests.sh tests/gateway/test_stream_delivery_warning.py — 2 passed after the fix; the idle-consumer assertion failed on origin/main while the control warning assertion passed.
BEFORE: the focused probe was RED on origin/main before this change
AFTER: - [x] scripts/run_tests.sh tests/gateway/test_stream_delivery_warning.py — 2 passed after the fix; the idle-consumer assertion failed on origin/main while the control warning assertion passed. — 2 passed
CONTROL: neighboring paths listed in How to Test still pass
Checklist
Code
✅ I've read the Contributing Guide
✅ My commit messages follow Conventional Commits
✅ I searched for existing PRs to make sure this isn't a duplicate
✅ My PR contains only changes related to this fix
✅ I've run relevant tests locally (see How to Test)
✅ I've added tests for my changes
✅ I've tested on my platform: macOS
Documentation & Housekeeping
✅ Documentation update: N/A unless noted in Changes Made
Duplicate of #103160 — that open, earlier PR changes the same elif _sc is not None branch in gateway/run_turn.py to the same streamed or previewed or content_delivered gate (and downgrades the no-signal case to info). #105446 addresses the same false positive via an interim-only consumer flag. Consider consolidating on one of the existing PRs.
Exact-head cross-link: this PR silences the idle-consumer duplicate-send WARNING when no delivery evidence exists. KEEP #111296 head dc714eac2136eac2d7eebdfe9535b348528bbaa4 is the narrower preview-only gate that matches the #111281 RCA (only _previewed without a confirming send is real duplicate risk). Prefer close-or-rebase after #111296 rather than merging both into gateway/run_turn.py.
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
area/streamingStreaming responses: gateway delivery, provider wirecomp/gatewayGateway runner, session dispatch, deliveryduplicateThis issue or pull request already existsP3Low — cosmetic, nice to havesweeper:risk-message-deliverySweeper risk: may drop, duplicate, misroute, or suppress messagestype/bugSomething isn't working
17 participants
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.
What does this PR do?
This PR stops the gateway from emitting a
possible duplicate sendwarning merely because a stream consumer object exists. It keeps the diagnostic when the turn has actual streaming-delivery evidence that was not reconciled with the normal final send.Related Issue
Fixes #110590
Type of Change
Changes Made
gateway/run_turn.py— require delivery evidence before logging the duplicate-send diagnostic.tests/gateway/test_stream_delivery_warning.py— cover the all-false Telegram-like consumer and retain coverage for an unconfirmed preview mismatch.How to Test
scripts/run_tests.sh tests/gateway/test_stream_delivery_warning.py— 2 passed after the fix; the idle-consumer assertion failed onorigin/mainwhile the control warning assertion passed.scripts/run_tests.sh tests/gateway/test_stream_delivery_warning.py tests/gateway/test_duplicate_reply_suppression.py— 11 passed, including existing final-delivery suppression coverage.streamed=False,previewed=False, andcontent_delivered=Falseproduces nopossible duplicate sendwarning.scripts/run_tests.sh tests/gateway/test_stream_delivery_warning.pyscripts/run_tests.sh tests/gateway/test_stream_delivery_warning.py tests/gateway/test_duplicate_reply_suppression.pyEvidence
scripts/run_tests.sh tests/gateway/test_stream_delivery_warning.py— 2 passed after the fix; the idle-consumer assertion failed onorigin/mainwhile the control warning assertion passed. — 2 passedChecklist
Code
Documentation & Housekeeping
cli-config.yaml.example: N/ACONTRIBUTING.mdorAGENTS.md: N/A