wkt-app: the member is the Coa-built Android APK in an emulator; the founder stays on the AppImage (Ben, #1855) #1884

Merged
ben merged 1 commit from session/wkt-app-member-apk into main 2026-09-25 16:47:35 +00:00
Owner

Ben's ruling (2026-09-25, #1855). Once the founder is set up on the Linux desktop, the member uses the Android APK in an emulator. The member submits a registration request, the founder approves it in the app, and the member signs into Nextcloud with the membership credential. This supersedes the design's "Linux AppImage for both instances; the Android APK is Ben's manual test".

Proven by hand on bens-mac-04 before the code:

  • nixpkgs' google_apis Android 34 x86_64 image is a userdebug build. It booted headless under KVM in about 50 s.
  • The real signed wkt-demo APK from Coa (it carries x86_64 libs and the matou:// scheme) installed unchanged.
  • Its WebView answered DevTools on webview_devtools_remote_<pid>, as page "Matou" at https://localhost/#/. Userdebug makes a release APK's WebView inspectable, so the drive drives the real app with no debug rebuild.
  • The app then stopped at its backend start, because wkt-demo.idss.nz pointed at a half-built box. A matou-app finding from that: a failed backend start leaves a blank screen with no error.

Change:

  • flake.nix: new packages.android-sdk, with platform-tools, the emulator, cmdline-tools and the image. Its licence and unfree allowance are scoped to that import alone.
  • fixtures/androidMember.ts:
    • bootEmulator refuses a non-userdebug image.
    • installAndLaunch reads the package id from the APK's own capacitor.config.json.
    • attachWebView finds the pid, the socket and an adb forward, then runs connectOverCDP.
    • deliverAndroidDeepLink sends am start -W -a VIEW -d '<link>' <pkg>.
    • relocateAvd rewrites the AVD's absolute path=.
  • wktApp.ts: resolveApk, and a new leg member-device between founder-nextcloud-qr and member-first-run.
  • journey.wkt-app.spec.ts:
    • download also fetches the APK.
    • The member's legs drive the WebView page with the unchanged app-flow helpers.
    • qrSignIn takes a delivery function, so the founder gets the AppImage argv and the member gets adb.
    • kept keeps the APK and the member's AVD, plus boot and deep-link lines.
  • smoke-private-path.sh: wkt_android_gate refuses unless this user has read+write on /dev/kvm and a complete SDK, and exports WKT_ANDROID_SDK.
  • The spec ruling, the runbook's Drive B section and STATUS are updated.

Tests. 11 new tests failed before the change and pass after it: the fixture's pure helpers, resolveApk, the leg order, the spec wiring and the harness gate. All 43 fixture files pass (747 tests), vue-tsc is clean, and the wkt-app and wkt-founding harness tests pass.

Live proof. It waits on a green Drive A, whose kept bundle Drive B rides. Drive A is paused.

Refs #1855 #1844

🤖 Generated with Claude Code

https://claude.ai/code/session_013h5C35beyRQMAA1QjxZGk7

**Ben's ruling (2026-09-25, #1855).** Once the founder is set up on the Linux desktop, the member uses the Android APK in an emulator. The member submits a registration request, the founder approves it in the app, and the member signs into Nextcloud with the membership credential. This supersedes the design's "Linux AppImage for both instances; the Android APK is Ben's manual test". **Proven by hand on bens-mac-04 before the code:** - nixpkgs' `google_apis` Android 34 x86_64 image is a userdebug build. It booted headless under KVM in about 50 s. - The real signed wkt-demo APK from Coa (it carries x86_64 libs and the `matou://` scheme) installed unchanged. - Its WebView answered DevTools on `webview_devtools_remote_<pid>`, as page "Matou" at `https://localhost/#/`. Userdebug makes a release APK's WebView inspectable, so the drive drives the real app with no debug rebuild. - The app then stopped at its backend start, because `wkt-demo.idss.nz` pointed at a half-built box. A matou-app finding from that: a failed backend start leaves a blank screen with no error. **Change:** - `flake.nix`: new `packages.android-sdk`, with platform-tools, the emulator, cmdline-tools and the image. Its licence and unfree allowance are scoped to that import alone. - `fixtures/androidMember.ts`: - `bootEmulator` refuses a non-userdebug image. - `installAndLaunch` reads the package id from the APK's own `capacitor.config.json`. - `attachWebView` finds the pid, the socket and an adb forward, then runs `connectOverCDP`. - `deliverAndroidDeepLink` sends `am start -W -a VIEW -d '<link>' <pkg>`. - `relocateAvd` rewrites the AVD's absolute `path=`. - `wktApp.ts`: `resolveApk`, and a new leg `member-device` between `founder-nextcloud-qr` and `member-first-run`. - `journey.wkt-app.spec.ts`: - `download` also fetches the APK. - The member's legs drive the WebView page with the unchanged app-flow helpers. - `qrSignIn` takes a delivery function, so the founder gets the AppImage argv and the member gets adb. - `kept` keeps the APK and the member's AVD, plus boot and deep-link lines. - `smoke-private-path.sh`: `wkt_android_gate` refuses unless this user has read+write on `/dev/kvm` and a complete SDK, and exports `WKT_ANDROID_SDK`. - The spec ruling, the runbook's Drive B section and STATUS are updated. **Tests.** 11 new tests failed before the change and pass after it: the fixture's pure helpers, `resolveApk`, the leg order, the spec wiring and the harness gate. All 43 fixture files pass (747 tests), `vue-tsc` is clean, and the wkt-app and wkt-founding harness tests pass. **Live proof.** It waits on a green Drive A, whose kept bundle Drive B rides. Drive A is paused. Refs #1855 #1844 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_013h5C35beyRQMAA1QjxZGk7
wkt-app: the member is the Coa-built Android APK in an emulator; the founder stays on the AppImage (Ben, #1855)
Some checks failed
ci / seam (pull_request) Failing after 19m40s
ci / publish (pull_request) Has been skipped
ci / publish-broker (pull_request) Has been skipped
ci / deploy-broker (pull_request) Has been skipped
e8bb46421e
Ben's ruling 2026-09-25: once the founder is set up on the Linux desktop,
the member registers from the APK in an emulator, the founder approves in
the app, and the member signs into Nextcloud with the membership
credential. Supersedes "AppImage for both; the APK is Ben's manual test".

Proven by hand on bens-mac-04 first: the google_apis Android 34 x86_64
image is userdebug (boots headless under KVM in ~50 s), the real signed
wkt-demo APK installs, and its WebView answers DevTools — userdebug makes
a release APK's WebView inspectable, so the real app is driven.

- flake: packages.android-sdk (licence scoped to that import)
- fixtures/androidMember.ts: boot (userdebug-only), install + launch
  (package id from the APK's capacitor config), CDP attach to the WebView,
  VIEW-intent deep links, AVD relocation
- wktApp: resolveApk + leg member-device; journey.wkt-app drives the
  member's legs through the WebView page with the unchanged app flows
- harness: wkt_android_gate (rw /dev/kvm, complete SDK, WKT_ANDROID_SDK)
- spec ruling + runbook

Refs #1855 #1844

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013h5C35beyRQMAA1QjxZGk7
ben force-pushed session/wkt-app-member-apk from e8bb46421e
Some checks failed
ci / seam (pull_request) Failing after 19m40s
ci / publish (pull_request) Has been skipped
ci / publish-broker (pull_request) Has been skipped
ci / deploy-broker (pull_request) Has been skipped
to 5aa771397f
All checks were successful
ci / seam (pull_request) Successful in 17m8s
ci / publish (pull_request) Has been skipped
ci / publish-broker (pull_request) Has been skipped
ci / deploy-broker (pull_request) Has been skipped
2026-09-25 16:29:55 +00:00
Compare
ben merged commit 481c29a333 into main 2026-09-25 16:47:35 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/idss!1884
No description provided.