Notice: one-way migration of Session transcripts to the RuntimeEvent ledger #4866
Astro-Han
started this conversation in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
This is a notice, not a design thread. The technical discussion lives in #4791 and should stay there.
What is changing
Ordinary execution history is currently written twice: to
session_messagesasStoredMessage, and toruntime_eventsasRuntimeEvent. #4791 removes the double write and makesRuntimeEventthe single authority.StoredMessageremains as an API and UI projection type only.Existing local Sessions are converted to
RuntimeEvents once, during the upgrade, by an extension of the Session Importer. The read path, recovery, paging, unread markers, goal context, subagent summaries and the Agent Graph consumers all move in the same PR, so the repository never carries a half-migrated state.Why this needs a notice
The migration is not reversible. Once it runs, downgrading to a build from before the cutover cannot read its own data. The compatibility epoch covers the protocol, not the data.
The conversion is a total function: every legacy row produces something, and anything that cannot be mapped to a structured event becomes a text event carrying its rendered content with legacy provenance. No Session and no line of conversation is dropped. Three classes of fact are known not to survive as structured events, because the old records never held them:
turn_staterows, which the backfiller has never converted. A gap here has to be closed before any write removal.system_noterows, including the eight kinds that are part of the user-visible transcript.Tool calls, tool results, token usage and permission decisions do convert faithfully; an earlier claim of mine in #4791 that they would be lost was wrong and is corrected there.
The upgrade window is proportional to total history. It will be measured, bounded and resumable after a crash before this ships.
What I am asking for
Objections to the one-way migration itself. Design feedback, file-level review and alternatives belong in #4791, where three of us have already converged on the plan.
I am not holding the work for a comment window. The PR goes up as a draft shortly and review continues there; raise a blocking objection here or on the PR at any point before it merges.
All reactions