Skip to content

fix(config): stop config set compression.<lcm_knob> crying wolf - #537

Merged
Kyzcreig merged 1 commit into
mainfrom
fix/lcm-config-key-validation
Aug 10, 2026
Merged

Kyzcreig merged 1 commit into
mainfrom
fix/lcm-config-key-validation

Conversation

@Kyzcreig

Copy link
Copy Markdown
Collaborator

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.

`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.
@Kyzcreig
Kyzcreig added this pull request to the merge queue Aug 10, 2026
Merged via the queue into main with commit 6f66e6b Aug 10, 2026
44 checks passed
@Kyzcreig
Kyzcreig deleted the fix/lcm-config-key-validation branch August 10, 2026 00:58
@Kyzcreig

Copy link
Copy Markdown
Collaborator Author

FleetReview

Confidence: 3/5

Findings

  • P1 hermes_cli/config_defaults.py:627 — compression.skew_floor default declared as 0.55 silently lowers the built-in compressor's late-compaction guard from 0.7
  • P2 hermes_cli/config_defaults.py:615 — Comment's "NOT by the core compressor" premise is false for skew_floor/calibration_hard_frac, and schema-declaring them makes config_defaults.py the effective source of truth

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant