Files
hermes-agent/nix
Siddharth Balyan 298df0820d fix(nix): fresh declarative installs no longer warn their config predates version 12 (#126022)
* fix(nix): stamp _config_version into the declarative config.yaml

The NixOS and Home Manager modules rendered config.yaml without a
_config_version key. Hermes reads a missing key as version 0, so every
boot of a fresh declarative install ran the post-update migrate step,
which logged "This config predates version 12 ... can no longer be
auto-migrated". Hermes cannot fix this itself: in managed mode
save_config() refuses to write config.yaml, so migrate_config() can
never persist the stamp.

The module now builds the generated config with the package's own
interpreter and adds DEFAULT_CONFIG["_config_version"], so the stamp
always matches the package it ships with. An explicit
settings._config_version still wins. A user-supplied configFile is
installed unchanged.

* test(nix): a generated config.yaml is current to the packaged Hermes

Merges the module's generated config into an empty HERMES_HOME and asks the packaged check_config_version() whether it is up to date. Fails on the parent commit (v0 vs v46).
2026-09-28 11:12:16 +05:30
..
…
…
…