Repository navigation
feat(compression): persist RTK grouping config (unlock R5 enableGrouping) - #4207
Merged
Merged
Conversation
…ing) The RTK R5 grouping strategy (collapse near-equivalent consecutive lines) is read by the engine (config.enableGrouping / groupingThreshold) but was unreachable in production: the rtkConfigSchema (.strict()) rejected the two fields on write and normalizeRtkConfig dropped them on read, so they could never be anything but undefined. Add enableGrouping (bool) + groupingThreshold (int, 2..100, default 3) to DEFAULT_RTK_CONFIG, normalizeRtkConfig, and rtkConfigSchema so the feature is actually settable and survives the DB round-trip. Default stays OFF — no behavior change for existing configs. Part of the compression "100% functional" program (audit follow-up).
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This was referenced Jun 19, 2026
Merged
tkgo11
pushed a commit
to tkgo11/OmniRoute
that referenced
this pull request
Sep 23, 2026
…ing) (cheaper-inference#4207) The RTK R5 grouping strategy (collapse near-equivalent consecutive lines) is read by the engine (config.enableGrouping / groupingThreshold) but was unreachable in production: the rtkConfigSchema (.strict()) rejected the two fields on write and normalizeRtkConfig dropped them on read, so they could never be anything but undefined. Add enableGrouping (bool) + groupingThreshold (int, 2..100, default 3) to DEFAULT_RTK_CONFIG, normalizeRtkConfig, and rtkConfigSchema so the feature is actually settable and survives the DB round-trip. Default stays OFF — no behavior change for existing configs. Part of the compression "100% functional" program (audit follow-up).
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.
Contexto
Programa compressão 100% funcional (follow-up da auditoria). Item: desbloquear o RTK grouping R5.
Gap
A estratégia R5 (colapsar linhas consecutivas quase-equivalentes em
<linha> [rtk:grouped ×N]) é lida pelo engine (rtk/index.ts:330config.enableGrouping/:332groupingThreshold), mas era inalcançável em produção:rtkConfigSchema(.strict()) rejeitava os 2 campos na escrita.normalizeRtkConfigos dropava na leitura do DB.→
enableGroupingnunca podia ser nada além deundefined(sempre OFF).Fix
Adicionar
enableGrouping(bool) +groupingThreshold(int, 2..100, default 3) aDEFAULT_RTK_CONFIG,normalizeRtkConfigertkConfigSchema→ a feature agora é configurável e sobrevive ao round-trip do DB. Default continua OFF — zero mudança para configs existentes.Validação
groupingThreshold:1; (b) round-trip de DB (updateCompressionSettings→getCompressionSettings) preservaenableGrouping:true/groupingThreshold:7.DEFAULT_RTK_CONFIG.typecheck:core✅ ·eslint✅.🤖 Generated with Claude Code