Skip to content

fix(honcho): bound gateway session ids - #14129

Closed
LeonSGP43 wants to merge 1 commit into
NousResearch:mainfrom
LeonSGP43:fix/honcho-gateway-session-key-limit-13868
Closed

fix(honcho): bound gateway session ids#14129
LeonSGP43 wants to merge 1 commit into
NousResearch:mainfrom
LeonSGP43:fix/honcho-gateway-session-key-limit-13868

Conversation

@LeonSGP43

Copy link
Copy Markdown
Contributor

Summary

  • sanitize long gateway_session_key values through a deterministic Honcho session-id helper
  • keep per-chat session IDs under Honcho's 100-character limit while preserving stable prefixes and uniqueness
  • add a regression test covering long Matrix-style gateway keys

Testing

  • pytest -o addopts='' tests/honcho_plugin/test_client.py

Closes #13868

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/plugins Plugin system and bundled plugins labels Apr 22, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Likely duplicate of #13931 — both fix gateway_session_key exceeding Honcho's 100-char session ID limit (#13868), using truncation in honcho/client.py.

@Bartok9

Bartok9 commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Re-verified against current origin/main (27c486e3b): this appears resolved. plugins/memory/honcho/client.py already sanitizes gateway session keys (re.sub(r'[^a-zA-Z0-9_-]+', '-', ...)) and bounds them via _enforce_session_id_limit against _HONCHO_SESSION_ID_MAX_LEN = 100, truncating over-limit keys to a sanitized prefix plus a sha256 hash suffix so distinct long ids don't collide. That's the same bound-and-sanitize this PR set out to add.

Recommend closing as superseded — happy to be corrected if I've misread the current state.

@teknium1

Copy link
Copy Markdown
Contributor

Thanks for the focused Honcho regression fix. This automated hermes-sweeper review found that the requested behavior is already on current main.

  • plugins/memory/honcho/client.py:648 bounds sanitized session IDs to 100 characters and appends a deterministic SHA-256 suffix; resolve_session_name() applies it to gateway_session_key at :699-701.
  • tests/honcho_plugin/test_client.py:745 already covers long Matrix-style keys, determinism, allowed characters, and non-collision for shared prefixes.
  • The equivalent fix shipped in cd1c4812abe8731dc485f15da14412c1f9e6f60e (fix(honcho): truncate resolve_session_name output to Honcho's 100-char limit (#13868)), included in v2026.4.30.

This also confirms the June 26 re-verification comment that the PR is superseded.

@teknium1 teknium1 closed this Jul 12, 2026
@teknium1 teknium1 added the sweeper:implemented-on-main Sweeper: behavior already present on current main label Jul 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/plugins Plugin system and bundled plugins P2 Medium — degraded but workaround exists sweeper:implemented-on-main Sweeper: behavior already present on current main type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: resolve_session_name sanitizes gateway_session_key without length truncation, overflows Honcho's 100-char session ID limit

4 participants