Highlights
Several applications can now boot in one process. Test suites that boot the whole application can run those tests with t.Parallel(), and a test binary no longer leaks a goroutine every time it builds a router.
Every Go example in a module README is now compiled and run by go test, the same as the examples on the docs site.
Added
party.RegisterFactory(id, fn)registers a plugin through a constructor that runs once per application. Use it for a plugin whoseinit()sets up shared maps or pointers.surf.AssembleRouter(app, plugins)builds the router and the HTTP handler in one pass and returns both. Callers that need the route table and the handler no longer build twice, and with MCP enabled a second build failed.surf.Router.Close()releases what the router created itself: its in-memory rate-limit store and the MCP endpoint it mounted. It never closes a store published on the application.surf.MemoryStore.Close()andpier.Pier.Close()stop their background goroutines.summer docs:syncandsummer docs:build --checknow coversrc=code blocks in module READMEs. The API pages caption those blocks with a link to their source.
Changed
party.Activategives every application its own copy of each plugin, so a plugin'sRegisterandBootbind to that application only. Plugins need no changes as long as they keep their per-application state on the plugin struct, never in package variables.serveandroute:listclose their router on exit.- A Go code block in a module README must reference compiled code with
src=. The docs checker reports a bare one.
Fixed
- A router build no longer leaks the rate-limit store's sweep goroutine, which piled up in test binaries that boot many applications.
Still process-wide: column-encryption keys, so two applications with different keys in one process share the keys published last. Plain surf.Assemble drops its router and so can't close the store; use AssembleRouter and Close where that matters.