Skip to content

Two hybrid-search implementations have diverged: the corpus search st… - #2050

Draft
lore-agent[bot] wants to merge 5 commits into
mainfrom
lore/implementation-loop/issue-1976
Draft

lore-agent[bot] wants to merge 5 commits into
mainfrom
lore/implementation-loop/issue-1976

Conversation

@lore-agent

@lore-agent lore-agent Bot commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Opened by the Lore assembly line from lore/implementation-loop/issue-1976.

Closes #1976
Lore-Task: 0cc30600-5879-43fc-a0af-9422949314fc

Lore Agent and others added 2 commits September 13, 2026 00:20
Two acceptance tests that fail for the exact reasons the ticket names:
1. hybridSearch uses plainto_tsquery (ANDs every word) instead of
   websearch_to_tsquery with extracted key terms — keyword leg empties
   on natural-language queries so vector alone decides ranking.
2. hybridSearch returns raw RRF scores (~1/61) with no normalization;
   hybridChunkItems already applies normalizeScores here.

Adds traceability links on the two new spec statements in
specs/mcp-tools/search-context/spec.md, replacing the "untested beyond
schema resolution" note.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Sep 13, 2026

Copy link
Copy Markdown

🔍 Lore Spec Impact — advisory

This PR touches 1 statement(s) across 1 spec(s), and 1 of them has validating tests this PR does not change.

Weaker signals (1) — linked by a spec, not proven by a test run

Feature Specification: GET /healthz API Route · 1 statement(s)

specs/api-routes/healthz/spec.md

Behavior
⚠ the tests that validate it are not touched by this PR

Call getHealthStatus(){ connected, … } (db.getHealthStatus).

validated by nothing validates it
via changed file libs/server-core/src/outbound/db.ts

Deterministic · graph @ 9f3d3ae (projected 2026-09-12) · no tests run by this check

Lore Agent and others added 3 commits September 13, 2026 00:29
Replace plainto_tsquery with websearch_to_tsquery('english', $2) and
pass extracted key terms so the keyword leg uses OR semantics instead of
ANDing every word. Rescale rrf_score so the top result is 1.0 (mirrors
the normalizeScores fix applied to hybridChunkItems in #1924).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Remove all block and inline comments from db-hybrid-defects.test.ts
(re-lint/max-comment-lines: 0 in test files). Drop the redundant
`expect(results[1].rrf_score).toBeLessThan(1.0)` assertion to bring
the second test from 4 expects to the allowed max of 3. Update the
two spec-link anchors in search-context/spec.md from the old line
numbers (#L55, #L78) to the new positions after comment removal
(#L29, #L40).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Extract SQL execution into runHybridSQL() to keep hybridSearch under
  max-lines-per-function (20 lines)
- Add three blank lines required by @stylistic/padding-line-between-statements
  so it() calls land at the lines ESLint --fix would produce (31, 43)
- Update spec links: L29→L31, L40→L43; remove decimal in second label
  to prevent spec-sentence-splitter false split on "1.0"

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@lore-agent

lore-agent Bot commented Sep 13, 2026

Copy link
Copy Markdown
Contributor Author

Lore implementation-loop run failed (iteration_max — AssemblyLine implementation-loop: node "await-ci" failed — the await-ci->repair-build retry budget (2) is spent) — 4aeab0ae-4c89-4d8e-816b-3e8b42551ca3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Two hybrid-search implementations have diverged: the corpus search still has the defects #1924 fixed

0 participants