Repository navigation
fix(installer): a fallback list of mappings converges - #25
Merged
Merged
Conversation
An owner override such as
fallback_providers = [{"provider":"litellm","model":"reason"}]
was applied on every install and --check never came back clean. Hermes
prints a list of mappings as a YAML block, and the installer compared
that text with the JSON line in settings.conf, so the two never matched.
_cfg now reads such a block back as a list of mappings, and the check
and the install compare both sides in one form (JSON, sorted keys,
values as text). Other values compare as before. No new dependency: the
installer still runs on a plain python3.
The test double now prints a mapping list the way Hermes does, which is
why the existing tests did not catch this.
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 and why
A follow-up to #24. An owner override such as
is applied on every install, and
install.py --checknever comes back clean. Hermes prints a list of mappings as a YAML block (- provider: litellmwithmodel: reasonunder it). The installer compared that text with the JSON line insettings.conf, so the two never matched._cfgnow reads such a block back as a list of mappings.settings_problemsand_apply_settingscompare both sides in one form (JSON, sorted keys, values as text). Other values compare as before. There is no new dependency, so the installer still runs on a plainpython3.The #24 tests missed this because the test double printed every list as
- itemlines.tests/hermes_fake.pynow prints a mapping list the way Hermes does.Related issue
Follow-up to #24.
Type of change
How to test
python -m pytest tests -q. Two new tests are intests/test_install_template_overrides.py. One checks that a JSON fallback list is applied once and then reports clean. The other checks that a different mapping is still reported.<Hermes home>/crew/templates/worker/settings.conf. Runinstall.py, theninstall.py --check.fallback_providersis no longer listed for the worker profile.Platform tested on
Linux: the test suite on Python 3.12, and step 2 against 4 real role profiles on Ubuntu 26.04. Not run on Windows or macOS. The change is string parsing only, with no paths or processes.
Checklist
fix(scope):,feat(scope):)python -m pytest tests -qpasses (894 passed, 3 skipped)