Expand description
SqliteRunTraceStore — SQLite-backed RunTraceStore using
[rusqlite-isle], sharing the same database FILE as
crate::store::run::SqliteRunStore (~/.mse/store/run.sqlite by
default) in its own run_trace table. Sharing the file keeps “one
Run’s persistence” a single artifact on disk; each store still owns
its own confined Connection (its own AsyncIsle thread), so both
connections set busy_timeout to ride out each other’s short write
transactions.
§Schema
CREATE TABLE IF NOT EXISTS run_trace (
run_id TEXT NOT NULL,
seq INTEGER NOT NULL, -- per-run, 1-based, monotonic
ts_ms INTEGER NOT NULL,
kind TEXT NOT NULL, -- namespaced open set
step_ref TEXT,
attempt INTEGER,
payload_json TEXT NOT NULL,
PRIMARY KEY (run_id, seq)
);seq assignment and retention pruning run inside one transaction per
append, so concurrent appenders to the same Run cannot collide on a
seq or over-prune. Filtering (kind prefix / step_ref / attempt) is
applied in Rust over the per-Run rows (bounded by the retention
ceiling) — the query axes are too dynamic to be worth SQL-side
predicates at this scale.
Structs§
- Sqlite
RunTrace Store - SQLite-backed persistent
RunTraceStore.