• v0.1.0-dev.35 70ebe2e935

    v0.1.0-dev.35
    Some checks failed
    Corn CI / release-check-1 (push) Successful in 2s
    Corn CI / release-check (push) Successful in 0s
    Corn Release / release-1 (push) Successful in 7s
    Corn Release / release (push) Successful in 0s
    Corn CI / test (push) Has been cancelled
    Corn CI / release (push) Has been cancelled
    Pre-release

    john released this 2026-11-21 09:21:36 +00:00 | 115 commits to main since this release

    v0.1.0-dev.35 — Stateless Corn: safe to run as several replicas (pre-release)

    Prepares Corn to run as several identical replicas behind a load balancer, writing
    to the same database. Single-instance behaviour is unchanged; this release still
    deploys as one container. The replica deployment follows in a separate change.

    Shared state moves out of the process

    • MCP OAuth state (client registrations, consent, authorization codes, the
      Pocket ID token map) now lives in Corn's database (kv_entries) instead of
      files under FASTMCP_HOME. Values stay Fernet-encrypted with the same derived
      key. Existing registrations are read through from the old files on first use
      and copied in, so connected MCP clients do not need to sign in again.
    • MCP over streamable HTTP is stateless: no per-process MCP session, so any
      replica can serve any request.
    • Shopping product IDs from a search are shared, so a stock check works on any replica.

    Concurrency

    • SQLite runs in WAL mode with a 30 s busy timeout. First start creates the
      schema under an exclusive lock, so replicas can start together.
    • Refreshing a user's Coder (upstream MCP) token and Corn's own Pocket ID
      session takes a short database lease, so with rotating refresh tokens only one
      replica refreshes and the others reuse the result. Without it, two replicas
      could spend the same refresh token and disconnect the user.

    In-memory caches (transit feeds, pricing, calendar, per-user upstream proxies)
    stay per replica; they are re-derivable.

    No API changes. Migration: none.

    Source commit 70ebe2e9354a844e0bb792c2b0a7ec1fd15619d6.

    Downloads