Global Store Consolidation — Overview
Mirrored from
docs/design/global-store-consolidation/1_overview.md. Edit the source document in the repository, not this generated page.
High-cardinality, machine-only runtime stores now use the existing global SQLite database instead of JSON-per-record workspace files.
1. Motivation
Section titled “1. Motivation”The v2 audit envelope, job-run lifecycle, and session-learning stores grow quickly and need indexed lookup by workspace, run, state, event type, and time. Keeping those stores as JSON files under every workspace creates inode pressure and slow scans without giving humans useful review material.
2. Core Concepts
Section titled “2. Core Concepts”| Concept | Meaning |
|---|---|
| Global DB | ~/.orbit/orbit.db, opened through orbit-store::Store. |
| Workspace discriminator | workspace_id from <workspace>/.orbit/config.yaml. |
| One-shot import | Release N imports legacy JSON once and leaves the old dirs intact. |
| File-backed boundary | Friction reports and audit blobs stay on disk. |
3. At a Glance
Section titled “3. At a Glance”| Concern | File | Task |
|---|---|---|
| SQLite schema | crates/orbit-store/src/sqlite/migration/mod.rs | ORB-00276 |
| Store APIs | crates/orbit-store/src/sqlite/*_store/mod.rs | ORB-00276 |
| Runtime bootstrap import | crates/orbit-core/src/runtime/builder.rs | ORB-00276 |
| Decision | docs/design/global-store-consolidation/4_decisions.md | ORB-00276 |
Task References
Section titled “Task References”- ORB-00276 — migrated v2 audit, job-run, and session-learning state to SQLite.
Resolve any task above with orbit task show <ID> or git log --grep=<ID>.