node: rank remote tools by intent word overlap #832
All Vouch review confidence checks passed
Residual risk 0.23 = Change Risk (0.42) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.42 · 352 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.351
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #832"
general
weight: 0.35
aojea
find_remote_toolscurrently acceptsintentwithout using it. This adds a Go-standard-library lexical baseline: distinct query-word coverage in service/tool names and descriptions, then name matches, with deterministic tool-name/peer-ID ties. No dependencies, flags, or protocol changes.Ranking runs after authorized discovery and peer/service filtering. Exact
tool_namelookups take precedence. Nonmatching tools, labels, and diagnostic rows are retained. Empty/function-word-only queries preserve the unranked order; zero-overlap queries return the authorized catalogue in deterministic order. Raw intent text is no longer logged.Related to #313. This is keyword ranking without synonym inference or embeddings; no broader semantic-retrieval quality claim is made. The API reference shows the three-word versus one-word ordering and documents the no-match behavior.
Review follow-up:
TestHandleFindRemoteTools_Intentnow lives ininternal/node/mcp_handlers_test.goand checks complete tool order for snake_case natural-language matching, exact-name precedence, multi-word coverage, and zero overlap. Peer/service filters and authorization hiding remain covered.Validation on Linux/arm64 with Go 1.27.3 after merging upstream main
1fae868e:-race; unit cases cover Unicode/punctuation, duplicate terms, deterministic ties, and retained metadata/errors.make: pass.make test: 874 top-level tests passed, 10 SDK tests skipped because their JavaScript/Python SDK environments are not installed.make lint: pass, including formatting, both Helm charts, golangci-lint v2.14.0 (zero issues), and deadcode.make e2e-test: all 32 Bats scenarios pass, including the remote tool discovery/call/describe scenarios.Google CLA passed before this follow-up; the new commit uses the same CLA-associated author and DCO identity. Upstream checks will validate the new head after push.
AI assistance: implemented with Codex, with independent read-only code/documentation review.