LifeMate — Personal, Family & Learning Companion
fix/local-task-persistence
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
| 1 | import test from 'node:test'; |
| 2 | import assert from 'node:assert/strict'; |
| 3 | import fs from 'node:fs'; |
| 4 | |
| 5 | const src=fs.readFileSync(new URL('../src/phase4.js',import.meta.url),'utf8'); |
| 6 | const migration=fs.readFileSync(new URL('../migrations/0004_ai_learning_wellbeing.sql',import.meta.url),'utf8'); |
| 7 | |
| 8 | test('phase4 schema contains learning wellbeing guide and proposal boundaries',()=>{ |
| 9 | for(const table of ['learning_goal','learning_checkin','wellbeing_checkin','ai_guide_session','ai_guide_message','ai_plan_proposal','wellbeing_safety_event']) assert.match(migration,new RegExp(`create table if not exists ${table}`)); |
| 10 | assert.match(migration,/visibility in \('private','guardian_summary'\)/); |
| 11 | assert.match(migration,/status in \('proposed','accepted','rejected'\)/); |
| 12 | }); |
| 13 | |
| 14 | test('AI guide is advisory and has urgent safety path',()=>{ |
| 15 | assert.match(src,/urgent_review/); assert.match(src,/medicalDiagnosis:\s*false/); assert.match(src,/automaticAction:\s*false/); assert.match(src,/خدمات اضطراری محلی/); |
| 16 | }); |
| 17 | |
| 18 | test('wellbeing list is owner scoped and excludes raw note',()=>{ |
| 19 | assert.match(src,/select id,mood,energy,stress,visibility,created_at from wellbeing_checkin where owner_user_id=\$1/); |
| 20 | assert.doesNotMatch(src,/select id,mood,energy,stress,note,visibility,created_at from wellbeing_checkin/); |
| 21 | }); |