Skip to content

Commit c453e0e

Browse files
committed
test(replay): carry the hoisted open hint in the shell-text rewrite fixture
The production cause arrives with the open-route hint already hoisted to the top level, so the fixture must too: a rewrite that only filled a missing hint would have passed the hint-free shape.
1 parent 22889e7 commit c453e0e

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { test, expect } from 'vitest';
22
import {
33
ANDROID_SHELL_TEXT_UNSUPPORTED_REASON,
44
ANDROID_TEST_IME_FLOW_HINT,
5+
ANDROID_TEST_IME_OPEN_HINT,
56
} from '@agent-device/contracts/android-text-input';
67
import {
78
buildReplayDivergenceFailureResponseFromDescriptor,
@@ -80,13 +81,16 @@ test('a replay divergence carries the readiness evidence of an exhausted target
8081

8182
// #2997: the Android platform states `open --test-ime` because it sees one dispatched
8283
// session-open. On this surface that advice is unactionable — a flow caller never runs
83-
// `open` — so the cause's hint is rewritten off the typed reason, never off the message.
84+
// `open` — so the cause's hint is replaced off the typed reason, never off the message.
85+
// The fixture carries the production shape: the cause arrives WITH the open-route hint
86+
// already hoisted, so a rewrite that only fills a missing hint would still fail here.
8487
test('an Android shell-text cause gets the flow-owned --test-ime recovery', () => {
8588
const cause = hoistReplayFailureCauseDiagnosticMeta({
8689
code: 'COMMAND_FAILED',
8790
message:
8891
'Android text input requires provider-native text injection or the bundled test IME helper for non-ASCII/control characters; the adb-shell fallback supports ASCII text only.',
89-
details: { reason: ANDROID_SHELL_TEXT_UNSUPPORTED_REASON },
92+
hint: ANDROID_TEST_IME_OPEN_HINT,
93+
details: { reason: ANDROID_SHELL_TEXT_UNSUPPORTED_REASON, hint: ANDROID_TEST_IME_OPEN_HINT },
9094
});
9195

9296
expect(cause.hint).toBe(ANDROID_TEST_IME_FLOW_HINT);

0 commit comments

Comments
 (0)