Skip to content

feat(sessions): import the old session runtime files into sessions.db - #1848

Merged
igorjs merged 1 commit into
mainfrom
feat/issue-536-s5-import-of-old-files
Nov 15, 2026
Merged

igorjs merged 1 commit into
mainfrom
feat/issue-536-s5-import-of-old-files

Conversation

@igorjs

@igorjs igorjs commented Nov 15, 2026 •

Copy link
Copy Markdown
Member

Summary

S5 of #536 (WU-5): a one-shot migration, sessions-runtime-files-to-db, imports the old runtime/<sid>/ files into sessions.db in one transaction marked by the runtime_import meta row. It fills only null columns of an existing row, writes nothing and creates no database when no folder qualifies, and returns Repeat on a database error so later migrations run.

Notes for reviewers

  • since: next, so playbook migrate skips it until a release stamps it. The binary tests run the entry in process; the plan said through the binary.
  • About 920 lines, about 240 production, the rest tests.
  • Kept by the plan: no meta row when no folder qualifies, so a fresh install can import current-build folders as "old" (null-fill only, harmless).
  • 5 lens reviews; fixed a blocking waiting_after_prompt overwrite, weak error assertions, missing cases, the clock parameter.

Refs #536

@igorjs
igorjs enabled auto-merge November 15, 2026 07:48
@igorjs
igorjs force-pushed the feat/issue-536-s5-import-of-old-files branch from 4744f50 to a135275 Compare November 15, 2026 07:48
Add a one-shot migration, sessions-runtime-files-to-db, that reads the old
runtime/<sid>/ files (start-ts, last-clean-ts, clean-exit, activity.json)
and writes one row per session in a single transaction, marked by the
runtime_import meta row. It fills only null columns of an existing row,
never creates the database when no folder qualifies, and reports a
database error as a repeat so later migrations still run.

Refs #536

Signed-off-by: igorjs <2278164+igorjs@users.noreply.github.com>
@igorjs
igorjs force-pushed the feat/issue-536-s5-import-of-old-files branch from a135275 to 804eb75 Compare November 15, 2026 07:52
@igorjs
igorjs added this pull request to the merge queue Nov 15, 2026
Merged via the queue into main with commit 34822bf Nov 15, 2026
29 of 30 checks passed
@igorjs
igorjs deleted the feat/issue-536-s5-import-of-old-files branch November 15, 2026 08:02
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.

1 participant