fix(gateway): fail closed on compression state probe errors - #63422
Merged
kshitijk4poor merged 1 commit intoJul 14, 2026
Merged
Conversation
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
Fail closed when the gateway cannot verify whether context compression is currently in flight for a busy session.
Problem
GatewayRunner._session_has_compression_in_flight()protects the #56391 path: when a user sends a follow-up while context compression is rotating the session,busy_input_mode='interrupt'must be demoted to queue semantics. Otherwise the gateway can interrupt/start work against the pre-rotation parent session and fork orphaned compression siblings.The helper currently returns
Falsefor all exceptions while checking the session routing entry or readingget_compression_lock_holder(). That makes transient store/SQLite probe failures fail open: the gateway treats compression as absent and allows the interrupt path to proceed.Fix
Split structural/version-skew absence from real probe failures:
AttributeError/TypeErrorstill returnFalse, preserving the fix(compression): fail open when lock subsystem is missing (version skew) #34475 compatibility behavior for older/missing lock subsystems.True, treating compression as active so the busy handler queues the follow-up instead of interrupting the parent session.Tests