docs(phase-1/m4.3): M4.3 status + §1 gate output; plan handed to M4.4
Also two new §3 traps paid for during the gate re-run: daemon-surviving desktop JVMs after a client kill (use pkill -9 before re-running against the same data dir), and never parallelizing two --data-dir runs (leg B against leg A's half-written library produces bogus FAILs).
This commit is contained in:
1 parent
59bd6e106b
commit
31408172df
2 files changed
+77
-9
No files matched your search
@@ -661,15 +661,74 @@ commonMain).
|
|||||||
./gradlew :desktopApp:run … --self-test SELFTEST wrote note id=1
|
./gradlew :desktopApp:run … --self-test SELFTEST wrote note id=1
|
||||||
```
|
```
|
||||||
|
|
||||||
**Next up: M4.3** — the container seam: an `AppGraph` interface in
|
**M4.3 — container seam: DONE.** `AppGraph` in
|
||||||
`commonMain` (noteRepository, settings, cipher services, security
|
`commonMain` (`noteRepository` + `settingsRepository` +
|
||||||
state) so the four ViewModels leave `IncidoApplication`/
|
`encryptionBadge`) with `LocalAppGraph`/`requireAppGraph`; both
|
||||||
`AndroidViewModelFactory` behind (multiplatform lifecycle artifacts —
|
containers implement the face. Three commits:
|
||||||
verify the set against Compose 1.7.3 first, §6.4), and
|
|
||||||
`DesktopContainer` can implement the same face. Clipboard
|
- **M4.3a** — `:core:settings` → multiplatform (verbatim M4.2 playbook,
|
||||||
(`LocalClipboard` + `ClipEntry`) and image-decode
|
pure renames). One honest new seam: `runBlocking` has no commonMain
|
||||||
(`skia.Image.makeFromEncoded`) migrations ride along with the screens
|
declaration, so `snapshot()` goes through an internal expect/actual
|
||||||
that need them (§6.3).
|
`blockingFirst` — identical two-liner actuals (both targets JVM).
|
||||||
|
- **M4.3b** — the §6.4 "verify the artifact set" answer is **GREEN,
|
||||||
|
no state-holder fallback needed**: `org.jetbrains.androidx.lifecycle:
|
||||||
|
2.8.4` is the same coordinate set `androidMain` has resolved since
|
||||||
|
M4.1 (assembleDebug coexists with the AndroidX BOM) and the desktop
|
||||||
|
runtime already carried matching `-desktop` jars — so ViewModels
|
||||||
|
move with their `androidx.lifecycle.*` imports UNCHANGED.
|
||||||
|
`DrawerViewModel` led; `AppContainer : AppGraph` + `IncidoApp`
|
||||||
|
provides `LocalAppGraph` at the root.
|
||||||
|
- **M4.3c** — `NoteListViewModel` + `NoteEditorViewModel` (UiStates +
|
||||||
|
`SharedImage`) in commonMain. The editor VM's four
|
||||||
|
`withContext(Dispatchers.IO)` became `withContext(ioDispatcher)` —
|
||||||
|
internal expect/actual, actual literally `Dispatchers.IO` on both
|
||||||
|
targets. `EncryptionBadge`/`LibraryVerification` mirror `:core:data`'s
|
||||||
|
`EncryptionVerification` because :core:data is an androidLibrary and
|
||||||
|
must stay invisible to commonMain (§2.3 ObjectBox classpath rule);
|
||||||
|
each container maps the real verifier 1:1 at its own seam.
|
||||||
|
`SettingsViewModel` stayed in androidMain — the graph was NOT widened
|
||||||
|
around SecurityManager/Keystore/Uri-IO/CarnetImporter; those screens
|
||||||
|
read a small `LocalAndroidContainer`. APPLICATION_KEY +
|
||||||
|
`IncidoApplication` are gone from all four ViewModels and all six
|
||||||
|
screen call-sites (drawer/list/editor/settings/pin-setup/pin-change).
|
||||||
|
**Exit proof: `DesktopContainer : AppGraph`**, compiler-checked via
|
||||||
|
`:desktopApp` → `:composeApp` (jvm variant); `repository` renamed
|
||||||
|
`noteRepository`. Stand-in UI unchanged (M4.5 hosts the real screens).
|
||||||
|
|
||||||
|
```
|
||||||
|
§1 gate re-run first, all green:
|
||||||
|
:core:data-jvm:smoke RESULT: M1a PASS
|
||||||
|
:desktopApp:run … --self-test SELFTEST id=1 → RENDER notes=1
|
||||||
|
(first attempt hit the documented teardown wedge AFTER all PASS
|
||||||
|
lines — killed, rerun exited 0; see new §3 trap below)
|
||||||
|
:spike:data-jvm:run RESULT: S1 PASS — incl. envelope
|
||||||
|
84 B round-trip, PBKDF2 [50, 50] ms
|
||||||
|
assembleDebug BUILD SUCCESSFUL (134 tasks)
|
||||||
|
:desktopApp:createDistributable BUILD SUCCESSFUL — 169 MB image
|
||||||
|
crypto legs, separate processes 9×PASS + leg-A ALL-OK → LEG-B PASS
|
||||||
|
objectbox-models clean; default.json tracked,
|
||||||
|
not ignored (ls-files + check-ignore)
|
||||||
|
|
||||||
|
M4.3 suite per commit:
|
||||||
|
./gradlew assembleDebug :composeApp:compileKotlinJvm :desktopApp:build
|
||||||
|
BUILD SUCCESSFUL (the AppGraph exit proof compiles here)
|
||||||
|
:desktopApp:run … --self-test SELFTEST id=1 → RENDER notes=1 selected=1, clean exit
|
||||||
|
:core:data-jvm:smoke RESULT: M1a PASS
|
||||||
|
crypto legs (post-refactor) leg-A ALL-OK → LEG-B ALL-OK
|
||||||
|
```
|
||||||
|
|
||||||
|
**Next up: M4.4** — the screens: port the §6.3 seams one at a time
|
||||||
|
(theme `dynamicColor`/`Build.VERSION` remaining sites; the seven
|
||||||
|
`LocalContext` sites → platform-context abstraction; clipboard
|
||||||
|
`LocalClipboardManager` → `LocalClipboard` + `ClipEntry` on BOTH
|
||||||
|
platforms; image decode `BitmapFactory` →
|
||||||
|
`skia.Image.makeFromEncoded(bytes).toComposeImageBitmap()`; EXIF —
|
||||||
|
**verify a JVM decoder exists before committing**; file intake →
|
||||||
|
drag-drop + picker). Deferred/hide-UI: voice recording, camera,
|
||||||
|
share-sheet, biometrics (§6.5). ViewModels are already common, so
|
||||||
|
each screen moves once its own android.* seam is solved. M4.5 then
|
||||||
|
hosts the real screens in `:desktopApp` (replacing Main.kt's
|
||||||
|
stand-in) and deletes `spike/` (§6.6).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -98,6 +98,15 @@ app version `0.4.2.0` (code 38).
|
|||||||
* PBKDF2 200k iterations ≈ **55 ms** on desktop versus ~2 s on the phone.
|
* PBKDF2 200k iterations ≈ **55 ms** on desktop versus ~2 s on the phone.
|
||||||
* The jpackage launcher prints `pure virtual method called` on stderr when the
|
* The jpackage launcher prints `pure virtual method called` on stderr when the
|
||||||
app exits via `exitProcess`; harmless.
|
app exits via `exitProcess`; harmless.
|
||||||
|
* Killing the gradle client of a wedged `:desktopApp:run` does NOT kill the
|
||||||
|
app — the JavaExec child runs under the daemon. `pkill -f org.incido.desktop.MainKt`
|
||||||
|
(TERM can be ignored by a wedged AWT JVM — use `-9`) before re-running against
|
||||||
|
the same data dir, or ObjectBox's single-writer lock and DataStore's file lock
|
||||||
|
will wedge the next run too.
|
||||||
|
* Never batch the crypto legs (or any two `--data-dir` runs) in one parallel
|
||||||
|
command group — leg B opening the library leg A is still writing produces
|
||||||
|
bogus FAIL lines and a corrupt-on-paper result. Sequential, separate processes,
|
||||||
|
fresh dir first.
|
||||||
|
|
||||||
## 4. M2 — the backup bridge (next up; the product's reason to exist)
|
## 4. M2 — the backup bridge (next up; the product's reason to exist)
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user