Apply the slow-platform allowance where the bounds are actually written - #49
Merged
Merged
Conversation
…ually written
The first version of this fix scaled only the DEFAULT child timeout, and the very
test that was flaking passes its own `timeoutMs: 30_000`. So it stayed pinned to
thirty seconds and failed again on the next Windows run, at 30872ms -- which is
how I know the allowance was not reaching it.
Two gaps, both now closed by construction rather than by remembering:
- `cliIt.concurrent` treats a caller's test timeout as a FLOOR, not a ceiling.
Thirty-seven call sites pass `60_000`, comfortably above the old fixed 30s
child bound and BELOW the Windows one, so honouring them literally
reintroduced exactly the drift the derived constants exist to prevent. One
clamp fixes all of them; editing thirty-seven call sites would not have kept
the thirty-eighth honest.
- `slowPlatform(ms)` is exported for the call sites that genuinely need their
own bound, so the intent stays readable at the call site while the correction
is applied for them.
The duration assertion beside one of those bounds is scaled WITH it. Its claim is
that the CLI exits promptly rather than being killed by the timeout, and a
duration pinned to a base figure while the bound moves tests something else.
This was referenced Sep 21, 2026
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 #47, which was incomplete — and the next Windows run said so.
What #47 missed
It scaled only the default child timeout. The very test that was flaking passes its own
timeoutMs: 30_000, so it stayed pinned to thirty seconds and failed again at 30872ms on the run that already contained the fix. That number is the evidence: with the allowance in effect the bound would have been 90s.Two gaps, both closed by construction
cliIt.concurrentnow treats a caller's test timeout as a FLOOR, not a ceiling. Thirty-seven call sites pass60_000— comfortably above the old fixed 30s child bound and below the Windows one, so honouring them literally reintroduced exactly the drift the derived constants exist to prevent. One clamp fixes all thirty-seven; editing them individually would not have kept the thirty-eighth honest.slowPlatform(ms)is exported for the call sites that genuinely need their own bound, so intent stays readable while the correction is applied for them.The duration assertion beside one of those bounds is scaled with it — its claim is that the CLI exits promptly rather than being killed, and a duration pinned to a base figure while the bound moves tests something else.
Still a mitigation
Worth repeating from #47: the platform factor responds to a timeout, not to a diagnosed cause. What #47 genuinely fixed is that the next occurrence will report what the child printed — both streams were being discarded on the timeout path at two separate layers. If it recurs with output preserved, that output is the diagnosis and this factor should be revisited against it.
Gates