fix(honcho): restore profile fallback and backfill memory files - #13359
Closed
stephenschoettler wants to merge 1 commit into
Closed
fix(honcho): restore profile fallback and backfill memory files#13359stephenschoettler wants to merge 1 commit into
stephenschoettler wants to merge 1 commit into
Conversation
- fall back to session context when direct peer-card lookup is empty - backfill USER.md, MEMORY.md, and SOUL.md into existing sessions once per content hash - add regression tests for both paths
Contributor
Author
|
Superseded by #13369. The two failing checks here were caused by this branch being based on a stale main snapshot, which pulled in unrelated failures and triggered the supply-chain scan on old setup.py changes. I rebuilt the Honcho patch cleanly on current main and opened a fresh PR with only the 3 intended files changed. |
Contributor
Author
Contributor
Author
|
Closing as superseded by #13375. |
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 Description
honcho_profilecould return an empty profile even when Honcho session context already had a populated peer card. Existing sessions also never importedUSER.md,MEMORY.md, orSOUL.mdif they were created before the migration path ran.Root Cause
get_peer_card()only trusted the direct peer-card lookup path.Fix
honcho_profilefall back to session context before returning an empty resultHow to Verify
source venv/bin/activate && pytest tests/honcho_plugin/test_session.py -q.honcho_profilereturns session-context facts when direct peer-card lookup is empty.Test Plan
Manual verification:
source venv/bin/activate && pytest tests/honcho_plugin/test_session.py -qsource venv/bin/activate && python - <<'PY' from plugins.memory.honcho.client import HonchoClientConfig, get_honcho_client from plugins.memory.honcho.session import HonchoSessionManager cfg = HonchoClientConfig.from_global_config() client = get_honcho_client(cfg) mgr = HonchoSessionManager(honcho=client, config=cfg) s = mgr.get_or_create(cfg.resolve_session_name(cwd='/home/w0lf')) print(mgr.get_peer_card(s.key, peer='user')[:8]) PYRisk Assessment
Low - the fallback only activates when the direct card lookup is empty, and the backfill path is limited to non-per-session sessions with local memory files and a new content hash.