Skip to content

test(opencode-agents): make the boot-timeout test robust on slow runners - #212

Open
jeffdupont wants to merge 1 commit into
mainfrom
test/opencode-boot-timeout-flake
Open

jeffdupont wants to merge 1 commit into
mainfrom
test/opencode-boot-timeout-flake

Conversation

@jeffdupont

@jeffdupont jeffdupont commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

TestProcess::test_boot_is_outside_the_caller_timeout gave the stream a 0.2 s timeout after a 0.6 s fake boot. On a slow runner the stream alone can take more than 0.2 s, so the test failed with no bug present (it failed CI on #201).

This raises the fake boot to 2.0 s and the timeout to 1.0 s:

  • The boot is still longer than the timeout, so the test still fails if the boot moves inside the caller's timeout. I checked this locally by wrapping async with handler in the timeout: the test fails.
  • The stream now has 1 s of room instead of 0.2 s.

The test takes about 2.5 s instead of 0.6 s.

🤖 Generated with Claude Code


Note

Overview
Relaxes timing in test_boot_is_outside_the_caller_timeout so it stops failing on slow CI when the stream alone exceeds the old 0.2 s budget.

The fake OpenCode delay_ready goes from 0.6 s → 2.0 s, and the asyncio.timeout around streaming goes from 0.2 s → 1.0 s. Boot is still longer than the timeout, so the test still catches boot work incorrectly running inside the caller’s timeout; the wider window only gives the stream headroom on sluggish runners. Comments in the test document that intent.

Reviewed by Cursor Bugbot for commit 53ea3d2. Bugbot is set up for automated code reviews on this repo. Configure here.

The test gave the stream a 0.2 s timeout after a 0.6 s fake boot. On a
slow runner the stream alone can take longer than 0.2 s, so it failed
without any bug. A 2.0 s boot against a 1.0 s timeout still fails if the
boot moves inside the caller's timeout, and leaves the stream room.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant