• v0.1.0-dev.39 b47a845076

    v0.1.0-dev.39
    Some checks failed
    Code Architecture / inventory (push) Has been skipped
    Code Architecture / mermaid-comment (push) Has been skipped
    Code Architecture / review (push) Has been skipped
    Code Architecture / comment (push) Has been skipped
    Corn CI / release-check-1 (push) Successful in 2s
    Corn CI / release-check (push) Successful in 0s
    Corn Release / release-1 (push) Successful in 4s
    Corn Release / release (push) Successful in 0s
    Corn CI / test (push) Successful in 2m46s
    Corn CI / release (push) Failing after 15s
    Code Architecture / review-1 (push) Successful in 3m42s
    Code Architecture / analyze (push) Successful in 0s
    Pre-release

    john released this 2026-11-23 05:30:56 +00:00 | 68 commits to main since this release

    v0.1.0-dev.39 — Read-only per-request auth resolution and throttled last_seen_at (pre-release)

    Cached tools/list still took ~200 ms p50 across Corn's three replicas
    because FastMCP's AuthMiddleware invoked IdentityService.resolve() once per
    listed tool, and every call unconditionally opened a second SQLite session to
    update users.last_seen_at and commit. With ~60 tools across Corn and Coder,
    one tools/list ran 360 SQLite statements (240 SELECT, 120 UPDATE commits)
    synchronously on the event loop.

    • IdentityService.resolve() now keeps the read-only fast path when an enabled
      user's profile claims match and last_seen_at was updated within the last
      5 minutes (last_seen_interval_seconds=300). Profile claim changes and new
      users still persist immediately.
    • ToolTimingMiddleware.on_request scopes an in-memory per-request identity
      cache (identity_request_cache()), so AuthMiddleware's per-tool checks and
      UserScopedMcpProxy's user-id checks reuse the first resolution for that
      request instead of repeating SQLite queries.
    • MCP auth checks (_authenticated, _current_user_id, corn_whoami) and
      UserScopedMcpProxy.is_connected run SQLite/crypto lookups off the asyncio
      event loop via asyncio.to_thread().

    Local measurement (60-tool FastMCP + AuthMiddleware + ToolTimingMiddleware):
    one Client.list_tools() drops from 360 SQLite ops (including 120 commits) to
    1 read-only SELECT (~24 ms → ~0.5 ms middleware time).

    No API, database schema, or deployment-file changes.

    Source commit b47a845076d795be03f137f80bae00ce0bda0f33.

    Downloads