You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
iOS tests check command limits on a spawn timeoutMs that nothing reads, which keeps it in spawn's options type #1984
iOS tests pin command limits through the timeoutMs option runCommand passes to spawn (src/drivers/ios/command-run.ts:26), which the Node runner never reads, so they cannot see whether the limit holds. Removing that dead option fails 41 tests in 9 files under src/drivers/ios (boot-deadline, index, index-device-set, index-provenance-root, index-save-source-lifecycle, index-seed-provision, index-slim-mode, physical, physical-presence). The real limit is the clock timer at command-run.ts:43; a test that advances the clock proves it.
While those tests read it, timeoutMs cannot leave spawn's options type (src/ports/process-runner-types.ts:2), so the compiler cannot refuse a call like #1979's.
Seen on: fakes (scripted runner, fake clock) and tsc.
On bug/1984-repro:
"a hung … is ended by the clock at … ms and not 1 ms before, and is spawned with no limit of its own": 12 cases in src/drivers/ios/command-limits.test.ts and physical-files-and-limits.test.ts. Only the last clause fails.
src/ports/process-runner-types.test.ts: "a spawn given timeoutMs does not compile, nor does a run without it; a run with it and a spawn without it do".
$ pnpm exec vitest run --project unit <the three files>
AssertionError: expected { timeoutMs: 30000 } to deeply equal {} (12 cases)
AssertionError: expected [ 'line 4: TS2741' ] to deeply equal [ 'line 3: TS2353', 'line 4: TS2741' ]
Tests 13 failed | 7 passed
Root cause
Defect, in types and tests; the limits themselves hold. spawn takes the options type of run (src/ports/process-runner-types.ts:162), against its own comment, so command-run.ts:26 compiles and tests read what nothing uses. The issue's 41 tests in 9 files are confirmed, but 13 of them also advance the clock:
command-run.ts:43 mutated, src/drivers/ios run each time:
timer never fires: 28 of the 41 still pass
both simctl lists, delete x1000, x0.5: no test fails
listapps, print-disabled, devicectl list/apps/uninstall x0.5: no test fails
type spawn's options Omit<ProcessRunOptions, "timeoutMs">;
drop the argument in runCommand;
in the nine files, drop the option or expect {}; delete index-seed-provision.test.ts's "boots the seed within" (two cases here replace it).
The compiler then refuses exactly two calls: command-run.ts:26 and process-supervisor.ts:102 (#1979).
fix tried on origin/main, then restored (the supervisor's option dropped, only to compile)
src/drivers + src/ports: 2022 passed | 60 skipped; test:changed: 7567 passed | 61 skipped; typecheck clean
with the fix, timer +1 ms or -1 ms: all 12 clock cases fail
Alternatives rejected
spawn honours timeoutMs: contradicts the ports manual.
Remove it from ProcessRunOptions: ten more errors, in Android tests.
Drop the assertions only: those limits stay unproven.
Activity
V3RON commentedon Nov 30, 2026
Reproduction
Seen on: fakes (scripted runner, fake clock) and
tsc.On
bug/1984-repro:src/drivers/ios/command-limits.test.tsandphysical-files-and-limits.test.ts. Only the last clause fails.src/ports/process-runner-types.test.ts: "a spawn given timeoutMs does not compile, nor does a run without it; a run with it and a spawn without it do".Root cause
Defect, in types and tests; the limits themselves hold.
spawntakes the options type ofrun(src/ports/process-runner-types.ts:162), against its own comment, socommand-run.ts:26compiles and tests read what nothing uses. The issue's 41 tests in 9 files are confirmed, but 13 of them also advance the clock:Simplest fix
After #1979 and #1980:
spawn's optionsOmit<ProcessRunOptions, "timeoutMs">;runCommand;{}; deleteindex-seed-provision.test.ts's "boots the seed within" (two cases here replace it).The compiler then refuses exactly two calls:
command-run.ts:26andprocess-supervisor.ts:102(#1979).Alternatives rejected
spawnhonourstimeoutMs: contradicts the ports manual.ProcessRunOptions: ten more errors, in Android tests.Risk
tsc(about 0.5 s);expectTypeOfcould replace it. It was not used because the commit hook refuses a failing typecheck.Fast track
Written by an agent.