Repository navigation
fix(compression): apply the lossy policy to the default-combo fallback - #15609
Merged
diegosouzapw merged 4 commits intoOct 6, 2026
Merged
diegosouzapw merged 4 commits into
diegosouzapw merged 4 commits into
Conversation
handleChatCore's legacy default-combo fallback installs the default compression combo's pipeline after resolveBasePlan has already applied the lossy-request policy. So an operator-edited default combo, for example one with rtk added, ran its lossy steps on requests that sent no x-omniroute-compression opt-in. The fallback also replaced a plan the request header had chosen, such as a named combo. defaultComboForRequest now yields to a plan the header chose and runs the default combo's pipeline through applyLossyRequestPolicy. With allow-lossy the full combo runs; every other request gets only its safe steps. Unit tests replace the skipped integration test that expected rtk to run on the seeded default combo.
planFromHeader treated any truthy combos-map value as a plan the header chose. A combo with an empty pipeline (reachable via setEngineInDefaultCombo) then won the precedence race, made the default-combo fallback yield, and let the builtin rtk/caveman pipeline run lossy on a request that never opted in: the exact outcome the lossy policy exists to prevent. The unguarded plain-object lookup also resolved prototype keys (constructor, toString) to truthy garbage. The named-combo branch now requires Array.isArray with length > 0. The default-combo fallback logs when it skips for a request carrying a compression header, the predicates module comment matches its three exports, and unit tests pin the empty-pipeline, single-engine, resolvable-engine-header, and prototype-key cases.
…ression-default-combo-lossy
diegosouzapw
merged commit Oct 6, 2026
9d6d1ad
into
diegosouzapw:release/v3.8.52
41 of 51 checks passed
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
Related Issues
Validation
Tests Added Or Updated
Coverage Notes
open-sse/ changes are covered by the three unit files above plus the integration file. The full compression aggregate (1682 tests) and typecheck:core pass on the merged tree. Evidence: _artifacts/suite-final.log and the QA report (verdict pass, 4/4 contracts) in .gstack/qa-reports/qa-report-compression-default-combo-2026-10-05.md.
Reviewer Notes