Skip to content

test(computer-use): order the stray-line check after an observable marker - #2471

Merged
Astro-Han merged 1 commit into
apache:mainfrom
UncertaintyDeterminesYou4ndMe:test/cu-after-hello-marker
Aug 8, 2026
Merged

test(computer-use): order the stray-line check after an observable marker#2471
Astro-Han merged 1 commit into
apache:mainfrom
UncertaintyDeterminesYou4ndMe:test/cu-after-hello-marker

Conversation

@UncertaintyDeterminesYou4ndMe

Copy link
Copy Markdown
Contributor

Follow-up to the post-merge P3 on #2394 (cc @Astro-Han) — the review was right: the window.list round trip was not yet a causal barrier, because the mock emits AFTER_HELLO from a 30ms timer after the handshake. The round trip could be answered before the stray null was ever written, letting the assertion pass before the behavior under test occurred.

Exactly the suggested shape:

  • the mock logs an after-hello marker once the stray lines are on stdout;
  • the test waits for that marker (bounded waitForRecord), then does the round trip.

With the stray line provably ahead of the response on the same pipe, stream ordering makes the anchor real: the line was processed — and would have thrown in the stdout data listener — before the call returned. No fixed wait restored; test-only, production surface unchanged.

17/17 service tests green across 5 repeated runs after a clean build.

…rker

Post-merge review follow-up on apache#2394: the window.list round trip was claimed
as a causal anchor for the stray `null` line, but the mock emits AFTER_HELLO
from a 30ms timer after the handshake — the round trip could be answered
before the stray line was ever written, and the assertion could pass before
the behavior under test occurred.

The mock now logs an `after-hello` marker once the stray lines are on
stdout, and the test waits for that marker (bounded waitForRecord) before
the round trip. With the line provably ahead of the response on the pipe,
stream ordering makes the anchor real: the stray line was processed — and
would have thrown in the data listener — before the call returned.

17/17 service tests green across 5 repeated runs after a clean build.
@Astro-Han
Astro-Han merged commit f9ee6f0 into apache:main Aug 8, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants