test(computer-use): order the stray-line check after an observable marker - #2471
Merged
Astro-Han merged 1 commit intoAug 8, 2026
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to the post-merge P3 on #2394 (cc @Astro-Han) — the review was right: the
window.listround trip was not yet a causal barrier, because the mock emitsAFTER_HELLOfrom a 30ms timer after the handshake. The round trip could be answered before the straynullwas ever written, letting the assertion pass before the behavior under test occurred.Exactly the suggested shape:
after-hellomarker once the stray lines are on stdout;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.