mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-30 13:20:54 +01:00
The first measured run of the overlapped Runner build showed cargo slowing from 36s to 55s while the TypeScript steps competed for the runner's four cores, so the overlap saved nothing (runner build 55.7s against 52-54s on like-for-like master runs). The steps that run while cargo compiles now start at below-normal priority (os.setPriority, inherited by the nested pnpm, tsc and node), so cargo keeps the cores it would have had alone and the steps fill the single-threaded tail of codegen and linking. The timing line gains steps_priority so the next run shows whether it applied. Review findings, all valid: - A standalone pnpm points npm_execpath at a native executable; it is now run directly, and only a .cjs/.mjs/.js entry goes through Node, the same rule as the CLI's resolvePnpmInstallInvocation. - The start-order test raced: the first step's stand-in logged its start before waiting for cargo's marker. Stand-ins now wait before logging, and the test also asserts the parent's own launch order. - The stop grace timer is cleared once cargo exits, so a build that failed early no longer keeps the process alive for five seconds. Tests: 8 node:test cases (was 7), ten consecutive runs clean; each of the three fixes has a case that fails against the previous code. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>