Repository navigation
fix(api): accept enableRenderers in RTK compression config schema (#6703) - #6757
Merged
diegosouzapw merged 1 commit intoJul 10, 2026
Conversation
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.
Problem
Saving compression settings in the Dashboard (or calling the RTK config/test APIs)
fails with an HTTP 400 validation error:
{"error":{"message":"Invalid request","details":[{"field":"rtkConfig","message":"Unrecognized key: \"enableRenderers\""}]}}This blocks:
PUT /api/settings/compression(Dashboard "Save")POST /api/context/rtk/testPUT /api/context/rtk/configRoot cause
rtkConfigSchemainsrc/shared/validation/compressionConfigSchemas.tsis declaredwith Zod
.strict(), but it was missing theenableRenderersfield — even though thatfield is part of the RTK config everywhere else:
open-sse/services/compression/types.ts→DEFAULT_RTK_CONFIGhasenableRenderers: false✅open-sse/services/compression/engines/rtk/configSchema.ts→RTK_SCHEMAhasenableRenderers✅src/shared/validation/compressionConfigSchemas.ts→rtkConfigSchemamissing ❌The flow that triggers it:
enableRenderers: falsefromDEFAULT_RTK_CONFIG.enableRenderers..strict()sees the unknown key and rejects the whole request with 400.Fix
Add
enableRenderers: z.boolean().optional()tortkConfigSchema, right afterpreserveDocstrings— mirroring the type inDEFAULT_RTK_CONFIG/RTK_SCHEMA..strict()is preserved, so genuinely unknown keys are still rejected.stripCodeComments: z.boolean().optional(), preserveDocstrings: z.boolean().optional(), + enableRenderers: z.boolean().optional(), }) .strict();Verification
New regression test
tests/unit/rtk-enable-renderers-6703.test.ts.Before the fix (reproduces the reported error):
After the fix:
The test also asserts
.strict()still rejects a genuinely unknown key, so the anti-typoguard is unchanged.
Diff summary
src/shared/validation/compressionConfigSchemas.ts— addenableRenderers(+1 line)tests/unit/rtk-enable-renderers-6703.test.ts— new regression test (+41 lines)Closes #6703.
Thanks for the precise root-cause report — the field-by-field comparison made this a one-line fix.