You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Every search re-read the returned documents after retrieval to fetch the name, URL, modified time and connector type of each source card, under the same predicate hydration had just applied (7–82 ms and one round trip per search). Those fields now ride on the hydrated row: hydration joins the connector, and the application maps the row directly. getDocumentMetadataByIds stays for the v1 route and document reads.
The workspace keyword hydration still scored results on the original vector, which lives out of line in toast storage; it now scores on the projection like the other legs.
Type of Change
Improvement
Testing
Application tests updated to feed the source-card fields on the hydrated rows; the case that dropped a passage between hydration and the metadata re-read is gone with the re-read, since hydration's predicate is the gate. The hydration test asserts the joined fields.
bun run lint, check:audits, type-check pass; 3,311 tests pass across knowledge and the search routes.
The PR appears safe to merge; the only post-review change restores the shorter Tin readiness-cache window requested by the prior review.
Summary
This PR removes the second source-card metadata read by carrying document and connector fields through hydrated search rows, scores workspace keyword results using the projection vector, and restores the Tin readiness cache to one minute.
Joins source-card metadata into vector, tag-only, and keyword hydration queries.
Maps hydrated source metadata directly into application search results.
Uses the projected embedding for keyword-result distance calculations.
Updates diagnostics and tests for the single-read retrieval flow.
Restores the shorter Tin readiness-cache window after the previous review.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Search candidates] --> B[Hydrate visible documents]
B --> C[Join document metadata]
C --> D[Join connector type]
D --> E[Optional reranking]
E --> F[Map hydrated rows to results]
waleedlatif1
changed the title
improvement(knowledge): read the source card with the result and hold Tin readiness longer
improvement(knowledge): read the source card with the result
Sep 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
getDocumentMetadataByIdsstays for the v1 route and document reads.Type of Change
Testing
bun run lint,check:audits,type-checkpass; 3,311 tests pass across knowledge and the search routes.Checklist