fix(honcho): respect nested host aiPeer config in SOUL.md sync#5061
Closed
MacroAnarchy wants to merge 1 commit into
Closed
fix(honcho): respect nested host aiPeer config in SOUL.md sync#5061MacroAnarchy wants to merge 1 commit into
MacroAnarchy wants to merge 1 commit into
Conversation
The SOUL.md aiPeer sync check 'cfg.raw.get("aiPeer")' only reads the
root-level aiPeer key from the raw config dict. But the Hermes setup
wizard writes aiPeer under 'hosts.<host>.aiPeer' (see cli.py line 736),
which is the canonical nested format documented in client.py.
For any user with a nested host config and a SOUL.md whose first heading
or YAML name doesn't exactly match their configured aiPeer, the sync
silently overrides the configured value with a sanitized version of the
SOUL.md heading (e.g. '# SOUL.md — Who I Am' becomes peer id
'SOUL-md---Who-I-Am').
The resolved cfg.ai_peer is set correctly from the host block at config
load time — the sync check just looked at the wrong level.
Fix: also skip the sync when cfg.ai_peer was already customized from its
default ('hermes'), which is true whenever the host block set it.
Users affected: anyone who ran 'hermes honcho setup' (which always writes
nested) and has a SOUL.md with a heading that doesn't match their aiPeer.
Contributor
|
Thanks for the detailed write-up and repro, @MacroAnarchy! This is a real bug — but it was already fixed on Automated hermes-sweeper review.
The fix in this PR is correct and the analysis is accurate; the behaviour was just resolved via a broader overhaul rather than the targeted patch here. Closing as implemented on main. |
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.
Bug
The SOUL.md
aiPeersync (added in #1969, landed via commit 9e0fc62) checkscfg.raw.get("aiPeer")which only reads the root-levelaiPeerkey from the raw config dict. But the Hermes setup wizard writesaiPeerunderhosts.<host>.aiPeer(seecli.pyline 736) — the canonical nested format documented inclient.py.For any user who ran
hermes honcho setupAND has aSOUL.mdwhose first heading doesn't exactly match their configuredaiPeer, the sync silently overrides the configured value with a sanitized version of the SOUL.md heading.Concrete repro
Config (standard wizard output):
{ "hosts": { "hermes": { "peerName": "Tiger", "aiPeer": "clawd" } } }SOUL.md:
Expected: assistant peer id =
clawdActual: assistant peer id =
SOUL-md---Who-I-Am(sanitized first heading)Result:
honcho_profile,honcho_search, and auto-injected context all return empty because the session's assistant peer has no data — the user's actual conclusions/observations were written underclawd.Fix
Also skip the sync when
cfg.ai_peerwas already customized from its default ("hermes"). The resolvedcfg.ai_peeris set correctly from the host block at config load time inHonchoClientConfig.from_global_config()— the sync check just looked at the wrong level.Testing
hosts.hermes.aiPeer: "clawd"config + SOUL.md with# SOUL.md — Who I Amheading, the sync is now correctly skipped andhoncho_profilereturns the 40-item peer card forclawd.cfg.ai_peer == "hermes"(default), so existing behavior for users who never configuredaiPeeris preserved.aiPeercheck — backward compatible with flat configs.Users affected
Anyone who ran
hermes honcho setup(always writes nested) with a SOUL.md whose heading doesn't match their configuredaiPeer.