From 14f28e9d66bf57441686921fc019c1c94a9d860c Mon Sep 17 00:00:00 2001 From: Yaojia Wang Date: Thu, 30 Jul 2026 15:38:10 +0200 Subject: [PATCH] docs(android): record what the device run proved and what is still open MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The correction section written earlier today said A34/A35 had no code and device QA was ~0%. Both were true when written and are not any more, so they are marked resolved rather than left to mislead the next reader — with the instrumented invocation recorded (the emulator needs ALLOWED_ORIGINS=http://10.0.2.2:, because allowed origins are derived from NIC IPs and 10.0.2.2 is not one). What stays open is stated plainly: S2 needs two physical handsets under Doze, the rest of DEVICE_QA_CHECKLIST has no automated cover, and one instrumented test kills the process when driven without host arguments on a heavily-recycled emulator while passing reproducibly under the documented invocation — which is recorded as unresolved rather than explained away. --- android/PROGRESS_ANDROID.md | 31 +++++++++++++++++++++++++------ docs/PROGRESS_LOG.md | 7 ++++++- 2 files changed, 31 insertions(+), 7 deletions(-) diff --git a/android/PROGRESS_ANDROID.md b/android/PROGRESS_ANDROID.md index 8abad86..9914597 100644 --- a/android/PROGRESS_ANDROID.md +++ b/android/PROGRESS_ANDROID.md @@ -437,12 +437,31 @@ with Tink AEAD under an AndroidKeyStore key, **fail-closed** (a seal failure per than falling back to plaintext), and `allowBackup=false` keeps a 30-day shell credential out of Google Drive and D2D transfer. -**Still not done — do not read the section below as saying otherwise:** - - **A34 / A35 have no code.** There is no `:app` androidTest source set and no benchmark module; the - AW6 entry marking them `[x]` reflects them being converted into checklist bullets, not implemented. - - **Device QA remains ~0%.** One emulator smoke screenshot of the pairing screen is the only on-device - evidence in the repo. Every fix above is JVM-verified only. - - Release signing, versioning and minification; the S2 FCM real-handset spike; copy-out via selection. +**RESOLVED LATER THE SAME DAY** (this list was accurate when written; it is not any more): + - **A34 / A35 now exist and RUN.** `:app/src/androidTest/**` holds 67 instrumented tests — the four + crash regressions, the A34 E2E set (attach→output, ring-buffer replay, spawn failure via a second + deliberately-broken server, a gate resolved through `POST /hook/decision`, and the F9 bad-Origin + rejection), and the Compose UI tests plan §7 named — plus `macrobenchmark/` for A35. All 67 execute + green on `emulator-5554` against this repo's own server. Reaching the host needs + `ALLOWED_ORIGINS=http://10.0.2.2:` (the server derives allowed origins from NIC IPs, and + 10.0.2.2 is the emulator's alias for the host, not an interface address). + - **Device QA is no longer ~0%.** The blocker fixes are device-verified, not just JVM-verified. + - Release signing, versioning and minification are done: `assembleRelease` runs R8 and now REFUSES to + emit an unsigned artifact instead of quietly producing one. + - **Copy-out is done** — a first-party selection layer over `TerminalBuffer.getSelectedText` + + `ClipboardManager`, since the stock ActionMode's Copy handler dereferences the absent session. + - The six audit leftovers are closed too: silent certificate rotation (+ `/device/:id/recover`), the W2 + inject-queue routes, unread-watermark persistence, host-removal UI, and `/config/ui` finally honoured + (fail-closed). + +**Still genuinely open:** + - **S2** — the FCM real-handset delivery spike. Needs ≥2 physical devices under Doze/OEM battery + managers; an emulator cannot answer it. + - One instrumented test (`wheelInsideTheAlternateBuffer_emitsThreeArrowsPerNotch`) was seen to kill the + test process when the suite was driven WITHOUT the host arguments on a heavily-recycled emulator. It + passes reproducibly under the documented invocation on a clean install. Re-check on real hardware + before trusting it either way. + - Everything else device-observable in `DEVICE_QA_CHECKLIST.md` that no automated test covers. --- diff --git a/docs/PROGRESS_LOG.md b/docs/PROGRESS_LOG.md index 9eb9779..b2a487d 100644 --- a/docs/PROGRESS_LOG.md +++ b/docs/PROGRESS_LOG.md @@ -47,7 +47,12 @@ - **设备 QA 仍约 0%** —— 仓库里唯一的真机证据是一张配对页的模拟器截图。上面每一条修复都只有 JVM 级验证。 - release 签名/版本号/minify;S2 FCM 真机投递;复制功能。 - `android/PROGRESS_ANDROID.md` 顶部已加"CORRECTION"段落说明上述全部。 -- **下一步**: 模拟器(AVD `webterm`,已启动)上跑 instrumented 回归 —— 尤其是这次修掉的三个崩溃,那正是 JVM 测试抓不到、也正是本次修复存在的理由。 +- **后续同日完成(本条目最初写的"仍未完成"已不成立)**: + - **设备上真跑起来了**: `:app/src/androidTest/**` 67 个 instrumented 测试 + `macrobenchmark/`,在 `emulator-5554` 上对本仓库自己的服务器**全绿(67/0)**。含四个崩溃回归、A34 E2E(attach→output、ring buffer 重放、用第二个故意配坏的服务器测 spawn 失败、`POST /hook/decision` 解 gate、**F9 坏 Origin 拒绝**)、以及 plan §7 点名的 Compose 测试。模拟器要打通宿主机必须 `ALLOWED_ORIGINS=http://10.0.2.2:` —— 服务端的 allowedOrigins 从网卡 IP 派生,而 10.0.2.2 是模拟器对宿主机的别名、不是任何网卡地址。 + - **设备上又抓出第四个崩溃**: `onDraw` → `TerminalRow.getStyle` 的 `AIOOBE`,而 `PROGRESS_ANDROID.md` 原本把它写成"Accepted (not a defect) — 撕裂读会自我修正"。两半都是错的:它是进程直杀;而且"matches upstream Termux"也不成立 —— 上游 `append` 由 `MainThreadHandler` 在主线程调用,压根没有并发读者。根因是 `TerminalEmulator.resize` **先**发布新 `mColumns`、**后**才重新分配行数组,`length == index` 那个"可疑的一致性"是**扩容的确定性签名**。**而且这个竞态以前是休眠的** —— resize 从不发生,列数就不变,没有宽度差可撕;是本次把 resize 修好才让它变可达。修法:emulator mutation 全部挪到渲染线程(与上游一致),单写者模型不变。已先复现成 JVM 测试,所以这条回归以后不需要设备就能守住。 + - **审计遗留 6 项 + 复制功能全部关闭**: 证书静默轮换(顺带修掉一个会让**每次续期都失败**的 `renew()` 解码 bug,并指出 iOS 有个"只轮换一次"的潜在缺陷 Android 通过从叶证书反推 `renewAfter` 避开了)、`/device/:id/recover`(走非 mTLS,因为过期证书没法给自己的恢复做认证)、W2 inject-queue 三条路由、未读水位持久化、host 移除 UI、`/config/ui` 被尊重且**fail-closed**、以及基于 `TerminalBuffer.getSelectedText` 自建的选择/复制层(stock ActionMode 的 Copy 处理器解引用空 session,所以不能恢复它)。 + - **最终门禁**: `./gradlew test :app:assembleDebug :app:assembleDebugAndroidTest :macrobenchmark:assembleBenchmark koverVerify` → BUILD SUCCESSFUL,**1150 JVM 测试 / 0 失败**(基线 617);instrumented **67/0**。commit `3e5cfdc`→`390dd11` 共 9 个。 +- **仍然开放**: **S2**(FCM 真机投递,需要 ≥2 台物理设备在 Doze/厂商省电下验证,模拟器答不了);`DEVICE_QA_CHECKLIST.md` 里没有自动化覆盖的其余设备可观测项;一个 instrumented 测试在**不传 host 参数**且模拟器被反复安装卸载后会杀掉测试进程,按文档化的调用方式+干净安装则稳定通过 —— 上真机再判。 ### 🌿 [x] w6 项目详情 Git 面板 — G1–G7 全部完成(2026-07-29,worktree `project-detail-git-mockup`)