Files
hermes-webui/api
e7da197d4f fix(branch): preserve displayed conclusion in session forks (#6735)
* fix(branch): slice fork transcript in GET /api/session merged-view coordinates

keep_count sent by forkFromMessage is an index into the merged display
view (sidecar lineage stitched across compression snapshots, append-only
merged with state.db rows, parent backfill). The branch handler sliced the
raw sidecar instead, which diverges from that view in both length and
content after compactions: forks from the final conclusion landed rows
too early, ending the fork mid tool-run and dropping the conclusion.

Build source_messages through the exact same pipeline as the
GET /api/session load_messages path for non-messaging sessions.

Regression test: test_branch_route_slices_merged_display_view_not_raw_sidecar
(fails on the old code with the fork ending on a tool row).

* fix(branch): align fork source with display bounds

---------

Co-authored-by: Anthony Ruiz <ruizanthony@users.noreply.github.com>
Co-authored-by: nesquena-hermes <nesquena+hermes@gmail.com>
2026-08-08 22:57:09 +00:00
..