Repository navigation
Cursor shim tests: give a shim's first frame time for node to start - #1051
Merged
zeronsh[bot] merged 5 commits intoOct 26, 2026
Merged
Conversation
Every frame these tests read has 5 s to arrive, and a shim's first one also waits for `node` to start, which on Windows CI runners has taken longer than that by itself. In 6 of the last 30 Windows runs on main, the four tests that sort first, which start their shims together, all failed 5.04 to 5.08 s after the test binary started, with `bounded frame: Elapsed(())`. A shim's first frame now gets 30 s; every later frame keeps 5 s. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d-start Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
…d-start Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Audited (test-only change to crates/harness/tests/cursor_shim.rs; no deps, CI, or network changes) and reviewed. A shim's first frame is its ready event, so giving it 30 s and keeping later frames at 5 s waits on readiness with a bounded timeout rather than sleeping. I replaced the Deref/DerefMut passthrough with a small Frames::next_line. Locally on current main, cargo test -p zeron-harness --test cursor_shim passed 9 of 9 runs and clippy is clean for the file. The ui-tests and engine-tests failures in run 40384413323 are unrelated Windows tests in crates/ui and crates/engine.
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.
Windows CI's
harness-app-testsfails in about one run in five, incursor_shim, withbounded frame: Elapsed(())(crates/harness/tests/cursor_shim.rs:192onmain). Every frame these tests read has 5 s to arrive (:190), and a shim's first frame also waits fornodeto start, which on the Windows runners has taken longer than that by itself. A shim's first frame now gets 30 s; every frame after it keeps 5 s. Test-only.What changes
frame()waits 30 s for a shim's first frame and 5 s for each later one (crates/harness/tests/cursor_shim.rs:196-207).Frameswraps a shim's stdout lines and remembers whether its first frame has come (:171-195). Every place that starts a shim returns one (spawn,start_frame, and the engine-death test's parent process). Tests that time a frame themselves still callnext_line()on it.Where it fails
main's Windows push runs:harness-app-testsfailed in 6 of the 30 from October 22 to 25 (a9e6c48, ea3dcc8, 684becf, 0e1b891, fd7d268, 1ec71a3), each time incursor_shim. Providers: a switch to turn native subagents off #1046 hit it twice in a row.cursor_shimstarts. They always include the four tests that sort first, which start their shims together:a_model_switch_names_its_model_from_its_own_send_on,a_reply_that_is_only_a_transport_dump_fails_the_turn,a_send_with_no_update_at_all_is_abandoned_at_the_boundanda_settled_reply_that_never_streamed_is_still_shown. The tests after them pass, or fail the same way 5 s later whilenodeis still slow to start.nodestart on a loaded runner is also whyscripts/ci/nextest.toml:18-24retries an opencode test on Linux.Testing
cargo test --locked -p zeron-harness --features native-fixture --test cursor_shimgives 31 passed, onmain(255c540) and on this branch.nodethat takes 6 s to start (a script first inPATHthat sleeps 6 s, then runs Node):main: 3 passed, 28 failed, all 28 atcursor_shim.rs:192:10withbounded frame: Elapsed(()). The 3 that pass are the one-shotrun_shimtests, which wait up to 10 s for the whole run (cursor_shim.rs:17-28).stress_100_interrupted_sessions_recover_without_losing_history_or_replayingalone starts 201 shims, one after another.Known limits
a_stop_during_startup_retries_is_not_lost(cursor_shim.rs:981) it is the cancelled turn. The test still catches a lost stop: it checks that the catalog was fetched once and that no prompt was sent (cursor_shim.rs:1006-1007).run_shim's 10 s bound is unchanged: none of its three tests failed in those eight logs.Need help on this PR? Tag
@codesmith-botwith what you need.