LifeMate — Personal, Family & Learning Companion

feat/weekly-planner-android
chore/phase1-repository-cleanup deploy/stable-web-apk deployment-static design/mobile-accessibility-v2 design/mobile-navigation-review docs/child-education-access-decision docs/offline-data-rescue-options docs/owner-guide-and-delivery-plan docs/phase1-policy-options docs/public-review-live-2026-10-15 feat/aparat-learning-library feat/child-device-safety feat/child-identity-schema feat/flutter-mobile-navigation feat/learning-content-operations feat/local-signing-preflight feat/online-family-stage0 feat/personal-encrypted-recovery feat/private-planner-series-api feat/public-review-page feat/standalone-weekly-planner feat/weekly-planner-android final-feature-1/iran-family-school fix/auth-abuse-expiry-safety fix/auth-expiry-after-lock fix/backend-request-safety fix/lifeguide-bootstrap-naming-ci fix/lifeguide-pages-qa-base-preflight fix/lifeguide-qa-pages-env-deployment fix/local-task-persistence fix/managed-child-session-boundary fix/personal-jalali-dates fix/personal-notification-controls fix/personal-upgrade-delivery-guard fix/sms-approval-gates fix/study-duration-display infra/cloudflare-neon-migration infra/lifeguide-cloudflare-qa infra/lifeguide-github-pages-qa infra/lifeguide-supabase-qa main phase-1/foundation-completion phase-2/product-foundation-identity phase-3/planner-school-family-core phase-4/ai-learning-wellbeing phase-5/hardening-observability-release test/android-reminder-acceptance test/personal-notification-settings test/personal-recovery-acceptance test/role-entry-apk
js 16 lines 887 Bytes
Raw
1 import test from 'node:test';
2 import assert from 'node:assert/strict';
3 import { spawnSync } from 'node:child_process';
4
5 test('direct production server start fails closed instead of bypassing shared auth IP and request guards', () => {
6 const result = spawnSync(process.execPath, ['src/server.js'], {
7 cwd: new URL('../', import.meta.url),
8 env: { ...process.env, NODE_ENV: 'production', PORT: '0', SMS_PROVIDER: 'disabled', EMAIL_FROM: '',
9 JWT_SECRET: 'synthetic-entrypoint-guard-fixture-not-live-2026',
10 SMTP_HOST: '', RESEND_API_KEY: '', AI_API_KEY: '', AI_BASE_URL: '', AI_MODEL: '' },
11 timeout: 2000, encoding: 'utf8',
12 });
13 assert.equal(result.status, 1, 'Use npm start; server.js must not open an unguarded production listener');
14 assert.match(result.stderr, /production_entrypoint_required/);
15 assert.doesNotMatch(result.stdout, /listening|startup/);
16 });