feat: keep reset session history searchable (#111194)

* feat(sessions): retain reset history in sqlite with physical disk budget

* fix(sessions): satisfy test-types, knip export scan, and docs map

* fix(sessions): align behavioral suites and flip proof with retained history, route-aware cleanup plans
This commit is contained in:
Peter Steinberger
2026-07-19 03:38:51 -07:00
committed by GitHub
parent b9c9140034
commit ef91ce5712
27 changed files with 1497 additions and 482 deletions

View File

@@ -119,12 +119,14 @@ describe("SQLite sessions/transcripts flip built CLI proof", () => {
const resetCheckpoint = report.checkpoints.find(
(checkpoint) => checkpoint.label === "after-sessions-reset",
);
// Retained history: reset keeps the old generation's SQLite rows and
// writes no reset archive artifact.
const resetArchive = resetCheckpoint?.archiveArtifacts.find(
(artifact) =>
artifact.archiveReason === "reset" && artifact.archiveSessionId === report.legacySessionId,
);
expect(resetArchive?.messageTexts).toContain("legacy hello");
expect(resetArchive?.messageTexts).toContain("sqlite user-facing send before reset");
expect(resetArchive).toBeUndefined();
expect(resetCheckpoint?.sqlite.transcriptEvents ?? 0).toBeGreaterThan(0);
const sharedFirstCheckpoint = report.checkpoints.find(
(checkpoint) => checkpoint.label === "after-shared-first-delete",
);