Skip to content

fix(config): parse structured config values - #66439

Closed
HengYangDS wants to merge 1 commit into
NousResearch:mainfrom
HengYangDS:fix/config-structured-mapping-20260718
Closed

fix(config): parse structured config values#66439
HengYangDS wants to merge 1 commit into
NousResearch:mainfrom
HengYangDS:fix/config-structured-mapping-20260718

Conversation

@HengYangDS

Copy link
Copy Markdown

Summary

  • Parse YAML list literals for list-valued configuration defaults.
  • Parse YAML mapping literals for mapping-valued defaults, including quick_commands.
  • Preserve existing string, scalar, unknown-key, and nested-key coercion behavior.

Verification

  • scripts/run_tests.sh tests/hermes_cli/test_set_config_value.py tests/hermes_cli/test_config.py tests/hermes_cli/test_config_validation.py tests/hermes_cli/test_config_drift.py tests/hermes_cli/test_config_env_expansion.py tests/hermes_cli/test_config_env_refs.py -- -q
    • 259 passed, 0 failed.
  • ruff check hermes_cli/config.py tests/hermes_cli/test_set_config_value.py
    • passed.

TDD evidence

Before the production change, the new list/mapping regression tests failed because both values were persisted as strings (57 passed, 2 failed). After the minimal change, the same test file passed (59 passed, 0 failed).

@HengYangDS
HengYangDS marked this pull request as ready for review July 17, 2026 18:08
@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/cli CLI entry point, hermes_cli/, setup wizard area/config Config system, migrations, profiles sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades labels Jul 17, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

This was generated by AI during triage.

Related: this overlaps open structured-value coercion work in #40546, #64389, #59182, and #37460. This PR is narrower (known declared list/mapping defaults only), so it is not marked a duplicate; maintainers can choose the desired validation scope.

@HengYangDS
HengYangDS marked this pull request as draft July 17, 2026 18:59
@HengYangDS
HengYangDS force-pushed the fix/config-structured-mapping-20260718 branch from 8d64ac7 to 7df3781 Compare July 17, 2026 19:14
@HengYangDS
HengYangDS marked this pull request as ready for review July 18, 2026 05:10
@HengYangDS

Copy link
Copy Markdown
Author

Closing as superseded by #64389.

#64389 contains this PR's list/mapping coercion fix and additionally validates known scalar/structured types, rejects malformed or non-JSON-compatible values before any write, and covers config-to-env round trips. Keeping one stronger review surface avoids duplicate maintenance.

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

Labels

area/config Config system, migrations, profiles comp/cli CLI entry point, hermes_cli/, setup wizard P3 Low — cosmetic, nice to have sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants