fix(nix): auto-generate config keys from Python, remove manual config-keys.json#3061
Merged
fix(nix): auto-generate config keys from Python, remove manual config-keys.json#3061
Conversation
outsourc-e
pushed a commit
to outsourc-e/hermes-agent
that referenced
this pull request
Mar 26, 2026
StreamOfRon
pushed a commit
to StreamOfRon/hermes-agent
that referenced
this pull request
Mar 29, 2026
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.
What does this PR do?
Removes
nix/config_keys.jsonas well as config drift check.Uses a nix derivation to pull in the default config.
Type of Change
Changes Made
nix/checks.nix— Added configKeys derivation in the let block that auto-generates config leaf keys from Python'sDEFAULT_CONFIGat build time. Exposed aspackages.configKeys. Removed the config-drift check (lines 104-159) that compared against a static reference file. Addedset -euo pipefailand uses$TMPDIRinstead ofmktemp -d.nix/config-keys.json— Deleted. Static reference file that required manual updates whenever DEFAULT_CONFIG changed.website/docs/getting-started/nix-setup.md— Updated the "Discovering available config keys" tip to referencenix build .#configKeys && cat resultinstead of the deleted file. Removed config-drift from the individual checks list (line 610) and the checks table (line 624).How to Test
nix flake check --print-build-logs— all 6 remaining checks pass (package-contents,entry-points-sync,cli-commands,bundled-skills,managed-guard,config-roundtripwith 7 scenarios)nix build .#configKeys && cat result— outputs a sorted JSON array of leaf keys extracted fromDEFAULT_CONFIGnix flake show—configKeysappears underpackages.x86_64-linuxAdd a new key to
DEFAULT_CONFIGinhermes_cli/config.py—nix build .#configKeyspicks it up automatically without any manual file updates (the whole point of this change)Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/A