From 93bdad4c42b234f575e8ae0e3e0b9e069eb15dbe Mon Sep 17 00:00:00 2001 From: Hare Date: Sat, 20 Jun 2026 19:33:08 +0900 Subject: [PATCH] ticket: close mcp list changed handling --- .yoi/tickets/00001KVHR3WSW/item.md | 4 +- .yoi/tickets/00001KVHR3WSW/resolution.md | 36 ++++++++++++++++ .yoi/tickets/00001KVHR3WSW/thread.md | 52 ++++++++++++++++++++++++ 3 files changed, 90 insertions(+), 2 deletions(-) create mode 100644 .yoi/tickets/00001KVHR3WSW/resolution.md diff --git a/.yoi/tickets/00001KVHR3WSW/item.md b/.yoi/tickets/00001KVHR3WSW/item.md index 1424ab14..ab4a9dd8 100644 --- a/.yoi/tickets/00001KVHR3WSW/item.md +++ b/.yoi/tickets/00001KVHR3WSW/item.md @@ -1,8 +1,8 @@ --- title: 'MCP: handle list_changed notifications safely' -state: 'done' +state: 'closed' created_at: '2026-06-20T05:30:04Z' -updated_at: '2026-06-20T10:32:35Z' +updated_at: '2026-06-20T10:32:59Z' assignee: null readiness: 'implementation_ready' risk_flags: ['mcp', 'notifications', 'tool-schema', 'prompt-cache', 'refresh'] diff --git a/.yoi/tickets/00001KVHR3WSW/resolution.md b/.yoi/tickets/00001KVHR3WSW/resolution.md new file mode 100644 index 00000000..10b1b924 --- /dev/null +++ b/.yoi/tickets/00001KVHR3WSW/resolution.md @@ -0,0 +1,36 @@ +## Resolution + +`00001KVHR3WSW` を完了しました。 + +実装内容: +- MCP `notifications/tools/list_changed`, `notifications/resources/list_changed`, `notifications/prompts/list_changed` を bounded kind-only state として記録します。 +- Notification params は保存・render・behavior に使わず、hidden resource/prompt context injection を防止します。 +- Safe-boundary refresh 用の snapshot/clear API を追加しました。 +- Startup tool discovery では、registration 前に `tools/list_changed` が観測された場合のみ `tools/list` を最大 1 回 refresh します。 +- Refresh 後も変更が続く場合は bounded restart-required diagnostic を出し、active-run model-visible tool schema を post-registration mutation しません。 +- MCP tool/resource/prompt operations 中に list_changed が観測された場合、ordinary Tool output に bounded warning を明示的に返します。 +- Resource/prompt notifications は content fetch/injection を行わず、explicit list/read/get tools でのみ扱います。 +- Sampling / elicitation / remote transport は実装していません。 + +主な commit: +- `e33dee19 mcp: handle list changed notifications` +- `ae5f3e42 merge: mcp list changed handling` + +Review: +- r1 は `approve`。 +- Reviewer は current-run schema/history invariants、safe-boundary refresh、restart-required fallback、notification params の非使用、no hidden injection、no sampling/elicitation/remote scope creep を確認しました。 + +最終 validation: +- `cargo fmt --all --check` +- `git diff --check HEAD^1..HEAD` +- `cargo test -p mcp list_changed -- --nocapture` +- `cargo test -p pod mcp::tests:: -- --nocapture` +- `cargo test -p mcp` +- `cargo check --workspace` +- `nix build .#yoi --no-link` + +Package impact: +- `nix path-info -S .#yoi`: `113428296` + +Validation log: +- `/run/user/1000/yoi/yoi-orchestrator/bash-output/bash-ddp5Ei.log` \ No newline at end of file diff --git a/.yoi/tickets/00001KVHR3WSW/thread.md b/.yoi/tickets/00001KVHR3WSW/thread.md index d1cbc03d..8c83e5f9 100644 --- a/.yoi/tickets/00001KVHR3WSW/thread.md +++ b/.yoi/tickets/00001KVHR3WSW/thread.md @@ -255,3 +255,55 @@ Final state: Implementation was merged into Orchestrator branch at `ae5f3e42`, review approved, and final Orchestrator validation passed: `cargo fmt --all --check`, `git diff --check HEAD^1..HEAD`, focused `mcp` and `pod mcp::tests::` tests, `cargo check --workspace`, and `nix build .#yoi --no-link`. --- + + + +## State changed + +Ticket を closed にしました。 + + +--- + + + +## 完了 + +## Resolution + +`00001KVHR3WSW` を完了しました。 + +実装内容: +- MCP `notifications/tools/list_changed`, `notifications/resources/list_changed`, `notifications/prompts/list_changed` を bounded kind-only state として記録します。 +- Notification params は保存・render・behavior に使わず、hidden resource/prompt context injection を防止します。 +- Safe-boundary refresh 用の snapshot/clear API を追加しました。 +- Startup tool discovery では、registration 前に `tools/list_changed` が観測された場合のみ `tools/list` を最大 1 回 refresh します。 +- Refresh 後も変更が続く場合は bounded restart-required diagnostic を出し、active-run model-visible tool schema を post-registration mutation しません。 +- MCP tool/resource/prompt operations 中に list_changed が観測された場合、ordinary Tool output に bounded warning を明示的に返します。 +- Resource/prompt notifications は content fetch/injection を行わず、explicit list/read/get tools でのみ扱います。 +- Sampling / elicitation / remote transport は実装していません。 + +主な commit: +- `e33dee19 mcp: handle list changed notifications` +- `ae5f3e42 merge: mcp list changed handling` + +Review: +- r1 は `approve`。 +- Reviewer は current-run schema/history invariants、safe-boundary refresh、restart-required fallback、notification params の非使用、no hidden injection、no sampling/elicitation/remote scope creep を確認しました。 + +最終 validation: +- `cargo fmt --all --check` +- `git diff --check HEAD^1..HEAD` +- `cargo test -p mcp list_changed -- --nocapture` +- `cargo test -p pod mcp::tests:: -- --nocapture` +- `cargo test -p mcp` +- `cargo check --workspace` +- `nix build .#yoi --no-link` + +Package impact: +- `nix path-info -S .#yoi`: `113428296` + +Validation log: +- `/run/user/1000/yoi/yoi-orchestrator/bash-output/bash-ddp5Ei.log` + +---