Skip to content

Commit 3d8da45

Browse files
committed
chore(interaction): remove retired readiness forwarding
1 parent fc224bc commit 3d8da45

5 files changed

Lines changed: 4 additions & 64 deletions

File tree

‎packages/daemon/src/execution/interaction/internal/__tests__/interaction-touch-response.test.ts‎

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -85,20 +85,17 @@ test('commandless longpress response omits internal interaction diagnostics', ()
8585
).toEqual({ completedSteps: 1 });
8686
});
8787

88-
function selectorResult(readiness?: { polls: number; waitedMs: number }): PressCommandResult {
88+
function selectorResult(): PressCommandResult {
8989
return {
9090
kind: 'selector',
9191
point: { x: 10, y: 20 },
9292
target: { kind: 'selector', selector: 'label=Continue' },
9393
node: { ref: 'e1', index: 0, type: 'Button', label: 'Continue' },
9494
selectorChain: ['label=Continue'],
9595
warning: 'earlier warning',
96-
...(readiness ? { readiness } : {}),
9796
};
9897
}
9998

100-
const WAITED_SELECTOR_RESULT = selectorResult({ polls: 3, waitedMs: 400 });
101-
10299
test.each([false, true])('selector-touch observation after retirement=%s', async (retired) => {
103100
const sessionStore = makeSessionStore();
104101
const address = 'cwd:selector-touch-response:default';
@@ -252,25 +249,14 @@ test.each([
252249
},
253250
);
254251

255-
test('the response builder reports the resolved wait and keeps the prior warning', () => {
256-
const { responseData, result } = buildInteractionResponseData({
257-
source: { kind: 'runtime', result: WAITED_SELECTOR_RESULT },
258-
referenceFrame: undefined,
259-
staleRefsWarning: 'stale refs',
260-
});
261-
262-
expect(responseData.readiness).toEqual({ polls: 3, waitedMs: 400 });
263-
expect(responseData.warning).toBe('earlier warning stale refs');
264-
expect(result.readiness).toBeUndefined();
265-
});
266-
267-
test('the response builder omits readiness when nothing waited', () => {
252+
test('the response builder keeps the prior warning', () => {
268253
const { responseData } = buildInteractionResponseData({
269254
source: { kind: 'runtime', result: selectorResult() },
270255
referenceFrame: undefined,
256+
staleRefsWarning: 'stale refs',
271257
});
272258

273-
expect('readiness' in responseData).toBe(false);
259+
expect(responseData.warning).toBe('earlier warning stale refs');
274260
});
275261

276262
test('an already retired coordinate touch skips its frame probe without a warning', async () => {

‎packages/daemon/src/execution/interaction/internal/interaction-touch-response.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,6 @@ export function buildInteractionResponseData(params: {
236236
visualization.warning = warning;
237237
responseData.warning = warning;
238238
}
239-
if ('readiness' in result && result.readiness) responseData.readiness = result.readiness;
240239
return { result: visualization, responseData, ...recordedTargetCapture(result) };
241240
}
242241

‎packages/replay-port/src/daemon-port/__tests__/session-replay-runtime-failure-response.test.ts‎

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -52,30 +52,6 @@ test('native replay failure metadata keeps machine fields and daemon-owned paths
5252
expect(response.error.details).not.toHaveProperty('reas<var:MODE>');
5353
});
5454

55-
test('a replay divergence carries the readiness evidence of an exhausted target wait', () => {
56-
const readiness = { polls: 11, waitedMs: 2_004, end: 'expired' };
57-
const response = buildReplayDivergenceFailureResponseFromDescriptor({
58-
error: {
59-
code: 'COMMAND_FAILED',
60-
message: 'Selector did not match',
61-
details: { reason: 'selector_not_found', readiness },
62-
},
63-
actionLabel: 'press label=Continue',
64-
action: 'press',
65-
positionals: ['label=Continue'],
66-
step: 3,
67-
replayPath: '/tmp/flows/checkout.ad',
68-
artifactPaths: [],
69-
divergence: {},
70-
scrubVars: [],
71-
});
72-
73-
expect(response.ok).toBe(false);
74-
if (response.ok) return;
75-
expect(response.error.code).toBe('REPLAY_DIVERGENCE');
76-
expect(response.error.details).toMatchObject({ reason: 'selector_not_found', readiness });
77-
});
78-
7955
// #2997: the Android platform states `open --test-ime` because it sees one dispatched
8056
// session-open. On this surface that advice is unactionable — a flow caller never runs
8157
// `open` — so the cause's hint is replaced off the typed reason, never off the message.

‎packages/replay-port/src/daemon-port/session-replay-runtime-failure-response.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,6 @@ function readStringDetail(
141141
}
142142

143143
const SAFE_CAUSE_DETAIL_KEYS = [
144-
'readiness',
145144
'reason',
146145
'recovery',
147146
'retriable',

‎src/mcp/__tests__/command-tools-readiness.test.ts‎

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)