perf: collapse app-driving startup turns
Merged
TH
4mo ago+143+143+012345678901234567890123456789-108-108-012345678901234567890123456789
Summary
- make
open <app> --foregroundpreserve normal app/device selection, work for both fresh and existing sessions, and return the initial interactive snapshot in one call; bare iOS auto-discovery remains fail-closed - make the compact skill and canonical CLI guidance start ordinary app-driving tasks directly, without mandatory help/version/session probes, with a conformance test pinning the default recipe
- extend same-scope iOS tap corroboration from 5s to a bounded 15s so ordinary model turn latency can still prove a tap landed after XCTest reports failure
The wider corroboration window deliberately accepts some additional organic-label-drift exposure. It remains limited to XCTEST_RECORDED_FAILURE, requires the same backend and presentation, and returns an explicit re-observation warning; a false corroboration could still record a tap that did not land, so this is an accepted bounded tradeoff rather than a general success fallback.
Validation
pnpm check:affected --run— all runnable checks passed, including 2,559 affected Vitest tests, 100% changed-line coverage, Node integration, package, architecture/progress, and replay compatibility- red-before: reverting the review fixes makes the existing-session explicit-app foreground test fail with
INVALID_ARGSand the skill conformance test find both foreground and plain-open recipes; both pass on this head - focused suite: 11 files / 245 tests passed;
pnpm buildpassed - live iOS at exact head:
open xyz.blueskyweb.app --foreground --platform ios --udid C4578E05-BB63-4A3D-AB53-B011EFA2D981 --session review-1693 --jsonreturned a healthy interactive snapshot on a fresh session, then the identical command succeeded again on the existing session with a new refs generation; the session was closed afterward - controlled GPT-5.4 runs with isolated config/binary: Element-14 improved from 75.3s / 14 calls to 59.3s / 7 (Argent: 53.6s / 10); Element-03 improved from 174.8s / 30 to 85.4s / 12 (Argent: 122.8s / 18)
- Bluesky reproduced the XCTest recorded-failure path and the changed post-action capture correctly corroborated the landed tap; timing was excluded because local golden verification proved that benchmark fixture was logged out