@smoothbricks/nx-plugin 0.6.3-0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +159 -121
- package/dist/.build-inputs.json +25 -20
- package/dist/bin/smoo-nx-go-test-build.d.ts +3 -0
- package/dist/bin/smoo-nx-go-test-build.d.ts.map +1 -0
- package/dist/bin/smoo-nx-go-test-build.js +79 -0
- package/dist/bin/smoo-nx-go-test-run.d.ts +3 -0
- package/dist/bin/smoo-nx-go-test-run.d.ts.map +1 -0
- package/dist/bin/smoo-nx-go-test-run.js +129 -0
- package/dist/bounded-test-policy.d.ts +1 -1
- package/dist/bounded-test-policy.d.ts.map +1 -1
- package/dist/bounded-test-policy.js +9 -8
- package/dist/cargo-workspace.d.ts +10 -20
- package/dist/cargo-workspace.d.ts.map +1 -1
- package/dist/cargo-workspace.js +12 -22
- package/dist/cross-check-policy.d.ts +2 -2
- package/dist/cross-check-policy.js +2 -2
- package/dist/deploy-policy.d.ts +6 -0
- package/dist/deploy-policy.d.ts.map +1 -1
- package/dist/deploy-policy.js +11 -0
- package/dist/executors/bounded-exec/executor.d.ts.map +1 -1
- package/dist/executors/bounded-exec/executor.js +49 -37
- package/dist/executors/bounded-exec/mbx-pool.d.ts +39 -10
- package/dist/executors/bounded-exec/mbx-pool.d.ts.map +1 -1
- package/dist/executors/bounded-exec/mbx-pool.js +78 -24
- package/dist/executors/bounded-exec/progress.js +5 -5
- package/dist/executors/bounded-exec/runner-sizing.d.ts +40 -2
- package/dist/executors/bounded-exec/runner-sizing.d.ts.map +1 -1
- package/dist/executors/bounded-exec/runner-sizing.js +55 -4
- package/dist/executors/bounded-exec/runtime-pin.js +1 -1
- package/dist/executors/bounded-exec/verdict.d.ts +6 -0
- package/dist/executors/bounded-exec/verdict.d.ts.map +1 -1
- package/dist/executors/bounded-exec/verdict.js +6 -0
- package/dist/executors/wrangler-deploy/deploy-hash.d.ts +10 -0
- package/dist/executors/wrangler-deploy/deploy-hash.d.ts.map +1 -0
- package/dist/executors/wrangler-deploy/deploy-hash.js +14 -0
- package/dist/executors/wrangler-deploy/executor.d.ts +24 -0
- package/dist/executors/wrangler-deploy/executor.d.ts.map +1 -0
- package/dist/executors/wrangler-deploy/executor.js +43 -0
- package/dist/executors/wrangler-deploy/hasher.d.ts +27 -0
- package/dist/executors/wrangler-deploy/hasher.d.ts.map +1 -0
- package/dist/executors/wrangler-deploy/hasher.js +90 -0
- package/dist/executors/wrangler-deploy/schema.d.ts +5 -0
- package/dist/executors/wrangler-deploy/schema.d.ts.map +1 -0
- package/dist/go-tests.d.ts +30 -0
- package/dist/go-tests.d.ts.map +1 -0
- package/dist/go-tests.js +43 -0
- package/dist/index.d.ts +9 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +271 -230
- package/dist/managed-files/files.d.ts.map +1 -1
- package/dist/managed-files/files.js +5 -0
- package/dist/process-group.js +2 -2
- package/dist/runtime-input-policy.d.ts +3 -3
- package/dist/runtime-input-policy.js +3 -3
- package/dist/test-timings.d.ts +23 -4
- package/dist/test-timings.d.ts.map +1 -1
- package/dist/test-timings.js +72 -12
- package/dist/version-actions.cjs +10 -11
- package/dist/version-actions.d.cts.map +1 -1
- package/dist/workspace-config-policy.d.ts.map +1 -1
- package/dist/workspace-config-policy.js +17 -22
- package/dist/workspace-manifest.js +3 -3
- package/executors.json +6 -5
- package/managed/raw/patches/nx@23.2.1.patch +118 -24
- package/managed/raw/patches/ttsc@0.34.1.patch +64 -0
- package/managed/raw/tooling/direnv/developer-links.ts +121 -51
- package/managed/raw/tooling/direnv/installed-bun-links.ts +7 -6
- package/managed/raw/tooling/direnv/setup-environment.ts +14 -4
- package/managed/raw/tooling/git-hooks/pinned-revisions-served.ts +252 -0
- package/managed/raw/tooling/git-hooks/pre-push.sh +34 -32
- package/package.json +58 -8
- package/runtime/nx-publish/.build-inputs.json +11 -0
- package/runtime-input.sh +50 -23
- package/src/bin/smoo-nx-go-test-build.ts +83 -0
- package/src/bin/smoo-nx-go-test-run.ts +140 -0
- package/src/bounded-test-policy.ts +9 -8
- package/src/cargo-workspace.ts +12 -24
- package/src/cross-check-policy.ts +2 -2
- package/src/deploy-policy.ts +11 -0
- package/src/executors/bounded-exec/executor.ts +61 -42
- package/src/executors/bounded-exec/mbx-pool.ts +97 -33
- package/src/executors/bounded-exec/progress.ts +5 -5
- package/src/executors/bounded-exec/runner-sizing.ts +73 -7
- package/src/executors/bounded-exec/runtime-pin.ts +1 -1
- package/src/executors/bounded-exec/verdict.ts +7 -0
- package/src/executors/wrangler-deploy/deploy-hash.ts +15 -0
- package/src/executors/wrangler-deploy/executor.ts +63 -0
- package/src/executors/wrangler-deploy/hasher.ts +111 -0
- package/src/executors/wrangler-deploy/schema.json +16 -0
- package/src/executors/wrangler-deploy/schema.ts +4 -0
- package/src/go-tests.ts +67 -0
- package/src/index.ts +294 -253
- package/src/managed-files/files.ts +5 -0
- package/src/process-group.ts +2 -2
- package/src/runtime-input-policy.ts +3 -3
- package/src/test-timings.ts +72 -14
- package/src/version-actions.cts +10 -11
- package/src/workspace-config-policy.ts +20 -29
- package/src/workspace-manifest.ts +3 -3
- package/test-timings.json +131 -130
- package/dist/executors/clean-outputs/executor.d.ts +0 -26
- package/dist/executors/clean-outputs/executor.d.ts.map +0 -1
- package/dist/executors/clean-outputs/executor.js +0 -83
- package/dist/executors/clean-outputs/schema.d.ts +0 -4
- package/dist/executors/clean-outputs/schema.d.ts.map +0 -1
- package/src/executors/clean-outputs/executor.ts +0 -131
- package/src/executors/clean-outputs/schema.json +0 -15
- package/src/executors/clean-outputs/schema.ts +0 -3
- /package/dist/executors/{clean-outputs → wrangler-deploy}/schema.js +0 -0
package/README.md
CHANGED
|
@@ -57,16 +57,19 @@ with `tsconfig.lib.json` receives transformer-aware `tsc-js` and native `typeche
|
|
|
57
57
|
- `test-watch` from explicit `test` commands for Bun and Vitest packages
|
|
58
58
|
- Cargo workspace targets from a neighboring workspace-root `Cargo.toml`
|
|
59
59
|
- aggregate `build` and `lint` targets
|
|
60
|
-
-
|
|
61
|
-
|
|
62
|
-
-
|
|
63
|
-
`smoo wrangler deploy-stage --stage
|
|
60
|
+
- a cached `shard-timings` check, which `lint` depends on, beside `bun test` targets sharded with `--shard` and balanced
|
|
61
|
+
with `--timings`
|
|
62
|
+
- a cached `deploy` for a PRIVATE project with a wrangler manifest: the `wrangler-deploy` executor, which runs
|
|
63
|
+
`smoo wrangler deploy-stage --stage <stage>`
|
|
64
64
|
|
|
65
65
|
The deploy is one target that takes whichever stage it is given, never a configuration per stage: pull-request stages
|
|
66
66
|
are `prN` for unbounded N, so `nx run <project>:deploy --stage=pr42` has to work for a stage no enumeration could list.
|
|
67
|
-
It is
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
It is cached on what it uploads (the project's files and its build half's output) and the stage, but the executor's
|
|
68
|
+
hasher answers that hash only while the stage serves the version tagged with it. Any other live version, or none it can
|
|
69
|
+
read, adds a nonce to the hash, so the run misses and deploys, still tagging the artifact's version; a rollback is never
|
|
70
|
+
answered from the cache. Hashing the live tag in instead would never converge, since the version is tagged with the
|
|
71
|
+
hash. Declaring `deploy` locally overrides only the properties it names, so a project adds cross-project ordering with
|
|
72
|
+
`"dependsOn": ["...", "backend:deploy"]` and keeps the inferred executor; a project that declares `deploy-build` gets
|
|
70
73
|
that edge instead of `build`, and the plugin caches that half without inventing its command.
|
|
71
74
|
|
|
72
75
|
`private: true` is half the detection, because a wrangler manifest alone does not mean deployable: a published library
|
|
@@ -219,10 +222,10 @@ last 60 lines before fixture retirement removes them. The record-change and rest
|
|
|
219
222
|
|
|
220
223
|
The plugin discovers Cargo workspaces beside Nx project manifests at any depth:
|
|
221
224
|
|
|
222
|
-
- **Workspace owner:** the project beside a workspace `Cargo.toml` owns one `cargo-fetch`, `cargo-test-
|
|
223
|
-
`cargo-lint`, cross-check, mutation
|
|
224
|
-
|
|
225
|
-
|
|
225
|
+
- **Workspace owner:** the project beside a workspace `Cargo.toml` owns one `cargo-fetch`, `cargo-test-build`,
|
|
226
|
+
`cargo-lint`, cross-check, mutation and bench target. Its `cargo-lint` and `cargo-test` aggregates reach all workspace
|
|
227
|
+
crates, including a root `[package]`; `cargo-test` is the ordinary suite, and the project's `test` also reaches the
|
|
228
|
+
serial test groups (below).
|
|
226
229
|
- **Crate owner:** the deepest Nx project directory containing a crate owns `cargo-test-<crate>` targets. Its
|
|
227
230
|
`cargo-lint` delegates to the workspace owner's one verdict, and `lint` never depends on the workspace test suite.
|
|
228
231
|
Projects can own multiple crates. A nested independent workspace has its own prerequisites and does not inherit those
|
|
@@ -231,7 +234,7 @@ The plugin discovers Cargo workspaces beside Nx project manifests at any depth:
|
|
|
231
234
|
`cargo --frozen clippy --workspace --all-targets --target-dir target/cargo-lint --config 'build.warnings="deny"'`
|
|
232
235
|
cover every member. Clippy of a crate is a check build of its whole closure, so a target directory per crate rebuilt
|
|
233
236
|
every shared dependency once per crate — 49 closures and 11 GiB on one repository — and no per-crate cache hit repaid
|
|
234
|
-
it. Clippy writes its own `target/cargo-lint`, so the
|
|
237
|
+
it. Clippy writes its own `target/cargo-lint`, so the test build, the Wasm and N-API builds and every other dev build
|
|
235
238
|
never queue behind a workspace-wide check on Cargo's build-directory lock. The price is that clippy compiles its own
|
|
236
239
|
host units (build scripts, proc-macros) once per directory. `cargo-lint-cross` keeps `target/cargo-lint-cross` for the
|
|
237
240
|
same lock reason: a foreign triple's units are distinct anyway, and its own lock keeps the cross check from queueing
|
|
@@ -242,7 +245,7 @@ The plugin discovers Cargo workspaces beside Nx project manifests at any depth:
|
|
|
242
245
|
lock serializes the invocations that share a directory.
|
|
243
246
|
- **Retention:** Cargo never deletes a unit generation a later build superseded, so a busy checkout's target directory
|
|
244
247
|
only grows. After each Nx run that executed a Cargo producer (an inferred target that builds, checks or tests into the
|
|
245
|
-
target directory, marked by its `cargoProducer` metadata: `cargo-test-
|
|
248
|
+
target directory, marked by its `cargoProducer` metadata: `cargo-test-build`, `cargo-test`, `cargo-lint`,
|
|
246
249
|
`cargo-lint-cross`, mutation, bench, and the napi and wasm builds), the plugin's `postTasksExecution` runs its Cargo
|
|
247
250
|
retention hook, which starts a pass of `@smoothbricks/cargo-retain` for each Cargo workspace that is due for
|
|
248
251
|
maintenance, in a process of its own (below). In an mbx project, whose canonical environment names `MBX_CACHE_DIR`
|
|
@@ -298,28 +301,29 @@ The plugin discovers Cargo workspaces beside Nx project manifests at any depth:
|
|
|
298
301
|
`foreign-root`. A pre-created target need not carry Cargo's optional backup tag; a present but invalid tag still
|
|
299
302
|
refuses the pass. Every pass still reads the current fingerprint graph. The locked scan reuses directory-entry types
|
|
300
303
|
and reads its small metadata files synchronously, avoiding duplicate stats and one asynchronous dispatch per tiny
|
|
301
|
-
file; it does not walk retained artifact contents or reuse an earlier graph that could miss in-place recompiles.
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
304
|
+
file; it does not walk retained artifact contents or reuse an earlier graph that could miss in-place recompiles. That
|
|
305
|
+
package's `smoo-nx-cargo-retain [cargo-workspace-dir]` previews the same selection, nested roots included, without
|
|
306
|
+
changing anything. It is a tool run by hand, not an Nx target: its verdict is about this machine's disk, not the
|
|
307
|
+
commit, and no input could key it. Each profile's `incremental/<crate>-<id>/` directories go in the same pass: rustc
|
|
308
|
+
keeps one per build variant and never removes the one a feature, profile or flag change superseded. One is kept while
|
|
309
|
+
its newest finished session started inside the compile window (`invoked.timestamp` to the hash file's last write) of a
|
|
310
|
+
kept unit of the same crate, while it started within the recent-use window, or while the directory holds an unfinished
|
|
311
|
+
or unreadable session. The split-debuginfo objects rustc keeps inside current generations (rust-lang/rust#161824) are
|
|
312
|
+
not reclaimed, so a target directory is not bounded by them. Empty fingerprint hashes are kept as unfinished
|
|
313
|
+
compilations. The preservation proof covers Cargo's current unit and dependency records, not every debug reference in
|
|
314
|
+
copied binaries or other checkouts. In particular, a binary copied up before a failed link can outlive the generation
|
|
315
|
+
its debug map names; this pass does not establish that machine-wide debug closure.
|
|
312
316
|
- **Scheduling:** inference never throttles Nx. It sets no `parallelism: false` or `parallel: false`, no cap, and no
|
|
313
317
|
edge whose only purpose is keeping two cargo writers off one `target/`: Cargo owns that lock, and a second process
|
|
314
|
-
waits inside cargo. An edge states a real consumer — fetch before frozen cargo, the
|
|
318
|
+
waits inside cargo. An edge states a real consumer — fetch before frozen cargo, the test build before the runners,
|
|
315
319
|
`napi-debug` before the tests that load its addon. A producer and its consumer inside one task are one `&&` command
|
|
316
|
-
(`mkdir` then the
|
|
320
|
+
(`mkdir` then the test build, `cargo build` then `wasm-bindgen`); independent commands (`cargo fmt` and clippy,
|
|
317
321
|
per-manifest `cargo fetch`, Biome and ESLint) stay in a `commands` list that Nx runs side by side.
|
|
318
322
|
- **Overrides:** normal Nx merging applies. Explicit `nx.targets` fields replace inferred fields, while omitted fields
|
|
319
323
|
retain their inferred base. Use `"dependsOn": ["...", "extra"]` to preserve inferred prerequisites when adding an
|
|
320
324
|
edge; replacing the array makes its author responsible for fetching before frozen Cargo commands and producing the
|
|
321
|
-
|
|
322
|
-
runners' owning project targets, so a cold checkout reaches it before
|
|
325
|
+
test build before any runner consumes it. This repository also declares the test build explicitly in both APFS
|
|
326
|
+
runners' owning project targets, so a cold checkout reaches it before their sweep runs its executable.
|
|
323
327
|
|
|
324
328
|
Member and exclude patterns may use `*` and `?` in any path segment (for example, `packages/*/crates/*`). Unsupported
|
|
325
329
|
patterns and member patterns that match no directory fail graph construction instead of silently omitting crates.
|
|
@@ -345,8 +349,8 @@ layout. Declarations interpolate the same options the commands use, so their out
|
|
|
345
349
|
together. The host-resolved `cli-native` and `napi-native` aggregates delegate to the existing platform producers and
|
|
346
350
|
declare no outputs of their own. Their `production` configuration forwards that same selection to the host producer. A
|
|
347
351
|
test that executes the CLI or loads the ordinary platform addon names those producers; tests using the explicit test
|
|
348
|
-
addon still name `napi-debug`. The land host runs `cowshed:cli-native:production` then the
|
|
349
|
-
`cowshed:release-check
|
|
352
|
+
addon still name `napi-debug`. The land host runs `cowshed:cli-native:production` then the dependency-free
|
|
353
|
+
`cowshed:release-check`, cached on a runtime digest of the shipping bytes it inspects, never on a development output.
|
|
350
354
|
|
|
351
355
|
After the fast-forward, main's output restoration explicitly requests `build`, `cli-native`, and `napi-native`. The
|
|
352
356
|
normal build remains JS/dependency-only; this post-land seam restores the source-selected host CLI/addon and their input
|
|
@@ -365,17 +369,22 @@ Rust LMAO's opt-in source-revision contract is defined in
|
|
|
365
369
|
targets declare `{ "env": "LMAO_GIT_REVISION" }` as an input. Default dev/test runs leave it unset; publishing jobs set
|
|
366
370
|
it to the dispatch commit, so those builds include the explicit revision in their key without making dev runs
|
|
367
371
|
commit-keyed. The `production` configuration selects the shipping profile; it does not discover a Git revision. The root
|
|
368
|
-
workspace's cached
|
|
372
|
+
workspace's cached test build hashes that variable too, because it compiles the LMAO test binaries.
|
|
369
373
|
|
|
370
374
|
### Cargo cache boundaries
|
|
371
375
|
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
376
|
+
Every inferred cargo target that runs work is cached, `cargo-fetch` included. Its download lands in `CARGO_HOME`,
|
|
377
|
+
outside Nx outputs, so its key names the registry's state instead: the manifests, the lock and the Cargo configuration
|
|
378
|
+
it reads, and a runtime input that is `fetched` when an offline `cargo fetch --locked` of each manifest succeeds. A
|
|
379
|
+
registry missing a locked crate gives a value of its own run, which no cached run matches, so the fetch runs; a complete
|
|
380
|
+
one makes an unchanged lock a cache hit. `cargo-test-build` is the one cached cargo build, and it is the step that
|
|
381
|
+
compiles the test binaries ahead of the bounded runners; there is no separate `cargo test --no-run` warm-up, since it
|
|
382
|
+
compiled the same units the test build does. Cargo's own incremental cache avoids recompiling unchanged code. Nx never
|
|
383
|
+
restores or collects shared Cargo build directories; lint and test **results**, and dedicated Wasm/N-API **outputs**,
|
|
384
|
+
remain cacheable. `mutation` and `bench` key on the workspace's crates and toolchain like `cargo-lint`, `mutation` also
|
|
385
|
+
on `.cargo/mutants.toml` and `cargo mutants --version` with `mutants.out` as its output: an unchanged tree measures
|
|
386
|
+
nothing new. A cross-triple test runner keys on its archive's own bytes, the binaries it runs, since the machine that
|
|
387
|
+
runs it did not build them.
|
|
379
388
|
|
|
380
389
|
Validation inputs include the crate's files, every file its sources compile in through a literal `include_str!` or
|
|
381
390
|
`include_bytes!` path outside the crate's directory (a shipped skill or a shared corpus beside the crates), the crates
|
|
@@ -400,7 +409,7 @@ environment probe: a target that runs one must name the script itself as an inpu
|
|
|
400
409
|
hash the manifest of every package the workspace build compiles inside the Nx workspace (a member's, and a path
|
|
401
410
|
package's that reaches the build only as some crate's dev-dependency), because those affect unified features, and the
|
|
402
411
|
nextest executable/configuration. While the build compiles a path package outside the Nx workspace, every runner also
|
|
403
|
-
names externalRustCrates, which then must be declared: a runner's key does not follow
|
|
412
|
+
names externalRustCrates, which then must be declared: a runner's key does not follow the test build's outputs.
|
|
404
413
|
|
|
405
414
|
Nothing machine-local takes part. The ambient cargo environment as a whole and the global `$CARGO_HOME/config.toml` are
|
|
406
415
|
deliberately not hashed: their values carry per-checkout state directories (`CARGO_INSTALL_ROOT` moves under the active
|
|
@@ -432,7 +441,7 @@ target.
|
|
|
432
441
|
|
|
433
442
|
Every cached cargo target names the npm packages its command runs as `externalDependencies`: none for cargo itself, and
|
|
434
443
|
`@smoothbricks/nx-plugin` for a target that runs its executor or reads its installed files (the nextest tool config, the
|
|
435
|
-
|
|
444
|
+
test-binaries helper). Without that input Nx keys a task whose executor is not an `@nx/` one on every package in the
|
|
436
445
|
lockfile, so a lockfile-only commit re-ran every cargo verdict. Inside this repository the plugin is a workspace
|
|
437
446
|
project, which Nx refuses as an external dependency, so the list is empty here. The plugin tells the two apart by the
|
|
438
447
|
workspace's own `node_modules/@smoothbricks/nx-plugin`: one that resolves inside the workspace and outside every
|
|
@@ -545,7 +554,10 @@ Nx 23.2.1 hashes a runtime input's stdout and stderr and ignores its exit status
|
|
|
545
554
|
its error text, one string for every history, toolchain or file it could not read, and a result cached under it is
|
|
546
555
|
replayed for all of them. The script keys on the command's stdout alone and turns a nonzero exit into an Nx error: it
|
|
547
556
|
ends stdout with the byte 0xFF, and Nx refuses output that is not UTF-8
|
|
548
|
-
(`invalid utf-8 sequence of 1 bytes from index N`, exit 1).
|
|
557
|
+
(`invalid utf-8 sequence of 1 bytes from index N`, exit 1). That native message names neither the task nor the input;
|
|
558
|
+
the carried Nx patch's hasher rethrows it as `Could not hash <tasks>: invalid utf-8 sequence …` and lists each runtime
|
|
559
|
+
input of those tasks with the tasks that hash it (`patches/README.md`, "A hash failure names its tasks and runtime
|
|
560
|
+
inputs"). It names the candidates, not the one that failed. Nx drops a runtime input's stderr, so a failure that only
|
|
549
561
|
wrote to stderr would be invisible. The wrapper retains each failure under the checkout's
|
|
550
562
|
`.runtime-input-failures/failure.XXXXXXXXXX/`, outside Nx's state and the temporary directory. These private records
|
|
551
563
|
survive `nx reset`, task-cache cleanup and temporary-directory retirement; they remain until the operator removes them.
|
|
@@ -557,7 +569,7 @@ cat .runtime-input-failures/*/report
|
|
|
557
569
|
|
|
558
570
|
`smoo github-ci nx-smart`, `nx-run-many` and `nx-deploy` print every report retained during a failed Nx run
|
|
559
571
|
(`runtimeInputFailureReports(root, sinceMs)`, `@smoothbricks/nx-plugin/runtime-input-policy`), so a CI log names the
|
|
560
|
-
command and its cause beside Nx's
|
|
572
|
+
command and its cause beside Nx's error, which names only the candidates.
|
|
561
573
|
|
|
562
574
|
Each readable `report` names the command, its indexed arguments, working directory, exit status and original stderr.
|
|
563
575
|
`argv` retains the exact NUL-delimited argument vector (including empty arguments), `stderr` retains the original bytes
|
|
@@ -678,8 +690,8 @@ prefixes.
|
|
|
678
690
|
`bun packages/nx-plugin/benchmarks/cargo-closure-input.bench.ts` measures the real async inference entry with cached
|
|
679
691
|
Cargo resolution/source scans at 1–4,096 packages, including a one-package overhead row. Its expansion oracle checks
|
|
680
692
|
complete ordered input equality before timing; filesystem scanning and Cargo resolution are not part of this
|
|
681
|
-
measurement. `bun packages/nx-plugin/benchmarks/compact-candidates.bench.ts` measures the
|
|
682
|
-
|
|
693
|
+
measurement. `bun packages/nx-plugin/benchmarks/compact-candidates.bench.ts` measures the converging dependency-graph
|
|
694
|
+
traversal, without invoking an executor or gate.
|
|
683
695
|
|
|
684
696
|
Literal `include_str!` and `include_bytes!` files also belong to the closure, including data inside a crate and tracked
|
|
685
697
|
files outside its directory (such as a shipped Markdown skill). One Rust lexer excludes comments and example strings;
|
|
@@ -919,9 +931,12 @@ service", and 05, "Publication"). No task is rebuilt and no shell is evaluated b
|
|
|
919
931
|
The canonical cache adapter and native publisher remain in
|
|
920
932
|
`packages/cowshed/crates/cowshed-core/src/build_volume/{cache_adapter.js,nx_publish.js}`. The cached
|
|
921
933
|
`copy-nx-publish-assets` target declares those source inputs and owns `runtime/nx-publish/`, disjoint from the entire
|
|
922
|
-
TypeScript `dist/` output. It copies their unchanged bytes; there is one implementation, not two maintained sources.
|
|
923
|
-
|
|
924
|
-
runtime-
|
|
934
|
+
TypeScript `dist/` output. It copies their unchanged bytes; there is one implementation, not two maintained sources. It
|
|
935
|
+
writes `.build-inputs.json` beside them through `smoo-nx-build-inputs --input`, so a developer link to this checkout
|
|
936
|
+
judges `runtime/nx-publish/` by the bytes it copied (specs/cli/01_workspace_reconciliation.md, "Declared developer link
|
|
937
|
+
pins"). `build` depends on that producer and the emitted executable. `test-nx-publish` depends on the concrete
|
|
938
|
+
JavaScript and runtime-asset producers and loads their bytes; tests never build the publisher or its runtime assets
|
|
939
|
+
inline.
|
|
925
940
|
|
|
926
941
|
## Build/Test Graph Boundary
|
|
927
942
|
|
|
@@ -929,7 +944,7 @@ The final-graph `createMetadata` hook also calls `refuseBuildTestDependencies(gr
|
|
|
929
944
|
`@smoothbricks/nx-plugin/task-graph-policy`. A `build` aggregate, an inferred build family, or any non-test target with
|
|
930
945
|
outputs must not reach test work through `dependsOn`, directly or transitively. Inference publishes its semantic kind in
|
|
931
946
|
target metadata; declared targets use the same test naming policy, including `test`, `test-*`, `cargo-test-*` and
|
|
932
|
-
`*-test`. The
|
|
947
|
+
`*-test`. The test build is test work even though it compiles rather than executes.
|
|
933
948
|
|
|
934
949
|
Nx's metadata hook precedes its implicit-project-edge pass. The decision first completes any declared implicit edges
|
|
935
950
|
with Nx's own `applyImplicitDependencies` and `ProjectGraphBuilder` over an isolated dependency map, leaving the
|
|
@@ -1193,61 +1208,67 @@ Concrete targets come from concrete files:
|
|
|
1193
1208
|
`ttsc`. Transform plugins' diagnostics are enforced by `tsc-js`, which runs them.
|
|
1194
1209
|
- `typecheck-tests` is inferred from `tsconfig.test.json` and runs the same compiler on
|
|
1195
1210
|
`-p tsconfig.test.json --noEmit`. It first rebuilds the current package's `tsc-js` output (or its non-TypeScript
|
|
1196
|
-
`build`) so self-imports resolve
|
|
1211
|
+
`build`) so self-imports resolve from its own outputs. Transform calls in test files are checked when the test runner
|
|
1197
1212
|
transforms them.
|
|
1198
1213
|
- `typecheck-tests:watch` is inferred from `tsconfig.test.json` and runs the same typecheck in watch mode.
|
|
1199
1214
|
- `test-watch` is inferred when the package already defines an explicit Bun or Vitest `test` command. The plugin derives
|
|
1200
1215
|
the corresponding watch command and makes it depend on `typecheck-tests`.
|
|
1201
1216
|
- A workspace-root `Cargo.toml` provides `cargo-test`, `test`, `cargo-lint`, `mutation`, and `bench`. Build targets
|
|
1202
1217
|
compile build outputs only: compiling every test binary makes every build a test build. Test runners depend on their
|
|
1203
|
-
workspace's `cargo-test-
|
|
1204
|
-
`cargo-test-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1218
|
+
workspace's `cargo-test-build` themselves, and a test that executes a CLI or loads an addon names its producer.
|
|
1219
|
+
`cargo-test-build` runs one `cargo --frozen nextest list --workspace --list-type binaries-only --message-format json`
|
|
1220
|
+
into `.cache/nextest/binaries-metadata.json` and `cargo --frozen metadata --format-version 1 --all-features` into
|
|
1221
|
+
`.cache/nextest/cargo-metadata.json`, and is the only cached Cargo compilation of test binaries: mbx caches the build,
|
|
1222
|
+
and its Nx outputs are nextest's reuse-build metadata and the build's key (`.cache/nextest/build.key`, the task's
|
|
1223
|
+
hash), files outside the build-volume links, never the mutable build tree the binaries stay in. Its last step records
|
|
1224
|
+
that key in the target directory it built. Nx cache restoration must never replace Cargo's `target` link. Its inputs,
|
|
1225
|
+
like every cargo-derived fileset, are anchored at `{workspaceRoot}`: Nx resolves a `{projectRoot}` glob against only
|
|
1226
|
+
the files its project owns, and a nested package owns the crates under it, so a root workspace's test build spelled
|
|
1227
|
+
that way hashes none of its members and replays stale binaries against edited crates. Each member crate gets a cached
|
|
1210
1228
|
`cargo-test-<package>` run (30s slow-test warning, no per-test kill) whose inputs include the crates Cargo builds for
|
|
1211
1229
|
that crate's tests (from Cargo's locked resolve: its dependencies and its own dev-dependencies, never the
|
|
1212
1230
|
dev-dependencies of the crates below it), and whose command runs
|
|
1213
1231
|
`cargo --frozen nextest run --binaries-metadata … --cargo-metadata … --target-dir-remap … --workspace-remap . -E 'package(<crate>)'`
|
|
1214
|
-
|
|
1215
|
-
tree, and fan out instead of chaining.
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
(
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
the
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
project
|
|
1232
|
+
in place, against the binaries the build left in Cargo's target directory. Runners therefore execute rather than
|
|
1233
|
+
build: they compile nothing in cargo's build tree, copy nothing, and fan out instead of chaining. A test archive
|
|
1234
|
+
exists only for a cross build, whose binaries are built on one platform and run on another (`cross-targets`, below); a
|
|
1235
|
+
same-platform run reuses the build in place, where an archive made every run pay for a copy of the workspace's
|
|
1236
|
+
binaries before its first test (measured: 290 binaries, 678 MB, 4.6s on a quiet host and 21s in a gate, per archive).
|
|
1237
|
+
`--target-dir-remap` names this checkout's target directory, which the host's native `smoo-nx-nextest-binaries`
|
|
1238
|
+
(`@smoothbricks/nextest-extract`) reads from `cargo metadata`, so a `build.target-dir` setting is honoured. The
|
|
1239
|
+
binaries are not Nx outputs, and a binary's path is cargo's `-C metadata` hash, which ignores source content: a
|
|
1240
|
+
checkout whose build was a cache hit holds the metadata without the binaries, or with an older tree's at the very
|
|
1241
|
+
paths it names. Each runner's `bounded-exec` fixture (`smoo-nx-nextest-binaries ensure`) therefore compares the key
|
|
1242
|
+
the target directory records with the build's and stats every binary the metadata names; on any difference it rebuilds
|
|
1243
|
+
with the build's own command through mbx, once for the checkout's runners under a lock of its own, and records the
|
|
1244
|
+
key, inside the fixture's build interval and never the progress-bounded test window. The key output is also what lets
|
|
1245
|
+
a dependent that hashes the build's outputs see a source change the metadata alone would hide. The fixture reports its
|
|
1246
|
+
own duration and mbx's hits and misses apart from the run's, and says `CACHE MISS` naming the crates when mbx
|
|
1247
|
+
compiled. A repository's own target that runs the workspace's test binaries itself ensures them the same way
|
|
1248
|
+
(`ensureInPlace`) and passes the same reuse flags. A cross lane's runner, `nextest run --archive-file`, unpacks the
|
|
1249
|
+
whole archive into a fresh directory under its `TMPDIR`, which for a `bounded-exec` task on macOS is a lease on the
|
|
1250
|
+
shared RAM volume (measured: a 548 MB archive unpacks to 1.97 GiB, and four such tasks filled the 8 GiB volume).
|
|
1251
|
+
`--workspace-remap` is required — the metadata records the producing tree's absolute paths, and without it metadata
|
|
1252
|
+
restored from another checkout hands tests that checkout's `CARGO_MANIFEST_DIR`. With it the metadata is relocatable,
|
|
1253
|
+
so one cache entry serves every checkout of the same commit; nextest re-points
|
|
1254
|
+
`CARGO_BIN_EXE_<name>`/`NEXTEST_BIN_EXE_<name>` at the remapped binaries at runtime, but a test that reads them
|
|
1255
|
+
through the compile-time `env!` macro keeps the producing tree's path. Per-crate runners accept an empty nextest
|
|
1256
|
+
selection because a valid workspace member may have no tests and a hash partition may legitimately be empty. A crate
|
|
1257
|
+
in the project that builds the debug cdylib runs after `napi-debug`, because its tests load that addon from
|
|
1258
|
+
`target/debug`. A crate declaring `[package.metadata.smoothbricks.wasm-bindgen]` also receives the cacheable
|
|
1259
|
+
`cargo-wasm` output target in its owning project.
|
|
1240
1260
|
- The plugin's own `nextest.toml` is passed as
|
|
1241
1261
|
`--tool-config-file "smoo:$PWD/<to workspace root>/node_modules/@smoothbricks/nx-plugin/nextest.toml"`, so it is a
|
|
1242
1262
|
layer BENEATH the repository's `<cargo-workspace>/.config/nextest.toml` rather than a replacement for it: a repository
|
|
1243
|
-
can raise a timeout or declare `archive.include`
|
|
1244
|
-
settings win. That file is an input of both the
|
|
1245
|
-
governs. `$PWD` keeps the command text identical across checkouts while satisfying
|
|
1246
|
-
config path be absolute, and naming the file through the workspace root's
|
|
1247
|
-
real location — keeps it identical for a plugin linked from a checkout
|
|
1248
|
-
workspace sits at; `--user-config-file none` still holds, because a
|
|
1249
|
-
cached verdict. Runtime hash inputs use that same workspace-relative
|
|
1250
|
-
checkout. Both the runtime output and the owning target's command
|
|
1263
|
+
can raise a timeout or declare, for a cross lane, the `archive.include` of a cdylib or fixture its archived test
|
|
1264
|
+
binaries need, and its settings win. That file is an input of both the test build and every runner, so changing it
|
|
1265
|
+
invalidates the verdicts it governs. `$PWD` keeps the command text identical across checkouts while satisfying
|
|
1266
|
+
nextest's requirement that a tool config path be absolute, and naming the file through the workspace root's
|
|
1267
|
+
`node_modules` link — never the plugin's real location — keeps it identical for a plugin linked from a checkout
|
|
1268
|
+
outside the workspace, whatever depth each workspace sits at; `--user-config-file none` still holds, because a
|
|
1269
|
+
developer's `~/.config/nextest` must not decide a cached verdict. Runtime hash inputs use that same workspace-relative
|
|
1270
|
+
installed path, never the physical plugin checkout. Both the runtime output and the owning target's command
|
|
1271
|
+
declaration therefore remain portable.
|
|
1251
1272
|
- A crate whose suite is better spread over several runners declares `[package.metadata.smoothbricks.test] shards = N`,
|
|
1252
1273
|
and gets `cargo-test-<package>-shard1..N`, each running `--partition hash:i/N` under the same progress bound. nextest
|
|
1253
1274
|
assigns a test to a shard by hashing its name, so the shards stay an exact partition of the crate as tests and test
|
|
@@ -1263,10 +1284,10 @@ Concrete targets come from concrete files:
|
|
|
1263
1284
|
one there is the whole change to that class. Serial groups are classified separately, by `test-group` overrides in the
|
|
1264
1285
|
workspace's `.config/nextest.toml`; the plugin's file declares none. Only sharded crates need these targets; an
|
|
1265
1286
|
unsharded crate already runs all its non-group tests in one process. Empty partitions pass, including platforms where
|
|
1266
|
-
the tests are `cfg`-ed out. `nextest-partitions.test.ts` executes the inferred
|
|
1287
|
+
the tests are `cfg`-ed out. `nextest-partitions.test.ts` executes the inferred test build and shard commands over 29
|
|
1267
1288
|
tests and asserts that the ordinary shards ran exactly the 13 ordinary tests once and the exceptional shards exactly
|
|
1268
|
-
the 12 exceptional ones. The suite builds one shared fixture and
|
|
1269
|
-
real default serial-group executor: a successful count and run with the group's probes exactly once each, three
|
|
1289
|
+
the 12 exceptional ones. The suite builds one shared fixture and test build, then runs separate bounded cases through
|
|
1290
|
+
the real default serial-group executor: a successful count and run with the group's probes exactly once each, three
|
|
1270
1291
|
refusals that run nothing and clear the task's previous verdict, and a failing run whose ordinary failures still run
|
|
1271
1292
|
the group's remaining probes. The shared fixture first produces one real passing verdict, before any case runs. Each
|
|
1272
1293
|
refusal copies that seed and removes its own marker log, so neither a timed-out success case nor a prior refusal that
|
|
@@ -1288,7 +1309,7 @@ Concrete targets come from concrete files:
|
|
|
1288
1309
|
may time only a member that declares `shards`, by test paths a `test(=…)` filter matches literally; anything else
|
|
1289
1310
|
fails graph construction.
|
|
1290
1311
|
- A repository's serial test groups each run in one runner, `cargo-test-group-<group>`, owned by the cargo workspace
|
|
1291
|
-
root beside `cargo-test-
|
|
1312
|
+
root beside `cargo-test-build`. A group is declared once, in `<cargo-workspace>/.config/nextest.toml`: a
|
|
1292
1313
|
`[test-groups.<group>]` table with `max-threads = 1`, and default-profile overrides that name it with `test-group` and
|
|
1293
1314
|
`platform = 'cfg(target_os="macos")'`. The runner's filter is the union of those overrides, so the runner and the
|
|
1294
1315
|
per-crate exclusions cannot drift; every crate piece excludes it with `not (…)`, so each test is selected by exactly
|
|
@@ -1312,8 +1333,8 @@ Concrete targets come from concrete files:
|
|
|
1312
1333
|
manifest and the repository's nextest config, so a change to an unrelated crate leaves it cached. The filter is read
|
|
1313
1334
|
as nextest reads it (its precedence, blanks and predicate arguments; `filterScope`): a plain `package(<name>)` or
|
|
1314
1335
|
`package(=<name>)` bounds a clause to that package, `and`, `&` and `-` keep the narrower side or the left side, and
|
|
1315
|
-
`or`, `|` and `+` take every clause. Anything that bounds nothing scopes the group to every member, as the
|
|
1316
|
-
hashed: a clause with no package, a glob, substring or regex name, `not`, `deps` or `rdeps`, an argument with a
|
|
1336
|
+
`or`, `|` and `+` take every clause. Anything that bounds nothing scopes the group to every member, as the test build
|
|
1337
|
+
is hashed: a clause with no package, a glob, substring or regex name, `not`, `deps` or `rdeps`, an argument with a
|
|
1317
1338
|
backslash or a comma, a filter nextest refuses, or packages that exclude each other. A scope that names a package
|
|
1318
1339
|
which is not a member of the Cargo workspace is refused when the graph is built.
|
|
1319
1340
|
- Inference orders nothing between two serial groups: each is serial only within its own runner. A repository that needs
|
|
@@ -1602,7 +1623,7 @@ an unbounded runtime source closure. `ensure-built-receipt.test.ts` judges this
|
|
|
1602
1623
|
graph.
|
|
1603
1624
|
|
|
1604
1625
|
A tracked public output stays in the source basis while it holds HEAD's bytes, so a later task can read it as a FILE
|
|
1605
|
-
input: the root `cargo-test-
|
|
1626
|
+
input: the root `cargo-test-build` reads the corpus `cowshed:wire-fixtures` regenerates, a tracked file that is both.
|
|
1606
1627
|
Only its stamp is the run's to move (a cache restore or a regeneration moves it). A run that leaves it other bytes
|
|
1607
1628
|
refuses the receipt, and one that differs from HEAD when the run starts binds no input, so a task that reads it is
|
|
1608
1629
|
unbound.
|
|
@@ -1985,11 +2006,12 @@ and memory histories are not polling input. The activity projection omits those
|
|
|
1985
2006
|
the observer's output or control-plane limits.
|
|
1986
2007
|
|
|
1987
2008
|
The decision to use zero-hold pausing is made before spawn, from the canonical scheduling switch and the supported
|
|
1988
|
-
command, never from silence on the pipe. The inferred
|
|
1989
|
-
`cargo --frozen nextest run --binaries-metadata
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
2009
|
+
command, never from silence on the pipe. The inferred in-place
|
|
2010
|
+
`cargo --frozen nextest run --binaries-metadata … --target-dir-remap "$(…/smoo-nx-nextest-binaries target-dir)" …`,
|
|
2011
|
+
whose one substitution prints this checkout's target directory, is hold-gated, including chains joined by `&&`, `||`, or
|
|
2012
|
+
`;` when every leg is a supported scheduled Cargo test execution. Each leg is checked separately; a later unscheduled
|
|
2013
|
+
command, pipeline or background command retains conservative idle protection. Plain `cargo test` can also run
|
|
2014
|
+
unscheduled doctests, so it retains its lifecycle idle clock, as do unknown runners, direct binaries, test listings,
|
|
1993
2015
|
configuration/toolchain/directory overrides, and `--archive-file` whose target is not known at spawn. Explicit non-doc
|
|
1994
2016
|
Cargo target selections can be hold-gated. These conservative cases remain bounded even when they never hold an mbx
|
|
1995
2017
|
permit (specs/cowshed/11_shell.md, "Cargo test-runner boundaries").
|
|
@@ -2004,6 +2026,7 @@ watchdog.
|
|
|
2004
2026
|
| Runner | Authoritative end of build | End of active execution |
|
|
2005
2027
|
| --------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
|
|
2006
2028
|
| Go (`go test -json`) | Native package `Action:start`, after that package's build dependencies | Native package `pass`, `fail`, or `skip`; the clock runs while any package executes |
|
|
2029
|
+
| Prebuilt Go tests (`smoo-nx-go-test-run`) | None: it builds nothing, so it is active from command spawn | Command exit |
|
|
2007
2030
|
| Cargo (`cargo test --message-format=json-render-diagnostics`) | Native `build-finished`, after `compile_tests` and before `run_unit_tests` | The owned Cargo child's close **and drained output**, never a libtest summary; custom harnesses, doctests, and teardown remain bounded |
|
|
2008
2031
|
| Bun | No separate authoritative build event; active from command spawn | Command exit |
|
|
2009
2032
|
| Unknown shell wrappers, mixed unsupported commands, and nextest | No inferred build exemption; active from command spawn | Command exit |
|
|
@@ -2020,6 +2043,20 @@ Separately building test binaries and then executing them under the unchanged bo
|
|
|
2020
2043
|
without a native lifecycle hook, not evidence that their combined cold-build command is safe. Direct Go/Cargo commands
|
|
2021
2044
|
use the lifecycle channel instead; unknown wrappers retain conservative spawn accounting.
|
|
2022
2045
|
|
|
2046
|
+
A Go module whose test build should be a cached target of its own splits it from the run with two bins of this package.
|
|
2047
|
+
`smoo-nx-go-test-build <out-dir> <package pattern>...`, run in the module, builds one `go test -c` binary for each
|
|
2048
|
+
package with test files that `go list` resolves, and writes `<out-dir>/go-tests.json`:
|
|
2049
|
+
`{"version":1,"tests":[{"binary":…,"dir":…,"importPath":…}]}`, sorted by import path, every path relative to the
|
|
2050
|
+
manifest. It replaces `<out-dir>` whole and refuses a directory that holds no such manifest.
|
|
2051
|
+
`smoo-nx-go-test-run [-p=N] [--allow-empty] <go-tests.json>` runs each binary as `go test -json` runs a package's: in
|
|
2052
|
+
its package directory, under `go tool test2json -t -p <import path>`, with the flags go test passes
|
|
2053
|
+
(`-test.paniconexit0` and the default `-test.timeout=10m0s`), up to `-p` binaries at once (`GOMAXPROCS`, else one per
|
|
2054
|
+
core). Its stdout is the same event stream, one whole line per event, so bounded-exec reads results, in-flight names and
|
|
2055
|
+
the verdict from it and sizes its `-p` as it does for `go test` (`GO_TEST_RUNNER` in `verdict.ts`); having nothing to
|
|
2056
|
+
build, it is active from spawn. A manifest that lists no binary is refused unless `--allow-empty` says none is expected,
|
|
2057
|
+
so a package pattern that matched no tests cannot pass. It exits 1 when any binary failed and 2 when the manifest cannot
|
|
2058
|
+
be run.
|
|
2059
|
+
|
|
2023
2060
|
A target may name a `fixtureCommand` with its `fixtureTimeoutMs`: a compiler-fixture producer the executor runs first,
|
|
2024
2061
|
in the same cwd, environment and CPU grant, as segment 0 of the same lifecycle — a build interval for its whole life,
|
|
2025
2062
|
under its own supervisor and acknowledged like a runner's phases. The command follows under `&&` (a direct Go/Cargo
|
|
@@ -2345,21 +2382,21 @@ their runnable work within that tree's count instead of each sizing its runners
|
|
|
2345
2382
|
runner's requested parallelism, read from the runner's own flag rather than the core count — nextest's `--test-threads`
|
|
2346
2383
|
or one per core (one for `--no-capture`, which runs tests serially), `bun test --parallel=N` N, Stryker's
|
|
2347
2384
|
`--concurrency` N or N% (default one per core less one past four cores), Vitest's `--maxWorkers` N or N% (default one
|
|
2348
|
-
per core less one), `go test -p` (default `GOMAXPROCS`), cargo-mutants' `--jobserver-tasks`
|
|
2349
|
-
whatever `--jobs` says), a cargo build one per core, anything else one, or the target's
|
|
2350
|
-
by positive inherited `NEXTEST_TEST_THREADS`/`CARGO_BUILD_JOBS` ceilings. A configured
|
|
2351
|
-
ceiling, never raise it. The runner uses `min(bounded request, granted tokens)`: nextest's
|
|
2352
|
-
Bun's parallel flag, Stryker's, Vitest's and go's worker flag (added when the command names
|
|
2353
|
-
jobserver tasks, `--jobs` and per-process test threads, and a cargo build's libtest and nextest
|
|
2354
|
-
to that limit. Cargo's rustc count needs no flag: the run's sub-pool is a GNU make jobserver fifo
|
|
2355
|
-
and `MAKEFLAGS` name, so Cargo, its build scripts and every nested `cargo` share the grant's
|
|
2356
|
-
socket children, and no grant sets `CARGO_BUILD_JOBS`. A command whose runner the executor
|
|
2357
|
-
`RUST_TEST_THREADS` and `NEXTEST_TEST_THREADS` set to its whole held grant, since test
|
|
2358
|
-
A runner that starts its own workers or jobserver (cargo-mutants, Stryker, Vitest,
|
|
2359
|
-
must run under `bounded-exec`, whose runner kinds size its own flag; the inferred
|
|
2360
|
-
retain their independent inherited/configured ceilings. `BOUNDED_EXEC_CPU_TOKENS`,
|
|
2361
|
-
the actual held grant. `timeoutMs` and `idleTimeoutMs` start at the grant. The
|
|
2362
|
-
with the executor's socket when it is killed. The wait prints one
|
|
2385
|
+
per core less one), `go test -p` and `smoo-nx-go-test-run -p` (default `GOMAXPROCS`), cargo-mutants' `--jobserver-tasks`
|
|
2386
|
+
(default one per core, whatever `--jobs` says), a cargo build one per core, anything else one, or the target's
|
|
2387
|
+
`parallelism` option — bounded by positive inherited `NEXTEST_TEST_THREADS`/`CARGO_BUILD_JOBS` ceilings. A configured
|
|
2388
|
+
count can lower an inherited ceiling, never raise it. The runner uses `min(bounded request, granted tokens)`: nextest's
|
|
2389
|
+
environment and named flag, Bun's parallel flag, Stryker's, Vitest's and go's worker flag (added when the command names
|
|
2390
|
+
none), cargo-mutants' jobserver tasks, `--jobs` and per-process test threads, and a cargo build's libtest and nextest
|
|
2391
|
+
test threads are sized to that limit. Cargo's rustc count needs no flag: the run's sub-pool is a GNU make jobserver fifo
|
|
2392
|
+
that `CARGO_MAKEFLAGS` and `MAKEFLAGS` name, so Cargo, its build scripts and every nested `cargo` share the grant's
|
|
2393
|
+
count with the sub-pool's socket children, and no grant sets `CARGO_BUILD_JOBS`. A command whose runner the executor
|
|
2394
|
+
cannot see (a script) gets `RUST_TEST_THREADS` and `NEXTEST_TEST_THREADS` set to its whole held grant, since test
|
|
2395
|
+
threads take no jobserver token. A runner that starts its own workers or jobserver (cargo-mutants, Stryker, Vitest,
|
|
2396
|
+
`go test`) ignores that fifo, so it must run under `bounded-exec`, whose runner kinds size its own flag; the inferred
|
|
2397
|
+
`mutation` target does. Test threads retain their independent inherited/configured ceilings. `BOUNDED_EXEC_CPU_TOKENS`,
|
|
2398
|
+
the sub-pool and telemetry still name the actual held grant. `timeoutMs` and `idleTimeoutMs` start at the grant. The
|
|
2399
|
+
tokens go back when the command exits, or with the executor's socket when it is killed. The wait prints one
|
|
2363
2400
|
`cowshed: cpu-pool wait done elapsed=… tokens=<granted>/<asked>` line.
|
|
2364
2401
|
|
|
2365
2402
|
The plugin's `preTasksExecution` serves each Nx run that inherits no pool its own `BOUNDED_EXEC_CPU_POOL`, and
|
|
@@ -2509,14 +2546,15 @@ explicit contract, not a claim that its console output is a structured reporter
|
|
|
2509
2546
|
left unchanged because raw test output would destroy structured-channel attribution. Ignored-test delivery follows
|
|
2510
2547
|
nextest's own channel: an ignored start is not evidence a test ran, and a binary with no executed test may omit its
|
|
2511
2548
|
ignored terminals. The human progress display remains the owner of in-flight watchdog names.
|
|
2512
|
-
- Go reuses the existing `go test -json` decoder
|
|
2513
|
-
package terminals or output heartbeats. Its native test output
|
|
2514
|
-
duration when present. These records have `source: "native"`;
|
|
2549
|
+
- Go reuses the existing `go test -json` decoder, for `smoo-nx-go-test-run`'s stream as for `go test`'s: only test-level
|
|
2550
|
+
pass/fail/skip terminals produce records, never package terminals or output heartbeats. Its native test output
|
|
2551
|
+
supplies failure evidence, and `Elapsed` supplies the duration when present. These records have `source: "native"`;
|
|
2552
|
+
the channel supplies no declaration location.
|
|
2515
2553
|
- Bun reuses the watchdog's existing named result-line scan, not another console parser. Per the owner's ruling of
|
|
2516
2554
|
2026-10-29 these records have `source: "progress"`, explicitly provisional: publish immediately when a named result
|
|
2517
2555
|
closes, never wait for later tests. Bun prints diagnostics before its `(fail)` line, so failure evidence is the
|
|
2518
2556
|
captured stderr interval since the preceding named result through this failure line. It can include unrelated output
|
|
2519
|
-
and is not proof of root-cause ownership.
|
|
2557
|
+
and is not proof of root-cause ownership. Bun's inspector reporter (measured on 1.4.3) loses events at exit and under
|
|
2520
2558
|
parallel/isolate execution, while its JUnit reporter writes only at the end; neither is a reliable complete live
|
|
2521
2559
|
channel. Dots and agent-mode output omit passing/skip names, so no identities are invented for dots. Terminal Bun
|
|
2522
2560
|
JUnit supplies those missing named results as `source: "junit"`. If its status contradicts a provisional record of the
|