rouse-context/e2e
monkopedia-coder 9d50167eba
fix(mcp): advertise the build version in the MCP handshake (#603) (#604)
`AppModule` built its `McpSession` with named arguments and simply omitted
`serverVersion`, so the `core:mcp` default won and every MCP client that
completed `initialize` was told the server was `0.1.0` -- true of every
release so far, and the first thing an AI client learns about the app.

`core:mcp` is KMP and cannot read the app's `BuildConfig`, so there is no
correct default it could hold. The next best thing is no default at all:
`serverVersion` is now required on both `McpSession` and
`configureMcpRouting`, which turns "a caller forgot" into a compile error,
and `AppModule` passes `BuildConfig.VERSION_NAME`. Both `"0.1.0"` literals
are gone.

Tests pass an obviously-fake `0.0.0-test` so a real version can never be
mistaken for one that came from a build. `McpEndToEndTest` now asserts the
advertised `serverInfo.version` equals the versionName of the package
installed on the device; against the pre-fix build it reports
`expected: <1.0.9> but was: <0.1.0>`. `McpSessionTest` covers the same
plumbing at the unit level.

`McpProtocolTest`'s inline notifications provider moved out to a private
class so the one added argument does not push that test over detekt's
LongMethod limit.

Closes #603


Claude-Session: https://claude.ai/code/session_01YYSPuh9bZEJkrzvnEpY1QK

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-08-23 16:18:34 -04:00
..
src/test/kotlin/com/rousecontext/e2e fix(mcp): advertise the build version in the MCP handshake (#603) (#604) 2026-08-23 16:18:34 -04:00
build.gradle.kts Fix #323: Remove personal machine identifiers from public repo (#326) 2026-04-20 12:24:01 -04:00