Track build ownership, qualified pins and bounded cache/log lifecycles. Move Vite fixtures to a job-owned server helper and preserve private outputs outside Git.
SSR unit-test server
Import createServer from ./support/vite-server.mjs in tests, instead of from Vite.
The helper keeps normal project resolution and plugins, disables browser/SSR
prebundling after plugin configuration, and gives every server its own directory
under the repository .runtime/frontend-unit-tests.
Keep the server alive for the whole test file: create it in before, and await
server?.close() in the file's existing after hook. A server created inside a
test must close in finally. Closing twice is safe. The helper cleans its own
cache after close and on initialization failure; it does not register a nested
after hook, which could close a file-scoped server before later tests use it.
npm run test:unit executes files sequentially for the operator Mac's memory
budget. Production and development Vite configuration is unchanged.