Skip to content

refactor(search): share rank fusion with Kit - #758

Merged
mariusvniekerk merged 1 commit into
mainfrom
t3code/kit-stack-migration
Oct 3, 2026
Merged

mariusvniekerk merged 1 commit into
mainfrom
t3code/kit-stack-migration

Conversation

@mariusvniekerk

@mariusvniekerk mariusvniekerk commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Search now uses the released Kit dependency for reciprocal-rank fusion. DocBank keeps its stable-key tie ordering, source signals, explicit rank gaps, and truncation reporting. Stored vectors and processing identities are unchanged.

Layer 1 of the migration stack: #758 → #759 → #760 → #762. This layer is based on main; #759 adopts full-text query construction, and #760 composes the shared text embedding client with DocBank's provider policy. #762 adds the preferred Kit configuration schema.

@roborev-ci

roborev-ci Bot commented Oct 2, 2026

Copy link
Copy Markdown

roborev: Combined Review (6127bdb)

Verdict: No findings at or above medium severity.


Reviewers: 2x codex, codex (security) | Synthesis: codex | Total: 2m33s

@roborev-ci

roborev-ci Bot commented Oct 3, 2026

Copy link
Copy Markdown

roborev: Combined Review (21ef3c4)

Verdict: No findings at or above medium severity.


Reviewers: 2x codex, codex (security) | Synthesis: codex | Total: 5m35s

Use released Kit v0.30.0 for reciprocal-rank fusion so search shares
its ranking implementation with the other consumers. Keep DocBank's
stable-key ties, explicit rank gaps, provenance and truncation rules.
Existing vector and processing identities are unchanged.

Generated with Codex (gpt-6-astra)
Co-authored-by: Codex <codex@users.noreply.github.com>
@mariusvniekerk
mariusvniekerk force-pushed the t3code/kit-stack-migration branch from 21ef3c4 to 7187cfd Compare October 3, 2026 23:20
@mariusvniekerk
mariusvniekerk merged commit 71832e9 into main Oct 3, 2026
9 of 10 checks passed
mariusvniekerk added a commit that referenced this pull request Oct 3, 2026
Name search now uses Kit's FTS candidate builder and literal quoting. It
keeps prefix matching, name-before-content ordering, scope filters, and
overflow reporting. Ranking no longer uses a separate FTS lookup for
each name result.

Filters and name-based ties remain outside the candidate relation,
before the final limit. Rendition selection and evidence/citation joins
remain in DocBank.

Layer 2 of the migration stack: #758 → #759 → #760 → #762. Based on
#758; #760 adopts the shared text embedding transport. #762 adds the
preferred Kit configuration schema.

Co-authored-by: Codex <codex@users.noreply.github.com>
mariusvniekerk added a commit that referenced this pull request Oct 3, 2026
…760)

The OpenAI-compatible adapter uses Kit to encode text requests, decode
vectors, and restore response order. DocBank retains strict response
schemas, model/revision checks, credential resolution, provider error
handling, and unit-length validation. Already-formatted document and
query texts remain one request; retries stay with the worker.

Canonical fingerprints, input recipes, vector storage, and generation
selection are unchanged. Synthetic fingerprints extracted from the
previous implementation match exactly. A repeated indexing scan makes no
provider call and leaves exported metadata byte-identical. Local servers
verify prepared text bytes, result ordering, and retry behavior.

This adopts Kit's admission rules: public-IP HTTP endpoints fail during
client setup, and whitespace/control-only prepared text is rejected
before transport. Input rejection is classified as permanent rather than
an invalid provider response.

Kit configuration types hold the model, deployment, batch, and transport
settings. Public DocBank configuration keys and named credential
bindings stay unchanged. Native providers, multimodal inputs, source
coordinates, and exact-search storage remain DocBank-owned.

Layer 3, based on #759, which is based on #758.

---------

Co-authored-by: Codex <codex@users.noreply.github.com>
mariusvniekerk added a commit that referenced this pull request Oct 3, 2026
Text embedding services can now use Kit's standard `embedder`
configuration, including API keys supplied as a literal, environment
reference, or private-file reference. The existing DocBank settings
remain supported as legacy input. Conflicting settings fail explicitly.

Both forms resolve to the existing immutable binding. Equivalent
configurations produce byte-identical portable profile JSON and the same
provider descriptor, including endpoints with explicit default ports.
Secrets resolve per request and remain outside profile identities;
changing a model or revision still rejects the old pinned descriptor.

DocBank retains chunking, role formatting, vector validation, consent,
and egress policy. The pinned text adapter still requires
`/v1/embeddings`, `input_type_mode = "none"`, and count-based batching.
Unsupported Kit settings are rejected and documented.

Layer 4, based on #760. Earlier layers are #758 and #759.

---------

Co-authored-by: Codex <codex@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant