rowboat/apps/x
Ramnique Singh 17f18a35a1 feat(migration): port legacy runs into the turn/session runtime at startup
One-time startup migration that scans ~/.rowboat/runs/*.jsonl and converts
each legacy run into the new event-sourced runtime, so existing chats and
agent history are visible and continuable after the runtime rewrite.

Mapping (a run is one whole conversation; turn boundaries are user messages):
- copilot_chat run  -> 1 session (sessionId = original runId) + one turn per
                       user message (turn ids <runId>-tNNN).
- every other run   -> a single standalone turn whose id IS the original runId,
                       so live-note (lastRunId) and background-task (runs.log)
                       history views resolve it via sessions:getTurn with no
                       renderer change.
- code_session runs are skipped (Code mode still uses the old runtime).

- convert.ts: pure convertRun(); synthesizes a reduceTurn/reduceSession-legal
  event log (exact request refs, permission replay, denials -> runtime isError
  results, reasoning parts preserved) and validates via the reducers before
  returning.
- migrate.ts: defensive IO runner. Successful runs are moved to runs-archive/
  (that move is the idempotency guard); failures are left in place (still
  served by the runs:fetch fallback) and retried next launch. Per-run
  try/catch never blocks boot. Writes config/runs-migration.json.
- main.ts: runs before sessions.initialize() and logs an [runs-migration]
  summary (N turns across M sessions, skipped/failed counts).
- Tests: 13 cases over 4 real (redacted) run fixtures — conversion, session
  chaining, deny->error, reasoning preservation, transcript fidelity,
  archive-on-success, skip, quarantine, idempotency, and read-back through the
  real FSTurnRepo/FSSessionRepo.

Dry-run on real data: 19 runs -> 3 sessions + 21 turns, 0 failures.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-02 21:56:04 +05:30
..
apps feat(migration): port legacy runs into the turn/session runtime at startup 2026-07-02 21:56:04 +05:30
packages feat(migration): port legacy runs into the turn/session runtime at startup 2026-07-02 21:56:04 +05:30
patches fix codex unresponsive 2026-06-30 22:28:15 +05:30
.gitignore feat(x): reference-based model requests + wire-form composer 2026-07-02 14:20:44 +05:30
ANALYTICS.md add code mode: coding-agent workspace with sessions, direct/Rowboat drive, diffs, and worktrees 2026-06-12 23:57:44 +05:30
CODE_MODE_ENGINES_PLAN.md Code mode: make packaged builds work via managed engine provisioning (#625) 2026-06-17 21:53:15 +05:30
eslint.config.mts ignore renderer eslint 2026-01-16 12:05:33 +05:30
LIVE_NOTE.md Refactor builtin file tools beyond workspace scope 2026-05-25 16:21:51 +05:30
package.json ci(x): parent test harness + GitHub Actions workflow 2026-07-02 14:23:39 +05:30
pnpm-lock.yaml chore(x): lockfile for renderer test dependencies 2026-07-02 14:20:44 +05:30
pnpm-workspace.yaml fix codex unresponsive 2026-06-30 22:28:15 +05:30
tsconfig.base.json bootstrap new electron app 2026-01-16 12:05:33 +05:30