deps(core): align kv-lance pins with lance-graph #423 (lance 4→6, lancedb 0.27→0.29, arrow 57→58)#28
Conversation
… 4→6, lancedb 0.27→0.29, arrow 57→58) Catches the AdaWorldAPI/surrealdb fork up to lance-graph main (post surrealdb#423): - lance 4.0.0 → 6.0.0 (exact-equals) - lance-index 4.0.0 → 6.0.0 (lock-step) - lancedb 0.27.2 → 0.29.0 (exact-equals; transitively pins lance =6.0.0) - arrow-array 57 → 58 (lock-step with datafusion 53 in lance-graph) - arrow-schema 57 → 58 All bumps under the optional `kv-lance` feature (no change to default build). Cargo.toml-only; no .rs touched. Note: the user-authorised follow-on patch to lance =6.0.1 is currently BLOCKED by lancedb 0.29.0's transitive `lance = "=6.0.0"` requirement (lancedb 0.29.0 is the latest 0.29.x on crates.io). See lance-graph root Cargo.toml RESOLVED(A) for the full reasoning. Re-bump when lancedb 0.29.1+ ships. https://claude.ai/code/session_01FMooFcE7hgRWWvknNr2N4i
📝 WalkthroughWalkthroughThis PR updates optional Lance/LanceDB ecosystem dependencies in the core Cargo.toml to newer locked versions: Lance and Lance-Index to 6.0.0, LanceDB to 0.29.0, and Arrow crates to version 58, with no changes to feature definitions or other dependency entries. ChangesLance/LanceDB Ecosystem Dependencies
Estimated Code Review Effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly Related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b5a3e1e764
ℹ️ 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".
| lance = { version = "=6.0.0", optional = true } | ||
| lance-index = { version = "=6.0.0", optional = true } | ||
| lancedb = { version = "=0.29.0", optional = true } | ||
| arrow-array = { version = "58", optional = true } | ||
| arrow-schema = { version = "58", optional = true } |
There was a problem hiding this comment.
Commit the lockfile updates for these pins
With Cargo.lock tracked, changing these exact dependency requirements without updating the lockfile leaves the workspace inconsistent: the lockfile still contains lance/lance-index 4.0.0, lancedb 0.27.2, and Arrow 57.3.1 entries. Any locked build or CI job that enables surrealdb-core/kv-lance will have to update the lockfile before it can resolve the new =6.0.0 / =0.29.0 requirements, so this change should include the corresponding Cargo.lock changes.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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.
Inline comments:
In `@surrealdb/core/Cargo.toml`:
- Around line 110-114: The Cargo.toml dependency pins for lance, lance-index,
lancedb, arrow-array and arrow-schema were changed but Cargo.lock still resolves
older versions; update the lockfile to match these exact versions by running
cargo update --precise for each package (e.g., cargo update -p lance --precise
6.0.0, cargo update -p lance-index --precise 6.0.0, cargo update -p lancedb
--precise 0.29.0, cargo update -p arrow-array --precise 58, cargo update -p
arrow-schema --precise 58) or run cargo generate-lockfile, verify Cargo.lock now
contains the pinned versions, and commit the updated Cargo.lock alongside the
Cargo.toml change so CI with --locked will succeed.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: ee48526b-776b-4c97-b38a-5f98c153657a
📒 Files selected for processing (1)
surrealdb/core/Cargo.toml
| lance = { version = "=6.0.0", optional = true } | ||
| lance-index = { version = "=6.0.0", optional = true } | ||
| lancedb = { version = "=0.29.0", optional = true } | ||
| arrow-array = { version = "58", optional = true } | ||
| arrow-schema = { version = "58", optional = true } |
There was a problem hiding this comment.
Update Cargo.lock alongside these pinned version bumps.
Lines 110-114 move the kv-lance dependency pins, but the provided lockfile context still resolves old versions (lance 4.0.0, lancedb 0.27.2, arrow-schema 57.3.1). Since CI runs with --locked, this can fail builds until lockfile entries are regenerated to match the new manifest pins.
🤖 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 `@surrealdb/core/Cargo.toml` around lines 110 - 114, The Cargo.toml dependency
pins for lance, lance-index, lancedb, arrow-array and arrow-schema were changed
but Cargo.lock still resolves older versions; update the lockfile to match these
exact versions by running cargo update --precise for each package (e.g., cargo
update -p lance --precise 6.0.0, cargo update -p lance-index --precise 6.0.0,
cargo update -p lancedb --precise 0.29.0, cargo update -p arrow-array --precise
58, cargo update -p arrow-schema --precise 58) or run cargo generate-lockfile,
verify Cargo.lock now contains the pinned versions, and commit the updated
Cargo.lock alongside the Cargo.toml change so CI with --locked will succeed.
… to catalog Expr (codex P2 PR #38) P2 review comment on #38: the bridge transferred name/table/kind from `ast::FieldDefinition` but silently dropped `assert: Option<String>` (added in nexgen-rs#27). Result: the catalog accepts values that the rendered SurrealQL announces it would reject — exactly the kind of declared-vs-enforced drift the C16c bridge exists to prevent. # Fix `From<ast::FieldDefinition> for catalog::FieldDefinition` now calls `with_assert(rails_assert_to_expr(s))` so the catalog carries the same constraint the AST renders. # `rails_assert_to_expr` — structural lowering The OpenProject AR-shape extractor emits exactly one expression today: `$value != NONE` (the schema-level marker for any `validates_constraint` triple; see PR #28 fix for why it's not ASSERT-on-`normalizes_attribute`). We construct it structurally as Expr::Binary { left: Param("value"), op: NotEqual, right: Literal::None, } instead of going through surrealdb-core's SurrealQL parser (which is `async` + heavy). One known shape, one explicit arm. Comment stripping: PR #28's `normalize:` annotation renders as `$value != NONE /* normalized */`. The block-comment + whitespace canonicalisation drops the marker before matching so both inputs lower to the same Expr. The marker is metadata; the assertion is unchanged. Unknown strings (e.g. a future `$value > 100 AND $value < 1000`) return `None` — the catalog stays accept-any, matching the previous (pre-D-AR-6.3) silent-drop behaviour. A future PR swapping in a real mini-parser is the natural next step when the AR-shape vocab needs richer expressions (`validates :len, length: {minimum: 3}` → `string::len($value) >= 3`). # Tests +4 new under `--features op-bridge`: - `d_ar_6_3_field_definition_bridges_assert_clause` — matches the structural Binary($value, !=, NONE) shape. - `d_ar_6_3_assert_normalized_comment_is_stripped` — the `/* normalized */` marker is metadata; the lowered Expr is the same as the bare `$value != NONE` case. - `d_ar_6_3_no_assert_when_ast_field_has_none` — passthrough preserves None. - `d_ar_6_3_unknown_assert_string_lowers_to_none` — unknown expressions don't corrupt the catalog (safety net). # Iron-rule lock §0 ANTI-INVENTION GUARDRAIL honoured: one new free fn (`rails_assert_to_expr`) over the existing `Expr` / `Param` / `Literal` types. No new variant, no new builder, no new dep.
The bridge has been pinned at the stranded `claude/op-surreal-ast-field-types-stacked` branch since the D-AR-5.2 work first went up as nexgen-rs#29. That PR landed on a stacked branch instead of main and never made it back, so the nexgen-rs `main` diverged from the bridge's view for several sprints. The D-AR-5.2 work has now re-landed via nexgen-rs#36 (Kind variants + field_type consumer), and nexgen-rs `main` carries significant downstream improvements: - FK direction gating (#33) — only `belongs_to` emits a column - Polymorphic FK fallback (#30) — `option<any>` for unknown targets - Singularization tightening (#34, #35, #37) — fixes corpus quirks like `phases→Phase`, `children→Child`, `job_status→JobStatus`, `:big_integer→Decimal` - Phantom-table guard + order-independent ASSERTs (#27/#28/#26) - Rails type aliases (#37) The bridge's `From<ast::Kind> for catalog::Kind` impl already matches the 7 scalar variants the new main carries, so the bump is mechanical — `cargo check --features op-bridge` passes with no source changes needed. Updates Cargo.lock to the new rev (44550a87 — the merge commit of nexgen-rs#37 on main).
Summary
Catches the AdaWorldAPI/surrealdb fork (kv-lance feature) up to
lance-graphmain (post surrealdb#423).Bumps (all under the optional
kv-lancefeature)lance=4.0.0=6.0.0lance-index=4.0.0=6.0.0lancedb=0.27.2=0.29.0arrow-array5758arrow-schema5758Cargo.toml-only; no.rstouched. The default build (nokv-lancefeature) is unaffected.The user's 6.0.1 ask — currently blocked
The user authorised a follow-on patch
lance 6.0.0 → 6.0.1. Cargo cannot satisfy it:lancedb 0.29.0(the latest 0.29.x on crates.io) transitively pinslance = "=6.0.0". Resolution path: wait forlancedb 0.29.1+. SeeAdaWorldAPI/lance-graphrootCargo.tomlRESOLVED(A)for the full reasoning.Test plan
surrealdb/core/Cargo.toml.[features] kv-lance— default build unaffected..rs/build.rstouched.https://claude.ai/code/session_01FMooFcE7hgRWWvknNr2N4i
Generated by Claude Code
Summary by CodeRabbit