You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
V2 beta: isolate storage/database from stable OpenCode data #34831
Before a broader V2 beta/release, V2 should use a storage namespace/database that cannot interfere with the existing stable OpenCode database.
Why
In release prep discussion, the team called out that beta users should not corrupt or migrate production/stable user data. This is especially important while V2 table schemas, event names/versions, and migration-sensitive data are still being reviewed.
Scope
Decide whether V2 uses a separate SQLite database file, directory, namespace, or migration channel from stable/main OpenCode.
Ensure starting V2 does not eagerly migrate or mutate stable user data unless explicitly intended.
Document the migration/rollback behavior for beta users.
Verify CLI/TUI/Desktop/server paths all resolve the intended V2 storage location.
Add a smoke/regression check if there is a clean seam for it.
On current dev, latest, beta, and prod all resolve to opencode.db; opening the database applies migrations. A beta release channel alone therefore does not isolate V2.
I propose a first milestone:
Give V2 a generation-specific database name (e.g. opencode-v2-beta.db) through the shared core resolver, including Desktop's embedded server. Keep stable's existing path unchanged.
Start with an empty V2 database; do not automatically import or migrate stable data. Rollback means reopening stable with its original database, retaining V2 data separately.
Treat OPENCODE_DB and OPENCODE_DISABLE_CHANNEL_DB explicitly: avoid silently opting a V2 release back into stable storage.
Add resolver coverage and a startup regression that checks stable schema/journal/data remain unchanged; check CLI/TUI/server/Desktop resolve the same V2 path.
The shared data root also contains auth and auxiliary files, so database isolation alone is not full directory isolation. Should this milestone retain shared auth/config while isolating session/event storage, or should V2 have a separate data directory too? Please have the core team review and approve this boundary before implementation.
Activity
Dante-dan commentedon Oct 1, 2026
On current dev,
latest,beta, andprodall resolve toopencode.db; opening the database applies migrations. A beta release channel alone therefore does not isolate V2.I propose a first milestone:
opencode-v2-beta.db) through the shared core resolver, including Desktop's embedded server. Keep stable's existing path unchanged.OPENCODE_DBandOPENCODE_DISABLE_CHANNEL_DBexplicitly: avoid silently opting a V2 release back into stable storage.The shared data root also contains auth and auxiliary files, so database isolation alone is not full directory isolation. Should this milestone retain shared auth/config while isolating session/event storage, or should V2 have a separate data directory too? Please have the core team review and approve this boundary before implementation.