feat(mcp): explicit discovery modes and semantic inventory (CW-20261001-0542) #102
All Vouch review confidence checks passed
Residual risk 0.44 = Change Risk (0.50) × (1 − Review Confidence (0.11)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.50 · 572 lines diff across 7 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 6% · 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.380
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #102"
general
weight: 0.35
copilot-pull-request-reviewer[bot]
Flat MCP clients currently receive discovery/dispatch hatches that can reach upstreams outside
--servers. This change makes flat the default honest surface and adds explicit search mode under the final ADR 0047 names. CW-20261001-0542.tether_gateway_status; no search/list/call wrappers. Search lists exactlytether_tool_search,tether_tool_list,tether_tool_call,tether_gateway_status. The semantic inventory includes native targets as origintether.--discovery-modeandTETHER_MCP_DISCOVERY_MODE; catalog config usesmcp.discovery_mode.mcp.discovery_modefallback via GET/PUT/settings/mcp({"discovery_mode":"search"},{}clears). The daemon mount and client are wired; daemon-only proxies read it over HTTP without opening state DB. Known setting keys validate even through the generic persistence seam.tether_tool_listnow enumerates real schemas or hydrates exactnames;tether_tool_searchuses a nonemptyquerywith summary/schema detail, server/tag filters and numeric limits. Both report total/returned/truncation, incomplete discovery and unavailable origins. Cursors bind selection, filters and inventory/schema/availability snapshot; changed requests or inventory fail with restart guidance. Unknown/excluded/unavailable hydration names get per-name errors without schema leakage. No guessed safety or pseudo schema/example refs remain.tether_tool_call(name, arguments)dispatches only eligible exact targets, preserving upstream content, tool errors and structured results; transport errors retain their protocol semantics. Native targets use a private in-memory SDK connection, preserving their existing schema validation, auth/scopes, result conversion and metadata without copying the provider/server library. The wrapper advertises possible writes, and docs explain that client permissions/hooks see the dispatcher rather than the downstream name.--serversis a strict loading/secret/discovery/hydration/dispatch/refresh restriction in both modes, regardless of--confine. Unknown/disabled IDs fail; explicit empty lists select none.--brokeris removed.--onlycontinues to omit native targets, while the selected mode's gateway infrastructure remains visible.The minimal status reports mode/source, origin connection status/counts/errors and per-name visibility reasons (mode, restriction, availability). Profile selection/filtering is 0008: only
Profile.DiscoveryMode/mcp.profiles.<id>.discovery_modeand the resolver tier are added here. Naming/collision/lint policy is 0009, metadata/status extras 0010, conformance 0011, HTTP MCP transport/selectors 0539, shared ranker adoption 0012 after go-toolselect is tagged. The existing scorer stays behind the service seam. No second tool rename, deployment, daemon restart or live configuration edits.Validation: preliminary isolated
make checkpassed (lint, full race suite, vulnerability check, 72.1% coverage). The final merged candidate64be31fpassed lint and all race packages except the existingTestDaemonToolCallPublisher_AHugeErrorStillRecordsTheCalltiming flake, tracked as CW-20261001-0427 and fixed separately in #101. Per lead direction, that test is unchanged here; main will be merged after #101 lands and the final gate rerun. Post-cleanup focused race suites and separate Sysop frontend build / Go tests passed. All gates use isolated HOME, clear CODEX_* and use TMPDIR under /var/tmp. Focused integration/package checks pass, including real proxy subprocess surfaces/restrictions, native hydration/dispatch, unknown/disabled startup refusal, every mode tier and overridden invalid values, stale pagination cursors, settings persistence/clear/validation, extraction/provenance and upstream refresh/recovery. Existing daemon route-table guard includes the new settings mount. Separate Sysop check builds its ignored frontend artifacts first; its pre-existing local library link is resolved by installing the declared@hollis-labs/sysop-ui@0.9.0with--no-save --package-lock=false, leaving tracked frontend dependencies unchanged.