docs(rewrite): spec and implementation plan for M1, Go session store over the existing SQLite - #1132
Closed
ElioNeto wants to merge 2 commits into
Closed
docs(rewrite): spec and implementation plan for M1, Go session store over the existing SQLite#1132ElioNeto wants to merge 2 commits into
ElioNeto wants to merge 2 commits into
Conversation
…g SQLite First of four milestones towards reading and continuing Claude Code and Codex sessions from teamcode. M1 makes go-core able to own session persistence on the same opencode.db and drizzle schema the TypeScript side uses today, without changing TypeScript behavior. Covers file opening rules, schema ownership and the degraded mode when the schema is outdated, the data model with opaque JSON for message and part payloads, the id scheme, the write rules copied from the TS projectors, the /v1/session HTTP surface, the rewritten event bus with per-session sequence and replay, TS and Go coexistence on one file, and the test plan including TS-vs-Go parity and a concurrency test. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Fourteen tasks with tests first: SQLite opening and schema check, TS-compatible ids with a cross-language fixture, session, message, part, todo and fork persistence, sequenced event log, /v1/session and /v1/events handlers with degraded mode, TS-versus-Go parity by table dump, single-file concurrency, read budget, CI job and cleanup of the unused JSON session store. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Owner
Author
|
Superseded by #1133, which carries the same spec and plan plus the edits made during implementation (§3.2 column-shape check, §4.2 fork body and list rules, §7.5 no-race budget). Branch deleted. |
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.



What
Design spec and implementation plan for M1, the first of four milestones towards reading and continuing Claude Code and Codex sessions from teamcode. M1 makes go-core able to own session persistence on the same
opencode.dband drizzle schema the TypeScript side uses today, without changing TypeScript behavior.Files:
docs/rewrite/spec-m1-go-session-store.mddocs/rewrite/plan-m1-go-session-store.md(14 tasks, tests first, full code per step)Decisions recorded
modernc.org/sqlite, no cgo) over the existing file and schema; ApexStore stays on the roadmap phase.__drizzle_migrations(max(created_at) = 1781910501000) and runs degraded (503 schema_outdated) when behind.message.dataandpart.dataare opaque JSON in Go; onlystep-finishcost and tokens are read, for session usage counters./v1/session/*mirrorsSession.Servicemethod by method with the TS wire shapes; existing/session/*stays until M2.seq, replay ring and no silent drops (internal/eventlog); legacyinternal/eventbusstays for/session/eventsuntil M2.id.ts, TS-vs-Go parity by table dump, concurrency on one file, 50k-message read budget, CI job forgo-core/.Follow-ups (not in this PR)
Execution of the plan (separate PRs per task group), then M2 (TS talks to go-core, dual write), M3 (Claude Code and Codex converters in Go), M4 (TUI list,
import --from,external_sessiontool).🤖 Generated with Claude Code