PR #26 added BDD_SCHEMA_ISOLATION=true to CI but this creates per-scenario schemas WITHOUT running migrations on them, causing 500 errors on user registration. This PR reverts that and instead relies on: 1. The existing CleanupDatabase hook (truncates all tables AfterScenario) 2. Sequential test package execution (-p 1) to avoid contention between feature packages sharing the same Postgres DB Plus defensive additions for future-proofing: - pkg/server/server.go: GetCacheService() exposed for test cleanup - pkg/bdd/testserver/server.go: cacheService field + FlushCache() method - pkg/bdd/testserver/state_tracer.go: TraceStateCacheOperation - pkg/bdd/suite.go: AfterScenario hook calls FlushCache() - scripts/run-bdd-tests.sh: -p 1 added (sequential package execution) Validation: - AuthBDD alone: 5/5 PASS (was 0/5 with broken schema isolation) - Full features/ via run-bdd-tests.sh: ALL PASS (auth, config, greet, health, jwt) Out of scope (follow-up T12): - Proper parallel BDD with schema migrations per scenario + dedicated connection pools. Required for scaling tests but architecturally significant. Tracked. Co-Authored-By: Mistral Vibe (devstral-2 / mistral-medium-3.5) - cache flush diagnosis Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> - root cause + revert
12 KiB
12 KiB