feat: unified first-run flow — merge wizard + gateway install (IUH-M03) #433
Reference in New Issue
Block a user
Delete Branch "feat/unified-first-run"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
mosaic wizardandmosaic gateway installinto a single cohesive first-run flow; gateway config + admin bootstrap now run as terminal stages ofrunWizard.$XDG_RUNTIME_DIR/mosaic-install-state.jsonsession-file bridge — state lives inWizardState(newgateway?:slice).gatewayConfigStage+gatewayBootstrapStageas first-class stages with full spec coverage;mosaic gateway installbecomes a thin wrapper..envandmeta.jsoncannot drift.state.hooks.accepted === falseend-to-end: finalize setsMOSAIC_SKIP_CLAUDE_HOOKS=1, andmosaic-link-runtime-assetscleans up previously-installed hooks only when a stable"mosaic-managed": truemarker (or byte-equality for legacy installs) identifies the file as ours.tools/install.shcallsmosaic wizardonly — the legacy follow-upmosaic gateway installauto-launch is removed.Test plan
pnpm typecheck(turbo, all packages)pnpm lint(turbo, all packages)pnpm format:checkpnpm --filter @mosaicstack/mosaic test— 24 files, 219 tests passing (includes 10 new stage spec tests + 3 unified-wizard integration tests)gatewayConfigStagespec — fresh install / decline-rerun / corrupt partial / MOSAIC_STORAGE_TIER=team / BETTER_AUTH_SECRET preservation / port-override regenerationgatewayBootstrapStagespec — fresh bootstrap / already-exists short-circuit / headless already-bootstrapped no-op / missing env vars / status failure / setup POST failureunified-wizard.test.ts— defaultrunWizardinvokes both gateway stages / skips bootstrap when config not ready / respectsskipGateway: trueCloses mosaicstack/mosaic-stack#427.
Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com
ec89675f97tof3d5ef8d7d