Files
memos/docs
boojack 619eb8d6b8 chore(mcp): expose spaces, forward the client address, re-pin evals
The MCP catalog survived the recent API changes because it is derived
from OpenAPI, but three things drifted around it, and fixing them
surfaced a fourth.

- mcp: the adapter built each in-process API request with httptest,
  whose fixed peer address (192.0.2.1) overrode the caller's resolved
  address on the client-address middleware's second pass. Every
  anonymous MCP caller shared one rate-limit bucket. The adapter now
  presents the address resolved for the /mcp request as the peer.
- mcp: the full SpaceService is curated as space_* tools. Space and
  member updates drop path-bound fields and rely on the gateway's
  update-mask inference; accepting and declining an invitation no
  longer require an empty body for a body: "*" binding whose only
  field comes from the path.
- mcp/evals: answers re-pinned to the current seed (four users,
  22 top-level memos, 35 reactions, four spaces) and extended with
  space questions.
- store/sqlite: transactions begin IMMEDIATE. Token authentication
  records the token's last-used time asynchronously on every request,
  and the space drivers read before they write in a deferred
  transaction; when the background commit landed in between, SQLite
  refused the upgrade with SQLITE_BUSY without consulting the busy
  timeout. Roughly half of space creates over MCP failed. Taking the
  write lock up front keeps the parent-delete serialization the design
  relies on, so the SQLite stale-snapshot test now asserts that a
  concurrent delete waits for the open transaction instead.
2026-09-18 07:21:38 +08:00
..