Skip to content

fix(cli): tolerate fts errors in search#438

Open
Steve-too wants to merge 1 commit into
vouchdev:testfrom
Steve-too:fix/search-hybrid-fts-fallback
Open

fix(cli): tolerate fts errors in search#438
Steve-too wants to merge 1 commit into
vouchdev:testfrom
Steve-too:fix/search-hybrid-fts-fallback

Conversation

@Steve-too

Copy link
Copy Markdown

What changed

Makes vouch search tolerate FTS5/index failures the same way the context, MCP, and JSONL retrieval surfaces already do:

  • auto backend falls through to substring search when index_db.search() raises sqlite3.Error
  • hybrid backend degrades to semantic-only fusion when FTS5 raises
  • adds CLI regressions for both paths

Why

The CLI search path had a resilience gap: server/JSONL/context callers already guard FTS5 failures, but the CLI could still surface a raw search failure instead of returning the best available fallback results.

Tests

  • PYTHONPATH=src python3 -m pytest tests/test_cli.py -q
  • uv run --with ruff python -m ruff check src tests
  • uv run --with mypy --with types-PyYAML --with jinja2 python -m mypy src

@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 4d9f9798-1c1f-4af3-b7c6-2d889073d21b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@github-actions github-actions Bot added cli command line interface tests tests and fixtures size: S 50-199 changed non-doc lines labels Jul 7, 2026
@Steve-too Steve-too changed the base branch from main to test July 7, 2026 19:21
@Steve-too Steve-too force-pushed the fix/search-hybrid-fts-fallback branch from 5572fb7 to d583b14 Compare July 7, 2026 19:21
@Steve-too

Copy link
Copy Markdown
Author

Retargeted this PR to test and rebuilt the branch on top of origin/test, matching CONTRIBUTING.md. The diff remains limited to src/vouch/cli.py and tests/test_cli.py. Targeted local check passed: PYTHONPATH=src python3 -m pytest tests/test_cli.py -q.

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

Labels

cli command line interface size: S 50-199 changed non-doc lines tests tests and fixtures

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant