Repository navigation
fix(compression): drop the dead per-engine Preserve system prompt checkbox - #15605
Merged
diegosouzapw merged 3 commits intoOct 6, 2026
Conversation
…ckbox The Lite, Aggressive and Ultra engine pages rendered a "Preserve system prompt" checkbox that never took effect: every apply site reads the flag from the global compression settings (options.config.preserveSystemPrompt), the aggressive/ultra settings normalizers copy only named fields so a stored per-engine value never round-trips, and the Lite page never sent it (liteConfigSchema is strict and carries only compressToolResults and maxToolLength). Unchecking the box saved without error, compression kept following the global setting, and the checkbox snapped back to checked. Remove the preserveSystemPrompt field from LITE_SCHEMA, AGGRESSIVE_SCHEMA and ULTRA_SCHEMA so the engine config UI stops surfacing it; the global "Preserve system prompt" control in the compression panel remains the real switch. The engine validateConfig checks and the strict Zod step-config schemas still accept the key so stored combo step configs that carry it keep validating and PUT round-trips don't 400. Also drop the unused ok() helper from cavemanAdapter.ts and its no-unused-vars suppression entry (the file's only lint suppression).
Review-pass findings applied on top of the checkbox removal: - The regression test now pins the retained validateConfig back-compat (aggressive/ultra accept a boolean preserveSystemPrompt and reject a non-boolean), so a future cleanup cannot silently drop that acceptance, and its comment now states accurately that only the aggressive/ultra Zod step-config schemas keep the optional slot (lite's strict liteConfigSchema never had one). - Delete the orphaned compressionEngineConfig.fields.preserveSystemPrompt label from all 67 locale files. No schema exposes the field anymore, so the dynamic fields.<key> lookup in EngineConfigPage can never reach it. Removal is surgical text deletion verified per file by JSON parse and deep-compare against base minus exactly that key; i18n UI coverage and the localization contract suite stay green.
diegosouzapw
merged commit Oct 6, 2026
5a82a1c
into
diegosouzapw:release/v3.8.52
43 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
The Lite, Aggressive and Ultra engine pages (
/dashboard/context/lite,/aggressive,/ultra) rendered a "Preserve system prompt" checkbox that never took effect:options.config.preserveSystemPrompt), incavemanAdapter.tsandstrategySelector.ts.liteConfigSchemais strict and carries onlycompressToolResultsandmaxToolLength.So unchecking the box saved without error, compression kept following the global setting, and the box snapped back to checked on the next load.
Changes:
preserveSystemPromptfield fromLITE_SCHEMA,AGGRESSIVE_SCHEMAandULTRA_SCHEMAso the engine config UI stops surfacing it. The global control in the compression panel remains the real switch.validateConfigchecks and the strict aggressive/ultra Zod step-config schemas still accept the key, so stored combo step configs that carry it keep validating and PUT round-trips don't 400. Lite's strictliteConfigSchemanever had a slot for the key (unchanged).ok()helper fromcavemanAdapter.tsand removed itseslint-suppressions.jsonentry (the file's only suppression).compressionEngineConfig.fields.preserveSystemPromptlabel from all 67 locale files, verified per file by JSON parse and deep-compare against base minus exactly that key.Related Issues
Validation
npm run lint(eslint with the suppressions file: clean on changed files)Tests Added Or Updated
tests/unit/compression/engine-registry.test.ts: new regression test "does not expose a per-engine preserveSystemPrompt control". Verified red while the field was present (fails on lite, then aggressive/ultra) and green after the schema removal, per TDD. Also pins the retainedvalidateConfigback-compat for aggressive/ultra (boolean accepted, non-boolean rejected) so a future cleanup cannot silently drop it, and scopes the rationale comment accurately (only the aggressive/ultra Zod schemas keep the optional slot).Coverage Notes
open-sse/; coverage of the changed paths: 8/8 tested (100%), 0 gaps. Dead-code deletions (theok()helper, the locale labels) are not paths.Pre-Landing Review
/ponytail-review: clean, nothing to cut (diff already net-negative)./gstack-review(testing + maintainability specialists, two in-host adversarial passes, exploratory QA; converged after one fix cycle): 0 unresolved defects, quality 10/10. Fixed during review: validator back-compat pins (operator-approved), stale test comment scoped accurately, orphaned i18n label deleted from 67 locales (operator-approved).preserveSystemPromptwhile omniglyph honors step-level values. Out of scope, unchanged by this branch.validateLiteConfigrejectsmaxToolLength: nullwhileliteConfigSchemaallows null. Unreachable today (noupdateEngineConfigcaller passes user input).Design Review
No frontend files changed (locale JSON is data; the UI renders from the schema). Design review skipped.
Eval Results
No prompt-related files changed. Evals skipped.
Scope Drift
Scope Check: CLEAN. The diff matches the stated intent: dead checkbox removal, test hardening, dead i18n label. No unrelated files touched.
Plan Completion
No plan file detected. Intent source: operator task description plus commit messages; every step delivered (consumer survey, schema removal, TDD red-then-green regression test, review fixes).
Verification Results
npm run typecheck:core, eslint with suppressions. The fulltests/unit/compression/directory also ran 1661/1661 during review.npm run i18n:check-ui-coveragePASS (100% in all 66 locales after the key removal);tests/unit/dashboard-localization-contract.test.ts14/14.npm run i18n:checkfails ondocs/architecture/QUALITY_GATES.mddrift: pre-existing on base (the file is not in this diff).Documentation
Docs audit executed: no document describes the per-engine checkbox; the only
preserveSystemPromptmention in docs (COMPRESSION_ENGINES.md, omniglyph profile section) describes the global/per-step flag this PR does not touch.check:docs-allpasses on identical doc bytes (the branch touches no doc files). No doc edits needed.Reviewer Notes
preserveSystemPromptsemantics with omniglyph; widen the schema-absence test to the full engine registry.