# Mobile Markdown BOM performance capture

Synthetic English Markdown only; no account, backend, project database, or real conversation data.

The identical scratch `driver.py` installs a temporary measurement screen in each checkout's existing mobile AppContent, replacing Navigation while retaining the normal application providers, native dev client, Hermes runtime, and native enriched Markdown renderer. This is instrumentation of the mobile app, not a normal chat navigation recording. The timing boundary is markdownWithTextDirection, both directly and after markdownForNativeRendering, matching the original triage probe. It excludes native layout, React commit time, and remark normalization before the direction pass.

Use two clean checkouts at the SHAs in the JSON captures, install dependencies with `vp i`, then apply `python3 driver.py <checkout> <sha>` to each. No changes should be committed. Start a local HTTP collector that accepts the screen's JSON POST; set EXPO_PUBLIC_PROOF_URL to its device-reachable URL. Start Metro with `vp run dev:client --port <port>` from each apps/mobile directory, and point the same Pixel 9 Android API 36 pooled device and cached T3 Code development client at each Metro in turn. Press Run measurement once and retain the POST as JSON. Record each interaction with agent-device record start/stop.

The screen uses the unchanged production Markdown helper imports. Each input is warmed once and measured in nine batches of twenty calls. Per-call times use performance.now, in milliseconds. Direct and post-normalization measurements have separate samples. It displays the BOM document through the existing native EnrichedMarkdownText dependency, and records exact string equality before and after the direction pass. The large synthetic document is 38,912 JavaScript characters, English ASCII except a leading U+FEFF in the BOM cases. The numeric-reference control appends `It&#39;s fine &#169; 2026`.

`node-probe.mjs <checkout> <sha>` provides the matching Linux Node 26.13.1 command-line measurement as supplemental evidence; run using `vp exec node --no-warnings` from apps/mobile. Native JSON captures identify Android/Hermes separately.

The entity-only Hebrew example is `English` followed by three words written as decimal numeric references. Base adds an RTL mark only when a BOM is present. Head adds an RTL mark with or without a BOM. This is a behavior expansion, not the BOM-free behavior described in the original brief. The English captures remain byte-for-byte unchanged.

The base collector stopped before the POST arrived. The completed in-app samples were preserved across Fast Refresh, and the added Export completed samples button sent those original samples after the collector was restarted. No timing batches were rerun for that export. The driver includes that recovery button on both sides. `collector.mjs <output-directory> [port]` is a portable receiver for reproduction.

The base recording joins Android's three consecutive screenrecord chunks without changing playback speed. Its bottom 324 pixels are blacked out to remove the collector warning's private connection address; the measured status and results above it are unobscured. The head recording is 4.3 seconds because Android stops encoding frames when the screen stops changing, although record stop was called 22.5 seconds after start. The stable result screenshots were taken twice more than 500 ms apart and were byte-identical on each side.
