test(cli): loosen flaky header-timeout no-abort case - #11685
Merged
Conversation
The headerTimeout 'does not abort delayed SSE body' test flakes on loaded CI runners: its 50ms header window is too tight, so the in-process server's headers/prelude don't arrive in time and the timeout aborts the stream instead of letting the delayed body through. Bump the headerTimeout to 500ms and the body delay to 1000ms, keeping body > headerTimeout so the assertion stays meaningful (the body lands past the header window but isn't aborted because the timer clears on header arrival). The other timing tests are unchanged since they expect the timeout to fire, so CI slowness makes them more reliable.
marius-kilocode
enabled auto-merge
June 25, 2026 10:21
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (1 files)
Reviewed by gpt-5.4-20260305 · Input: 51.1K · Output: 4.8K · Cached: 404.2K Review guidance: REVIEW.md from base branch |
markijbema
approved these changes
Jun 25, 2026
t7tran
pushed a commit
to t7tran/kilocode
that referenced
this pull request
Aug 14, 2026
test(cli): loosen flaky header-timeout no-abort case
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.
The
provider/header-timeout.test.tssuite intermittently fails one case on CI, and a recent attempt to stabilize it (c319334) didn't fully fix the flake.Problem
The
headerTimeout does not abort delayed SSE body after headers arrivetest (the only case that expects the timeout to not fire) used a 50ms header window with a 250ms delayed body. On a loaded CI runner the in-process server's headers and SSE prelude don't reach the client within 50ms, so the header-timeout timer fires and aborts the stream.result.textthen rejects instead of resolving to"late", and the file fails on both attempts.The other two timing cases (
chunkTimeoutandheaderTimeout aborts when headers don't arrive) want the timeout to fire, so CI slowness makes them more reliable, not less. Only this one race-fails.Change
headerTimeout: 50->500(10x margin for CI jank)250->1000The body still lands well past the header window, so the assertion keeps its meaning: a healthy stream whose body arrives after headers should not be aborted by the header timeout (the timer is cleared on header arrival). Both edited lines are in a shared upstream test file, so they carry
kilocode_changemarkers.Could not run the suite locally (worktree has no node_modules and this sandbox has no network to
bun install); the change is two numeric literals with no typecheck/lint impact.