Skip to content

Commit 601fff5

Browse files
thymikeeclaude
andcommitted
refactor(daemon): inline the post-open verdict and name the open-time mark in the tap gap
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent ce8fbbe commit 601fff5

2 files changed

Lines changed: 6 additions & 15 deletions

File tree

‎packages/contracts/src/interaction-guarantees.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ const SHARED_RESPONSE_CONSTRUCTION: GuaranteeEnforcement = {
166166
const TAP_OUTCOME_NOT_OBSERVED_GAP: GuaranteeEnforcement = {
167167
kind: 'waived',
168168
reason:
169-
'gap: the response reports the dispatch only; only opt-in --verify/--settle capture post-action evidence into it. The deferred marks set after dispatch (Android snapshot freshness after press/click, post-gesture stabilization when the request sets postGestureStabilization) are judged by the next capture, never in this response, and the iOS ambiguous-failure corroboration reconsiders only a thrown runner error.',
169+
'gap: the response reports the dispatch only; only opt-in --verify/--settle capture post-action evidence into it. The deferred marks set after dispatch (Android snapshot freshness after press/click, post-gesture stabilization when the request sets postGestureStabilization) are judged by the next capture, never in this response. An iOS Simulator open whose launch watch ended unobservable marks the next capture in that session to wait for a quiet surface (markPostOpenStabilization); that steadies where a target is resolved, not whether the tap landed. The iOS ambiguous-failure corroboration reconsiders only a thrown runner error.',
170170
trackingIssue: TAP_OUTCOME_NOT_OBSERVED_GAP_ISSUE,
171171
};
172172

‎src/daemon/deferred-interaction-outcome.ts‎

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -109,27 +109,18 @@ function markPostGestureStabilization(
109109
}
110110

111111
/**
112-
* The one post-open verdict that observed the launch still in flight: the bridge kept answering with
113-
* a launch-transition failure until its window closed, and the open returned on a fixed settle.
114-
* `observable` read the app; `probe-failed`, `app-unidentified`, and `not-eligible` learned nothing
115-
* about the layout, so they keep the fixed settle alone.
116-
*/
117-
const POST_OPEN_IN_FLIGHT_OBSERVATION: PostOpenObservation = 'unobservable';
118-
119-
/**
120-
* Open-side marking, called once an app open has published its session. An Apple app open whose
121-
* observation could not read the launched app returns before anything proved its layout at rest, so
122-
* the session's next capture runs the same quiet-window loop a scroll's does: a selector resolved
123-
* from a list still sliding into place taps where its target used to be (#3354). No baseline is
124-
* recorded: the pre-open tree is a different surface, so the loop never claims the open had no effect.
112+
* Called once an app open has published its session. `unobservable` means the launch was still in
113+
* flight or no app process was found when the open returned, so the next capture runs the
114+
* quiet-window loop before a selector resolves against a layout that may still be moving (#3354). No baseline: the pre-open tree is a
115+
* different surface, so the open is never reported as having no effect.
125116
*/
126117
export function markPostOpenStabilization(
127118
session: SessionState,
128119
observation: PostOpenObservation | undefined,
129120
): void {
130121
if (!isApplePlatform(session.device.platform)) return;
131122
if (!supportsPostGestureStabilization(session.device)) return;
132-
if (observation !== POST_OPEN_IN_FLIGHT_OBSERVATION) return;
123+
if (observation !== 'unobservable') return;
133124
session.postGestureStabilization = { action: 'open', positionals: [], markedAt: Date.now() };
134125
}
135126

0 commit comments

Comments
 (0)