Skip to content

docs(lance-backend): proven kv-lance feature-gate reference (lite-unified)#47

Merged
AdaWorldAPI merged 1 commit into
mainfrom
claude/jirak-math-theorems-harvest-rfii13
Jun 19, 2026
Merged

docs(lance-backend): proven kv-lance feature-gate reference (lite-unified)#47
AdaWorldAPI merged 1 commit into
mainfrom
claude/jirak-math-theorems-harvest-rfii13

Conversation

@AdaWorldAPI

@AdaWorldAPI AdaWorldAPI commented Jun 19, 2026

Copy link
Copy Markdown
Owner

What

Adds .claude/lance-backend/LANCE_FEATURE_GATES.md — a proven, reference + troubleshooting card for the lite-unified surreal build: a pure-Rust columnar surreal whose backing store is Lance, with the C++ and gRPC storage engines dropped.

The proven invocation

cargo build -p surrealdb --no-default-features --features kv-lance,rustls
# core-only, fastest loop:
cargo check -p surrealdb-core --no-default-features --features kv-lance

--no-default-features is load-bearing: it drops kv-rocksdb (C++ cc/libstdc++) and kv-tikv (gRPC/protoc), keeping kv-lance (lance, lance-index, lancedb, arrow-array, arrow-schema — all pure Rust). Observed clean compile (~5m43s cold, seconds incremental), zero C++ in the closure.

