Skip to content

feat(fts): expose shared corpus owner reconstruction - #10632

Merged
BubbleCal merged 2 commits into
mainfrom
yang/fts-corpus-owner
Nov 2, 2026
Merged

BubbleCal merged 2 commits into
mainfrom
yang/fts-corpus-owner

Conversation

@BubbleCal

Copy link
Copy Markdown
Contributor

External plan codecs cannot restore the shared scorer binding between the indexed and flat branches of a mixed FTS query. Expose SharedFtsScorerExec and FtsCorpusBinding: export child paths within one owner, then reconnect native Match or BM25F leaves with fresh coordination. Reconstruction checks branch roles, query/resolved granularity, shared snapshot handles and owner boundaries while preserving each leaf's filters, limits and statistics scope.

A child rewrite can clone a nested owner while retaining its template Arc. The old execution traversal rebinds that nested pair in the outer scope and fails with got 2 and 2. Stop rebinding at nested owners so each prepares its own execution state. The regression reproduced that failure before the fix; cancellation, errors and subsequent execution retain the native lifecycle. One-shot children remain non-replayable.

Integrates main's FTS module split and reuses its leaf rebuilding helpers. This supplies the owner boundary only: BM25F leaf-state export and downstream PE codecs/routing remain separate work. No scoring defaults, persisted formats or dependency pins change. No performance claim.

Validation at ea260e0fa with pinned Rust 1.98.1 on macOS ARM64:

  • 28 runtime tests and 1 public API doctest passed, including native/reconstructed failure and cancellation, replay, independent executions, nested/cloned owners, child rewrites and incompatible bindings.
  • cargo clippy --locked --all --tests --benches -- -D warnings passed.
  • Formatting, module-size and PR-diff whitespace checks passed.

@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 enhancement New feature or request label Nov 2, 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.

No merge-blocking issues found. Scoped reconstruction preserves the native scorer lifecycle and keeps nested owners independent.

@lance-gatekeeper lance-gatekeeper Bot added the K-approved Latest Gatekeeper recommendation permits acceptance. label Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request K-approved Latest Gatekeeper recommendation permits acceptance.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants