fix(config): stop config set compression.<lcm_knob> crying wolf - #537
Merged
Merged
Conversation
`hermes config set compression.skew_floor 0.55` printed:
⚠ 'compression.skew_floor' is not a recognized config key — it was saved
anyway, but Hermes may not read it.
Hermes does read it. The LCM context-engine plugin reads several `compression.*`
keys through its own explicit `_hermes_compression_float` bridge
(plugins/context_engine/lcm/config.py), but they were never declared in
DEFAULT_CONFIG, so `_validate_config_key` classified each one as unknown.
Measured 2026-08-09 — 4 of the 5 keys the plugin reads warned falsely:
OK compression.target_ratio
MISS compression.skew_floor <- warning since it shipped
MISS compression.calibration_hard_frac
MISS compression.maintenance_min_pressure_ratio
MISS compression.maintenance_max_cache_hit_ratio
This is worse than cosmetic. The identical message is the ONLY signal for a
genuinely INERT knob — a key written to config.yaml that the runtime never reads.
That failure mode has shipped three times in this subsystem (#506 was dead until
#508 bridged it). A warning that is wrong by construction trains the operator to
ignore it, so the false positive disarms the real alarm.
Fix: declare the four keys in config_defaults.py's compression block with their
plugin defaults and a comment explaining that the plugin, not the core
compressor, reads them. Values match the plugin's own defaults, so behavior is
unchanged — this is schema declaration, not a new setting.
Deliberately NOT done: adding `compression` to the open-container escape list.
That would accept anything under `compression.` and silently swallow real typos.
Tests: 14 in tests/hermes_cli/test_lcm_compression_config_keys.py. The knob list
is DERIVED from the plugin source by regex rather than hardcoded, so a future
bridge entry added without a schema declaration fails immediately instead of
shipping another false warning. Includes a positive control (a regex matching
nothing would make the suite vacuous) and two negative controls: a typo must
still be rejected AND still produce the did-you-mean suggestion, and unrelated
garbage under `compression.` must stay unknown.
RED-proven: reverting the schema addition fails 9 of 14, including
test_a_typo_is_still_caught_and_suggested — the suggester can only propose the
real key once it is in the schema, so the fix also improves typo diagnostics.
533 passed in tests/hermes_cli -k config. The 5 failures in that selection are
pre-existing: pristine fork/main fails the same set under the same command.
Collaborator
Author
FleetReviewConfidence: 3/5 Findings
FleetReview provenance · models: B=gpt-5.6-sol, C=claude-code-opus-4-8, F=gpt-5.6-sol, G=grok-4.5 · cost: $4.15 · duration: 11m 27s · rounds: 1 · files examined: 2 |
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.
hermes config set compression.skew_floor 0.55printed:Hermes does read it. The LCM context-engine plugin reads several
compression.*keys through its own explicit
_hermes_compression_floatbridge(plugins/context_engine/lcm/config.py), but they were never declared in
DEFAULT_CONFIG, so
_validate_config_keyclassified each one as unknown.Measured 2026-08-09 — 4 of the 5 keys the plugin reads warned falsely:
This is worse than cosmetic. The identical message is the ONLY signal for a
genuinely INERT knob — a key written to config.yaml that the runtime never reads.
That failure mode has shipped three times in this subsystem (#506 was dead until
#508 bridged it). A warning that is wrong by construction trains the operator to
ignore it, so the false positive disarms the real alarm.
Fix: declare the four keys in config_defaults.py's compression block with their
plugin defaults and a comment explaining that the plugin, not the core
compressor, reads them. Values match the plugin's own defaults, so behavior is
unchanged — this is schema declaration, not a new setting.
Deliberately NOT done: adding
compressionto the open-container escape list.That would accept anything under
compression.and silently swallow real typos.Tests: 14 in tests/hermes_cli/test_lcm_compression_config_keys.py. The knob list
is DERIVED from the plugin source by regex rather than hardcoded, so a future
bridge entry added without a schema declaration fails immediately instead of
shipping another false warning. Includes a positive control (a regex matching
nothing would make the suite vacuous) and two negative controls: a typo must
still be rejected AND still produce the did-you-mean suggestion, and unrelated
garbage under
compression.must stay unknown.RED-proven: reverting the schema addition fails 9 of 14, including
test_a_typo_is_still_caught_and_suggested — the suggester can only propose the
real key once it is in the schema, so the fix also improves typo diagnostics.
533 passed in tests/hermes_cli -k config. The 5 failures in that selection are
pre-existing: pristine fork/main fails the same set under the same command.