Commit Graph
313 Commits
Author SHA1 Message Date
Bruno Ramirez 09b8ec1134 ci: open Homebrew tap PRs for stable CLI releases (#5173)
Stable CLI releases already publish three binary archives and their
checksums, but a maintainer would have to copy those checksums into the
Homebrew formula for every release. This adds a job that opens a PR in
the tap after GitHub publishes a stable release. Tap CI tests the
published binaries and a maintainer merges the update. Before the first
automated update, merge the initial [stable
formula](https://github.com/lancedb/homebrew-tap/pull/1) and configure
the GitHub App as described in `release_process.md`.

This was accomplished with the following changes:

- Read `SHA256SUMS` from the published tag and update the formula
version and the hash for each matching platform archive.
- Use a tap-scoped App token and a branch per release so retries update
the same PR. Older release retries preserve newer formula versions.

### Testing

All 38 CI-script tests passed locally, including checksum mapping,
invalid or incomplete manifests, prerelease rejection, and retries. A
dry run against the actual draft formula with a simulated stable
manifest produced valid Ruby and a second run produced no changes. Live
App authentication and tap PR creation require the installation
credentials.
2026-11-24 09:10:04 -08:00
Xuanwo ea7b3d0203 ci: set up Python 3.11 for NodeJS workspace lint (#5181)
The NodeJS lint job runs `cargo clippy --profile ci --all
--all-features` on Ubuntu 22.04, whose default `python3` is 3.10. The
workspace includes the PyO3 bindings, which now require Python 3.11 or
newer, so the build fails in `pyo3-ffi` before Clippy starts:

```
error: cannot set a minimum Python version 3.11 higher than the interpreter version 3.10
```

Select Python 3.11, the SDK's minimum supported interpreter, before Rust
compilation. Workspace, feature, and Node matrix coverage stay
unchanged. The Rust workflow already lints on Ubuntu 24.04 with Python
3.12, so it needs no matching change.

Validation: the workflow parses, and the Python setup step is ordered
before `Lint Rust`; the Node 22/24/26 matrix is unchanged. The hosted
NodeJS Lint run is linked from this PR's checks.
2026-11-24 13:31:36 +08:00
52209f10c3 chore!: drop Python 3.10 support (#5172)
Closes #5106.

Python 3.10 reached end of life on 2026-10-01. This raises the minimum
to 3.11, following #2955 for 3.9. It's marked `chore!:` because it's a
breaking change for 3.10 users.

- `python/pyproject.toml`: `requires-python = ">=3.11"`, and the 3.10
classifier is removed. The `pillow` lower bound in the `clip`, `siglip`
and `embeddings` extras goes up to `>=13.0.0`, the release with the CVE
fixes, which needs 3.11+. The `typing-extensions; python_version <
"3.11"` dev dependency is removed, since it no longer applies.
- `python/Cargo.toml`: pyo3 `abi3-py310` becomes `abi3-py311`, so wheels
are built as `cp311-abi3`.
- `python/lancedb/query.py`: `Self` comes from `typing`, without the
`typing_extensions` fallback.
- CI: the Linux test matrix goes from `["10", "13"]` to `["11", "13"]`,
and the minimum-dependencies job, the release build (`pypi-publish.yml`)
and the docs build move from 3.10 to 3.11.
- `python/uv.lock`: regenerated with `uv lock --extra-index-url
https://pypi.fury.io/lance-format/`. The only changes are the 3.10-only
resolutions going away: all 74 `python_full_version < '3.11'` markers,
`async-timeout`, `backports-asyncio-runner`, `exceptiongroup`, `tomli`,
and the older numpy, scipy, pandas, pyarrow and pillow pins. No package
version changes for 3.11+.

Checks run locally: `ruff check` and `ruff format --check` pass, and
`cargo metadata` succeeds for the workspace. I haven't run the Python
test suite, which needs the native build, so I'm relying on CI for that.

pylance still declares `>=3.10`. As the issue says, lancedb can move
first because pylance is optional.


![Evidence](https://raw.githubusercontent.com/rahulsjha/lancedb/pr-assets/lance5106-evidence.png)

---------

Co-authored-by: Will Jones <willjones127@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 17:30:18 -08:00
Will JonesandClaude Opus 5.5 4ac2728e73 ci: scope workflow permissions and drop unverified downloads (#5103)
## Summary

Fixes four high-severity Aikido findings in CI and the Dockerfile.

- **Workflow permissions:** `npm-publish.yml` and
`codex-update-lance-dependency.yml` now set `permissions: {}` at the
workflow level and grant permissions per job.
- `npm-publish`: only `publish` gets `id-token: write` (npm provenance).
Nothing in the workflow needed `contents: write`, so every job is now
read-only.
- `codex-update-lance-dependency`: keeps `contents: write`, because the
branch is pushed with the checkout token. It drops `pull-requests:
write` and `actions: read`, because all `gh` calls use `ROBOT_TOKEN`.
- **license-header-check:** replaces `curl .../master/install.sh | bash`
with `go install …@v1.5.0`. Go verifies the module against
sum.golang.org, so we don't maintain a hash ourselves. Go is
preinstalled on `ubuntu-latest`.
- **Dockerfile:** drops the rustup `curl | sh` along with
`build-essential`, `protoc`, and `git`, and runs as a non-root `lancedb`
user. `lancedb` installs from prebuilt `manylinux_2_28` wheels, and the
toolchain was only needed for the tantivy FTS support removed in #3282.

Alternatives considered for the Dockerfile, in case we want Rust in the
image:
- `COPY --from=rust:<ver>-slim-bookworm@sha256:…` to copy the toolchain
from the official image, pinned by digest.
- Download `rustup-init` from `static.rust-lang.org` and check it
against the published `.sha256`.

Neither seemed worth it for an image that only runs `pip install
lancedb`.

## Evidence

- In a clean Python 3.12 venv, `pip install --only-binary :all: lancedb`
installed 0.41.0, and building an FTS index and querying it worked.
Docker wasn't available, so the image itself wasn't built.
- Running `license-header-checker` v1.5.0 installed via `go install`
over `rust/` reports `license_ok: 258 files`.
- This PR runs both the `npm-publish` dry run and
`license-header-check`, because both workflows' path filters include
their own files.

## Merge Risk

**Door:** two-way; CI config and an example Dockerfile only.
**Blast Radius:** release automation. If `npm publish` or the Codex bump
job needs a permission I removed, it will fail on the next tag or
dispatch, and restoring that one permission fixes it.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 14:42:22 -08:00
Shu Chen c136022c7b ci: pin third-party GitHub Actions to full commit SHAs (#4922)
Pin every remaining third-party action reference in `.github/` to a full
40-character commit SHA, with the intended version in a trailing comment
(`uses: owner/action@<sha> # vX.Y.Z`), following the pins already in
`cli.yml`, `typos.yml` and `make-release-commit.yml`. Fixes #3293.

53 references across 13 files change, covering 16 actions, including the
branch refs called out in the issue (`dtolnay/rust-toolchain@master`,
`@stable`) and `pypa/gh-action-pypi-publish@release/v1`. Each SHA is the
commit its current tag or branch resolves to today, so the code that
runs is unchanged. Comments name the most specific tag on that commit
(for example `v2.9.3` for `Swatinem/rust-cache@v2`); where no such tag
exists, they keep the original ref (`v1` for `srvaroa/labeler` and
`rui314/setup-mold`, `v3` for `addnab/docker-run-action`,
`stable`/`master` for `dtolnay/rust-toolchain`). The `stable` branch of
`dtolnay/rust-toolchain` defaults its `toolchain` input to `stable`, so
pinning its SHA keeps the `nodejs.yml` step that passes no toolchain on
stable.

GitHub-maintained `actions/*` references are left on their tags, as in
the existing pins. Keeping SHAs current through Dependabot is the
sibling issue and is not part of this change.

Validation:

- No third-party `uses:` reference in `.github/` is left without a
40-character SHA (53 before, 0 after).
- For all 23 distinct third-party pins in `.github/`, `git ls-remote`
against the upstream repository confirms the SHA is the commit that the
commented tag or branch points to. A deliberately altered SHA and a
reverted tag ref were both caught.
- `pre-commit run` on the changed files passes (check-yaml, end-of-file,
trailing whitespace, typos).
- actionlint 1.7.12 reports the same 35 findings on `main` and on this
branch, all of them existing ones (custom runner labels and composite
actions under `workflows/`). It reports none for this change.
2026-11-19 11:18:10 -08:00
Bruno Ramirez 72b46439bf ci: publish and verify the CLI shell installer (#5090)
#5082 added the CLI installer, but users still needed a repository
checkout to run the script. This PR publishes it at
`https://downloads.lancedb.com/cli/install.sh` whenever
`scripts/install.sh` changes on `main`. The installer continues to fetch
binaries and checksums from GitHub Releases.

This was accomplished with the following changes:

- Serialize publishes and check out current `main` so retrying an old
run picks up the current script.
- Use GitHub OIDC to upload the installer to S3, invalidate its
CloudFront path, and compare the public download byte for byte with the
checked-out script.
- Allow a manual run on `main` for the first publish and retries. The
first run requires the `CLI_INSTALLER_AWS_ROLE_ARN` and
`CLI_INSTALLER_DISTRIBUTION_ID` repository variables.

### Testing

The installer failure-case tests passed. With simulated AWS and HTTP
responses, the publish step accepted matching bytes, rejected a stale
download, and stopped before upload when the distribution ID was
missing.
2026-11-18 15:38:02 -08:00
Bruno Ramirez dd69a2c535 feat(cli): install release binaries with a shell script (#5082)
Install the public CLI from GitHub Releases with `sh
scripts/install.sh`. The script selects the macOS Apple Silicon or Linux
ARM64/x86-64 archive, verifies its SHA-256 and reported version, and
installs it under the user's home directory. Set `LANCEDB_VERSION` to
pin a release, including a beta. The default resolves GitHub's latest
stable tag, which must have CLI assets.

If an Enterprise or other `lancedb` is already on PATH, the installer
asks for a separate install directory. An existing destination
(including a symlink) is always preserved.

The installer workflow exercises that same release on all three native
targets and checks checksum failures and existing executable handling.
2026-11-18 08:40:53 -08:00
Xuanwo 1a21698906 chore: update lance dependency to v15.0.0-beta.25 (#5069)
Update the Rust workspace, Java core dependency and Python test
dependency to [Lance
v15.0.0-beta.25](https://github.com/lance-format/lance/releases/tag/v15.0.0-beta.25).
Mark computed-column refresh replacements as data changes using Lance's
new explicit flag so refreshed values retain the existing index
invalidation and row-update behavior.

Rust API compatibility: the re-exported `CompactionOptions` adds
`max_data_files_per_fragment` and `scope`. Callers using exhaustive
struct literals must include the new fields or use
`..Default::default()`.

Configure macOS Rust tests with an explicit Python 3.13 interpreter and
runner/Python-specific caches so doctests do not link against an absent
Python framework.
2026-11-17 16:55:26 +08:00
Xuanwo 56c4b3a6f2 ci: stabilize macOS Node toolchain and build budget (#5017)
The macOS Node job installed floating stable before restoring the Rust
cache, although native builds use the repository-pinned compiler. Use
the existing file-aware Rust setup action with its implicit cache
disabled so setup, cache selection and compilation use the same pin and
one cache owner. Preserve the existing native build flags.

Allow 35 minutes for the complete macOS job. In the [pinned-toolchain
cold
run](https://github.com/lancedb/lancedb/actions/runs/43291714333/job/131439350321),
native compilation finished in 28m02s, but setup and packaging exhausted
the former 30-minute job limit before TypeScript checking and Jest.
Retained full Jest runs took 38–59 seconds; the new bound covers the
measured work with a small margin. The runner, build profile, features,
targets and complete test commands are preserved.

Hosted acceptance at `ff718c03`: the [complete macOS
job](https://github.com/lancedb/lancedb/actions/runs/43300424344/job/131469805138)
succeeded within the 35-minute limit (20:27:07–20:56:58 UTC). Native
compilation took 27m38s; the complete applicable Jest suite passed 1,695
tests, with 22 skipped, in 46.129s. This single successful run does not
guarantee every cold-build duration, validate the separate beta19
composition, or establish the cause of the DynamoDB timeout.
2026-11-14 20:55:23 +08:00
Xuanwo 193f203b72 ci: run remote Functions gate only in the full test suite (#5022)
The remote job runs the default local Functions gate twice: once before
building the remaining test targets, and again in the full remote suite.
Run it only through the existing full suite, removing the serial Cargo
invocation barrier while retaining the same features, authentication
wrapper, targets, and 30-minute deadline.

The [hosted remote
job](https://github.com/lancedb/lancedb/actions/runs/43302507952/job/131477104217)
at `7886d79e` completed successfully in 25m36s within the unchanged
30-minute limit. Its full suite passed 2,164 unit, 114 integration, and
120 doctests, including the three default gate tests. This single run
establishes completion for that workload, not a general timing
improvement or cold-build guarantee. The branch now includes main's
Cargo artifact fixture repair (#5010). The workflow, full-suite command,
authentication wrapper, three default Functions gate tests, and
30-minute deadline are unchanged from that hosted run. The 2,398-test
result remains evidence for `7886d79e`. On the updated head `810d6558`,
the [hosted remote
job](https://github.com/lancedb/lancedb/actions/runs/43382023177/job/131741745645)
completed in 17m58s with 2,171 unit tests, 119 integration tests, and
122 doctests passing (82 ignored), including all three default Functions
gate tests. This is current-head execution evidence, not a controlled
speedup comparison.
2026-11-14 20:54:19 +08:00
Yang Cen e1a10eaa66 chore(deps): upgrade Lance to v15.0.0-beta.21 (#5046)
Upgrade the Rust Lance family from beta.18 to the published
v15.0.0-beta.21 tag, and align Python test wheels and Java artifacts.
This includes the explicit-empty-segment FTS fix in
lance-format/lance#11063 needed by lancedb/sophon#10314. Enable Windows
Git long paths so Cargo can check out Lance fixtures in the Rust, NPM
and Python wheel builds.

Beta.21 also contains lance-format/lance#9858: new NGram, RTree and
MinHash LSH indexes use row addresses. Legacy row-ID segments remain
readable, but index maintenance on stable-row-ID tables can require a
rebuild. The NGram documentation now explains the consolidation
requirement; NGram/RTree tables without stable row IDs retain their
earlier format. The Python lock revision and unrelated dependency
entries are unchanged.

Validation:
- The official Lance release and internal mirror match
80bc45a195279befdec42853dac8d15a37e0504d. The seven official Fury wheels
and Maven POM/JAR were verified.
- Exact executable/dependency state 7846a15e completed the full Rust,
Python, Node, Java and CLI CI, including platform builds and package
publication dry runs. Xuanwo approved that head; Gatekeeper recommended
approve with a non-blocking qualification risk.
- Follow-up a289cb2c only adds the requested seven-line NGram upgrade
note. Static whitespace checks passed; new-head CI is running. No local
correctness tests or test builds were run by this task owner.
- Broader IVF/encoding/Blob/cache workload performance and the beta.21
Sophon composition remain separately qualified. Earlier Blob
cancellation and DynamoDB failures on #4967 are retained in their
original evidence; this PR does not count those historical failures as
fixed.

Current-head CI, full feedback and required review still gate merge. SDK
publication is a separate action. Sophon adoption follows a published
SDK release and mirror through its own dependency PR; its distributed
performance acceptance remains in #10314.
2026-11-14 20:22:13 +08:00
Will JonesandClaude Opus 5.5 1806dc2323 ci(java): publish beta releases to Fury instead of Maven Central (#5011)
## Summary

Java publishing has failed since `v0.42.0-beta.10` because the `lancedb`
Sonatype org hit Maven Central's monthly release-count limit:

```text
Publishing blocked: your organization has reached its monthly release count limit. Grace period ended 2026-11-08. Usage resets 2026-12-01.
```

This sends beta tags to `https://maven.fury.io/lancedb/` instead,
matching how Python publishes betas to `pypi.fury.io/lancedb`. Stable
releases still go to Maven Central.

```text
tag contains "beta" -> setup-java server "fury"  -> mvn deploy -P deploy-to-fury
otherwise           -> setup-java server "ossrh" -> mvn deploy -P deploy-to-ossrh
```

- `java/pom.xml`: new `deploy-to-fury` profile that points
`distributionManagement` at Fury.
- `java/README.md`: explains how to add the Fury and `maven.lance.org`
repositories to use a beta.

Requires a `FURY_TOKEN` secret with push access to the `lancedb` Fury
account. The token is passed as the Maven username with a placeholder
password. That follows Gemfury's convention but hasn't been tested
against Fury yet.

## Evidence

Running the beta path locally (`deploy -pl lancedb-core -am -P
deploy-to-fury`) against a file repository deployed `lancedb-parent`
(POM) and `lancedb-core` (JAR, POM, sources, javadoc).
`help:effective-pom -P deploy-to-fury` resolves the release repository
to `https://maven.fury.io/lancedb/`.

## Merge Risk

**Door:** Two-way. This only changes where future betas are published;
reverting the workflow restores Central publishing.
**Blast Radius:** `release-ci`. Beta consumers need the extra
repository; stable consumers are unaffected.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 11:34:14 -08:00
Xuanwo b5623f8881 ci: separate macOS Rust test phases (#4995)
macOS doctests and library/integration tests currently share a 60-minute
job budget. In #4967, compilation and doctests left only 3–4 minutes for
an integration group that takes 6–7 minutes on the base revision, so the
job was cancelled before it could finish.

Run doctests and library/integration tests in separate matrix jobs on
both macOS 15 and 26, each retaining the existing 60-minute limit.
Preserve the library/integration check names, feature selection, locked
dependencies and all existing coverage. This adds runner/build cost but
removes the cumulative deadline coupling without reducing coverage.

YAML parsing, shell syntax and matrix coverage checks pass. Hosted macOS
execution and subsequent beta19 integration still need verification;
this does not address the separate unlocked-build timeout.
2026-11-13 00:22:21 +08:00
Xuanwo a2a0d7f632 fix(ci): restore the unlocked Rust build cache once (#4997)
`build-no-lock` restores Rust build outputs twice: toolchain setup
enables its own cache by default before Cargo.lock removal, then the
workflow restores an explicit cache afterward. Both restore into the
same Cargo and target paths; the implicit action also allows PR cache
saves.

Disable only toolchain setup's implicit cache. The explicit restore
remains after lock removal and retains its main-only save condition.

This configuration is inherited unchanged by #4996. Its [failed
job](https://github.com/lancedb/lancedb/actions/runs/43229196192/job/131220088196)
reported runner ENOSPC while the second cache action was active, before
dependency installation or Cargo. Earlier hosted logs confirm two
restores into overlapping paths, but the failed job's full logs are
unavailable, so the exact disk peak and ENOSPC cause remain unproven.

A bounded probe using the resolved composite-action definitions verifies
two restores before this change versus one afterward, preserves ordering
and main-only saves, and confirms all other workflow configuration is
unchanged. The [hosted
run](https://github.com/lancedb/lancedb/actions/runs/43230840086/job/131225407007)
confirms one successful 1.62 GB cache restore after lock removal and no
PR cache save. It reached Cargo and linking without ENOSPC, but hit the
inherited 30-minute deadline with the unchanged one-job driver. Free
disk was 85 GiB before the build and 79 GiB at cancellation; these
endpoint observations do not establish peak disk use or a general ENOSPC
guarantee. The complementary two-job repair in #4996 now includes this
prerequisite for combined hosted acceptance; this PR remains limited to
cache ownership.
2026-11-13 00:20:53 +08:00
Yang Cen 5a38066234 chore(deps): upgrade Lance to v15.0.0-beta.18 (#4965)
Upgrade the Rust Lance dependency, Java lance-core, and Python test
dependency from beta.17 to the officially published
[v15.0.0-beta.18](https://github.com/lance-format/lance/releases/tag/v15.0.0-beta.18)
(`079fd77683a7acf056b0912f6ecda938e39ee120`). This provides a compatible
SDK for the newer Lance source already adopted downstream. Rust registry
versions and checksums are unchanged; the Python lock uses the six
published beta.18 wheels.

### Compatibility

The adopted release includes [Lance
#10863](https://github.com/lance-format/lance/pull/10863):
`FilteredReadOptionsProto.has_fragment_ids` distinguishes an explicit
empty fragment selection. Older executors ignore this field, so upgrade
executors before relying on the corrected empty-selection behavior. Rust
callers constructing this generated struct need the new field. [Lance
#10112](https://github.com/lance-format/lance/pull/10112) also replaces
the internal `hamming_distance_batch` API with
`hamming_distance_batch_into`.

The Linux Python matrix timeout is raised from 30 to 60 minutes: the
Python 3.13 cold native build and both test passes completed, but the
job hit its limit during cleanup. Build profiles, test commands, and
coverage are unchanged.

### Validation

- Three native FRI/ANN regressions passed: deferred-compaction refined
RQ, deferred index remapping, and approximate-query builder.
- `cargo clippy --quiet --locked --features remote --tests --examples --
-D warnings` passed with pinned Rust 1.97.0.
- Locked metadata, formatting, Python Makefile-scope Ruff checks, and
`uv lock --check --offline` passed.
- YAML, whitespace, end-of-file, and typo checks passed for the
timeout-only workflow change.

### Publication and CI

Java beta.18 is now published. After [Lance
#10968](https://github.com/lance-format/lance/pull/10968) merged, the
[normal publication
workflow](https://github.com/lance-format/lance/actions/runs/43146352505)
built all three JNI targets and published successfully; the Maven jar is
available. The upstream Python publication run was cancelled after its
Windows ARM job hit the one-hour timeout; six other wheels were
published and are the actual artifacts recorded in this lock.
Cross-platform SDK CI is still required. No performance claim is made by
this dependency update.
2026-11-12 16:09:13 +08:00
Yang Cen c1fee36045 chore(deps): upgrade Lance to v15.0.0-beta.17 (#4943)
Update the Rust workspace, Java dependency, and Python test dependency
to [Lance
v15.0.0-beta.17](https://github.com/lance-format/lance/releases/tag/v15.0.0-beta.17).
This includes the FRI cache and vector-index changes required by current
Sophon and retains the RaBitQ prewarm fixes. Lockfiles use the published
source and test wheels without unrelated registry version bumps.

The dependency dry run also exposed CI resource limits. Use the existing
larger x64 runner for GNU Node and compatibility-wheel builds; allow 60
minutes for Mac Python tests, 120 minutes for the compatibility wheel,
and 150 minutes for the Mac release wheel. Disable the CLI toolchain
action's automatic target cache so only the subsequent downloads-only
cache runs. Release optimization, the compatibility wheel's manylinux
container and x86-64-v2 baseline, and test coverage stay unchanged.

Validation:

- Three native SDK regressions pass: refined RQ queries after deferred
compaction, deferred index remapping, and ANN approximation planning.
- Pinned Rust 1.97.0: `cargo clippy --quiet --locked --features remote
--tests --examples -- -D warnings` passes.
- Locked offline Rust metadata, Python lock validation, Ruff
lint/format, and diff checks pass. The Python lock contains six
published beta.17 wheels.
- Repository YAML, whitespace and typo checks pass for the workflow
changes. Product-source checks are reused for the subsequent CI-only
commits.
- At head `07033dc6`, all 65 applicable pre-review CI checks pass,
including the compatibility wheel, Mac CLI, GNU Node, Mac Python tests,
release wheels, and Java checks. Six checks are skipped by tag/main-only
conditions or draft-only app behavior; the automated review and security
checks run after the Ready transition.

The upstream Java publisher succeeded and its beta.17 Maven artifact is
available. Six upstream Python wheel builds/uploads succeeded; its
Windows ARM job was cancelled. These checks do not establish Sophon
performance or aggregate-memory acceptance.
2026-11-11 07:26:52 -08:00
LanceDB RobotandJack Ye e928e374d0 chore: update lance dependency to v15.0.0-beta.16 (#4935)
Update the Rust workspace, Java lance-core, and Python test dependency
to [Lance
v15.0.0-beta.16](https://github.com/lance-format/lance/releases/tag/v15.0.0-beta.16).
Synchronize `python/uv.lock` with the published beta.16 wheels for
Linux, macOS, and Windows.

Run the native Linux x64 wheel build on an eight-core runner, matching
the existing ARM build allocation, after its optimized build repeatedly
exceeded the job deadline on the standard runner.

The dependency update passed Clippy, formatting, and CI-script checks;
the Python lockfile refresh/check passes. Fresh CI is running for the
runner adjustment. Java dependency-resolution failures caused solely by
publication lag are accepted for this upgrade.

---------

Co-authored-by: Jack Ye <yezhaoqin@gmail.com>
2026-11-10 00:25:41 -08:00
Jack Ye 794fa023cd feat: add materialized view refresh resource budgets (#4902)
Expose aggregate CPU, memory, and GPU budgets plus GPU-class placement
on materialized-view refreshes in Python and Rust. Forward options
through SQL and reject invalid or unsupported Embedded requests instead
of silently dropping constraints.

```python
job = view.refresh_async(
    cpu_millis=8000,
    memory_bytes=16 * 1024**3,
    gpu_count=2,
    gpu_class="h100",
)
job.wait()
```

```sql
REFRESH MATERIALIZED VIEW curated_training_set
WITH (cpu_millis = 8000, memory_bytes = 17179869184,
      gpu_count = 2, gpu_class = 'h100');
```

The same options apply to blocking refreshes, async Python connections,
and the Rust refresh builder. CPU/memory budgets require all three
resource fields; GPU-only caps and class-only placement are also
supported. These are execution-wide caps and require a supporting
Enterprise server with an isolated execution backend. A cap does not
increase refresh parallelism; current MV refreshes use at most one GPU.

Updates API documentation and SQL reference, with Python sync/async and
Rust remote-submission regression coverage. Formatting and Python lint
pass; local builds and tests are intentionally skipped.

The Linux CI build and example steps explicitly select the LanceDB
package, matching the feature-test step. This avoids rebuilding and
retaining a second dependency graph after a workspace-wide build, which
exhausted runner disk space on both this branch and main.

Related: [ENT-3386](https://linear.app/lancedb/issue/ENT-3386)
2026-11-09 15:02:13 -08:00
Yang Cen bd8cbfd4f2 chore: update lance dependency to v15.0.0-beta.14 (#4909)
Update the Rust workspace Lance crates and Python test dependency to
[Lance
v15.0.0-beta.14](https://github.com/lance-format/lance/releases/tag/v15.0.0-beta.14),
which includes JSON cache reuse across request stores and stable-row-ID
JSON index support. The Python lock contains all seven published wheels.
The independent Java module retains beta.8, as in the previous beta.13
update; its separate beta.14 publisher repair is outside this Rust
consumer upgrade.

Preserve all CI coverage while reclaiming completed workspace lancedb
artifacts before the package-level feature-test build, which otherwise
exhausted the Linux runner disk. Give only the Linux ARM64 release-wheel
job two hours after its one-hour timeout, retaining the same runner,
fat-LTO release profile and build flags.

Validation: 2,280 Rust tests passed (79 existing ignores), strict
workspace/all-feature Clippy, Rust formatting, and remote example checks
passed on unchanged Rust source and dependency lock. Python dependency
guards, lock validation, locked sync, and the published macOS wheel
import passed. The new Windows ARM64 wheel was downloaded and its
SHA-256 verified. Workflow YAML/shell checks and independent review
passed. Root Python Ruff/format checks still fail on unchanged
documentation examples; no suppressions or unrelated cleanup were added.

The CI repairs require a complete new run before readiness. This
dependency update does not establish corrected Sophon performance;
downstream native acceptance and the paired S3 replay remain separate.
2026-11-09 00:08:12 +08:00
Will JonesandClaude Opus 5.5 4fac811028 ci: pass release workflow inputs through env vars (#4884)
## Summary

`make-release-commit.yml` interpolated `workflow_dispatch` inputs
directly into `run:` scripts with `${{ }}`, which Aikido flags as
template injection. This passes them through environment variables
instead, so the shell never parses their values as code.

```diff
-          bash ci/bump_version.sh ${{ inputs.type }} ${{ inputs.bump-minor }}
+          bash ci/bump_version.sh "$RELEASE_TYPE" "$BUMP_MINOR"
```

The "Output Inputs" step gets the same treatment.

This is hardening rather than a fix for an exploitable bug: the inputs
are a choice and two booleans, and only users with write access can
dispatch the workflow.

## Evidence

Aikido local scan of the workflow: before, it reports "Template
Injection in GitHub Workflows Action" (severity 80) on the Bump version
step; after, that finding is gone.

## Merge Risk

**Door:** Two-way. The values passed to `bump_version.sh` are the same
strings as before.
**Blast Radius:** release workflow

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 14:45:32 -08:00
Xuanwo 57cd31e1aa test(python): load checked-in error classes for Rust tests (#4876)
Bare Rust test runners do not install the `lancedb` Python package, so
the typed-error tests fail with `ModuleNotFoundError`. Load the
checked-in exception modules once for the embedded interpreter,
preserving exception-class identity across parallel tests and the
existing type/cause assertions.

Rust CI now watches the binding sources and the Python exception modules
embedded by these tests, so those changes exercise the macOS Rust test
jobs.
2026-11-05 21:34:58 +08:00
Yang Cen 2dedde9b6c feat(python)!: expose typed query errors and request metadata (#4832)
Remote SQL failures currently become generic runtime errors, and HTTP
table lookup can discard server error metadata. Preserve transport
status, current request ID, SQL job ID and worker request ID across Rust
and Python. Select typed column, table, reference and schema exceptions
only when an explicit server code matches the transport status.

Remote `HttpError` and `RuntimeError` handlers remain compatible. Failed
SQL jobs retain `JobFailedError` with a typed SQL cause when available.
Missing metadata stays absent; message text never determines the
exception class. Local missing-column errors retain their type and
qualified-field suggestions, and `JobFailure.source` documents
structured remote Flight SQL failures.

This branch integrates main at `a9ad4997`, including its released Lance
15.0.0-beta.9 dependency update and remote optimize support. The only
textual conflict was two independent additions to `test_remote_db.py`;
both test groups and all original assertions are retained. The feature
has no dependency or lockfile delta against current main.

SDK runtime validation on `03ee633a` (runtime source unchanged in
`f3f2d0b8`), macOS ARM64, pinned Rust 1.97.0 and the frozen uv Python
3.14 environment:

- Rebuilt the native extension from the integrated source. All 22
targeted Python tests passed: native local errors, HTTP/Flight metadata,
legacy sync/async table-not-found behavior, and the three main
remote-optimize regressions.
- All 52 Rust SQL, metadata/source and nested-field tests passed,
including the new main optimize cases.
- Root and Python-binding Rust Clippy with `-D warnings`, Rust
formatting, Python package Ruff and conflict-file formatting passed.
- Repository-wide Ruff reports 59 existing documentation findings, and
its format check identifies six documentation files. Every affected file
is byte-identical to current main; these checks are not reported as
passing.
- Direct integration review and AST comparison confirm both conflicting
test groups were preserved. Earlier exception-constructor/pickling
evidence remains applicable to the unchanged Python error modules.

The unlocked build exhausted disk again on a runner with the same label
but only 9.4 GiB free on a 72 GiB root filesystem. Keep the existing
runner and dependency caches, serialize Cargo compilation, and remove
only completed test/bench executables reported by Cargo. This job never
runs those binaries; normal binaries, libraries and build-script outputs
remain available. Fresh resolution, the ci profile, all features, and
test/bench compilation and linking are retained.

Three probes using Cargo and target-path validation pass with `-D
warnings`: all fixture targets link while ordinary outputs remain
usable; an undefined symbol still produces Cargo exit 101 and its linker
diagnostic; files outside the target directory are never removed. The
[current-head build-no-lock
job](https://github.com/lancedb/lancedb/actions/runs/41911613851/job/126860364065)
passed on `f3f2d0b8`: all compilation/linking completed, 20 completed
test executables were removed, and `target` retained about 7.3 GiB. This
successful run had a 145 GiB root with about 78 GiB free afterward; it
was not an identical rerun of the failed 72 GiB image. The driver tests
also passed in this job. All previous-head jobs ended naturally before
the push; new-head CI and review gates still apply.

Typed remote input exceptions require the server metadata contract.
Older servers retain generic transport errors and existing missing-table
compatibility. The optimize tests use mock servers and do not establish
downstream server acceptance.

BREAKING CHANGE: Rust callers with exhaustive matches on
`lancedb::Error` must handle the new `FieldNotFound` and `Sql` variants.
Local `Error::ColumnNotFound` failures now raise
`lancedb.exceptions.ColumnNotFoundError`, a `ValueError` subclass.
Python callers that previously caught only `RuntimeError` for this local
failure must catch `ColumnNotFoundError` or `ValueError`.
2026-11-05 05:58:21 +08:00
Jack Ye 82cc4e82a1 fix: tag the final release commit after syncing lockfiles (#4825)
Release tags currently point to the version bump before the lockfile
amend, so tagged CLI builds fail with `--locked` even though the branch
has the synced lockfile.

Keep the newly created, unpublished tag on the final amended release
commit before pushing. Existing published tags and packages remain
unchanged.

[Remote preview dry
run](https://github.com/lancedb/lancedb/actions/runs/41764901500) passed
and moved the local tag after the lockfile amend; no tag was pushed.
2026-11-04 13:25:58 -08:00
Yang CenandXuanwo 10625f6dda chore: update lance dependency to v15.0.0-beta.9 (#4814)
Update Rust Lance dependencies to
[v15.0.0-beta.9](https://github.com/lance-format/lance/releases/tag/v15.0.0-beta.9),
including the scoped stable-row-ID conversion fix. Python tests use
published beta.9 wheels on Linux/Windows while macOS retains beta.4.
Java stays on beta.8, matching the original base, so this update does
not depend on beta.9 Maven publication or macOS Java packaging.

The dependency updater preserves workspace inheritance, the WAL test
wrapper uses the new StoredBatch module, and Linux/remote Rust CI uses
its installed mold linker. The Python lockfile also records the
already-declared OCI extra. CLI CI now caches Cargo downloads under a
separate key instead of restoring compiled targets: the previous runner
exhausted its disk during cache restoration, before compilation. Its
test matrix and commands are unchanged.

This branch includes #4820's row-freshness changes: successful rows
become current while skipped rows retain their values and remain
eligible for retry. Repair identities, replay handling and Restore
fencing protect publication completion.

BREAKING CHANGE: `StalenessPlan::row_dirty` is a new public field. Rust
callers using exhaustive struct literals must initialize it.

Validation:
- All reported non-Java checks passed on
`f5fa66fcbcf31a8eb188935f728735560c77c873`, including Rust
lint/Linux/remote, Python, NodeJS and CLI checks. Current head
`c660bc0ac9fd5920ad4b64be9c19f732ef4c56a5` preserves those product
sources, manifests, lockfiles and compiler/test commands; only the Java
pin restoration and CLI cache configuration differ. Current-head CI is
tracked separately.
- The complete Java directory is identical to the original PR base. The
scope correction reuses [Xuanwo's prepared and validated
commit](https://github.com/lancedb/lancedb/pull/4814#issuecomment-6626088466);
no new Java build was run.
- CLI workflow YAML parses successfully, its inputs match the pinned
rust-cache action schema, and the existing jobs, matrix and commands are
unchanged. Hosted execution must confirm the cache-restoration repair.
- Existing validation includes the updater regressions and 32 CI-script
tests, dependency-policy checks, count/WAL coverage, and #4820's 42
freshness tests, strict core Clippy and Rust doctest. Root Ruff
previously reported unchanged documentation-example issues;
Python-package Ruff passed.

This PR adopts the existing released Lance beta.9. A subsequent official
SDK release and normal Sophon dependency adoption remain separate
delivery steps.

---------

Co-authored-by: Xuanwo <github@xuanwo.io>
2026-11-04 19:35:36 +08:00
importcppandimportcpp 8172298044 test(python): expand minimal dependency coverage
Expand the Linux Python test run without pandas and pylance from two files to
the suite while retaining the regular dependency run for optional-package
modules.

Move optional imports into tests that need them and use Arrow assertions where
pandas is not required, preserving the existing behavioral assertions.

Validation:
- Physical no-pandas/no-pylance broad run: 2884 passed, 316 skipped, 8 existing
  marker cases deselected.
- Regular affected suite: 1687 passed, 39 skipped.
- Current-head hosted integration: all 15 checks and 4 workflows passed.

Co-authored-by: importcpp <57519936+importcpp@users.noreply.github.com>
2026-11-03 18:31:46 +08:00
Xuanwo 2d70bec53a feat: add UTM-tagged docs links to SDK warnings and enterprise-only errors (#4797)
Add a central documentation link registry (`lancedb::docs::DocLink`) in
the Rust core that builds `docs.lancedb.com` URLs with UTM parameters
(`utm_source=lancedb_sdk`, `utm_medium=warning|error`,
`utm_campaign=<id>`, `utm_content=<sdk>-<version>`) placed before any
`#anchor` fragment and without user-identifying data.

- Initialize `utm_content` per language binding (`python`, `nodejs`,
`cli`, defaulting to `rust`) and expose the link builder to Python so
`DBConnection` and `Job` stubs reuse the core definitions.
- Append published documentation links to Enterprise-only `NotSupported`
/ `NotImplementedError` errors across database, job, catalog, and table
operations.
- Emit rate-limited maintenance warnings (once per table per process
when `warn` logging is enabled) when opening a native table with at
least 100 small fragments (`< 100k` physical rows each) or at least
1,000,000 unindexed rows on an optimizable user index, reading only
manifest metadata without opening data or `_indices/` files, and
document the thresholds in the compaction and reindexing guides.
- Verify published/in-repo `docs/web/` targets and `#anchor` fragments
in unit tests and include extracted SDK links in the scheduled
`docs-link-check` workflow.

Linear: OSS-2772
2026-11-03 14:12:15 +08:00
Xuanwo 5ca8d836e7 fix(deps)!: upgrade candle to remove vulnerable zip
## Problem

`RUSTSEC-2026-0429` affects `zip 7.4.0`, which reaches the optional
`sentence-transformers` feature through `candle-core 0.9.2`. The `deny` check on
`main` fails on this advisory.

## Change

Update `candle-core`, `candle-nn`, and `candle-transformers` to `0.11.1`. The
focused lockfile resolution replaces `zip 7.4.0` with `zip 9.2.2`, and no other
zip version remains in the all-features graph. This also pulls candle's required
newer transitive `tokenizers` and `safetensors` releases; the directly declared
`tokenizers 0.19.1` and the embedding implementation remain unchanged.

The optional `sentence-transformers` Rust API exposes this dependency version:
`SentenceTransformersEmbeddingsBuilder::device` accepts
`D: Into<candle_core::Device>`, and the `Device` type is now from candle-core
0.11. The default CPU path constructs that device internally and is unchanged.

`deny.toml` is unchanged. Its obsolete zip ignores now produce
`advisory-not-detected` warnings, which do not fail the check.

## Validation

- The `sentence-transformers` feature builds with tests and examples.
- The existing CPU example loads the default model and retrieves
  `The human body has 206 bones.` for the matching query.
- A local contract check verified 384-dimensional, finite, non-zero Float32
  output and higher similarity for the matching fact than for an unrelated fact.
  It was not committed because it would add an 88 MB model download to
  all-features CI.
- `cargo deny` `0.20.2`, the version used by the Rust workflow, passes
  `advisories`, `bans`, `licenses`, and `sources`.
- The locally installed `cargo-deny 0.18.9` is not green: it treats
  informational unsound advisories differently from the workflow's `0.20.2`.
  The result above uses the exact CI version.
- Targeted clippy, formatting, lockfile review, and the reverse `zip` dependency
  tree pass.
- Hosted CI completed successfully for exact head `bffbcda6490fa1ed51838b3801e01ae2f82faed6`.

CI mitigation: Reclaim completed lancedb CI-profile artifacts before the Blob v2 example after disk sampling showed a minimum of 24,764,416 available bytes. This may rebuild lancedb for the example; the exact OS cause of the SIGBUS remains unproven.

BREAKING CHANGE: The optional `sentence-transformers` Rust API now takes
`candle_core::Device` from candle-core 0.11. Downstream crates that explicitly
construct and pass a candle-core 0.9 `Device` to
`SentenceTransformersEmbeddingsBuilder::device` must use a `Device` from
candle-core 0.11.x aligned with lancedb. This normally means updating a direct
candle-core dependency; if the value comes through a re-export, update the
dependency that supplies it. Callers that use the default CPU path without
passing a `Device` do not need to migrate.
2026-11-03 03:16:42 +08:00
Xuanwo 6063229de9 fix(ci): replace retiring macos-14 runners
The affected jobs were cancelled before runner assignment with GitHub's scheduled macOS 14 brownout annotation. macOS 14 runner images retire on November 2, 2026: https://github.com/actions/runner-images/issues/13518.

This moves the Python and CLI workflows to `macos-15` and keeps two distinct Rust macOS legs with `macos-15` and `macos-26`. All selected labels are public ARM64 runners, preserving the architecture of the previous plain `macos-14` jobs.

Validation: `git diff --check` and Ruby YAML parsing passed for all three changed workflows. A targeted `actionlint` check also passed; existing repository-wide custom-runner, reusable-workflow input, and shellcheck findings are outside this diff.
2026-10-31 04:15:02 +08:00
Colin Patrick McCabe 2044179a8b feat: add a CLI release binary (#4751)
Package the standalone lancedb CLI with every stable and beta GitHub
release. Publish archives for Linux x86_64, Linux ARM64, and Apple
Silicon macOS, along with SHA-256 checksums, licenses, and third-party
notices.

Synchronize the CLI version with the SDKs and validate that release tags
match both manifests. Add PR and manual packaging dry runs, runtime
compatibility checks, and smoke tests of extracted executables. GitHub
release creation now waits for all three archives to pass validation;
SDK registry publishing remains independent.

Update installation instructions and the release checklist. Linux
binaries target glibc 2.28, retaining existing x86_64 CPU requirements;
macOS binaries target macOS 14 or newer.
2026-10-30 12:54:54 -07:00
Will JonesandClaude Opus 5.5 87057b6616 ci: remove Codex Fix CI workflow (#4630)
## Summary

Removes the Codex Fix CI workflow. It ran an AI agent that read CI logs,
which outside contributors can write to, while the agent had the
repository's write token and no sandbox. Hardening it would take ongoing
work, and we don't use it enough to justify that, so we're removing it.

## Merge Risk

**Door:** two-way. The workflow can be restored from history.
**Blast Radius:** ci. Only affects manual dispatches of this workflow.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 23:59:55 +08:00
d5013459eb chore: update lance dependency to v15.0.0-beta.6 (#4742)
Updates Rust and Java Lance dependencies to
[v15.0.0-beta.6](https://github.com/lance-format/lance/releases/tag/v15.0.0-beta.6),
pins Python tests to published pylance 15.0.0b6, and refreshes both
lockfiles.

Aligns Arrow 59, DataFusion 55, and PyO3 0.29; adapts execution plans
and MemWAL directory handling, updates the ABI metadata test, and
removes the obsolete Lance Arrow patch now fixed upstream.

Validation: workspace clippy with all features/tests and warnings
denied, cargo fmt, Python/CI Ruff checks, uv lock check, 16 CI-script
tests, and targeted Python regressions (54 passed, 28 skipped);
repository-wide Ruff retains existing documentation-example failures,
and the upstream macOS wheel build failed while Linux and Windows wheels
are published.

---------

Co-authored-by: Daniel Rammer <hamersaw@protonmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 16:14:09 -05:00
Colin Patrick McCabe 301ccad3aa feat: add a LanceDB command line (#4600)
Add a LanceDB command line with the following functionality:

- `lancedb auth`: log in with OAuth, check cached OAuth session status,
or log out.
- `lancedb profile`: Create, edit, list, show, select, and delete
connection profiles.
- When no subcommand is given, we will attempt to create a SQL shell.

Update ci/check_cargo_lock.py and its regression tests to allow
pruning dependency edges while their target packages remain in
Cargo.lock. Removing the CLI from the Python source distribution
can disable optional features such as Axum tracing, even though
other SDK dependencies still require the tracing package.
2026-10-29 12:39:46 -07:00
Divyanshu Singh 005a9a353a ci(java): run Java 11 and 17 builds in parallel with matrix strategy
Split the Java 17 workflow into a matrix for Java 11 and Java 17.
Run Checkstyle once in a dedicated Java 17 job and skip the lifecycle-bound Checkstyle execution in the matrix builds to avoid redundant work.

Closes #1331.
2026-10-29 18:33:13 +08:00
Lei Xu 03bd909dab test(python): resolve aliased projections in the torch remote mock server
Map dynamic projections by output name to their source columns in the remote
torch test mock so permutation take queries preserve the aliased ordering
column. Run the regression in the embeddings-installed Python test job and
require torch to import so a missing dependency cannot skip coverage.
2026-10-29 12:19:44 +08:00
Brendan Clement 4359688f32 ci: let the Vale action install its pinned CLI (#4708)
Let the pinned Vale action install Vale 3.24.0 instead of maintaining a
separate download and extraction step
2026-10-28 23:26:40 +08:00
Brendan Clement 149cf1052a fix(ci): bundle Vale rules to avoid private release downloads (#4707)
The prose check fails because it downloads its Vale rules from the
now-private docs repository.

Keep the five unchanged rules from `vale-lancedb-v0.1.0` in this
repository and disable `vale sync` in CI. This also works for
contributors without access to the docs repository. The update
instructions record the release and archive checksum.
2026-10-28 08:16:42 -07:00
Xuanwo 8a4effa06a fix: gate experimental local functions behind an opt-in feature (#4688)
Published SDK builds currently expose local SQL computed columns and
materialized-view execution that are not ready for release. Add the
opt-in `experimental-functions` Cargo feature to the Rust core and
forward it through the Python and Node bindings; published packages
leave it disabled.

Local declarations and refreshes now return `NotSupported` before
mutating tables or spawning jobs, including prepared materialized-view
creation. Remote Cloud/Enterprise client operations, Python UDF
packaging, ordinary eager `add_columns`, and access to existing data
remain available. Stored metadata and write protections stay active, and
shared server commit helpers remain usable.

CI covers both feature configurations. Existing local execution tests
run with the feature enabled; default-build regressions cover early
rejection, unchanged table versions, existing metadata protections, and
normal eager transforms. API and source-build documentation explain the
opt-in.

Validation: Rust library tests pass with the feature disabled (1,869
tests) and enabled (1,947 tests), plus three default-build integration
regressions. Python and TypeScript bindings were rebuilt and tested in
both configurations, including mocked remote requests; Rust formatting,
Python package lint, TypeScript lint/build, and generated docs were
checked. Repository-wide Ruff still reports 48 pre-existing errors in
unchanged `docs/web-tests` files.
2026-10-27 14:32:09 +08:00
Drew 436c209580 docs: document Blob V2 in the multimodal guide (#4623) 2026-10-26 09:37:28 -07:00
Jack YeandLance Release 197403e891 fix: honor downstream Lance dependency overrides (#4671)
Consumers that provide a local Lance checkout cannot resolve the
dependency graph because the SDK directly selects a vendored
`lance-arrow`, producing two path packages with the same name and
version. The Rust core now declares its upstream Git dependency
separately so the consuming workspace can override that source
consistently. Python continues inheriting the vendored workspace
dependency, keeping the sliced-struct validity fix in Maturin source
distributions. Standalone SDK builds still select that same fix through
the existing root patch.

Adds a downstream consumer CI regression that resolves a local Lance
override and checks that exactly one canonical `lance-arrow` package is
selected. The Lance version updater also updates the core declaration in
stable, preview and local modes. Public APIs and query behavior are
unchanged.

The workspace declaration lint excludes path dependencies because the
Python binding intentionally uses the bundled source. Duplicate and
unused external declarations remain errors; advisory, license,
banned-package and source checks continue covering the full dependency
graph.

---------

Co-authored-by: Lance Release <lance-dev@lancedb.com>
2026-10-25 07:19:55 -07:00
KarthikSandXuanwo 702389654e fix(python): align pylance extra and preview install indexes (#4556)
Fixes #4248.

The preview index still contains pylance 1.0.0b6. uv's default
first-index resolution can select it, or backtrack to an old LanceDB
release when installing the extra. Meanwhile, the extra still permits
pylance 5 even though current main bundles Lance 14.

Raise the optional dependency to `pylance>=14.0.0b12`, the version
already pinned in the test extra, and keep the lockfile metadata
consistent. Document both Fury indexes and uv's `unsafe-best-match`
strategy in the Python README and the source-owned quickstart
(`docs/web/quickstart.mdx`). Explain the index trust requirement and
recommend installing the extra to enforce the version floor.

Add CI checks that reject older Lance majors and ensure the pylance and
tests extras remain compatible. Run these checks when either dependency
manifest changes, so a future Lance major bump cannot silently leave the
Python minimum behind.

### Validation

- Recreated the reported install on Ubuntu 26.04 / CPython 3.12.15 with
uv 0.12.23: `lancedb==0.40.0b5` plus the old index selects
`pylance==1.0.0b6`. Reproduced both the missing `blob_array` import and
the unexpected `blob_handling` scanner argument using a real blob table.
- Resolved the modified `python/pyproject.toml` with the pylance extra
against both indexes: selects `pylance==14.0.0b18`, matching the current
Rust pin.
- Ran both documented pip and uv installations in isolated environments:
`lancedb==0.41.0b7`, `pylance==14.0.0b18`; blob-array construction and a
blob-bytes round trip through `to_pandas(blob_mode="bytes")` pass. Both
package dependency checks pass.
- New regression fails on the original dependency bound (27
rejected-version cases incorrectly accepted), then passes with the fix.
Full CI-script suite: 3 tests pass.
- `uv lock --check` with both indexes passes; focused Ruff checks pass;
`git diff --check` passes.
- Repository-wide Ruff reports 49 existing errors in untouched
`docs/web-tests` files. Unrelated formatting changes were discarded.

Runtime smoke checks used released native wheels; source dependency
resolution was tested directly from the modified pyproject. No Rust or
Python runtime code changes.

---------

Co-authored-by: Xuanwo <github@xuanwo.io>
2026-10-24 03:27:32 +08:00
Xuanwo 5a79c7d22d ci: run aarch64 Windows tests on main only (#4637)
Run the aarch64 Windows build/test cycle only on pushes to main so PRs
wait
for a single Windows platform (x86_64). Main keeps the same native
aarch64
coverage as before.

GitHub evaluates job-level `if` before the matrix strategy is applied,
so
the aarch64 target is split into its own `windows-arm` job instead of
being
filtered inside the existing matrix. The job keeps the historical check
name.
2026-10-24 01:52:45 +08:00
Xuanwo 444f7f3bde ci: refresh apt lists before installing protobuf in docs build (#4636)
The docs deploy workflow installs protobuf-compiler without refreshing
apt
lists first. Ubuntu noble-updates replaced `protobuf
3.21.12-8.2ubuntu0.3`
with `.0.4`, so stale package lists in older runner images make `apt
install`
fail with 404 and exit code 100. Run `apt update` before installing,
matching
the other workflows.
2026-10-23 12:45:25 +08:00
Xuanwo a5079b0fc6 chore: update lance dependency to v15.0.0-beta.1 (#4628) 2026-10-22 19:41:40 +08:00
Tobias 1ad97b148b build(python): publish an sdist alongside the wheels (#4522)
Closes #4246.

lancedb publishes no source distribution, so a platform without a
prebuilt wheel (#4104, #4239) has nothing to install. This adds an sdist
to the Python release.

## The sdist job

The release workflow builds an sdist with the maturin version of the
wheel jobs. On a tag, the publish job uploads it with the wheels: to
PyPI, and to Fury for beta tags. The job also runs on the pull request
dry run, which now starts on a change to `python/pyproject.toml`.

## Checks

- The job builds a wheel from the sdist with `--locked` and smoke-tests
it in a fresh venv.
- `ci/check_sdist.py` fails if a tracked file of the Python package is
missing from the tarball.
- `twine check --strict` checks that the metadata renders. `pydistcheck`
enforces PyPI's 100 MiB size limit.
- The unit tests of both check scripts run in the CI scripts workflow.

## Cargo.lock

maturin ships the repository lockfile, which pins crates that only the
dropped `nodejs` member uses, so `cargo --locked` fails
(PyO3/maturin#2609). The job first runs `cargo metadata --locked` on the
repository workspace, so a lockfile that has drifted from `Cargo.toml`
fails there. It then removes the nodejs-only pins and repacks the sdist.
`ci/check_cargo_lock.py` fails if the prune changes any package it
keeps, or any dependency of one. The published file is the repacked one.

## Behavior change

After the first release with an sdist, pip on a platform with no current
wheel builds the newest version from source, which needs a Rust
toolchain and `protoc`. Before, pip installed the last version with a
wheel for that platform.
2026-10-19 13:35:07 -07:00
Brendan Clement 52eed381bb ci: add an advisory Vale check for documentation prose (#4581)
Checks `docs/web` against the shared LanceDB style rules, so the same
mechanical mistakes reach review.

**Change.**

- Add `.vale.ini`, pinning the shared LanceDB Vale package by release
(`vale-lancedb-v0.1.0`), and ignore the synced `.vale/` directory.
- Add the Docs prose style workflow. On pull requests that change
`docs/web` pages or `.vale.ini`, it annotates only added or changed
lines and never fails on a style finding; an install, sync or
configuration error still fails it.
- Link the style guide from `CONTRIBUTING.md` and show how to check a
page locally.


Validation: Tested in [temporary PR
#4595](https://github.com/lancedb/lancedb/pull/4595). Vale flagged all
five deliberate style issues on the changed prose lines, left inline
code and unchanged lines alone, and kept the check green. [Passing
workflow
run](https://github.com/lancedb/lancedb/actions/runs/39299187786/job/118219554825).
2026-10-19 12:47:25 -07:00
Will JonesandClaude Opus 5.5 eabec507a8 ci: pin protoc v36.2 with checksums across wheel builds (#4535)
## Summary

The Python wheel builds used different protoc versions: v24.4 on Linux,
v21.12 on Windows, and whatever Homebrew shipped on macOS. None of them
verified the download. A new composite action,
`.github/actions/setup-protoc`, now holds one pin, v36.2, with a SHA-256
for each platform's zip.

- macOS and Windows: the action downloads protoc, checks its hash, and
installs it.
- Linux: protoc has to be installed inside the manylinux container, so
the build reads the version and hash from the action's outputs and
checks the hash there.

protobuf does not publish checksum files for protoc. The pinned hashes
are the digests GitHub recorded for the v36.2 release assets. Older
releases such as v24.4 have none, which is why this moves to v36.2.
protoc only runs at build time, through `prost-build` in the Lance
crates. The Linux protoc binary is statically linked, so it runs in the
manylinux 2_17 container.

The action is also added to the path triggers of `pypi-publish.yml` and
`python.yml`, so a change to the pin runs the wheel builds.

Follow-up to
https://github.com/lancedb/lancedb/pull/4522#issuecomment-6160848344.
The sdist job in that PR can use the same action once this merges.

## Evidence

Running the action's install script locally on linux-aarch_64 installs
`libprotoc 36.2`, and a wrong hash fails with `protoc checksum
mismatch`. `cargo check -p lancedb` with `PROTOC` set to protoc 36.2
builds the Lance protos. The PyPI Publish dry run on this PR covers the
Linux, macOS and Windows builds.

## Merge Risk

**Door:** Two-way. CI only.
**Blast Radius:** Python wheel builds.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 10:58:12 -07:00
Brendan Clement 07e626ec48 fix: check docs web test license headers (#4474)
Remove scaffold that accidentally caused the post-merge Rust
license-header check to fail. Include `docs/web-tests/**` in the PR
workflow paths so future docs test changes run the license checks before
merge.

Validation: `cargo fmt --all`; `git diff --check`;
license-header-checker v1.5.0 using all four workflow commands on a
clean checkout; Cargo metadata confirms all six Rust example targets
remain unchanged.
2026-10-07 12:41:55 -07:00
LanceDB RobotandWyatt Alt 17e9a657e6 chore: update lance dependency to v14.0.0-beta.1 (#4445)
Updates the Rust workspace Lance dependencies, Cargo lockfile, and Java
lance-core to
[v14.0.0-beta.1](https://github.com/lance-format/lance/releases/tag/v14.0.0-beta.1).
No compatibility fixes were required.

Validation passed: `cargo clippy --quiet --workspace --tests
--all-features -- -D warnings`, `cargo fmt --all --quiet`, and `git diff
--check`.

---------

Co-authored-by: Wyatt Alt <wyatt.alt@gmail.com>
2026-10-06 08:34:45 -07:00
2734e10767 fix(node): update arrow to 21 (#4362)
Thanks @vincentkoc for starting this! I was just looking into this
myself. I started with your PR and added:
- make arrow 21 the default
- widen the peer range to <22 so if they release 21.3 that'll be
included
- have to do skipLibCheck in tsconfig.json, because of flatbuffers 25
which needs TypeScript 5.7
- fix override in Symbol.hasInstance
- support new types in Arrow 20-21 (LargeList, Utf8View, BinaryView,
IntervalMonthDayNano)
- arrow-compat job in nodejs.yml that runs tests with arrow 19 and 20
(adds 2 sec)
- put the list of arrow types in one place
- update NODEJS_THIRD_PARTY_LICENSES.md
- regenerated typescript docs (sorry about reorderings, one time cost)
- reformat arrow.test.ts (sorry, almost all whitespace, thanks to biome.
git diff -w shows 110 lines edited)
- fixed Sliced Utf8View / BinaryView serialization error, by just
converting them to Utf8 and Binary (as our rust code would anyway)

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-02 15:56:46 -05:00
0327618a62 feat(sql): add native vector dedup and partitioned mv refresh (#4303)
## Summary

Materialize a source-preserving dedup result from an indexed, pinned
snapshot with a short declaration. The default greedy policy keeps the
smallest unassigned snapshot row ID and removes only its directly
matching neighbors: For A < B < C, an A–B–C chain without an A–C edge
keeps A and C.

```python
from lancedb import vector_dedup

view = db.create_materialized_view(
    "images_clean",
    vector_dedup("images", column="phash", distance_threshold=4),
)
cleaned = view.table
```

The Python source expression captures the source version once at
creation and
waits for the materialized result by default. Use `dataset_version=...`
for an
explicit snapshot, `with_no_data=True` for declaration only, or
`create_materialized_view_async(...)` for a job handle. AsyncConnection
supports
the same expression. It uses the existing MV REST endpoints and registry
jobs,
without opening a SQL query connection. Source names are exact
root-namespace
table names. Additional select/where/limit options are rejected for this
source.

The SQL declaration remains available:

```sql
CREATE MATERIALIZED VIEW images_clean AS
SELECT * FROM vector_dedup('images', 7, 'phash', 4);
REFRESH MATERIALIZED VIEW images_clean;
```

This is the host-facing SQL entry point. The MV builder now accepts a
typed native vector source; the Rust SDK also supports the same
definition through `MaterializedViewDefinition::from_sql` and
`prepare_definition`; `view.refresh().execute()` executes it locally.
Hosts distribute its units using their existing job infrastructure. The
raw `vector_duplicate_pairs` source remains available separately when
callers want the pair relation.

## Implementation and contract

- Use actual Rust Lance `13.0.0-beta.15` (`db53dcf367`); the native
partition primitive computes pairs from index representations without
source-vector aggregation or a Python pair loop.
- Extend partitioned MV refresh with two dependent waves. Physical
segment/partition tasks stream pairs through a bounded external sort,
select direct representatives and write per-source-fragment bitmap
artifacts. Source-fragment tasks start after every selection receipt
completes and stream retained original rows, including blob payloads,
into uncommitted output fragments.
- Reuse normal blob write coercion and row-mask scans, including stable
row-ID translation after compaction. Null vectors, isolated rows and
source deletions are preserved correctly. Conflicting representative
decisions across overlapping index scopes fail before publication.
- Expose `dependency_units()` and `write_refresh_partition_with_inputs`
alongside the existing plan/commit API. Receipts bind
snapshot/configuration/policy/destination generation. Only a complete
accepted set can publish; unfinished units restart, completed units can
be reused. There is no pair-position checkpoint.
- Use MV format 4 for dedup results and format 3 for native pairs;
Python and TypeScript metadata readers recognize both. No source
deletion or source row-ID migration occurs.

Only same-segment/same-partition edges are covered. Quantized scores use
symmetric represented-vector distances. Result materialization requires
V2 data storage and is initially a native MV source, not an ordinary
SELECT table function. Compressed vertex masks stay in memory; edge
sorting spills to local disk. Unreferenced artifacts use normal Lance
retention/cleanup and must be retained for the job's recovery window.

## Validation

AWS Linux validation:

- Native pair/result integration matrix passed: multiple
segments/partitions, exact thresholds, empty output, cross-batch data,
single-process pair parity, source preservation, lost receipts and
publication guards.
- Blob/null-vector/pinned-deletion tests passed with both row-ID modes,
including compaction that changes physical row addresses.
- Representative policy, forced external-sort spill and
conflicting/corrupt artifact tests passed.
- Full MV regression suite: 153 passed, 2 pre-existing ignored. Rust
formatting and Clippy passed.

- Python MV suite: 47 passed; TypeScript MV suite: 11 passed. Native
bindings were rebuilt in project-local environments; formatting, lint
and TypeScript docs passed.
- Rust declaration doctests: 3 passed, including the complete local
dedup example.
- Companion host validation: 41 MV job tests passed (1 pre-existing
ignored), full workspace Clippy passed, and the complete process-level
CLI E2E suite passed (3 tests). Recovery exercises both selection and
materialization waves.
- A real CIFAR-10 pHash run used five actual registry-worker owners,
completed 32 selection + 24 materialization tasks, and retained 49,846
of 50,000 rows with identical original values and image payloads.

Host workflow performance measurements are recorded in the companion
host PR. Cross-platform CI is still running. The previous remote-test
bootstrap failed before Cargo tests with `401 Bad credentials`; the
workflow fix described below is being validated by CI. No deployment or
merge is performed.


## Python source validation

AWS tests cover automatic and explicit snapshots, physical/stable row
IDs, local
and remote creation, sync/job/async-connection APIs, delayed refresh,
strict
options and identifier quoting. The native Python extension was rebuilt
through
the project's uv/maturin backend. Ruff, Pyright and the full MkDocs
API-reference
build passed; both new public symbols are rendered.

A real 50,000-image FEv2 run disabled both Python SQL entry points and
supplied an
unreachable SQL endpoint. The new API still materialized the same 49,846
retained
rows and original image payloads. Three recorded creation/refresh jobs
completed
56 tasks each on all five registry-worker owners, and remained on source
snapshot
3 after source latest advanced to 4. No worker or server wire-protocol
changes
were needed for this client entry point.

Previous CI authentication failure:
https://github.com/lancedb/lancedb/actions/runs/36334679276/job/108663151265.

## Review and CI fixes

- Validate all JSON merge source fields before projection, rejecting
unknown and duplicate names at every struct level. Missing/reordered
fields and ordinary JSON merges remain supported. A checked-in 12-case
integration matrix covers root fields, structs, lists, large lists,
fixed-size lists and map values; rejected writes leave the table version
and row count unchanged.
- Match namespace connection MV method signatures to
`MaterializedViewSource` in all four sync/async methods, fixing the
Python 3.10 import failure from runtime override checks.
- Restore the remote-test script's encrypted-CLI path: use the Actions
token for artifact download and pass `SOPHON_READ_TOKEN` under the
variable the decryption script consumes. The previous workflow omitted
that variable and attempted the private release path, failing with HTTP
401. On the final head, remote CI passes: 1,464 Rust unit tests, the
integration targets and doctests pass (3 unit tests ignored).

AWS validation for these fixes: both review reproducers failed before
their fixes and pass afterward; 55 merge tests, 29 cast tests and the
standalone 7-case admission regression pass. Python 3.10.21 imports
successfully; 90 MV/namespace tests, 14 JSON tests and four real
namespace dedup cases pass. After `794b97a0`, the native binding was
rebuilt again and the JSON suite rerun. Rust formatting/Clippy, Ruff and
Pyright pass. Sophon's locked test compilation passes against the final
SDK source for all seven affected crates. Extended runners, logs and
benchmark artifacts remain local.

Gatekeeper recommends approval on `794b97a0`, and the `breaking-change`
label is set. Final CI: **49 checks passed, 3 expected skips, no
failures or pending checks**, including remote tests, Python 3.10,
minimum dependencies and Windows ARM Rust tests. All wheel builds pass
after retrying the Linux matrix affected by transient AlmaLinux
repository-metadata 404s. All code-review threads are resolved. The PR
remains open for maintainer review and merge.

---------

Co-authored-by: Yang Cen <yangcen@Yangs-Mac-mini.local>
Co-authored-by: Lance Release <lance-dev@lancedb.com>
2026-09-28 18:06:55 +08:00