fix(session): follow compression continuations for transcript reads (#34089) - #41882
Merged
Conversation
Contributor
🔎 Lint report:
|
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
Reading a compacted session by its old root id over HTTP now returns the live continuation transcript instead of an empty conversation — closing the last #34089 read-path gap for Desktop / remote API session readers.
Changes
gateway/platforms/api_server.py:GET /api/sessions/{id}/messagesresolves the id throughSessionDB.resolve_resume_session_id()before loading messages, and returns the resolved live id.hermes_cli/web_server.py: same fix on the CLI/Desktopget_session_messagesendpoint (after the existing prefix resolution).Root cause
/resumealready redirects throughresolve_resume_session_id(), but the two message-read endpoints still calledget_messages(root_id)directly. After compression the root has zero message rows (they live on the forked child), so readers got an empty transcript.Validation
GET /messageson compacted root idtests/gateway/test_session_api.py+tests/hermes_cli/test_web_server.pySalvaged from #41520 by @konsisumer; original commit cherry-picked with authorship preserved. (Author already in AUTHOR_MAP.)
Infographic