Follow-up 2b from #2879 (step 1 landed in #2916).
Problem
The longpress envelope is the literal envelopeMs: 210_000 in packages/command-registry/src/registry.ts. It rests on a comment sum: Android helper install 30 s (HELPER_INSTALL_TIMEOUT_MS, packages/platform-android/src/touch-helper.ts), the 120 s hold cap, and 15 s helper overhead. The comment also names an unbounded "hand off a running snapshot helper" step and the selector-resolution capture. Nothing checks the sum. The hold cap is a bare literal in src/commands/interaction/runtime/gestures.ts (requireIntInRange(options.durationMs, 'durationMs', 0, 120_000)).
Required
Follow-up 2b from #2879 (step 1 landed in #2916).
Problem
The
longpressenvelope is the literalenvelopeMs: 210_000inpackages/command-registry/src/registry.ts. It rests on a comment sum: Android helper install 30 s (HELPER_INSTALL_TIMEOUT_MS,packages/platform-android/src/touch-helper.ts), the 120 s hold cap, and 15 s helper overhead. The comment also names an unbounded "hand off a running snapshot helper" step and the selector-resolution capture. Nothing checks the sum. The hold cap is a bare literal insrc/commands/interaction/runtime/gestures.ts(requireIntInRange(options.durationMs, 'durationMs', 0, 120_000)).Required
elapsed + 30 s <= resolveCommandRequestTimeoutMs(resolveCommandTimeoutPolicy('longpress'), …).120_000literal with a named constant that both the validator and the scenario read.210_000, and point its comment at the test instead of the hand sum.