Skip to content

fix: reject unsafe legacy index coverage - #10256

Merged
Xuanwo merged 3 commits into
mainfrom
gatekeeper/fix-10254-1
Oct 25, 2026
Merged

Xuanwo merged 3 commits into
mainfrom
gatekeeper/fix-10254-1

Conversation

@lance-gatefixer

@lance-gatefixer lance-gatefixer Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Legacy commits could reuse a retired fragment ID still recorded in an index bitmap, making new rows appear indexed, or rewrite values while retaining a user index with unknown coverage.

  • Reject newly introduced fragment IDs found in existing index bitmaps, preserving the stored provenance needed by fragment reuse.
  • Reject in-place rewrites of fields covered by user indices without a fragment bitmap, with guidance to migrate or rebuild the index. Include nested field relationships.
  • Retain regression coverage for all five reserved top-level names across every add-column input form and rename, while allowing nested names. These checks use the shared schema validator now present in main.

Regression coverage also includes delete/reserve/claim sequences across append, update, merge, and rewrite, and unknown coverage across all three column rewrite operations on tagged and untagged tables.

This guards index coverage; general cross-version reservation ownership remains outside this repair (#10253).

Validation after merging main:

  • cargo fmt --all
  • cargo clippy --all --tests --benches -- -D warnings
  • cargo test -p lance-table --lib (766 passed)
  • cargo test -p lance --lib dataset::schema_evolution::test:: -- --test-threads=8 (98 passed)

Fixes #10254

@claude claude 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.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.

Tip: disable this comment in your organization's Code Review settings.

@github-actions github-actions Bot added the bug Something isn't working label Oct 23, 2026
lance-gatekeeper[bot]

This comment was marked as outdated.

@lance-gatekeeper lance-gatekeeper Bot added the K-approved Latest Gatekeeper recommendation permits acceptance. label Oct 23, 2026
Use the shared writable schema validator and retain reserved-name regression coverage alongside legacy index protections.
@lance-gatefixer lance-gatefixer Bot changed the title fix: guard legacy index coverage and reserved column names fix: reject unsafe legacy index coverage Oct 24, 2026
@lance-gatekeeper lance-gatekeeper Bot removed the K-approved Latest Gatekeeper recommendation permits acceptance. label Oct 24, 2026
lance-gatekeeper[bot]

This comment was marked as outdated.

@lance-gatekeeper lance-gatekeeper Bot added the K-approved Latest Gatekeeper recommendation permits acceptance. label Oct 24, 2026
@lance-gatekeeper lance-gatekeeper Bot removed the K-approved Latest Gatekeeper recommendation permits acceptance. label Oct 25, 2026

@lance-gatekeeper lance-gatekeeper Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Gate recommendation: approve.

Rejecting unsafe commits preserves index definitions and fragment provenance without changing stored formats. Shared validation from #9499 covers the reserved-name checks. The broader reservation-ownership problem in #10253 has unchanged exposure and is not a prerequisite for this repair.

@lance-gatekeeper lance-gatekeeper Bot added the K-approved Latest Gatekeeper recommendation permits acceptance. label Oct 25, 2026

@Xuanwo Xuanwo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Reviewed. Guards reject rewriting indexed fields when a user index has unknown coverage and reject claiming fragment ids still recorded in index bitmaps; nested-struct, tagged, and fragment-reuse cases covered. Schema-evolution tests lock in existing reserved-name guards. CI green on head.

@Xuanwo
Xuanwo merged commit 8890bb2 into main Oct 25, 2026
41 checks passed
@Xuanwo
Xuanwo deleted the gatekeeper/fix-10254-1 branch October 25, 2026 00:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working K-approved Latest Gatekeeper recommendation permits acceptance.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: legacy operations can leave indices claiming stale coverage

1 participant