DarshJDB v0.3.3 — Executor Rewire + SqliteStore::query + mlua ddb.kv.*
[0.3.3] - 2026-04-15 — Executor Rewire + SqliteStore::query + mlua ddb.kv
Sprint internally referred to as "v0.3.2.1" in agent SUMMARY files
and DEFERRED.md. Released as v0.3.3 because Cargo workspace versions
are strict three-part semver — the post-release "0.3.2.1" naming is
not a validcargoversion field. No semantic difference; this is
the patch release immediately following v0.3.2.
Closes the two integration deferrals from the v0.3.2 sprint so the
SQLite backend has a real read path and the DarshanQL executor knows
which dialects can run which statement types.
Added
SqliteStore::queryreal implementation — the v0.3.2 stub that
returnedInvalidQueryfor every plan is gone.SqliteStore::query
now bindsserde_json::Valueparams through a smallToSqladapter,
expands the v0.3.2 M-3__UUID_LIST__token into per-uuid?N
placeholders for nested-plan resolution, executes via rusqlite on a
blocking task, and materialises rows in the sameQueryResultRow
JSON shapePgStore::queryreturns so downstream consumers see no
shape drift across backends. Plans carrying the
__SQLITE_VECTOR_UNSUPPORTED__/
__SQLITE_COSINE_DISTANCE_UNSUPPORTED__sentinels are refused up
front with a clearInvalidQuerymessage.SqlDialectcapability gates — three new methods
(supports_ddl,supports_graph_traversal,supports_hybrid_search)
with default-true soPgDialectinherits the v0.3.1 surface
unchanged.SqliteDialectoverrides all three to false. The
DarshanQL executor checks them at dispatch time.darshql::ExecutorContext— a{pool, Arc<dyn Store>, Arc<dyn SqlDialect>}bundle threaded through every executor
function. The HTTP entry point keeps the existing
execute(&PgPool, …)signature for backwards compatibility and
constructs the context internally; new call sites (tests, future
portable runners) useexecute_with_contextdirectly.tests/sqlite_e2e_query.rs— six end-to-end integration tests
covering bare SELECT,$where Eq,$where Neq,$limit + $offset,
$order ASC, and the empty-result case against an in-memory
SqliteStoredriven throughplan_query_with_dialect+ the new
Store::querypath. Plus two matchingstore::sqlite::tests
unit tests and three newquery::dialect::testscapability checks.
Added — mlua ddb.kv.* host API
MluaContext.cache: Arc<DdbCache>— the v0.3.2 stub fields
forddb.kv.get/set/delare gone.MluaContextnow carries the
cache handle alongside the store + dialect, andmain.rswires
it from a singleshared_ddb_cache: Arc<DdbCache>constructed
beforeAppState::with_poolso REST/RESP3 dispatchers and the
Lua function runtime hold the same Arc — Lua writes from a
server function are immediately visible to subsequent REST
cache GETs and vice versa.ddb.kv.get(key)— returns a Lua string for UTF-8 values,
nilfor missing keys, and raises a LuaRuntimeErrorif a
present value is not valid UTF-8 (binary blobs belong in object
storage, not the string-shaped Lua boundary).ddb.kv.set(key, value [, ttl_seconds])— accepts an
optional trailingOption<u64>TTL.0is treated as
"no expiry" so dynamic-TTL callers don't need to special-case
the zero literal.ddb.kv.del(key)— returns aboolindicating whether the
key existed across any cache tier prior to deletion.- 5 new mlua tests exercising roundtrip, TTL expiry, deletion,
missing-key, and the non-UTF-8 error path. The total mlua test
count is now 30 passing (up from 23 in v0.3.2). - Stub-error assertion trimmed — the v0.3.2 mlua hardening
sprint added addb_stubs_all_raise_lua_errortest that loop-
assertedddb.kv.*raisedNotYetImplemented. That assertion
is now wrong; the kv methods are removed from the loop and the
test continues to guard the still-stubbedddb.notifyand
friends (if any).
Changed
- DarshanQL executor — Tier 2 statement-type gates.
DEFINE TABLE,DEFINE FIELD,RELATE,SELECTfields containing
->edgetraversal, andcount(->edge)computed fields now check
ctx.dialect.supports_*()and returnInvalidQuerywith a
v0.3.3-tracking message on dialects that don't support them
(SQLite today). PostgreSQL production behaviour is byte-for-byte
unchanged becausePgDialectinherits the default-true. - Workspace version bumped
0.3.2→0.3.3(released as v0.3.3
because Cargo's strict three-part semver disallows a0.3.2.1
version field; sprint files and agent reports retain the
v0.3.2.1naming for traceability).
Deferred to v0.3.2.2 / v0.3.3
- The portable Pg-or-SQLite hookup for SELECT / CREATE / INSERT /
RETRACT throughctx.store(rather thanctx.pool) is plumbed
throughExecutorContextbut the executor body still reaches for
the pool directly for the read/write SQL — the SurrealQL-shaped AST
consumed byquery/darshql/executor.rsis independent of the
JSON-shapedQueryASTdriven byplan_query_with_dialect, and the
v0.3.3 milestone tracks unifying the two planner surfaces so the
sameStore::querypath serves both. Until then the gates are the
safety net. INFO FORagainst:schema/*triples on SQLite — the storage
shape is portable but the planner pieces have not been ported.
Tracked alongside the DDL gate in v0.3.3.- See
DEFERRED.mdfor the full deferral list with rationale.
Full Changelog: v0.3.2...v0.3.3