From 5271092c21156b3cfdb86bd59f06ad18631b8cd8 Mon Sep 17 00:00:00 2001 From: Greg Pomerantz Date: Sun, 16 Aug 2026 13:31:10 -0400 Subject: [PATCH] =?UTF-8?q?Doc:=20correct=20frame-timing=20tooling=20?= =?UTF-8?q?=E2=80=94=20gfxinfo=20unusable=20(SurfaceView),=20use=20in-app?= =?UTF-8?q?=20frame=20deltas?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/development_plan.md | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/doc/development_plan.md b/doc/development_plan.md index 1683bd5..efd28cd 100644 --- a/doc/development_plan.md +++ b/doc/development_plan.md @@ -55,7 +55,8 @@ swipe/autocorrect sign-off (the emulator's AOSP/Gboard keyboard is a proxy). 4. **No headless test window** in v0.9 or v0.10 — widget-level Go tests are impossible; on-device e2e is required (§9). 5. **The dev agent has no vision** (verified) — the emulator debug loop is - data-based (state dumps, logcat, gfxinfo, PIL/OCR), not screenshot-judgment + data-based (state dumps, logcat, in-app frame-delta logs, PIL/OCR), not + screenshot-judgment (§9.3). ## 3. Current state of the live repo (post housekeeping, 2026-08-16) @@ -301,14 +302,20 @@ logging PASS/FAIL to a file the host `adb pull`s and asserts. Gio renders into one GL surface, so Android's view hierarchy exposes nothing about our UI. The debug loop is data-based — *more* precise than pixels for this codebase. Vision is now enabled and verified in-session (screenshots can be read), but it is -only an **auxiliary** check: state dumps, logcat, gfxinfo, and file diffs remain -the authoritative correctness signals. +only an **auxiliary** check: state dumps, logcat, in-app frame-delta logs, and +file diffs remain the authoritative correctness signals. 1. **State-dump debug flag** (add in Phase 1): debug builds write `app.State` (browser entries, editor text length, cursor px, scroll, dirty, row geometry) as JSON to the app data dir on a magic tap or 2 s interval; host `adb pull`s and asserts. Primary "eyes." 2. **logcat** — Go panics + our logs. -3. **`dumpsys gfxinfo `** — per-frame timing/jank for the 60 fps claims. +3. **Frame timing for the 60 fps claims — `dumpsys gfxinfo` DOES NOT WORK + here (verified 2026-08-16): it reported 0 frames while the app was visibly + rendering, because Pad draws into a `SurfaceView` and gfxinfo only measures + the View-layer pipeline. Use temporary in-app instrumentation instead: + timestamp each frame in the main loop, log deltas, report p50/p90/p99/max. + `screenrecord` is a human artifact, not an agent metric (it captures ~22 + fps with encoder-confounded timestamps). 4. **Screenshot → PIL color histogram / tesseract OCR** — coarse on-screen checks. 5. **File diffs** via `adb pull` — autosave/restore correctness. 6. **Driving** — `input tap/swipe/keyevent/text`, `am start/force-stop`,