Skip to content

fix(session): follow compression continuations for transcript reads (#34089) - #41882

Merged
teknium1 merged 1 commit into
mainfrom
hermes/salvage-41520
Jun 8, 2026
Merged

fix(session): follow compression continuations for transcript reads (#34089)#41882
teknium1 merged 1 commit into
mainfrom
hermes/salvage-41520

Conversation

@teknium1

@teknium1 teknium1 commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

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}/messages resolves the id through SessionDB.resolve_resume_session_id() before loading messages, and returns the resolved live id.
  • hermes_cli/web_server.py: same fix on the CLI/Desktop get_session_messages endpoint (after the existing prefix resolution).
  • Regression tests for both endpoints: a root session compressed into a child continuation hydrates from the child tip.

Root cause

/resume already redirects through resolve_resume_session_id(), but the two message-read endpoints still called get_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

Before After
GET /messages on compacted root id empty transcript, root id child transcript, child id
tests/gateway/test_session_api.py + tests/hermes_cli/test_web_server.py 268 passed

Salvaged from #41520 by @konsisumer; original commit cherry-picked with authorship preserved. (Author already in AUTHOR_MAP.)

Infographic

Follow the compression tip

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

🔎 Lint report: hermes/salvage-41520 vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 10114 on HEAD, 10111 on base (🆕 +3)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 5238 pre-existing issues carried over.

Diagnostics are surfaced as warnings — this check never fails the build.

@teknium1
teknium1 merged commit 3714caa into main Jun 8, 2026
30 of 38 checks passed
@teknium1
teknium1 deleted the hermes/salvage-41520 branch June 8, 2026 06:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants