Replace the selected adapter's integration, and nothing else.
A test is the same context as production minus the network: the same platform, the same response
type, the same error handlers — only the thing that talks to the outside world is swapped for an
in-memory one. Inventing a test platform instead was subtly wrong: adapters contribute much of
what an application is through platform-conditional blueprint middleware, for instance
Under a test platform every one of those conditions is false, so the kernel built a bare
OutgoingResponse. A JSON API survived it, because passing content through is all it needed; a
rendered page did not, because the view layer calls response.isError(). Keeping the platform
keeps all of it, for every context: HTTP, browser, edge, console, and whatever comes next.
Adapter middleware is the one thing dropped. It exists to normalise a raw platform event — a
Node IncomingMessage, a Lambda payload — and a test hands over a ready IncomingEvent, so there
is nothing left for it to translate.
Runs at priority 100, after the core selects the current adapter (0.1) and after the adapters have
contributed their platform-conditional configuration (6 for the Node HTTP response resolver). That
ordering is the whole mechanism.
Replace the selected adapter's integration, and nothing else.
A test is the same context as production minus the network: the same platform, the same response type, the same error handlers — only the thing that talks to the outside world is swapped for an in-memory one. Inventing a
testplatform instead was subtly wrong: adapters contribute much of what an application is through platform-conditional blueprint middleware, for instanceUnder a
testplatform every one of those conditions is false, so the kernel built a bareOutgoingResponse. A JSON API survived it, because passing content through is all it needed; a rendered page did not, because the view layer callsresponse.isError(). Keeping the platform keeps all of it, for every context: HTTP, browser, edge, console, and whatever comes next.Adapter middleware is the one thing dropped. It exists to normalise a raw platform event — a Node
IncomingMessage, a Lambda payload — and a test hands over a readyIncomingEvent, so there is nothing left for it to translate.Runs at priority 100, after the core selects the current adapter (0.1) and after the adapters have contributed their platform-conditional configuration (6 for the Node HTTP response resolver). That ordering is the whole mechanism.