What the card contains

  • Per-engine contrast table — which KV gate pulls C++/gRPC vs pure Rust, and why the lite path keeps only kv-lance.
  • Exact in-tree pinslance =7.0.0, lance-index =7.0.0, lancedb =0.30.0, arrow 58, matching the AdaWorldAPI/lance-graph workspace lockstep (PR link because because issue surrealdb/surrealdb#445). Documents the P0 fork-pin discipline (never substitute crates.io to make a compile pass).
  • Troubleshooting matrix — linker/protoc/Patch ... was not used/lance-family-drift/default-feature-leak.
  • The ractor connection — the self-updating substrate loop: Lance Dataset::versions()LanceVersionScheduler (ractor actor, bounded mailbox) → jitson/Cranelift formula → MailboxSoaView tenant write → commits a new Lance version → loop closes. Notes that DataFusion is NOT on this path (compute, not query) while lance/lancedb/arrow are (zero-copy columnar store), and that MessagingErr::Saturated is the backpressure valve between a fast Lance commit stream and a slower jitson worker.

This supersedes the stale patches/Cargo-toml.patch.txt (which still describes kv-lance as not-yet-wired, lance = "1.0", arrow = "55"); the feature is now wired in surrealdb/core/Cargo.toml.

Honest caveats (recorded in the doc)

  • The 5m43s is a cold-compile wall-clock, not a throughput benchmark — no "faster" claim is made.
  • The surreal_container consumer is still BLOCKED(C): the kv-lance fork dep isn't wired into its Cargo.toml. That wiring + the loop is the remaining work, not a 12-day lift.

Notes

  • Touches only .claude/ (the AdaWorldAPI engineering-session workspace) — no source or real Cargo.toml changes. Append-only AGENT_LOG.md entry added per the .claude board convention.
  • Companion to fix: handle MessagingErr::Saturated at all three match sites ractor#2 (the MessagingErr::Saturated fix that unblocks the actor-driven Lance subscription loop), on the same branch name.

🤖 Generated with Claude Code


Generated by Claude Code

Summary by CodeRabbit

  • Documentation

    • Added Lance feature gates guide with build configuration, version requirements, and troubleshooting matrix for standalone columnar deployments.
  • Chores

    • Updated development logs documenting build fixes and dependency management practices.

Document the lite-unified surreal build: `--no-default-features
--features kv-lance` drops the C++ (kv-rocksdb) and gRPC (kv-tikv)
storage engines, keeping a pure-Rust columnar surreal backed by Lance.
Captures the in-tree pins (lance =7.0.0, lance-index =7.0.0, lancedb
=0.30.0, arrow 58), a troubleshooting matrix, and the ractor
breakthrough loop (Lance versions() -> scheduler actor -> jitson ->
SoA tenant write).

Supersedes the stale patches/Cargo-toml.patch.txt (lance "1.0", arrow
"55", "not yet wired"); the feature is now wired in
surrealdb/core/Cargo.toml. Cross-references the ractor
MessagingErr::Saturated fix on the same branch that unblocks the
actor-driven Lance version-subscription loop.

Append-only AGENT_LOG entry added per .claude board convention.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CcpLeEC3XK8Eye53GKBVvi
@coderabbitai

coderabbitai Bot commented Jun 19, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Adds a new documentation card .claude/lance-backend/LANCE_FEATURE_GATES.md covering the kv-lance-only build invocations, dependency-gate rationale, exact Cargo version pins, a troubleshooting matrix, and a ractor/LanceVersionScheduler backpressure loop description. A corresponding dated entry is appended to .claude/board/AGENT_LOG.md.

Changes

Lance Feature Gates Documentation

Layer / File(s) Summary
LANCE_FEATURE_GATES.md: build commands, rationale, pins, troubleshooting, and ractor notes
.claude/lance-backend/LANCE_FEATURE_GATES.md
Introduces the full documentation card: --no-default-features --features kv-lance build commands, the lite-unified rationale table (excluded KV engines and their C++/gRPC dependencies), exact Cargo version pins for lance, lance-index, lancedb, and arrow 58 with lockstep-discipline rule, a troubleshooting matrix mapping symptoms to fixes, a step-by-step LanceVersionScheduler actor loop with Saturated bounded-mailbox backpressure, and non-claims/blocked-step clarification.
AGENT_LOG entry for this session
.claude/board/AGENT_LOG.md
Appends a newest-first dated entry recording the landing of LANCE_FEATURE_GATES.md, the cross-repo MessagingErr::Saturated compile fix, supersession of the old patch file, key facts about DataFusion vs. compute loop responsibilities, and open follow-up items.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • AdaWorldAPI/surrealdb#28: Updates surrealdb/core/Cargo.toml with the same kv-lance dependency/version pins (lance, lancedb, arrow 58) that this PR's documentation card records and locks.
  • AdaWorldAPI/surrealdb#32: Aligns directly with this PR's hardcoded version pins (lance = 7.0.0, lance-index = 7.0.0, lancedb = 0.30.0) via kv-lance feature gating in surrealdb/core/Cargo.toml.
  • AdaWorldAPI/surrealdb#35: Forwards the kv-lance feature through the SDK surrealdb/Cargo.toml, matching the SDK re-export of the gate documented in this PR's feature-gates card.

Poem

🐰 Hoppity-hop through the feature gate,
--no-default-features keeps the path straight!
Lance pins locked, ractor loops aligned,
Saturated mailbox — no messages left behind.
The rabbit has filed the docs with care,
Pure-Rust columnar columns everywhere! 🦀

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main change: documentation addition for a proven kv-lance feature-gate reference with 'lite-unified' designation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7f7e27c0b5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


```bash
# Lite-unified: pure-Rust columnar surreal, no RocksDB(C++), no TiKV(gRPC).
cargo build -p surrealdb --no-default-features --features kv-lance,rustls

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Don't include rustls in the no-cc proof command

For the non-WASM SDK build, this rustls feature is not a pure-Rust/no-cc choice: surrealdb/Cargo.toml enables rustls with aws_lc_rs, and the checked-in lockfile shows rustls depending on aws-lc-rs while aws-lc-sys depends on cc and cmake. As written, the documented “lite-unified” proof command can still require native build tooling and contradicts the later “Zero cc/C++ in the closure” claim, so users trying to verify a no-native-toolchain Lance-only build can get misleading results; use the core-only command for that proof or document the SDK rustls caveat.

Useful? React with 👍 / 👎.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
.claude/lance-backend/LANCE_FEATURE_GATES.md (1)

110-122: ⚡ Quick win

Fenced code block missing language specification.

The code block rendering the ractor loop diagram should include a language identifier to comply with Markdown linting standards. Consider using ```text to mark it as plain text.

🔧 Proposed fix
- ```
+ ```text
  Lance Dataset::versions()                     (kv-lance backend, this card)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.claude/lance-backend/LANCE_FEATURE_GATES.md around lines 110 - 122, The
fenced code block in LANCE_FEATURE_GATES.md containing the ractor loop diagram
(with Lance Dataset::versions(), LanceVersionScheduler, jitson/Cranelift
formula, and MailboxSoaView) is missing a language specification. Add the
language identifier 'text' to the opening fence of this code block by changing
the opening fence from three backticks alone to three backticks followed by
'text' to comply with Markdown linting standards.

Source: Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In @.claude/lance-backend/LANCE_FEATURE_GATES.md:
- Around line 110-122: The fenced code block in LANCE_FEATURE_GATES.md
containing the ractor loop diagram (with Lance Dataset::versions(),
LanceVersionScheduler, jitson/Cranelift formula, and MailboxSoaView) is missing
a language specification. Add the language identifier 'text' to the opening
fence of this code block by changing the opening fence from three backticks
alone to three backticks followed by 'text' to comply with Markdown linting
standards.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: abfc4c89-50f2-4592-9636-bb86bdb8303d

📥 Commits

Reviewing files that changed from the base of the PR and between f12cc7b and 7f7e27c.

📒 Files selected for processing (2)
  • .claude/board/AGENT_LOG.md
  • .claude/lance-backend/LANCE_FEATURE_GATES.md

@AdaWorldAPI AdaWorldAPI merged commit 9e18040 into main Jun 19, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants