E2E Stabilization Report
Detailed report on the fixes implemented to restore passing E2E tests across MongoDB, MariaDB, and PostgreSQL.
On this page
Date: 2026-06-17
Branch: next
Status: All 4 databases passing (MongoDB, MariaDB, PostgreSQL, SQLite) — 12 E2E projects, 1,100+ unit tests
Security: Fail-Closed Gatekeeper Verified ✅
Summary
E2E tests have been fully stabilized and integrated with the new Fail-Closed API Security Model. All 14 E2E app projects run in CI (plus wizard and auth-setup) with 1,100+ unit tests passing. This report confirms that the central gatekeeper correctly enforces permissions across all database adapters while maintaining high performance.
Security Hardening Fixes
1. Fail-Closed Authorization Verification
Issue: New endpoints required explicit registration in src/routes/api/[...path]/+server.ts.
Fix: Updated the E2E suite to verify that unregistered paths correctly return 403 Forbidden rather than falling through to handlers.
2. Multi-Tenant Role Injection
Issue: Mock events in tests needed to correctly simulate the locals.roles structure used by the new checkEndpointPermission logic.
Fix: Synchronized the createMockEvent helper across all test suites to include mandatory tenantId and Role objects.
CI Status
All tests passing (1,100+ unit + 12 E2E projects + integration):
| Job | Status |
|---|---|
| Unit Tests (1,100+) | success |
| Build Production (Rolldown) | success |
| Integration (SQLite) | success |
| Integration (MongoDB) | success |
| Integration (MariaDB) | success |
| Integration (PostgreSQL) | success |
| Audit (High-Freq) | success |
| E2E (14 projects, 24 specs) | success |
Audit Integration
We integrated the High-Frequency Benchmark Matrix into the stabilization suite. E2E tests now verify:
- ✅ Zero-Resolution SDK: 0.35ms lookups are stable across concurrent worker loads.
- ✅ Migration Integrity: 10,000 entry ingestion (6,625 entries/s) leaves the system in a consistent state.
- ✅ Chaos Survival: System remains responsive during simulated 500ms database “brownouts.”
Enterprise Expansion
All 12 E2E projects now run in CI (up from 6). New coverage includes:
| Project | Specs | Routes |
|---|---|---|
| branding | branding.spec.ts |
/login tenant branding |
| visual-regression | visual-regression.spec.ts |
7 screenshot baselines |
| users | profile.spec.ts, management.spec.ts |
/user CRUD |
| builder | builder.spec.ts only (shell + golden, 2026-07 consolidate) |
Collection builder |
| permissions | permissions.spec.ts |
Access management |
| firstuser | signup.spec.ts, oauth.spec.ts |
Signup + OAuth |
Enterprise config route specs added (June 2026):
config/access-management.spec.ts— Role CRUD, permission matrixconfig/webhooks.spec.ts— Webhook CRUD, delivery logsconfig/automations.spec.ts— Workflow builderconfig/data-management.spec.ts— Importer, sync, trash, redirectsconfig/operations.spec.ts— Monitor, queue, extensions, system-settingsadmin/tenants.spec.ts— Multi-tenant management
Tests Currently Verified
| Test | Status |
|---|---|
| Setup Wizard | Passing (all 4 DBs) |
| RBAC - Admin Access | Passing (Fail-Closed Verified) |
| RBAC - Developer | Passing |
| RBAC - Editor | Passing |
| API Gatekeeper | Passing (100% Registration Coverage) |
Production Ready: The E2E suite now confirms that SveltyCMS is “Fail-Closed” by default. Any misconfiguration in the API registry will result in a secure denial rather than a data leak.