fix: address CodeRabbit findings on registry-fallback search (#190 follow-up) - #195
Merged
Merged
Conversation
- Fix the MCP Registry endpoint: /v0/servers is not a real endpoint,
registry.modelcontextprotocol.io only serves /v0.1/servers -- the
fallback search has been silently hitting a dead URL and returning
nothing since it merged.
- Select only the "streamable-http" remote when picking remote_url,
instead of blindly taking the first one -- a deprecated HTTP+SSE
remote could be surfaced instead, which this codebase can't speak to.
Extracted select_remote_url() so this is unit-testable.
- Give skill-registry's fallback hits a real source ("mcp_registry")
instead of an empty string, so clients can tell them apart from a
local skill that happens to have a blank source.
- Move the registry HTTP call off the async runtime: skill()/tool()'s
search actions now run search_registry via tokio::task::spawn_blocking
instead of calling the synchronous ureq request inline. The prior fix
already stopped holding a lock across that call, but the main binary's
tokio runtime only enables the "rt" feature (single-threaded), so the
blocking call itself was still stalling every other in-flight request
for up to 3s, not just ones contending for the registry lock.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe registry fallback now uses ChangesRegistry fallback search
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant AgentflareMcp
participant spawn_blocking
participant search_registry
AgentflareMcp->>spawn_blocking: run registry search
spawn_blocking->>search_registry: search query and result limit
search_registry-->>spawn_blocking: registry hits or failure
spawn_blocking-->>AgentflareMcp: awaited fallback results
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
…ck-coderabbit-followup
getappz
added a commit
that referenced
this pull request
Jul 15, 2026
- Backfill items_fts for items that already existed before this migration ran -- the AFTER INSERT/UPDATE/DELETE triggers only keep the index in sync going forward, so without a backfill every item created before this migration would be permanently invisible to item(search) until it happened to be touched again. - Clamp item::search's limit via flare_search_kit::clamped_limit instead of a raw `limit as i64` cast -- usize::MAX (or any caller-supplied value that wraps negative on cast) turns into SQL "LIMIT -1", which SQLite treats as unlimited, defeating the cap. Same class of bug this codebase already guards against in gateway-registry/skill-registry's own search() via the same helper. - Fix the limit field's schema description, which said "omit for no limit" -- true for item(list), but item(search) defaults to 20 (clamped to 1000) when omitted, not unlimited. - Resolve merge conflicts against master's already-fixed compact.rs/ memory/mcp.rs (this branch predates #192/#195 and carried duplicate, pre-fix copies of that code) by taking master's versions.
3 tasks
This was referenced Jul 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #190 (merged) addressing CodeRabbit review comments that weren't resolved before merge:
/v0/servers, which doesn't exist — the real endpoint is/v0.1/servers. The registry-fallback search has been hitting a dead URL and silently returning nothing since Fallback MCP registry search #190 merged.remote_type == "streamable-http"instead of blindly taking the first remote (could previously surface a deprecated SSE remote this codebase can't speak to).source: "mcp_registry"instead of an empty string, so callers can distinguish them from local skills.tokio::task::spawn_blockinginstead of inline on the async task — the main binary's tokio runtime only enables thertfeature (single-threaded), so the blockingureqcall was stalling every other in-flight request for up to 3s, not just ones needing the registry lock (which Fallback MCP registry search #190 already fixed).Test plan
cargo test --workspace— all passing, new regression tests added (select_remote_urltransport filtering, endpoint URL,mcp_registryprovenance)cargo clippy --workspace --all-targets -- -D warnings -A unsafe_code -A clippy::pedantic— cleancargo fmt --check— cleanSummary by CodeRabbit