fix(gateway): skip inactive honcho cache-bust reads#33535
Closed
BROCCOLO1D wants to merge 3 commits into
Closed
Conversation
deb70c2 to
d6b7064
Compare
erosika
added a commit
to erosika/hermes-agent
that referenced
this pull request
May 29, 2026
Adopted from NousResearch#33535 (BROCCOLO1D): the per-message Honcho cache-busting gate reads memory.provider to decide whether to parse honcho.json, but the provider value itself was not a busting key. A user switching memory.provider mid-gateway (e.g. honcho -> mem0) would not necessarily rebuild the cached agent on that change alone. Add ("memory", "provider") to the busting key set and cover the provider-switch signature change with a test. Co-authored-by: BROCCOLO1D <279959838+BROCCOLO1D@users.noreply.github.com>
Contributor
|
Thanks for catching this — the |
Contributor
Author
|
Closing this to avoid duplicating #33954 now that the cache-busting key was adopted there with co-authored credit. Thanks for folding it into the broader Honcho cleanup. |
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.
Summary
memory.providerishoncho.honcho.jsonmtime for active Honcho gateways.Refs #33382
Why
_extract_cache_busting_config()runs on the gateway message hot path before agent dispatch.honcho.jsonfor every provider.Changes
gateway/run.py: addsmemory.providerto cache-busting keys, gates Honcho config parsing to the active Honcho provider, and caches extracted Honcho signature fields by(path, st_mtime_ns).tests/gateway/test_agent_cache.py: covers non-Honcho skip behavior and mtime-based memoization while keeping existing agent config signature tests intact.Validation
python -m pytest tests/gateway/test_agent_cache.py::TestExtractCacheBustingConfig tests/gateway/test_agent_cache.py::TestAgentConfigSignatureUserId -o 'addopts=' -qpython -m pytest tests/gateway/test_agent_cache.py -o 'addopts=' -qpython -m ruff check gateway/run.py tests/gateway/test_agent_cache.pyScope
Note: #33440 touches the same Honcho cache-signature block but addresses manager-scoped field coverage rather than the inactive-provider skip/memoization path here.