fix(session): follow compression continuations for transcript reads - #41520
fix(session): follow compression continuations for transcript reads#41520konsisumer wants to merge 1 commit into
Conversation
|
✅ Verified — compression continuation chain resolution in session message reads Reviewed the diff for
The fix is complete and consistent across both entry points. No issues found. |
|
For maintainer context on #34089, which already has two open PRs:
This PR is intentionally scoped to a distinct, non-overlapping surface: the transcript-read endpoints ( Caveat: if #34351 + #39005 already make the read endpoints resolve the continuation tip end-to-end, this becomes redundant and can be closed — otherwise it covers the read path they do not touch. |
|
Merged via #41882 (commit 3714caa on main). Your commit was cherry-picked with your authorship preserved in git log. This closes the last #34089 read-path gap — Desktop and remote API readers now follow the compression continuation tip instead of hydrating an empty root. Clean, well-scoped fix with regression coverage for both endpoints. Thanks! (CI on the salvage PR only ever failed on a transient GitHub-release-CDN 504 in the ripgrep install step — unrelated to the change; admin-merged once the code was verified green on every test shard.) |
What changed and why
Per the follow-up on 2026-06-07, this narrows the issue to transcript-read paths that still use the pre-compression session id directly.
gateway /resumealready redirects throughSessionDB.resolve_resume_session_id(), but bothhermes_cli.web_serverandgateway.platforms.api_serverwere still reading/api/sessions/{id}/messagesfrom the stale root id. After compression, that can leave Desktop or remote session readers hydrating an empty conversation even though the live transcript exists on the continuation child session.This patch makes both message-read endpoints resolve the session id through
resolve_resume_session_id()before loading messages, and returns the resolved live session id in the API response. It also adds regressions for the local web server and gateway session API so compressed conversations hydrate from the continuation tip instead of the empty root.Fixes #34089
How to test
pytest tests/gateway/test_session_api.py -q -k "session_messages_follow_compression_tip or session_crud_and_message_history"pytest tests/hermes_cli/test_web_server.py -q -k "get_session_messages_follows_compression_tip or search_dedupes_compression_lineage_to_tip or search_keeps_branch_specific_hits_on_branch"/api/sessions/<old-root-id>/messagesand confirm the response returns the childsession_idand the child transcript.What platforms tested on
python -m py_compile hermes_cli/web_server.py gateway/platforms/api_server.py tests/hermes_cli/test_web_server.py tests/gateway/test_session_api.pySessionDB.resolve_resume_session_id()sanity check confirmedroot -> tipand message load from the continuation.fastapi/starletteare not installed here and aiohttp test servers cannot bind localhost sockets under the worker restrictions.