feat: migrate v1 state into orchestrator v2 - #4400
Merged
juliusmarminge merged 8 commits intoJul 27, 2026
Merged
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
juliusmarminge
force-pushed
the
codex/v1-v2-state-migration
branch
from
July 24, 2026 10:12
0fff2d0 to
1d15173
Compare
juliusmarminge
force-pushed
the
codex/v1-v2-state-migration
branch
from
July 24, 2026 11:53
a5b5085 to
952df09
Compare
juliusmarminge
force-pushed
the
codex/v1-v2-state-migration
branch
3 times, most recently
from
July 24, 2026 12:31
4f338ff to
4e8f03a
Compare
juliusmarminge
force-pushed
the
t3code/codex-turn-mapping
branch
from
July 24, 2026 13:09
6b1c011 to
cd04ad1
Compare
juliusmarminge
force-pushed
the
codex/v1-v2-state-migration
branch
from
July 24, 2026 13:09
4e8f03a to
c827eba
Compare
juliusmarminge
force-pushed
the
t3code/codex-turn-mapping
branch
from
July 24, 2026 13:31
cd04ad1 to
1e58e65
Compare
juliusmarminge
force-pushed
the
codex/v1-v2-state-migration
branch
from
July 24, 2026 13:31
c827eba to
1842ade
Compare
juliusmarminge
force-pushed
the
t3code/codex-turn-mapping
branch
from
July 24, 2026 13:37
1e58e65 to
a286c60
Compare
juliusmarminge
force-pushed
the
codex/v1-v2-state-migration
branch
from
July 24, 2026 13:38
1842ade to
f9f39db
Compare
juliusmarminge
force-pushed
the
codex/v1-v2-state-migration
branch
3 times, most recently
from
July 24, 2026 16:06
f845ccf to
8008280
Compare
juliusmarminge
force-pushed
the
codex/v1-v2-state-migration
branch
from
July 27, 2026 16:58
8008280 to
4e8f49c
Compare
juliusmarminge
marked this pull request as ready for review
July 27, 2026 17:05
juliusmarminge
added a commit
that referenced
this pull request
Aug 17, 2026
Co-authored-by: codex <codex@users.noreply.github.com>
juliusmarminge
added a commit
that referenced
this pull request
Aug 28, 2026
Co-authored-by: codex <codex@users.noreply.github.com>
juliusmarminge
added a commit
that referenced
this pull request
Aug 28, 2026
Co-authored-by: codex <codex@users.noreply.github.com>
juliusmarminge
added a commit
that referenced
this pull request
Aug 28, 2026
Co-authored-by: codex <codex@users.noreply.github.com>
juliusmarminge
added a commit
that referenced
this pull request
Aug 29, 2026
Co-authored-by: codex <codex@users.noreply.github.com>
juliusmarminge
added a commit
that referenced
this pull request
Aug 29, 2026
Co-authored-by: codex <codex@users.noreply.github.com>
juliusmarminge
added a commit
that referenced
this pull request
Aug 29, 2026
Co-authored-by: codex <codex@users.noreply.github.com>
juliusmarminge
added a commit
that referenced
this pull request
Aug 29, 2026
Co-authored-by: codex <codex@users.noreply.github.com>
juliusmarminge
added a commit
that referenced
this pull request
Aug 30, 2026
Co-authored-by: codex <codex@users.noreply.github.com>
juliusmarminge
added a commit
that referenced
this pull request
Aug 30, 2026
Co-authored-by: codex <codex@users.noreply.github.com>
juliusmarminge
added a commit
that referenced
this pull request
Sep 1, 2026
Co-authored-by: codex <codex@users.noreply.github.com>
juliusmarminge
added a commit
that referenced
this pull request
Sep 2, 2026
Co-authored-by: codex <codex@users.noreply.github.com>
juliusmarminge
added a commit
that referenced
this pull request
Sep 2, 2026
Co-authored-by: codex <codex@users.noreply.github.com>
juliusmarminge
added a commit
that referenced
this pull request
Sep 2, 2026
Co-authored-by: codex <codex@users.noreply.github.com>
juliusmarminge
added a commit
that referenced
this pull request
Sep 4, 2026
Co-authored-by: codex <codex@users.noreply.github.com>
juliusmarminge
added a commit
that referenced
this pull request
Sep 5, 2026
Co-authored-by: codex <codex@users.noreply.github.com>
juliusmarminge
added a commit
that referenced
this pull request
Sep 5, 2026
Co-authored-by: codex <codex@users.noreply.github.com>
juliusmarminge
added a commit
that referenced
this pull request
Sep 8, 2026
Co-authored-by: codex <codex@users.noreply.github.com>
juliusmarminge
added a commit
that referenced
this pull request
Sep 8, 2026
Co-authored-by: codex <codex@users.noreply.github.com>
saphid
pushed a commit
to saphid/t3code
that referenced
this pull request
Sep 8, 2026
Co-authored-by: codex <codex@users.noreply.github.com>
juliusmarminge
added a commit
that referenced
this pull request
Sep 8, 2026
Co-authored-by: codex <codex@users.noreply.github.com>
juliusmarminge
added a commit
that referenced
this pull request
Sep 9, 2026
Co-authored-by: codex <codex@users.noreply.github.com>
juliusmarminge
added a commit
that referenced
this pull request
Sep 10, 2026
Co-authored-by: codex <codex@users.noreply.github.com>
juliusmarminge
added a commit
that referenced
this pull request
Sep 11, 2026
Co-authored-by: codex <codex@users.noreply.github.com>
juliusmarminge
added a commit
that referenced
this pull request
Sep 11, 2026
Co-authored-by: codex <codex@users.noreply.github.com>
juliusmarminge
added a commit
that referenced
this pull request
Sep 11, 2026
Co-authored-by: codex <codex@users.noreply.github.com>
juliusmarminge
added a commit
that referenced
this pull request
Sep 12, 2026
Co-authored-by: codex <codex@users.noreply.github.com>
juliusmarminge
added a commit
that referenced
this pull request
Sep 14, 2026
Co-authored-by: codex <codex@users.noreply.github.com>
juliusmarminge
added a commit
that referenced
this pull request
Sep 15, 2026
Co-authored-by: codex <codex@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
userdatadirectoryMigration behavior
projection_thread_messagesafter command readiness and on first open/dispatchVerification
Stacked on #2829. The released migration-order repair now lives in the parent PR.
Note
High Risk
Touches startup ordering, SQLite migration, on-disk state paths, and command/WebSocket paths where transcript hydration failures block reads and dispatch; incorrect import or path rename could strand or duplicate user data.
Overview
Migrates legacy v1 conversation state into orchestration v2 and drops the
userdata-v2/t3code-v2naming in favor of productionuserdataandt3code(desktop, server CLI, SSH remote launch).A new
LegacyV1ThreadImporterruns at startup (reconcileShells) to emit v2 events for threads that exist only in v1 projections, with lightweight shell previews (latest user + latest message). Full transcripts hydrate lazily viaensureTranscripton dispatch/projection/WebSocket subscribe, plus a backgroundimportPendingTranscriptspass after the server accepts commands. Progress is tracked in migration 043 (orchestration_v2_legacy_imports).Imported threads get
historyOrigin: v1_import.prepareLegacyImportbuilds a truncatedmanual_contexthandoff so the first native v2 turn (and provider-switch recovery after a failed run) can see imported user/assistant text without migrating v1 provider sessions.isTurnItemAtOrBeforeRuntreats runless imported items as visible for forks and provider switches.ThreadManagementServicehydrates legacy transcripts before dispatch and projection reads; hydration failures surface as dispatch/projection errors.Reviewed by Cursor Bugbot for commit 67ab204. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Migrate v1 thread state into orchestrator v2 with incremental import and context handoff
LegacyV1ThreadImporterto migrate v1 threads into the v2 orchestration system in two phases:reconcileShells(run at startup) creates thread shells with preview events, andimportPendingTranscripts(background fiber) hydrates full transcripts idempotently.prepareLegacyImporttoContextHandoffServiceV2to generatemanual_contexthandoffs carrying a text summary of imported history, capped at 32,000 characters with word-boundary truncation.ThreadManagementServiceso projections and dispatches hydrate v1 threads before execution, surfacing failures asOrchestratorProjectionErrororOrchestratorDispatchError.historyOrigin('native'|'v1_import') toOrchestrationV2AppThreadandOrchestrationV2ThreadShellcontracts, and propagates it through projection and shell utilities.orchestration_v2_legacy_imports) to track per-thread import progress.userdata-v2touserdataacross server, desktop, and SSH tunnel paths.userdata-v2→userdatarename is a breaking path change; existing non-dev installations must migrate their state directory or data will not be found.Macroscope summarized 67ab204.