docs(phase-1/m3.4): M3 status + scripted key-envelope legs; plan handed to M4

Closes milestone M3 (DESKTOP_PHASE_PLAN §5).

Code (one addition): --key-export / --key-import CLI legs in Main.kt —
the SecurityActions menu's exact codec calls, headless. This makes the
pending physical-phone leg a one-liner once a Waydroid container is
live (recipe recorded in the feasibility doc).

Docs: DESKTOP_FEASIBILITY.md gains the M3.1–M3.4 status section with
the actual run output (leg A/B, KEYENV logs, 0600 ls lines); plan §1
lists the two crypto legs among the must-stay-green commands; §5 marked
DONE; first-actions now point a fresh session at M4 task 1.

Exit criteria, per the plan's wording:
- encrypted desktop library passes EncryptionVerifier's trial-decrypt
  sweep: MET (leg A verified=1 failed=0, wrong key -> AEAD failure
  count, leg B relaunch all-ok).
- phone-exported recovery key decrypts on desktop: MET at format level
  (shared codec source, 84B INCKEY1 envelope, AEADBadTagException on
  wrong passphrase, byte-identical key into a fresh 0600 file); the
  physical phone export is FLAGGED pending (Waydroid container FROZEN,
  start is sudo-gated) with the exact re-run recipe — not assumed done.

Verified: ./gradlew assembleDebug, :core:data-jvm:smoke,
:spike:data-jvm:run, :desktopApp:run --self-test, and both crypto legs
— all green in one final pass (one self-test teardown hang under the
compositor, rc=124, clean on immediate rerun — recorded, environmental).
This commit is contained in:
Incido Developer committed 2026-10-06 07:39:54 +13:00
1 parent 000f4095cc
commit 6b8db18cdf
3 files changed
+175 -4

No files matched your search

+11 -4
View File
@@ -47,6 +47,10 @@ Commands that must stay green:
./gradlew :spike:data-jvm:run --args="/tmp/incido-spike-db" # Phase-0 probes
./gradlew assembleDebug # Android — every single step
./gradlew :desktopApp:createDistributable # packaging (M5)
# M3 (settings + at-rest encryption). Leg B must run as a SEPARATE process
# after leg A (it proves the relaunch), against the same fresh data dir:
./gradlew :desktopApp:run --args="--data-dir /tmp/incido-desktop-crypto --crypto-self-test --crypto-passphrase m3-script-pw --exit-after 20" # leg A (leaves lib encrypted)
./gradlew :desktopApp:run --args="--data-dir /tmp/incido-desktop-crypto --crypto-reopen --exit-after 15" # leg B (verifies + decrypts back)
```
Versions that matter: Compose Multiplatform `1.7.3`, AndroidX Compose BOM
@@ -128,7 +132,7 @@ is additive and forces `id = 0`. The only Android code in the path is
Exit criteria: bidirectional lossless round-trip; importing twice adds nothing;
`:core:backup` compiles for both platforms; Android backup screens unchanged.
## 5. M3 — settings + at-rest encryption on desktop
## 5. M3 — settings + at-rest encryption on desktop — **DONE** (status + run logs in `DESKTOP_FEASIBILITY.md`; the physical phone→desktop recovery-key leg is the one pending manual run, recipe recorded there)
**Settings.** Move `SettingsRepository` (116 LOC, 8 keys: `theme_mode`,
`dynamic_color`, `security_enabled`, `encryption_enabled`, `pin_enabled`,
@@ -238,6 +242,9 @@ abstraction, justify it in the commit message. Flag anything unverifiable
instead of assuming it works.
**First actions for a new session:** `git log --oneline -6` → read
`tools/DESKTOP_FEASIBILITY.md` → run `:core:data-jvm:smoke` and the
`:desktopApp:run … --self-test` command above to confirm the tree matches this
description → start M2 task 1 (extract `:core:backup`).
`tools/DESKTOP_FEASIBILITY.md` → run `:core:data-jvm:smoke`, the
`:desktopApp:run … --self-test` command, and the M3 crypto legs above to
confirm the tree matches this description → start M4 task 1 (convert
`:composeApp` in-place to `kotlin("multiplatform")` with
`androidTarget()` + `jvm()`, per §6 order of attack — decide within a day
of real friction whether to fall back to a `:ui-shared` module).