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
CLI tests: parallel test files rebuild dist-client while others run it #192
scripts/run-tests.mjs runs every test file with one node --test call, so the files run in parallel processes. Four of them compile the client into the same directory before they start:
tests/client/check-plan-cli.test.ts (before)
tests/client/plan-cli.test.ts (before)
tests/client/mcp.test.ts (before)
tests/client/cli-help.test.ts (inside the test)
Each runs tsc -p tsconfig.client.json, which rewrites every file in dist-client/. When one file's build overlaps with another file's run of dist-client/src/client/cli.js, that CLI loads a half-written module and exits with a syntax error. A full run on main failed this way:
✖ reports all three failure groups and exits nonzero for misses or unattributed failures
AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
+ 'file:///.../packages/diffci-cli/dist-client/src/preflight/fingerprint.js:58\n' +
+ ' normalizeErrorText(input.errorText).slice(0, 200), // bounded - a fingerprint is an \n' +
+ 'SyntaxError: Unexpected end of input\n' +
The next run of the same commit passed that test, so the failure depends on timing.
What you expected
dist-client is compiled at most once for a given source state during a test run, and no test rewrites it while another test is executing it.
Regression test
The linked pull request moves the build into one shared helper (tests/helpers/build-client.ts) that takes a lock and skips the build when dist-client is newer than every source file. tests/client/build-client.test.ts fails on main (it lists the four files above that still compile dist-client themselves) and passes with the fix.
Activity
ci: re-run (Merge gate smoke hit the dist-client rebuild race, DiffCI…
ci: re-run checks (check-plan-cli dist-client race, DiffCI#192)
ci: re-run checks after the Merge gate smoke dist-client race (DiffCI…
fix(rust): treat quoted keys and inline tables in Cargo config as bui…
test(cli): build dist-client once instead of in every test file (Diff…