Skip to content

Apply the slow-platform allowance where the bounds are actually written - #49

Merged
its-janghoon merged 1 commit into
developfrom
feature/slow-platform-at-the-call-sites
Sep 21, 2026
Merged

its-janghoon merged 1 commit into
developfrom
feature/slow-platform-at-the-call-sites

Conversation

@its-janghoon

Copy link
Copy Markdown
Contributor

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.concurrent now 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 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

typecheck        0 errors across the monorepo
packages/redrob  3380 pass / 0 fail
run-process      13/13

…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.
@its-janghoon
its-janghoon merged commit 4b065cb into develop Sep 21, 2026
15 checks passed
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