LifeMate — Personal, Family & Learning Companion
feat/local-signing-preflight
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 | # Local signing preflight implementation plan |
| 2 | |
| 3 | Spec: [local signing preflight](../specs/2026-10-23-local-signing-preflight.md). |
| 4 | Base: PR45 `5f0c4da`; branch `feat/local-signing-preflight`. |
| 5 | Owner/coordinator: root; Java helper owner: signing inspector implementer; |
| 6 | independent review: separate reviewer. No owner key/device/data actions. |
| 7 | |
| 8 | ## Task 1 — JDK inspector and synthetic integration tests |
| 9 | |
| 10 | Files owned: `scripts/java/LifeGuideKeyInspector.java`, |
| 11 | `scripts/tests/test_signing_java.py`, `scripts/tests/signing_test_support.py`. |
| 12 | Use the exact binary protocol and helper JSON schema in the spec. Success: |
| 13 | `schemaVersion: 1`, `status: INSPECTED`, four public fields named there; exit0. |
| 14 | Failure: `schemaVersion:1,status:REFUSED,reason:<fixed code>`; exit2. |
| 15 | Reason enum: `invalid_request`, `keystore_unreadable`, `private_key_unavailable`, |
| 16 | `unsupported_key_algorithm`, `key_proof_failed`, `inspection_failed`. |
| 17 | Reject trailing bytes and unsupported entry types. Sanitize all exceptions. |
| 18 | Remove password byte/char arrays best-effort. No dependencies beyond JDK17. |
| 19 | |
| 20 | First write/run tests against absent helper (RED), then implementation (GREEN). |
| 21 | Actual keytool fixture generation is test-only in TemporaryDirectory; use |
| 22 | per-process random credentials via keytool `:env` flags and capture its output. |
| 23 | Never print test credentials or raw subprocess errors; no artifact upload. |
| 24 | Run `python3 -m unittest scripts.tests.test_signing_java -v`. |
| 25 | Expected: all tests pass with real JDK; fixture source hash unchanged. |
| 26 | |
| 27 | ## Task 2 — Python CLI and read-only/error guards |
| 28 | |
| 29 | Files owned: `scripts/signing_preflight.py`, |
| 30 | `scripts/tests/test_signing_preflight.py`. Root implements independently of Java |
| 31 | files, consuming the exact protocol. Load baseline via existing verifier. Reuse |
| 32 | `read_bounded` for encrypted key file. `check` is default; `inspect --keystore |
| 33 | PATH --alias ALIAS --acknowledge-owner-local-inspection` is explicit/TTY-only. |
| 34 | Errors are JSON with safe fixed codes, never argparse argument interpolation. |
| 35 | No password env/CLI support, no key generation, no input searching, no file |
| 36 | writes. Java child options in env stripped, captured stdout strictly validated, |
| 37 | stderr discarded, timeout enforced. Tool report always delivery BLOCKED. |
| 38 | |
| 39 | First write/run tests before implementation. Run |
| 40 | `python3 -m unittest scripts.tests.test_signing_preflight -v`. |
| 41 | Expected: safety gates fail closed, real inspector integration uses only fixtures. |
| 42 | |
| 43 | ## Task 3 — CI, guide, regression and independent review |
| 44 | |
| 45 | Add `.github/workflows/signing-preflight-qa.yml`: paths-limited ubuntu/windows, |
| 46 | Python3.11/JDK17, contents read, no secrets/APK/device/network-dependent tests, |
| 47 | no test-key/report artifacts. Add Persian guide with check command and future |
| 48 | owner-only inspect command clearly gated by separate authorization. Explain |
| 49 | matching/different/debug results, no uninstall or sharing keys/passwords, limits. |
| 50 | Run new suites + existing Python tool/recovery suites; inspect every output. |
| 51 | Independent whole-packet review for secret leakage/file mutation/gate bypass. |
| 52 | Record actual commands/output and CI results in evidence JSON; record unrun |
| 53 | platforms/owner operations as UNVERIFIED. Update PROJECT_STATE. Open small PR on |
| 54 | PR45; no merge/release/deploy. Stop after handover. |
| 55 | |
| 56 | ## Execution ledger |
| 57 | |
| 58 | - Setup: clean isolated worktree at `5f0c4da`; inherited AGENTS/state read. |
| 59 | - Preflight: Java→Python exact protocol/JSON shared; no overlapping implementation |
| 60 | files. Tests and docs use baseline reader without alternative baseline input. |
| 61 | - Ruling: no new key-generation/transfer feature; read-only inspection is the |
| 62 | smallest prep dependency. A wrong scope choice costs deferred usable transfer, |
| 63 | not a change to installed data or approved policy. |
| 64 | - Task1: `79e1211`, 11 Java tests PASS on actual Temurin17; absent-helper RED and |
| 65 | deliberately removed-proof mutation RED observed (synthetic mismatched cert). |
| 66 | - Task2: 24 Python tests PASS, including real synthetic CLI→JDK→keypair proof; |
| 67 | missing-module RED, source17 capability RED, pre-prompt guard RED recorded. |
| 68 | - Ruling: check compiler module and empty-input source17 probe, not `javac` binary |
| 69 | presence — system21 has compiler but lacks ct.sym/source17; false capability |
| 70 | acceptance would delay inspection failure until after credentials. No key read |
| 71 | during the probe. Downloaded temporary official checksum-verified JDK17 only. |
| 72 | - Ruling: inherited 82 host guards run on Ubuntu only because they invoke POSIX |
| 73 | shell/FIFO operations; new signing suites run on both CI systems. Wrong scope |
| 74 | costs missing Windows legacy-guard coverage, not weaker Android release gates. |
| 75 | - Local full regression: 90 tests in32.576s OK (55 recovery +35 signing), inherited |
| 76 | host82 in0.197s OK; source compile and `git diff --check` exit0. |
| 77 | - Task3: independent review ran signing35/27.656s OK. It reproduced one Minor |
| 78 | multi-valued-RDN CN false-negative. Coordinator re-graded Important for accurate |
| 79 | owner-facing key facts, fixed all CN-value enumeration; actual synthetic test |
| 80 | RED1failure→GREEN1test/3subjects (positive multi-RDN/lowercase, negative OU). |
| 81 | No deferred review findings. Full-suite result recorded in final evidence. |
| 82 | - CI initial `39941563602`: signing35 PASS on Ubuntu and Windows (Windows one |
| 83 | POSIX skip); Ubuntu inherited guard import failed missing cryptography. Added |
| 84 | existing pinned requirement; `39941815472` then both jobs SUCCESS on `9df0c92`. |
| 85 | Final CN-correction `39942133341` SUCCESS on `62741da`: Ubuntu signing36+host82, |
| 86 | Windows36 including1POSIXskip; exact outputs read via official job-log connector. |
| 87 | Local final91/40.187s OK. Generic CI initial run superseded/cancelled by |
| 88 | normal branch concurrency; not treated as test success. |
| 89 | - No owner key/device/data inspection, signing/configuration, personal APK delivery, |
| 90 | merge/deploy/DNS performed. Generic CI may build existing debug test artifacts; |
| 91 | they are not an approved update to the installed personal APK. |