Skip to content

Commit 2821a03

Browse files
committed
docs(plan): lite-unified-surrealql-lance-v1 (feature-gated, test-don't-commit)
Capture the "lite unified" bet as a CONJECTURE plan to test behind a feature gate (NOT a default-build change): collapse the two query engines (datafusion + SurrealQL) + two stores (lance + rocksdb) to ONE store (lance-KV) + ONE primary query surface (SurrealQL/AR-API); datafusion feature-gated for analytical SQL; rocksdb dropped; DO-arm ExecTarget::SurrealQl becomes the primary exec path. Win for graph/AR/cognitive (Cypher->SurrealQL is a better lowering than Cypher->datafusion-SQL); downgrade for analytical SQL (datafusion kept feature-gated). Falsifier: datafusion_planner query-shape coverage in SurrealQL. Blockers: kv-lance not feature-wired, polyglot->SurrealQL lowering missing. Gated on a convergence+cross-domain+truth-architect probe before any promotion. Board: INTEGRATION_PLANS prepended. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CcpLeEC3XK8Eye53GKBVvi
1 parent 56a077f commit 2821a03

2 files changed

Lines changed: 93 additions & 0 deletions

File tree

.claude/board/INTEGRATION_PLANS.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
## 2026-06-18 — lite-unified-surrealql-lance-v1 (one store + one query surface, feature-gated; CONJECTURE, test-don't-commit)
2+
3+
**Status:** CONJECTURE / design — feature-gated test path, NOT a default-build change. **Plan file:** `.claude/plans/lite-unified-surrealql-lance-v1.md`.
4+
**Owns:** the "lite unified" bet — collapse the two query engines (datafusion + SurrealQL) + two stores (lance + rocksdb) to **ONE store (lance-KV) + ONE primary query surface (SurrealQL/AR-API)**, datafusion feature-gated (`datafusion-analytical`), rocksdb dropped; the DO-arm `ExecTarget::SurrealQl` becomes the primary exec path.
5+
- **Win** (graph/AR/CRUD/cognitive/vector): Cypher→SurrealQL is a better lowering than Cypher→datafusion-SQL (surreal is natively graph); drops the rocksdb C++ build + makes datafusion optional. **Downgrade** (heavy analytical SQL): datafusion's strength → kept feature-gated, not deleted.
6+
- **Falsifier (truth-architect):** lance-graph `datafusion_planner` test queries → can SurrealQL express each? Covered → drop datafusion for that path; gaps → keep `datafusion-analytical`. Measure footprint (proxy: lance-graph ≈889 crates, surreal-all ≈1148, SurrealQL-engine marginal ~260, rocksdb separate C++).
7+
- **Blockers (OQ-LU-1/2/3):** surreal kv-lance not yet feature-wired (`surrealdb/core/src/kvs/lance/` module implemented, no `kv-lance` feature); polyglot→SurrealQL lowering doesn't exist (today polyglot→datafusion); SPARQL/Gremlin lowering cleanliness unknown.
8+
**Gate before any promotion:** convergence + cross-domain (mechanism-vs-rhyme) + truth-architect (query-shape coverage). Do NOT touch the default build until green.
9+
**Repos:** lance-graph (+ surrealdb fork for kv-lance). Surfaced from the footprint discussion (drop datafusion+rocksdb) on branch `claude/soa-write-deinterlace-inc2`.
10+
11+
---
12+
113
## 2026-06-18 — mailbox-belief-update-and-substrate-test-v1 ("what did I learn" = NARS-revision delta + two-axis test; 5+3-ratified; slots S2.5b)
214

315
**Status:** CONJECTURE / design — 5+3 COMPLETE. **Plan file:** `.claude/plans/mailbox-belief-update-and-substrate-test-v1.md`. Parent: `bindspace-singleton-to-mailbox-soa-v1` §11 + `E-SOA-CYCLE-OWNERSHIP`.
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# lite-unified-surrealql-lance-v1 — one store + one query surface, behind a feature gate
2+
3+
> **Status:** CONJECTURE / design. **Test via feature gate; do NOT commit the
4+
> stack change.** Needs a convergence + cross-domain + truth-architect probe
5+
> (mechanism-vs-rhyme + the query-shape measurement) before any promotion.
6+
> **Date:** 2026-06-18. **Parent threads:** the DO-arm (`ExecTarget::SurrealQl`,
7+
> `lance-graph-contract::action`), `docs/STACK_SCAFFOLD.md`, the
8+
> "cold TS + kanban stay Lance-native" ruling.
9+
10+
## Epiphany (less is more)
11+
12+
Today there are **two query engines over the same lance storage** (lance-graph's
13+
*datafusion* planner + surreal's *SurrealQL*) and **two storage engines**
14+
(lance vs rocksdb). The "lite unified" bet collapses both: **ONE store (lance-KV)
15+
+ ONE primary query surface (SurrealQL via the AR-API adapter)**, datafusion
16+
**feature-gated**, rocksdb **dropped**. Cypher/SQL/neo4j lower to SurrealQL —
17+
which is *natively* graph (`->edge->`), a better target than Cypher→datafusion-SQL.
18+
19+
## The bet, as a feature gate (default-OFF)
20+
21+
A `lite-unified` feature that, when ON:
22+
1. **Storage = surreal kv-lance** (one store; drop rocksdb). *Blocked on:* surreal
23+
kv-lance is implemented as a module but not yet feature-wired
24+
(`surrealdb/core/src/kvs/lance/`, the `.claude/lance-backend` integration).
25+
2. **Query/exec = SurrealQL** via the AR-API adapter. The polyglot parser
26+
(Cypher/GQL/Gremlin/SPARQL/neo4j) lowers to **SurrealQL** (or the DO-arm
27+
`ActionInvocation`) instead of datafusion SQL. *Missing today:* the
28+
polyglot→SurrealQL lowering (today it's polyglot→datafusion).
29+
3. **datafusion = `optional`, OFF** on this path. Kept behind a separate
30+
`datafusion-analytical` feature for the workloads that genuinely need
31+
vectorized/analytical SQL (joins, aggregations) — SurrealQL's weak spot.
32+
4. The DO-arm `ExecTarget::SurrealQl` becomes the **primary** exec path, not one
33+
of four.
34+
35+
## What stays regardless (NOT datafusion)
36+
37+
lance vector search, CAM-PQ / bgz17 codec stack, the cognitive substrate
38+
(BindSpace→MailboxSoA, the write contract, the SPO/AriGraph tissue). These are
39+
orthogonal to the query-engine choice.
40+
41+
## Where it's a win vs a downgrade (the honest split)
42+
43+
- **Win (the bulk):** graph traversal, AR CRUD, cognitive/SPO, vector search —
44+
SurrealQL-on-lance fits, and Cypher→SurrealQL graph is a *better* lowering.
45+
Footprint: drop the rocksdb C++ build outright; make datafusion (a large Rust
46+
dep) optional.
47+
- **Downgrade:** heavy analytical SQL (multi-way joins, aggregations, columnar
48+
scan) — datafusion's strength, SurrealQL's weakness. Hence datafusion stays
49+
feature-gated, not deleted.
50+
51+
## Falsifier (truth-architect — measure before promoting)
52+
53+
Take lance-graph's `datafusion_planner` test queries (the Cypher→SQL cases) and
54+
check **SurrealQL can express each**. Covered → drop datafusion for that path;
55+
analytical gaps → keep `datafusion-analytical` for those only. Also measure the
56+
real footprint delta (`cargo tree --no-default-features` + release `cargo bloat`)
57+
once kv-lance is feature-wired — the proxy is lance-graph ≈ 889 crates, surreal
58+
(all backends) ≈ 1148; the marginal SurrealQL-engine cost is ~260 crates, rocksdb
59+
is a separate C++ build.
60+
61+
## Increments (all behind `lite-unified`, none committed to the default path)
62+
63+
1. **Probe (no code):** convergence + cross-domain (mechanism-vs-rhyme) +
64+
truth-architect (the datafusion_planner query-shape coverage check). Gate.
65+
2. **Wire surreal kv-lance** as a feature (finish the `.claude/lance-backend`
66+
integration; add the `kv-lance` feature + lance dep + `mod lance` in `kvs/mod.rs`).
67+
3. **Polyglot→SurrealQL lowering** — the missing front-end leg (parallel to the
68+
existing polyglot→datafusion).
69+
4. **`datafusion``optional`** + a `datafusion-analytical` feature; default the
70+
common path to SurrealQL-on-lance under `lite-unified`.
71+
5. **Measure** footprint + query-shape coverage; promote CONJECTURE→FINDING or
72+
correct.
73+
74+
## Blockers / open questions
75+
76+
- **OQ-LU-1:** surreal kv-lance feature-wiring (the integration TODOs).
77+
- **OQ-LU-2:** does SurrealQL cover the lance-graph datafusion_planner query
78+
shapes the live workloads actually use? (the falsifier).
79+
- **OQ-LU-3:** is the polyglot→SurrealQL lowering cleaner than polyglot→datafusion
80+
for the non-graph dialects (SPARQL/Gremlin)?
81+
- Do NOT touch the default build until the probe is green.

0 commit comments

Comments
 (0)