cli: add FTS5 content search (#406) - #517
Conversation
|
Warning Review limit reached
Next review available in: 52 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (7)
📝 WalkthroughWalkthroughThe PR adds the ChangesFTS5 Search Feature
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant User
participant CLI
participant SDK
participant ContentStore
User->>CLI: Run burn search query
CLI->>SDK: Submit query, session, and limit
SDK->>ContentStore: Execute FTS5 search
ContentStore-->>SDK: Return ranked hits
SDK-->>CLI: Return search results
CLI-->>User: Render table or JSON output
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fff3ebade3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
All reported issues were addressed
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@crates/relayburn-cli/src/cli.rs`:
- Around line 146-148: Update the CLI limit argument in the `limit` field to
reject values above `i64::MAX` while preserving the nonzero requirement. In the
SDK query construction around `opts.limit.max(1)` in `content.rs`, replace the
unchecked `usize`-to-`i64` cast with a checked conversion and propagate or
return the conversion failure before binding SQLite’s `LIMIT` parameter.
In `@crates/relayburn-cli/src/commands/search.rs`:
- Around line 77-84: Update the search flow feeding emit_json so it fetches
limit + 1 hits while retaining the user-requested limit value. Set truncated
based on whether the extra hit exists, then remove that extra hit before
constructing the payload in emit_json; preserve all other output fields and
behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 7cd904f9-8891-4e6f-bc23-743ea63b36c1
📒 Files selected for processing (15)
CHANGELOG.mdREADME.mdcrates/relayburn-cli/src/cli.rscrates/relayburn-cli/src/commands/mod.rscrates/relayburn-cli/src/commands/search.rscrates/relayburn-cli/src/main.rscrates/relayburn-cli/tests/search.rscrates/relayburn-cli/tests/smoke.rscrates/relayburn-sdk/src/export_verbs.rscrates/relayburn-sdk/src/ledger.rscrates/relayburn-sdk/src/ledger/content.rscrates/relayburn-sdk/src/lib.rstests/fixtures/cli-golden/invocations.jsontests/fixtures/cli-golden/snapshots/search-json.stdout.txttests/fixtures/cli-golden/snapshots/search.stdout.txt
Summary
burn search <query>as a thin CLI presenter over the existing SDK FTS5 search verb.Verification
cargo fmt --all -- --checkcargo test --workspacecargo test -p relayburn-cli --test searchFixes #406
🤖 Generated with Claude Code.