fix(mcp): SEP-2549 ttlMs/cacheScope on every result + hermetic dev cache-key - #606
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
ttlMsandcacheScoperequired on list/read results. rmcp keeps themOptionfor 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 wholetools/listwithexpected number, received undefined, bricking tool discovery while the connection stayed up ("⚠ connected · tools fetch failed").All five served results now stamp
ttlMs: 0+cacheScope: privatevia a sharedstamp_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 testhangs to the nextest timeout (stack-sampled insidesecurity_framework::get_generic_password). Fixed with[env] UFFS_DEV = "1"in.cargo/config.toml, routingget_cache_keyto 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 gofully green;cargo xwin clippy -D warningsclean for x86_64-pc-windows-msvc; 109/109 uffs-mcp tests including the new SEP-2549 wire regression.