Files
lancedb/nodejs/lancedb
lancedb-gatefixer[bot] d9db83de65 fix!: guard remote index routes against dot segments (#5013)
BREAKING CHANGE: Older Enterprise index listings that require per-index
statistics now omit historical entries with empty names, `.` or `..`.
Remote index operations reject these unaddressable names. Operators
needing to remove such entries can use server-side maintenance; direct
native access also supports cleanup. Ordinary index names and
`exist_ok=True` reuse require no migration.

Fixes #5007

Remote index URLs previously allowed `.` and `..` as path segments.
Reqwest normalizes them, so dropping an index named `..` could send the
table-level drop request and delete the table.

Guard the remote statistics, prewarm, and drop routes against empty
names, `.` and `..`, then percent-encode all other names. Index creation
retains its existing name policy on both backends, including names such
as `Customer lookup` and `café_idx` and reuse through `exist_ok=True`.
The same remote guard applies on checked-out branches.

Enriched Enterprise listings retain these entries without issuing stats
requests. Native cleanup is covered by a regression test. API
documentation explains these limits, and website release guidance
remains a non-rendering draft.

Validation:

- Before the review fix, 12 of 15 focused regressions failed,
reproducing valid-name rejection, generated-name reuse failure, and
mixed legacy-list failure.
- 60 focused Rust tests passed, covering unsafe routes, encoded names,
mixed legacy/enriched listings, generated names, native and Enterprise
lifecycles, checked-out branches, and `exist_ok` preservation of index
identity, definition, and table version.
- Rebuilt the Python extension in the uv-managed environment from
`python/uv.lock`; all 28 targeted Python tests passed, including both
names and synchronous/asynchronous `exist_ok` reuse.
- Node native build, TypeScript type checking, lint/format checks, four
targeted index tests, and generated API documentation passed.
- Rust formatting, Clippy (`remote`, tests and examples), Python
formatting/lint, repository-wide Typos 1.26.0, and `git diff --check`
passed. Native builds used the repository `ci` profile with
`remote,lancedb/metrics-otel` enabled for Python and Node.
- Repository-root Ruff lint reports 59 existing errors in unchanged
`docs/web-tests`; Python-package lint passes.

<!-- lance-gatekeeper-fix:v1 agent=1ef05de7bc00306ccd6f8a60b9a81003
generation=1 -->

<!-- gatefixer-walkthrough:v1
head=6b25e10810ea1d11a4ef56be63c4ef50225f65d6 -->
## Change walkthrough

```mermaid
flowchart TD
    entry["Listed index"] --> typed{"Type available?"}
    typed -->|Yes| include["Include index"]
    typed -->|No| safe{"Addressable name?"}
    safe -->|No| omit["Omit entry"]
    safe -->|Yes| stats["Encode and fetch stats"]
    stats --> include
```

Creation preserves existing name support; remote routes reject only
empty names, `.` and `..`.

**Read:** [Route
guard](https://github.com/lancedb/lancedb/blob/6b25e10810ea1d11a4ef56be63c4ef50225f65d6/rust/lancedb/src/remote/table.rs#L102-L112)
→ [Listing
fallback](https://github.com/lancedb/lancedb/blob/6b25e10810ea1d11a4ef56be63c4ef50225f65d6/rust/lancedb/src/remote/table.rs#L2534-L2596)
→ [Index-preservation
regression](https://github.com/lancedb/lancedb/blob/6b25e10810ea1d11a4ef56be63c4ef50225f65d6/rust/lancedb/src/table/create_index.rs#L1431-L1481).

<sub>Snapshot:
[6b25e10](https://github.com/lancedb/lancedb/commit/6b25e10810ea1d11a4ef56be63c4ef50225f65d6)</sub>
<!-- gatefixer-walkthrough:end -->

---------

Co-authored-by: Gatefixer <313497061+lancedb-gatefixer[bot]@users.noreply.github.com>
2026-11-30 20:51:19 +08:00
..
2026-09-23 15:09:40 +08:00