Skip to content

v0.1.20

Choose a tag to compare

@memtomem memtomem released this 27 Apr 14:17
05d0b85

Two new config-load validators harden upstream prefix handling, plus a CLI dispatch parity fix, the 64-char tool name overflow guard, and a test-suite flake fix accumulated since v0.1.19.

Headline

  • Duplicate upstream prefix → ValidationError at config load (#265). Two upstreams sharing a prefix used to silently drop the second-loaded duplicate at ProxyManager.start() with only a logger.warning. The new @model_validator(mode="after") on ProxyConfig raises with every collision group named in one error so both the upstream dict keys (what the user edited) and the prefix value (what collides) surface together. Hot-reload (ProxyConfigLoader.get) keeps the previous good config on validation failure.
  • Empty / whitespace-only upstream prefix → ValidationError at config load (#266). prefix="" used to validate fine and produce composed names like __list_items that surfaced as broken entries in tools/list, also skewing the 64-char overflow guard. Sibling validator placed before the uniqueness check so a prefix=""/prefix="" pair surfaces the more actionable empty error rather than the duplicate one.
  • Tool name overflow check against the 64-char MCP limit (#261). Three layers: mms add rejects prefixes that guarantee overflow; ProxyManager._connect_server per-tool checks the composed length at boot and skips offending tools (better one missing tool than the whole upstream); mms health --names re-runs the check on demand. MMS_CLIENT_SERVER_NAME env var lets users who registered STM under a shorter alias get accurate budget arithmetic.
  • All three console scripts now boot the MCP stdio server when invoked bare with a piped stdin (#260). Previously only memtomem-stm worked as an MCP-server registration target; memtomem-stm-proxy and mms resolved to the Click group whose bare invocation printed help and exited 2. Now all three [project.scripts] entry points dispatch identically based on sys.stdin.isatty().

Internal

  • TestAutoIndexStartupWarning no longer flakes under full-suite event-loop pressure (#264). The MCP SDK's stdio reader can surface echo-upstream handshake failure as asyncio.CancelledError (BaseException); try/except Exception didn't catch it. Catch widened to (Exception, asyncio.CancelledError) with a comment naming the SDK cancellation path. No production code touched.
  • Docs sync (#270). mms health --names flag and the new prefix invariants are now documented in docs/cli.md and docs/configuration.md respectively.

Behavior change

  • Configs that used to load with silent partial drops (#265) or visually broken composed names from prefix="" (#266) now fail at startup with ValidationError. Hot-reload retains the last-good config on validation failure, so a running proxy keeps serving its last known-good upstreams instead of going dark.
  • Upstreams whose composed name exceeds 64 chars are now skipped at boot with a WARNING log naming the tool and the suggested fix; previously the tool just disappeared from the client's catalogue.
  • mms and memtomem-stm-proxy registered as an MCP client's command now boot the stdio server identically to memtomem-stm instead of failing with : calling "initialize": EOF.
  • No SQLite migration. No env-var rename. No new MCP tool.

Full changelog: https://github.com/memtomem/memtomem-stm/blob/main/CHANGELOG.md