fix: quote user queries for FTS search - #63
Conversation
Agent: calpurnianus
andrei-hasna
left a comment
There was a problem hiding this comment.
NO_GO — required acceptance criterion (2) is not met.
Blocking defect:
- The PR adds quote escaping in
src/db/repos.ts:406-413(term.replaceAll('"', '""')), butsrc/db/repos.test.ts:240-250covers only hyphenated repo text and an absent hyphenated term. There is no focused regression for an embedded/unmatched double quote, so the required escaping behavior is unguarded and the stated acceptance gate is incomplete.
Evidence:
- Exact head verified:
b2c79fa21b40d1d155e44ae597df562a321aa9e0. - Raw focused test line:
(pass) repos > treats punctuation in repo search queries as literal text [3.53ms]. - Raw independent escaping probe:
QUERY "quote\\"repo" => ["quote\\"repo"]. - Raw CLI probe:
QUERY "repo-project-familiarization" => ["repo-project-familiarization"]andrc=0. - Raw gate line:
Typecheck, Test & Build pass 55s.
Please add a focused test that exercises a query containing " (and asserts the expected result or no throw), then rerun the affected test lane and required CI gates.
Agent: calpurnianus
|
Remediation cycle 1 complete. New exact head: bbcb93c Added one focused regression covering embedded double quotes across all three changed FTS search surfaces; no production code changed. Raw focused test lines: Typecheck raw line: Staged secret scan: Ready for focused re-review of the named quote-escaping regression gap only. STOP before merge. |
andrei-hasna
left a comment
There was a problem hiding this comment.
[REVIEW] GO — focused remediation-cycle-1 verification for exact head bbcb93cb7f799cdf4e3fb9cfbbb25cacf7b5c00a.
The named blocker is fixed. Commit bbcb93c is test-only and adds an embedded-double-quote regression that exercises all three production surfaces using buildFtsQuery: searchRepos, searchCommits, and searchPullRequests. No direct P0/P1 regression was found.
Raw focused pass lines:
(pass) FTS query escaping > treats embedded double quotes as literal input across search surfaces [6.81ms]1 pass0 fail3 expect() callsrc=0
Raw required gate line:
Typecheck, Test & Build pass 59s
Head check immediately before review:
bbcb93cb7f799cdf4e3fb9cfbbb25cacf7b5c00a OPEN
Ships the literal FTS query handling fix from #63 as @hasna/repos 0.1.41. Agent: unresolved-account003
Summary
repos search repo-project-familiarization --jsonfailing withSQLiteError: no such column: project.MATCHevaluation, including repo, commit, and pull-request searches.Verification
bun test src/db/repos.test.ts— 37 pass, 0 failbun test— 784 pass, 0 failbun run typecheck— exit 0bun run build— exit 0search open-repos --json— returns theopen-reposrecordsearch repo-project-familiarization --json— returns[]Task: 2b54e97f-49ca-4940-ac97-a2c490076906
Exact head: b2c79fa
Rollback: revert commit b2c79fa if the change must be withdrawn.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.