HANDOFF: current watch architecture (no Android mtime-diff, RESCANNING gate)

This commit is contained in:
Greg Pomerantz 2026-11-02 12:38:17 -05:00
parent 10ec0b52cc
commit 2c03577a67

View File

@ -8,8 +8,16 @@
> ContentObserver in `MainActivity.kt` receives the changed URI, queries
> that one row, drops a one-line payload (`.ms_recent.N`: `A|id|path|size`
> or `D|id`), wakes Rust via zero-arg JNI; Rust applies it directly.
> FS walk = startup baseline + 5-min reconciliation + mtime-diff
> incremental; a walk that ERRORS is never applied (see scan.rs docs).
> FS walk = startup baseline + 5-min reconciliation. On Android the
> mtime-diff (`dir_sig`) machinery is DISABLED — it cost a 10k-entry
> readdir per second and the MediaStore payloads already carry the
> exact change signal; a no-payload OS event falls back to a 30s-
> throttled full rescan. A `RESCANNING` gate parks payloads while a
> full walk is in flight (mid-walk deletes must apply AFTER the walk's
> apply to win over its stale snapshot). Per-file stat errors in a
> walk are skipped (a deleted-mid-walk file must not kill deletion
> detection); only readdir/root errors fail the walk, and a walk that
> ERRORS is never applied (see scan.rs docs).
>
> **Emulator `pad_aosp` gotcha:** the image ships with
> `debug.hwui.drawing_enabled=0` — every window renders BLACK (HWUI