Phase 12: Initial Setup Wizard #22

Merged
luckberg merged 76 commits from gsd/phase-12-initial-setup-wizard into main 2026-06-16 19:10:33 -04:00
3 changed files with 27 additions and 0 deletions
Showing only changes of commit 7354f3ec4f - Show all commits
+4
View File
@@ -22,3 +22,7 @@ paths = ['''apps/api/\.env\.spike$''']
[[allowlists]]
description = "apps/api/tests/broker/crypto.test.ts — synthetic AES-256-GCM test key assigned to process.env.APP_PASSWORD_ENCRYPTION_KEY in a Vitest beforeAll; not a real credential"
paths = ['''apps/api/tests/broker/crypto\.test\.ts''']
[[allowlists]]
description = "apps/api/tests/routes/setup.test.ts — synthetic VAPID public/private test pair used to set process.env.VAPID_* in the setup-route tests; not a real credential (verified not present in .env)"
paths = ['''apps/api/tests/routes/setup\.test\.ts''']
+18
View File
@@ -128,6 +128,24 @@ export default async function globalSetup(): Promise<void> {
ON DUPLICATE KEY UPDATE is_admin=true`,
);
// Phase 12: the setup-wizard gate (App.tsx) redirects EVERY route to /setup when
// app_config.setup_complete !== 'true' (isSetupLocked() === false). The e2e suite
// drives the real app (calendar/admin/lists/timezone), so without marking setup
// complete here every spec is redirected to the wizard and fails. Mark complete and
// seed a credential for the dev admin (id=1) so needsProviderSetup is false and the
// Phase-12 onboarding SetupBanner does not render — mirroring a post-wizard state.
// The credential blob is a synthetic placeholder; e2e read flows never decrypt it
// (the pre-Phase-12 suite ran with no credential at all). Idempotent upserts.
await conn.execute(
"INSERT INTO app_config (`key`, value) VALUES ('setup_complete', 'true') " +
"ON DUPLICATE KEY UPDATE value='true'",
);
await conn.execute(
`INSERT INTO member_credentials (user_id, encrypted_password, fastmail_email, provider_type)
VALUES (1, '{"iv":"e2e","authTag":"e2e","ciphertext":"e2e"}', 'dev@e2e.local', 'caldav')
ON DUPLICATE KEY UPDATE fastmail_email='dev@e2e.local'`,
);
// CI guard (Pitfall 4): ensure calendar row id=10 exists before inserting events.
// INSERT IGNORE is a no-op if the row already exists (dev DB), creates it if not (CI fresh DB).
await conn.execute(
+5
View File
@@ -3,5 +3,10 @@
"reason": "esbuild integrity-check advisory; transitive dev-only via drizzle-kit/vitest/vite; not in the production runtime — esbuild never runs in the shipped image; patched in esbuild >=0.28.1, will resolve when drizzle-kit bumps the transitive pin",
"reviewer": "luc",
"expires": "2026-09-01"
},
"GHSA-88fw-hqm2-52qc": {
"reason": "hono CORS-middleware advisory: reflects any Origin with credentials when cors() origin defaults to wildcard. NOT exploitable here — FamilySync never uses hono's cors() middleware (grep of apps/api/src is empty); the affected code path is unreachable. Newly-published advisory against the pinned hono 4.12.23 (CLAUDE.md). Re-evaluate when hono is bumped to the patched release.",
"reviewer": "luc",
"expires": "2026-09-01"
}
}