Skip to content

fix(mcp): SEP-2549 ttlMs/cacheScope on every result + hermetic dev cache-key - #606

Merged
githubrobbi merged 2 commits into
mainfrom
fix/mcp-sep2549-freshness
Aug 22, 2026
Merged

fix(mcp): SEP-2549 ttlMs/cacheScope on every result + hermetic dev cache-key#606
githubrobbi merged 2 commits into
mainfrom
fix/mcp-sep2549-freshness

Conversation

@githubrobbi

Copy link
Copy Markdown
Collaborator

Two field-found fixes from the winbox bring-up (2026-08-23)

1. Protocol 2026-07-28 clients rejected uffsmcp's tools/list

MCP spec revision 2026-07-28 (SEP-2549) makes ttlMs and cacheScope required on list/read results. rmcp keeps them Option for pre-2026 peers and defaults them to absent, so every result uffsmcp built omitted both — and Claude Code (which negotiates 2026-07-28) rejected the whole tools/list with expected number, received undefined, bricking tool discovery while the connection stayed up ("⚠ connected · tools fetch failed").

All five served results now stamp ttlMs: 0 + cacheScope: private via a shared stamp_freshness! helper, with a wire-shape regression test asserting the serialized JSON carries both fields.

2. Keychain-prompt test hang on interactive macOS

Every rebuild changes the test binaries' ad-hoc code signature → macOS Keychain re-prompts per run → background cargo test hangs to the nextest timeout (stack-sampled inside security_framework::get_generic_password). Fixed with [env] UFFS_DEV = "1" in .cargo/config.toml, routing get_cache_key to its existing file-based dev key for cargo-spawned processes only — macOS-only effect, DPAPI path ignores it, installed binaries and CI unaffected. The hung test: 353 s timeout → 11 ms.

Validation

just go fully green; cargo xwin clippy -D warnings clean for x86_64-pc-windows-msvc; 109/109 uffs-mcp tests including the new SEP-2549 wire regression.

…2026-07-28 clients rejected tools/list

MCP spec revision 2026-07-28 (SEP-2549) makes ttlMs and cacheScope
REQUIRED on list/read results. rmcp models them as Option for pre-2026
peers and its constructors leave them None, so every result uffsmcp
built omitted both — and a client that negotiated 2026-07-28 (Claude
Code does) rejects the entire tools/list with schema errors ('expected
number, received undefined' for ttlMs), bricking tool discovery while
the connection itself stays up. Field-observed on winbox 2026-08-23.

All five results we serve (tools/list, resources/list,
resource_templates/list, prompts/list, resources/read) now stamp
ttlMs: 0 ('always fresh, do not cache') + cacheScope: private — the
conservative pair matching rmcp's own DiscoverResult::new posture —
via a shared stamp_freshness! helper, with a wire-shape regression
test asserting the JSON literally carries both fields.
…ain-prompt test hang

Every rebuild changes the test binaries' ad-hoc code signature, so
macOS Keychain re-prompts for authorization on each cargo test run —
a GUI dialog a background run can never answer. Observed 2026-08-23:
uffs-core load_compact_cache_at_quarantines_nothing_itself hanging to
the 6-minute nextest timeout, stack-sampled inside
security_framework::get_generic_password.

Fix: [env] UFFS_DEV = '1' in .cargo/config.toml routes
uffs-security::keystore::get_cache_key to its existing file-based dev
key for every process cargo spawns in this workspace (the bypass that
env var was built for). macOS-only effect (the Windows DPAPI path
ignores it); installed release binaries never see the variable; CI is
headless and unaffected. The hung test: 353 s timeout -> 11 ms pass.
@githubrobbi
githubrobbi added this pull request to the merge queue Aug 22, 2026
Merged via the queue into main with commit 41c26cf Aug 22, 2026
21 checks passed
@githubrobbi
githubrobbi deleted the fix/mcp-sep2549-freshness branch August 22, 2026 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant