John Paul Soliva
fe8b643db6
fix(sessions): transcript exports keep compacted turns, so --delete-after-verified no longer deletes them unseen
...
In-place compaction is the default. It soft-archives every earlier row of
a session under the same id (active = 0, compacted = 1), and Desktop and
the dashboard still show those turns. The md/qmd export read the session
through export_session -> get_messages with the default live-only clause,
so it wrote only the compaction summary and the carried tail.
verify_export_file then compared the file with that same dict, and
delete_session removed every row of the session, including the archived
turns that never reached the file.
The md/qmd export now reads the display history (include_compacted), for
a single session and for --lineage logical. export_session and
export_session_lineage take include_compacted, off by default:
import_sessions inserts every message as live context, so the JSON export
and stranded-session adoption keep reading live rows only.
The other transcripts people read had the same hole without the delete:
`/save md` and `/save html` (CLI and gateway), `sessions export --format
html` (one session or all of them) and `--only user-prompts` each held 1
of 6 answers on a six-turn session after one compaction. They now read
the display history too (SAVE_TRANSCRIPT_FORMATS; export_all gains
include_compacted and reads per session then, since the display read
dedupes per session). `/save json`, JSONL and the dashboard's JSON export
stay live-only for the import reason above.
Before deleting, the verify step also re-counts the store's display rows
for every session the file covers and refuses on a mismatch. A message
that lands while the files are written, or a later export change that
reads a narrower view, now refuses the delete instead of being removed
unseen. Like the adoption retire loop, the re-count runs just before
delete_session, not inside its transaction. Rewind rows (undone turns,
the superseded originals of a carried tail) are still deleted without
being exported, as `hermes sessions delete` does: they are not part of
the history the session shows.
Measured through the real CLI on a session with 6 turns and one default
in-place compaction (15 rows, 13 shown): before, 3 messages were exported
and all 15 rows deleted, with answers 1-5 missing from the file; after,
13 messages are exported in display order, then deleted.
(cherry picked from commit adeaff1e33f1ae2b8a066ef2374bb29ade50b3b8)
2026-09-23 22:22:32 +05:30
..
2026-09-14 18:35:43 -07:00
2026-09-22 01:13:23 -07:00
2026-09-19 23:42:20 -07:00
2026-09-23 03:25:06 -07:00
2026-09-23 21:30:08 +05:30
2026-09-21 11:10:32 -07:00
2026-09-15 04:11:11 -07:00
2026-09-18 09:50:52 -07:00
2026-09-23 07:09:45 -07:00
2026-09-19 02:36:56 -07:00
2026-09-20 13:21:24 -07:00
2026-09-15 03:58:44 -07:00
2026-09-15 03:58:44 -07:00
2026-09-22 17:54:41 +05:30
2026-09-23 05:36:30 -07:00
2026-09-21 09:55:40 -07:00
2026-09-11 03:45:33 +05:30
2026-09-15 20:44:42 +05:30
2026-09-15 04:57:29 -07:00
2026-09-19 12:11:58 -07:00
2026-09-22 20:44:30 +05:30
2026-09-21 09:55:40 -07:00
2026-09-15 20:44:42 +05:30
2026-09-15 04:12:13 -07:00
2026-09-15 04:12:13 -07:00
2026-09-20 14:29:39 -07:00
2026-09-21 15:55:09 +05:30
2026-09-21 09:55:40 -07:00
2026-09-20 18:21:34 -07:00
2026-09-12 22:07:41 -07:00
2026-09-20 18:29:22 -07:00
2026-09-15 03:38:29 -07:00
2026-09-12 22:07:41 -07:00
2026-09-21 09:55:40 -07:00
2026-09-18 11:01:52 -07:00
2026-09-22 20:44:30 +05:30
2026-09-19 09:23:22 -07:00
2026-09-17 00:34:50 -05:00
2026-09-22 01:07:59 -07:00
2026-09-20 18:20:44 -07:00
2026-09-23 03:15:26 -07:00
2026-09-16 16:53:40 -07:00
2026-09-08 03:06:30 -07:00
2026-09-15 18:24:22 -07:00
2026-09-21 05:06:45 -07:00
2026-09-21 10:04:32 +05:30
2026-09-20 20:42:17 -07:00
2026-09-12 08:25:54 -07:00
2026-09-19 09:57:21 -07:00
2026-09-19 10:47:48 -07:00
2026-09-22 13:57:51 +05:30
2026-09-20 20:42:17 -07:00
2026-09-20 13:35:09 -07:00
2026-09-19 10:28:34 -07:00
2026-09-21 23:26:19 -07:00
2026-09-19 10:28:34 -07:00
2026-09-22 13:57:51 +05:30
2026-09-23 04:44:31 -07:00
2026-09-15 18:25:46 -07:00
2026-09-20 13:55:03 -07:00
2026-09-18 01:43:35 +05:30
2026-09-20 20:42:17 -07:00
2026-09-23 22:22:32 +05:30
2026-09-20 20:42:17 -07:00
2026-09-21 23:38:16 -07:00
2026-09-19 10:28:34 -07:00
2026-09-22 13:57:51 +05:30
2026-09-20 13:55:03 -07:00
2026-09-20 20:42:17 -07:00
2026-09-15 04:08:53 -07:00
2026-09-21 10:04:32 +05:30
2026-09-20 18:43:11 -07:00
2026-09-15 04:12:13 -07:00
2026-09-20 10:52:54 -07:00
2026-09-23 00:44:33 -07:00
2026-09-19 10:44:26 -07:00
2026-09-19 09:30:56 -07:00
2026-09-15 06:29:50 -07:00
2026-09-12 08:25:36 -07:00
2026-09-21 01:06:02 -07:00
2026-09-12 16:17:04 -07:00
2026-09-23 03:25:06 -07:00
2026-09-15 06:29:50 -07:00
2026-09-15 21:47:48 -07:00
2026-09-15 05:25:39 -07:00
2026-09-22 21:09:44 +00:00
2026-09-20 15:17:49 +05:30
2026-09-23 06:46:02 -07:00
2026-09-20 20:13:33 -07:00
2026-09-21 10:11:19 -07:00
2026-09-19 16:28:57 +05:30
2026-09-22 17:08:30 +05:30
2026-09-22 01:07:59 -07:00
2026-09-21 10:11:19 -07:00
2026-09-19 09:20:54 -07:00
2026-09-23 07:09:45 -07:00
2026-09-13 05:07:11 -07:00
2026-09-13 09:18:02 -07:00
2026-09-16 23:13:20 -04:00
2026-09-10 01:25:45 -07:00
2026-09-19 12:30:32 -07:00
2026-09-20 12:15:07 -07:00
2026-09-13 05:09:06 -07:00
2026-09-21 05:06:45 -07:00
2026-09-23 01:07:08 -07:00
2026-09-20 15:57:25 -07:00
2026-09-21 18:53:36 -07:00
2026-09-23 08:09:47 -07:00
2026-09-06 05:41:46 -07:00
2026-09-23 10:42:18 -04:00
2026-09-12 21:39:10 -07:00
2026-09-14 08:10:36 -07:00
2026-09-18 12:52:36 -07:00
2026-09-15 04:12:13 -07:00
2026-09-16 08:57:18 -07:00
2026-09-23 07:48:32 -07:00
2026-09-21 10:11:19 -07:00
2026-09-23 08:25:28 -07:00
2026-09-23 08:25:28 -07:00
2026-09-15 03:44:36 -07:00
2026-09-23 08:25:28 -07:00
2026-09-23 06:27:24 -07:00
2026-09-23 07:48:32 -07:00
2026-09-15 04:07:13 -07:00
2026-09-20 12:47:14 -07:00
2026-09-20 18:52:45 -07:00
2026-09-23 08:25:28 -07:00
2026-09-20 10:44:52 -07:00
2026-09-20 12:03:06 -07:00
2026-09-07 00:51:41 -07:00
2026-09-18 10:00:29 -07:00
2026-09-17 20:56:27 +05:30
2026-09-22 01:19:12 -07:00
2026-09-16 00:32:15 -07:00
2026-09-23 21:53:47 +05:30
2026-09-16 16:58:43 -07:00
2026-09-23 06:46:02 -07:00
2026-09-07 14:16:57 -07:00
2026-09-18 22:36:24 -07:00
2026-09-20 10:41:25 -07:00
2026-09-22 13:41:11 +05:30
2026-09-18 09:48:41 -07:00
2026-09-18 20:34:16 -07:00
2026-09-22 13:41:11 +05:30
2026-09-20 18:43:59 -07:00
2026-09-22 13:41:11 +05:30
2026-09-07 04:46:54 -07:00
2026-09-07 04:46:54 -07:00
2026-09-23 08:09:47 -07:00
2026-09-09 12:18:58 -07:00
2026-09-23 08:09:47 -07:00
2026-09-21 23:47:51 -07:00
2026-09-16 16:56:22 -07:00
2026-09-17 20:56:27 +05:30
2026-09-15 04:12:13 -07:00
2026-09-23 07:09:45 -07:00
2026-09-15 04:12:13 -07:00
2026-09-22 01:13:23 -07:00
2026-09-23 06:51:47 -07:00
2026-09-12 08:25:54 -07:00
2026-09-18 15:40:37 +05:30
2026-09-20 15:50:26 -07:00
2026-09-20 16:41:21 +05:30
2026-09-23 07:09:45 -07:00
2026-09-23 21:26:49 +05:30
2026-09-19 02:44:02 -07:00
2026-09-16 15:16:09 -05:00
2026-09-22 22:00:24 +00:00
2026-09-22 22:00:24 +00:00
2026-09-20 18:16:47 +05:30
2026-09-23 07:49:35 -07:00
2026-09-23 07:49:35 -07:00
2026-09-23 01:16:41 -07:00
2026-09-21 23:47:51 -07:00
2026-09-16 17:11:01 -07:00
2026-09-15 05:34:29 -07:00
2026-09-13 05:07:11 -07:00
2026-09-19 09:34:40 -07:00
2026-09-13 20:54:50 -07:00
2026-09-15 04:12:13 -07:00
2026-09-19 10:26:08 -07:00
2026-09-20 14:29:39 -07:00
2026-09-23 21:53:47 +05:30
2026-09-22 11:50:39 -07:00
2026-09-23 00:44:33 -07:00
2026-09-10 09:11:00 -07:00
2026-09-19 10:26:08 -07:00
2026-09-20 14:02:17 +05:30
2026-09-12 01:35:05 -07:00
2026-09-12 01:35:05 -07:00
2026-09-20 16:22:25 -07:00
2026-09-23 21:53:47 +05:30
2026-09-22 13:57:51 +05:30
2026-09-23 06:46:02 -07:00
2026-09-10 18:11:25 -07:00
2026-09-20 12:44:48 -07:00
2026-09-22 22:00:24 +00:00
2026-09-16 00:32:15 -07:00
2026-09-23 09:26:07 +05:30
2026-09-23 09:26:07 +05:30
2026-09-16 17:15:38 -07:00
2026-09-22 00:06:29 -07:00
2026-09-22 00:06:29 -07:00
2026-09-23 08:25:28 -07:00
2026-09-21 22:39:35 -07:00
2026-09-22 17:54:41 +05:30
2026-09-23 12:45:32 +05:30
2026-09-23 07:09:45 -07:00
2026-09-23 11:45:29 +05:30
2026-09-23 21:26:49 +05:30
2026-09-22 00:13:50 -07:00
2026-09-22 01:19:12 -07:00
2026-09-22 17:16:00 +05:30
2026-09-22 09:50:22 -07:00
2026-09-22 22:05:28 +05:30
2026-09-22 01:48:18 -07:00
2026-09-22 01:48:18 -07:00
2026-09-23 05:11:44 +05:30
2026-09-11 03:45:31 +05:30
2026-09-23 07:09:45 -07:00
2026-09-22 01:07:59 -07:00
2026-09-23 05:37:40 -07:00
2026-09-06 05:34:01 -07:00
2026-09-23 01:25:04 +05:30
2026-09-16 14:34:22 -07:00
2026-09-23 05:37:40 -07:00
2026-09-23 21:26:49 +05:30
2026-09-13 05:08:29 -07:00
2026-09-18 15:40:37 +05:30
2026-09-20 10:11:40 -07:00
2026-09-13 05:07:50 -07:00
2026-09-13 05:07:11 -07:00
2026-09-18 09:52:03 -07:00
2026-09-12 18:59:56 -07:00
2026-09-20 12:51:30 -07:00
2026-09-20 11:55:07 -07:00
2026-09-14 19:49:12 +05:30
2026-09-15 03:44:36 -07:00
2026-09-18 12:49:40 -07:00
2026-09-19 10:52:01 -07:00
2026-09-20 11:19:50 -07:00
2026-09-23 04:44:31 -07:00
2026-09-15 04:12:13 -07:00
2026-09-19 10:44:26 -07:00
2026-09-19 01:31:49 -07:00
2026-09-11 06:24:54 -07:00
2026-09-11 06:24:54 -07:00
2026-09-23 22:22:32 +05:30
2026-09-17 21:17:15 +05:30
2026-09-16 17:02:13 -07:00
2026-09-20 20:13:41 -07:00
2026-09-19 02:28:50 -07:00
2026-09-11 06:24:54 -07:00
2026-09-20 20:13:25 -07:00
2026-09-18 22:36:41 -07:00
2026-09-23 22:22:32 +05:30
2026-09-23 07:01:11 -07:00
2026-09-13 05:32:38 -07:00
2026-09-23 01:25:04 +05:30
2026-09-15 04:12:13 -07:00
2026-09-18 21:47:13 +05:30
2026-09-18 09:47:06 -07:00
2026-09-12 08:25:54 -07:00
2026-09-19 09:25:29 -07:00
2026-09-18 10:45:07 -07:00
2026-09-22 15:59:17 +05:30
2026-09-12 08:25:54 -07:00
2026-09-21 01:06:02 -07:00
2026-09-13 05:08:29 -07:00
2026-09-18 09:38:34 -07:00
2026-09-11 03:45:31 +05:30
2026-09-12 21:47:53 -07:00
2026-09-13 05:21:02 -07:00
2026-09-14 08:10:36 -07:00
2026-09-23 07:48:32 -07:00
2026-09-15 03:53:13 -07:00
2026-09-19 09:54:20 -07:00
2026-09-15 18:55:47 -07:00
2026-09-16 00:32:15 -07:00
2026-09-15 14:52:26 +05:30
2026-09-11 06:24:54 -07:00
2026-09-23 01:16:41 -07:00
2026-09-15 04:12:13 -07:00
2026-09-20 11:28:15 -07:00
2026-09-22 22:24:31 +00:00
2026-09-19 10:05:26 -07:00
2026-09-20 20:29:14 +05:30
2026-09-22 22:00:24 +00:00
2026-09-20 12:44:48 -07:00
2026-09-12 08:25:54 -07:00
2026-09-21 07:14:37 -07:00
2026-09-17 00:02:09 -07:00
2026-09-23 06:51:47 -07:00
2026-09-13 05:08:20 -07:00
2026-09-23 07:01:11 -07:00
2026-09-23 07:01:11 -07:00
2026-09-16 17:44:36 -07:00
2026-09-23 01:07:08 -07:00
2026-09-21 01:57:31 -07:00
2026-09-22 00:06:29 -07:00
2026-09-23 08:25:28 -07:00
2026-09-19 02:33:41 -07:00
2026-09-23 01:16:41 -07:00
2026-09-23 05:36:30 -07:00
2026-09-23 06:51:47 -07:00
2026-09-21 07:14:37 -07:00
2026-09-20 00:22:24 -07:00
2026-09-15 04:12:13 -07:00
2026-09-23 06:51:47 -07:00
2026-09-21 07:14:37 -07:00
2026-09-19 23:59:11 -07:00
2026-09-22 15:55:23 +05:30
2026-09-20 10:21:52 -07:00
2026-09-19 00:17:19 -07:00
2026-09-09 21:16:40 +05:30
2026-09-23 03:25:06 -07:00
2026-09-22 01:11:17 -07:00
2026-09-23 08:25:28 -07:00
2026-09-23 07:49:35 -07:00
2026-09-07 07:11:36 -07:00
2026-09-23 08:25:28 -07:00
2026-09-19 15:04:44 +05:30
2026-09-19 15:04:44 +05:30
2026-09-14 08:10:36 -07:00
2026-09-23 06:46:02 -07:00
2026-09-23 01:16:41 -07:00
2026-09-12 18:35:21 -07:00
2026-09-15 20:44:42 +05:30
2026-09-23 06:46:02 -07:00
2026-09-21 02:56:31 -07:00
2026-09-23 07:09:45 -07:00
2026-09-13 21:30:02 -07:00
2026-09-21 02:51:58 -07:00
2026-09-13 20:55:29 -07:00
2026-09-15 18:27:06 -07:00
2026-09-19 01:29:03 -07:00
2026-09-21 14:26:37 +05:30
2026-09-09 02:36:00 -07:00