Skip to content

fix(search): rivalsearch param name + store FTS query sanitization - #288

Merged
getappz merged 4 commits into
masterfrom
fix/search-web-store-bugs
Jul 21, 2026
Merged

fix(search): rivalsearch param name + store FTS query sanitization#288
getappz merged 4 commits into
masterfrom
fix/search-web-store-bugs

Conversation

@getappz

@getappz getappz commented Jul 21, 2026

Copy link
Copy Markdown
Owner

Closes #253, closes #254.

Changes

search_web (src/mcp_server/search.rs):

  • Renamed max_resultsnum_results in rivalsearch delegation
  • rivalsearch's web_search tool expects num_results, causing a validation
    error every time the web arm was used

search_store (src/mcp_server/search.rs):

  • Added flare_search_kit::fts_query sanitization before passing user query
    to doc_search → FTS5 MATCH
  • Prevents FTS5 column-name parsing errors like no such column: ctx when
    query terms happen to match FTS5 operator/column syntax
  • Uses MatchMode::All (default) — same pattern as memory/search.rs
    and search_memory

…e store FTS query

- search_web: rivalsearch web_search expects num_results, not max_results
  (#253)
- search_store: sanitize query via flare_search_kit::fts_query to prevent
  FTS5 column-name parsing errors like 'no such column: ctx' (#254)

Agentflare-Agent: 1
Agentflare-Branch: fix/search-web-store-bugs
@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Warning

Review limit reached

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

Next review available in: 6 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: a803f588-b475-4ddd-a6a1-8b41225ba0d8

📥 Commits

Reviewing files that changed from the base of the PR and between f398c43 and 1392220.

📒 Files selected for processing (1)
  • src/mcp_server/search.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/search-web-store-bugs

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.

getappz added 2 commits July 21, 2026 16:54
fts_query() returns None only when the sanitized query has no tokens
(e.g. quote-only input). The unwrap_or_else fallback was resubmitting
the raw, unsanitized query to FTS5 MATCH in that case, undermining the
sanitization it was meant to guarantee. Return an empty result set
instead.

Agentflare-Agent: claude-code_2-1-216_agent
Agentflare-Branch: fix/search-web-store-bugs
rivalsearch web_search rejects num_results outside 1..=20 (schema
validation). An unclamped limit (e.g. the default max of 50 used
elsewhere, or a caller-supplied value) failed the whole search call
instead of returning a truncated result set.

Agentflare-Agent: claude-code_2-1-216_agent
Agentflare-Branch: fix/search-web-store-bugs
@getappz
getappz enabled auto-merge (squash) July 21, 2026 12:04
@getappz
getappz merged commit f7aefcc into master Jul 21, 2026
15 of 16 checks passed
@getappz
getappz deleted the fix/search-web-store-bugs branch July 21, 2026 12:09
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