perf(setup): speed up conductor setup and make it rerun-safe

Drop the duplicate `pnpm run build` (artifacts:build already builds every
package). Run package builds in parallel topology via one recursive pnpm
invocation. Enable incremental tsc and keep the cli's tsbuildinfo outside
its dist (moved the dist wipe into a separate `clean` script). Run the
final `ktx status` doctor from a temp dir so it stops walking up into a
parent ktx.yaml and failing the script.

Conductor setup drops from ~26s to ~9.8s cold and ~4.4s warm.
This commit is contained in:
Andrey Avtomonov 2026-05-15 11:53:25 +02:00
parent b759a4a286
commit 03f4e32143
7 changed files with 38 additions and 59 deletions

View file

@ -27,9 +27,9 @@ describe('Conductor workspace scripts', () => {
assert.match(setupScript, /uv sync --all-packages --all-groups/);
assert.match(setupScript, /pnpm install --frozen-lockfile --prefer-offline/);
assert.match(setupScript, /pnpm run native:rebuild/);
assert.match(setupScript, /pnpm run build/);
assert.match(setupScript, /pnpm run artifacts:build/);
assert.match(setupScript, /packages\/cli\/dist\/bin\.js status --no-input/);
assert.match(setupScript, /packages\/cli\/dist\/bin\.js/);
assert.match(setupScript, /status --no-input/);
assert.doesNotMatch(setupScript, /scripts\/conductor\//);
});