e3a41728

By: Michael Lynch <git@mtlynch.io>

Fix per-session e2e database isolation

Route handler store operations through the request context so the dev-only
per-session database middleware can actually isolate browser sessions during
end-to-end tests.

This fixes the failing e2e flow where state leaked between Playwright tests,
causing the grocery form assertions to see data from earlier tests. It also
pins in-memory SQLite databases to a single connection so migrated schemas stay
visible across requests.

Testing:
- nix build .#e2e-tests
- nix flake check
- ./dev-scripts/git-hooks/pre-commit

Suite timing

Time to Start Worker time Duration Time to finish
Config 0s 2s 2s 2s
Eval 2s 1m37s 1m37s 1m40s
Build 19s 24m20s 2m40s 2m59s
Suite 0s 26m00s 2m59s 2m59s

Timeline

0s20s40s1m1m20s1m40s2m2m20s2m40s