Skip to content

fix(search): preserve focused document timeout - #1272

Merged
BigSimmo merged 2 commits into
mainfrom
codex/remaining-safe-fixes-20260727
Jul 27, 2026
Merged

fix(search): preserve focused document timeout#1272
BigSimmo merged 2 commits into
mainfrom
codex/remaining-safe-fixes-20260727

Conversation

@BigSimmo

Copy link
Copy Markdown
Owner

Summary

  • restore the historical 6,000 ms timeout only for explicitly documents-only universal search
  • retain the 750 ms documents cap for federated typeahead, so slow document retrieval cannot delay sibling domains
  • add deterministic fake-timer coverage for both paths and reconcile the durable canary, staging, production-content, and release ledgers

RAG impact: no retrieval behaviour change — this changes only the timeout availability of a documents-only universal-search request; retrieval, ranking, ordering, aliases, scores, ownership, and selected results are unchanged.

Verification

  • npm run verify:pr-local — 393 files, 3,526 passed / 2 skipped; production build, client-bundle secret scan, and 36-case offline RAG fixtures passed
  • npm run verify:cheap — all 25 gates passed
  • focused universal-search and RAG contracts — 77/77 passed
  • npm run eval:rag:offline — 36 golden cases / 309 tests passed
  • npm run check:production-readiness — READY (8 passes; only the isolated worktree's expected env-file-location warnings)
  • npm run verify:ui — UI verification not run: no UI, routing, styling, or browser behavior changed
  • npm run verify:release — Verification not run: the risk-scoped PR-local build/RAG gate is sufficient for this bounded server-library fix
  • live retrieval/answer eval — Verification not run: no retrieval or answer behavior changed; the scheduled baseline comparison already retained recall 1.0 and no new spend is justified

Red-before/green-after proof: the new contract failed on the old 750 ms documents-only path, then passed after the focused timeout selection. The full universal-search file passes 29/29.

Risk and rollout

  • Risk: a documents-only request may now wait up to 6 seconds instead of failing at 750 ms; federated typeahead retains the short cap
  • Rollback: revert the search commit (or this squash merge) to restore the single 750 ms policy
  • Provider or production effects: GitHub push/PR only in this handoff. Earlier evidence collection was read-only against the authorized GitHub, Supabase, and Railway targets. No production data write, OpenAI request, or live RAG dispatch occurred.

Clinical Governance Preflight

  • Source-backed claims still require linked source verification before clinical use
  • No patient-identifiable document workflow was introduced or expanded without explicit governance approval
  • Supabase target remains Clinical KB Database (sjrfecxgysukkwxsowpy)
  • Service-role keys and private document access remain server-only
  • Demo/synthetic content remains clearly separated from real clinical sources
  • Source metadata, review status, and outdated/unknown-source behavior remain conservative
  • Deployment classification/TGA SaMD impact was checked; no clinical decision-support behavior changed

Notes

@supabase

supabaseBot commented Jul 27, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project sjrfecxgysukkwxsowpy because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@coderabbitai

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@BigSimmo, you've reached your PR review limit, so we couldn't start this review.

Next review available in:3 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 3d88073c-55d3-43ce-85e1-3c9c64830477

📥 Commits

Reviewing files that changed from the base of the PR and between 3f47e20 and 5fd9daa.

📒 Files selected for processing (6)
  • docs/branch-review-ledger.md
  • docs/operator-backlog.md
  • docs/outstanding-issues.md
  • docs/staging-setup.md
  • src/lib/universal-search.ts
  • tests/universal-search.test.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/remaining-safe-fixes-20260727

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@BigSimmo
BigSimmo merged commit 51a3f7f into mainJul 27, 2026
18 checks passed
@BigSimmo
BigSimmo deleted the codex/remaining-safe-fixes-20260727 branch July 27, 2026 04:16
@BigSimmo

Copy link
Copy Markdown
OwnerAuthor

Post-merge staging proof completed on 2026-07-27:

  • Workflow: https://github.com/BigSimmo/Database/actions/runs/30238051403
  • Evaluated exact main SHA: cdf7c04f1184e372d530b50c1d99d634b28e6293 (contains this PR)
  • Result: PASS
  • Checkpoints: configuration safety, distinct users, private fixtures, list, detail, signed URL, labels, mutation, universal search, offline retrieval, source-only answer, and reindex
  • Cleanup: PASS, zero cleanup errors
  • OpenAI/live RAG spend: $0; no RAG dispatch was made

Sign up for freeto 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

@BigSimmo