Files
orca/config
Brennan Benson 93e4407180 fix(build): admit typecheck projects by memory, not core count (#22074)
The typecheck job ran all four tsc projects at once whenever the machine had
more than one core. Two of them are expensive -- tsconfig.node.json peaks at
6.3 GB of tsc heap and tsconfig.tc.web.json at 5.6 GB, measured with
--extendedDiagnostics -- so together they reach ~14.5 GB on a 16 GB runner.
Past that the runner agent is killed mid-check, and the job reports "The runner
has received a shutdown signal" with an orphaned tsc, not a type error.

Attempt-1 typecheck failures were 0 across Sept 11-17 and then 5-26% per day
from Sept 18, with no change to the scheduler in that window. What moved was the
codebase: src/main grew 23% and src/renderer 8.5% between Sept 1 and Sept 21,
which is what pushed the pair over the line.

Projects now carry their measured peak heap and are admitted heaviest-first
while the batch fits both a memory budget and the core count, so the two
expensive projects never share a runner. On a 16 GB / 4-core runner that plans
node+cli+mobile-web (10 GiB) then web (6 GiB), measured at 8.6 GB peak instead
of 14.5 GB. A roomy machine still runs all four together, so local typecheck is
unchanged. A project larger than the whole budget still runs alone rather than
producing an empty batch.

The runner body moves behind the standard direct-invocation guard so the
admission planner can be imported and tested without spawning tsc.
2026-09-21 14:59:31 -07:00
..