From a363135694284f0045dc095aba72bd37b1c11b4c Mon Sep 17 00:00:00 2001 From: ari Date: Mon, 19 Oct 2026 17:41:23 -0400 Subject: [PATCH] D0: rmcp conditional-tools spike handoff --- plan/phase-5-consolidator/ws-d-mcp.md | 1 + 1 file changed, 1 insertion(+) diff --git a/plan/phase-5-consolidator/ws-d-mcp.md b/plan/phase-5-consolidator/ws-d-mcp.md index 73d5e33..874f41c 100644 --- a/plan/phase-5-consolidator/ws-d-mcp.md +++ b/plan/phase-5-consolidator/ws-d-mcp.md @@ -81,3 +81,4 @@ Both snapshot variants pass; each tool with `peer` returns the peer's data via t 3. Schema caveat: `disable_route` hides a tool but cannot alter its static `Tool` attr. Adding `peer: Option` to the eight params structs therefore changes their `input_schema` even when peers are disabled, which contracts section 7 forbids. Recommended fix: a small helper in `TrackerService::new` that, when `state.peers.is_none()`, removes the `"peer"` property from each of the eight `input_schema`s (`ToolRouter.map` and `ToolRoute.attr` are public; `Arc::make_mut(&mut route.attr.input_schema).remove("peer")`); the field is optional so `required` is untouched. This is deterministic and covered by asserting the two snapshot variants' property sets. It relies on public fields of the pinned rmcp version, so keep the pin and the snapshot test. If that is judged too brittle, the alternative is a contracts section 7 change to always advertise `peer` (optional, ignored when peers are disabled); ask the contract owner first. 4. Not a risk for the rest of D3: `list_resources`, `list_prompts` and `get_info`/instructions are hand-written in this repo, so `peers://status`, the peer-aware prompt argument and the conditional instructions text are plain `state.peers.is_some()` branches, not router features. 5. Runtime toggling is not required (peers are declared at startup; SIGHUP rotates tokens, not `enabled`), but `disable_route`/`enable_route` can emit `notifications/tools/list_changed` via `bind_peer_notifier` if a later phase needs it. +- 2026-10-19: **Handoff (D0 complete).** Deliverable: the spike answer and recommendation above. Verdict: `rmcp` 3.5.1 supports the 8/10 conditional tool list natively via `ToolRouter::disable_route`, so D2 can proceed without a contract change; the only follow-up is stripping the optional `peer` property from the eight schemas when peers are disabled (point 3 above). No `src/` production code was changed; the throwaway test was removed after running and the tree is clean apart from this Log. Verification: `cargo fmt --check`, `cargo clippy --all-targets -- -D warnings` and `cargo test` all pass. Commits: findings `c168551`, this handoff. Next: D1/D2 once A0 (`AppState.peers`, `registry_with`, `static_registry`, `fake_state_with_peers`) is merged; rewrite the snapshot test to use `TrackerService::new` for both variants.