Skip to content

fix(search): preserve partial results and reuse document access checks - #7808

Merged
icecrasher321 merged 1 commit into
stagingfrom
codex/fix-regular-search-staging
Sep 14, 2026
Merged

icecrasher321 merged 1 commit into
stagingfrom
codex/fix-regular-search-staging

Conversation

@icecrasher321

Copy link
Copy Markdown
Collaborator

Summary

  • Keep authorized Search results when a retrieval branch times out, with an incomplete-coverage notice and a retry.
  • Let PostgreSQL reuse document visibility checks across vector candidates and retain ranking/deadline diagnostics on timeouts.

Type of Change

  • Bug fix

Testing

  • 132 unit tests and 14 PostgreSQL integration cases passed, including real SQL deadlines through the Search HTTP route. One optional Go-server integration case skipped.
  • Typecheck, lint, all 46 CI audits, block-registry and docs-manifest checks passed.
  • Verified partial matches, incomplete empty results, and retry states in an isolated browser fixture using the actual Search component.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Sep 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Sep 14, 2026 4:34pm UTC

Request Review

@greptile-apps

greptile-apps Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The PR appears safe to merge; the partial-result flow preserves authorization boundaries and the affected callers and UI states are consistently updated.

Summary

  • Adds retrieval completeness metadata to the dashboard search contract.
  • Enables partial results through the authenticated search route.
  • Keeps partial matches visible and provides an explicit retry state.
  • Reworks vector candidate visibility into a lateral document lookup so PostgreSQL can reuse document-level checks.
  • Retains timeout and vector-ranking diagnostics and adds focused route, UI, query, and PostgreSQL integration coverage.

Diagram

sequenceDiagram
    participant UI as Search UI
    participant API as Knowledge Search Route
    participant App as Search Application
    participant V as Vector Retrieval
    participant K as Keyword Retrieval
    participant DB as PostgreSQL

    UI->>API: query, scope, filters
    API->>App: "allowPartialResults = true"
    par Retrieval branches
        App->>V: retrieve authorized candidates
        V->>DB: vector scan + lateral visibility lookup
        DB-->>V: rows or deadline
    and
        App->>K: retrieve authorized candidates
        K->>DB: keyword search
        DB-->>K: rows or deadline
    end
    App->>App: retain fulfilled rows and record timed-out legs
    App-->>API: results + retrieval status
    API-->>UI: complete or partial response
    alt Partial coverage
        UI->>UI: keep matches and show incomplete notice
        UI->>API: Try again
    end
Loading

Reviews (1) · Last reviewed commit: "fix(search): preserve partial results an..."

@icecrasher321
icecrasher321 merged commit c734e46 into staging Sep 14, 2026
33 checks passed
@icecrasher321
icecrasher321 deleted the codex/fix-regular-search-staging branch September 14, 2026 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant