@smoothbricks/nx-plugin 0.4.31 → 0.5.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.
Files changed (74) hide show
  1. package/README.md +67 -46
  2. package/dist/cargo-toolchain-policy.d.ts +6 -6
  3. package/dist/cargo-toolchain-policy.js +6 -6
  4. package/dist/cross-check-policy.d.ts +31 -14
  5. package/dist/cross-check-policy.d.ts.map +1 -1
  6. package/dist/cross-check-policy.js +43 -15
  7. package/dist/ensure-built.d.ts.map +1 -1
  8. package/dist/ensure-built.js +14 -9
  9. package/dist/executors/bounded-exec/cpu-pool.d.ts +14 -7
  10. package/dist/executors/bounded-exec/cpu-pool.d.ts.map +1 -1
  11. package/dist/executors/bounded-exec/cpu-pool.js +297 -38
  12. package/dist/executors/bounded-exec/cpu-tokens.d.ts +19 -7
  13. package/dist/executors/bounded-exec/cpu-tokens.d.ts.map +1 -1
  14. package/dist/executors/bounded-exec/cpu-tokens.js +21 -7
  15. package/dist/executors/bounded-exec/executor.d.ts.map +1 -1
  16. package/dist/executors/bounded-exec/executor.js +12 -6
  17. package/dist/executors/bounded-exec/run-cpu-pool.d.ts.map +1 -1
  18. package/dist/executors/bounded-exec/run-cpu-pool.js +5 -4
  19. package/dist/executors/cargo-zigbuild/executor.d.ts +60 -0
  20. package/dist/executors/cargo-zigbuild/executor.d.ts.map +1 -0
  21. package/dist/executors/cargo-zigbuild/executor.js +266 -0
  22. package/dist/executors/cargo-zigbuild/schema.d.ts +15 -0
  23. package/dist/executors/cargo-zigbuild/schema.d.ts.map +1 -0
  24. package/dist/index.d.ts +0 -15
  25. package/dist/index.d.ts.map +1 -1
  26. package/dist/index.js +56 -89
  27. package/dist/producer-receipts.d.ts +10 -0
  28. package/dist/producer-receipts.d.ts.map +1 -1
  29. package/dist/producer-receipts.js +30 -5
  30. package/dist/testing.d.ts.map +1 -1
  31. package/dist/testing.js +3 -2
  32. package/executors.json +4 -4
  33. package/managed/raw/patches/nx@23.2.1.patch +177 -9
  34. package/managed/raw/tooling/direnv/devenv.smoo.nix +47 -49
  35. package/managed/raw/tooling/direnv/linked-snapshots.ts +18 -8
  36. package/managed/raw/tooling/direnv/repo-path +1 -1
  37. package/managed/raw/tooling/git-hooks/pre-push.sh +41 -23
  38. package/package.json +1 -1
  39. package/src/__tests__/counted-cargo.ts +1 -1
  40. package/src/cargo-closure-input.test.ts +1 -1
  41. package/src/cargo-toolchain-policy.ts +6 -6
  42. package/src/cross-check-policy.test.ts +90 -11
  43. package/src/cross-check-policy.ts +47 -17
  44. package/src/ensure-built.test.ts +39 -0
  45. package/src/ensure-built.ts +23 -9
  46. package/src/executors/bounded-exec/cpu-pool.test.ts +132 -4
  47. package/src/executors/bounded-exec/cpu-pool.ts +300 -46
  48. package/src/executors/bounded-exec/cpu-tokens.test.ts +60 -15
  49. package/src/executors/bounded-exec/cpu-tokens.ts +34 -11
  50. package/src/executors/bounded-exec/executor.test.ts +72 -4
  51. package/src/executors/bounded-exec/executor.ts +12 -6
  52. package/src/executors/bounded-exec/run-cpu-pool.test.ts +3 -0
  53. package/src/executors/bounded-exec/run-cpu-pool.ts +5 -4
  54. package/src/executors/cargo-zigbuild/executor.test.ts +129 -0
  55. package/src/executors/cargo-zigbuild/executor.ts +176 -0
  56. package/src/executors/cargo-zigbuild/schema.json +35 -0
  57. package/src/executors/cargo-zigbuild/schema.ts +14 -0
  58. package/src/index.test.ts +29 -61
  59. package/src/index.ts +60 -98
  60. package/src/nx-daemon-validity.test.ts +65 -0
  61. package/src/producer-receipts.test.ts +37 -15
  62. package/src/producer-receipts.ts +29 -5
  63. package/src/testing.ts +3 -2
  64. package/test-timings.json +1 -1
  65. package/dist/executors/napi-cross-toolchain/executor.d.ts +0 -42
  66. package/dist/executors/napi-cross-toolchain/executor.d.ts.map +0 -1
  67. package/dist/executors/napi-cross-toolchain/executor.js +0 -126
  68. package/dist/executors/napi-cross-toolchain/schema.d.ts +0 -4
  69. package/dist/executors/napi-cross-toolchain/schema.d.ts.map +0 -1
  70. package/src/executors/napi-cross-toolchain/executor.test.ts +0 -112
  71. package/src/executors/napi-cross-toolchain/executor.ts +0 -165
  72. package/src/executors/napi-cross-toolchain/schema.json +0 -15
  73. package/src/executors/napi-cross-toolchain/schema.ts +0 -3
  74. /package/dist/executors/{napi-cross-toolchain → cargo-zigbuild}/schema.js +0 -0
package/README.md CHANGED
@@ -275,9 +275,9 @@ The `@smoothbricks/nx-plugin:cargo-resolve` diagnostics channel reports `{ phase
275
275
  joins an existing flight. With no subscribers, inference neither allocates nor publishes an event. The cache regressions
276
276
  use this readiness signal and Cargo control-channel events to prove concurrency and child teardown without sleep-based
277
277
  timing assumptions; their outer hang guards report still-open test spans and process/gate state. The counted Cargo
278
- fixture delegates to the command selected before its shim was installed, with that original search path. An installed
279
- jobserver launcher remains in the chain; it must not rediscover the counted shim and recursively enter the broker. The
280
- real-producer regression covers both counted metadata and forwarded workspace discovery, with one metadata child.
278
+ fixture delegates to the command selected before its shim was installed, with that original search path, so nothing it
279
+ starts rediscovers the counted shim and recursively enters the broker. The real-producer regression covers both counted
280
+ metadata and forwarded workspace discovery, with one metadata child.
281
281
 
282
282
  Keep workspace-owned runtime state outside Nx's source index. The root `.nxignore` ignores every dot path with `.*` and
283
283
  re-includes each tracked dot input by its dot-named prefix, such as `!/.github` or `!/packages/lmao/.cargo`: a dot-named
@@ -757,17 +757,21 @@ Concrete targets come from concrete files:
757
757
  one has finished. Explicit target declarations are not platform-conditional: dependency-only target nodes and their
758
758
  ordering edges remain off macOS even though no executable group runner is inferred. The ordinary `test` and
759
759
  `cargo-test` aggregates must still reach neither group.
760
- - Canonical `napi` package metadata provides a host `cargo-napi` target and named release targets for each configured
761
- triple. Linux `--use-napi-cross` targets compile C/C++ dependencies with Clang; the NAPI CLI supplies its downloaded
762
- GNU sysroot and toolchain flags. This avoids the bundled GCC's unsupported diagnostics-color flag without disabling
763
- the workspace's sccache wrapper.
764
- - Each `--use-napi-cross` triple also gets a `napi-toolchain-<arch>-linux` prerequisite that extracts the pinned
765
- `@napi-rs/cross-toolchain-<host>-target-<arch>` archive into `~/.napi-rs`, where the NAPI CLI probes for it. Every
766
- cross build of that triple — the inferred `napi-<arch>-linux` and any package-local `cli-<arch>-linux` — depends on
767
- it, so the CLI's own downloader never runs. That downloader `npm pack`s into its own package directory, which under
768
- Bun's isolated global store is a shared (in CI host-wide) cache: two concurrent cross builds of one triple would
769
- otherwise pack the same file into the same directory and one would die on the other's cleanup. The prerequisite
770
- produces no artifact, so it stays out of the aggregate `build` and out of collected platform outputs.
760
+ - Canonical `napi` package metadata provides a host `cargo-napi` target (only when no configured triple is the host's
761
+ own platform) and named release targets for each configured triple. macOS triples run `napi build` with the host's
762
+ toolchain, because a macOS addon needs Apple's SDK, which zig does not carry; the napi CLI also writes the platform
763
+ `.d.ts`.
764
+ - Linux artifacts reference no build-host path. N-API addons link glibc 2.17 symbol versions and carry no RUNPATH;
765
+ binaries a package builds for Linux, such as a CLI, build the same way. Both are built by devenv's zig through
766
+ cargo-zigbuild, with the same command on every host. Each Linux triple's `napi-<arch>-linux` target runs the
767
+ `@smoothbricks/nx-plugin:cargo-zigbuild` executor with `--target <triple>.2.17`, and the executor copies the cdylib to
768
+ `dist/native/linux-<arch>-gnu/<binaryName>.linux-<arch>-gnu.node` itself: the napi CLI cannot carry the glibc suffix,
769
+ since it looks for the artifact under `target/<triple>.2.17/`. A package-local `cli-<arch>-linux` uses the same
770
+ executor with `bin` set; a static CLI targets `<arch>-unknown-linux-musl`. The executor runs `cargo-zigbuild`
771
+ directly, removes any compiler or linker the shell names for its triple (a Linux shell pins its host compiler for
772
+ `x86_64-unknown-linux-gnu`), and reads the artifact path from cargo's JSON messages. zig and cargo-zigbuild come from
773
+ the managed devenv module: a Linux shell carries them, a macOS shell only inside the `linux-cross` profile
774
+ (`tooling/devenv -P linux-cross shell -- …`).
771
775
  - `build` is inferred only when the project has at least one concrete build target to run, such as inferred `tsc-js`, a
772
776
  package-local target like `tsdown-js`, or `cargo-wasm` from this plugin. It depends on output-family wildcard targets:
773
777
  `*-js`, `*-web`, `*-html`, `*-css`, `*-ios`, `*-android`, `*-native`, `*-napi`, `*-bun`, and `*-wasm`.
@@ -910,12 +914,16 @@ its own Nx plugin options as
910
914
  `producerReceipts: { targets: ["lmao:rust-dist", "lmao:cargo-wasm", "lmao:cargo-thread-ffi"] }`, naming every target a
911
915
  consumer's snapshot declaration names. The pre-task hook captures the committed HEAD/tree and tracked-source/tool basis;
912
916
  the post-task hook uses Nx's actual successful `TaskResults`, hashes/hash details, argv and start/end times, including
913
- successful uncacheable prerequisites, and atomically publishes the receipt in that checkout's existing Nx
914
- workspace-data. Disabled publication performs no source prepass, so an ordinary consumer CLI pays none of that producer
915
- work. No file permission, path, daemon state or cached row can invent a completion receipt. Nx takes one pre/post
916
- task-hook pair per plugin, so the plugin's pair runs the controller's `COWSHED_NX_TASK_RECEIPT_ID` task-results hint
917
- first and these producer hooks second, each with the same options and run context and neither reading the other's
918
- output.
917
+ successful uncacheable prerequisites, and atomically publishes the receipt in that checkout's
918
+ `.cache/producer-receipts`. That is its source tree, not Nx's workspace-data: under cowshed workspace-data is build
919
+ state on the checkout's build volume, which a consumer's read grant of the provider checkout does not reach, so the
920
+ consumer could not read the receipt it validates. The directory ignores itself with a `.gitignore` of `*`, so no
921
+ checkout tracks a record and Nx never hashes one. A missing receipt refuses naming the path it was looked for at; a
922
+ receipt the consumer cannot read refuses with the read error (EPERM under a sandbox). Disabled publication performs no
923
+ source prepass, so an ordinary consumer CLI pays none of that producer work. No file permission, path, daemon state or
924
+ cached row can invent a completion receipt. Nx takes one pre/post task-hook pair per plugin, so the plugin's pair runs
925
+ the controller's `COWSHED_NX_TASK_RECEIPT_ID` task-results hint first and these producer hooks second, each with the
926
+ same options and run context and neither reading the other's output.
919
927
 
920
928
  The receipt binds the selected target, basis commit SHA and committed tree SHA, actual argv, declared producer
921
929
  environment identity and bound tool/module inputs, independent product output SHA-256, measured wall time, and an
@@ -943,7 +951,9 @@ environment/tool inputs and actual output census. It never re-hashes the provide
943
951
  Its read of the recorded tools must stay stable through that census on the same terms as the producer's: a tool node
944
952
  whose ctime alone moved is re-read and compared with the receipt, and a refusal names the nodes that moved. A valid
945
953
  receipt is the hit. A missing, mismatched, stale or unbound receipt requires the authoritative graph RPC, then a loud
946
- miss/refusal without running a target or writing provider outputs. A managed consumer requires the installed
954
+ miss/refusal without running a target or writing provider outputs. That RPC goes only to a daemon already serving the
955
+ provider: the probe never starts one, since a start writes the provider's workspace data and a sandboxed consumer may
956
+ only read its provider, so with none serving the refusal names `no-daemon`. A managed consumer requires the installed
947
957
  `probeBuilt` operation and the complete producer-receipt contract; an old receipt lacking it refuses, never falls back
948
958
  to `ensureBuilt` or a producer writer. `ensureBuilt` remains the normal build/stream operation with its existing
949
959
  hit/built/failed results and Nx's current source/cache/artifact verdict.
@@ -1443,31 +1453,42 @@ per core, whatever `--jobs` says), a cargo build one per core, anything else one
1443
1453
  bounded by positive inherited `NEXTEST_TEST_THREADS`/`CARGO_BUILD_JOBS` ceilings. A configured count can lower an
1444
1454
  inherited ceiling, never raise it. The runner uses `min(bounded request, granted tokens)`: nextest's environment and
1445
1455
  named flag, Bun's parallel flag, Stryker's, Vitest's and go's worker flag (added when the command names none),
1446
- cargo-mutants' jobserver tasks, `--jobs` and per-process test threads, and Cargo's jobs are sized to that limit. A
1447
- runner that starts its own workers or jobserver (cargo-mutants, Stryker, Vitest, `go test`) ignores the `cargo`
1448
- launcher's fifo, so it must run under `bounded-exec`; the inferred `mutation` target does. Cargo's `RUST_TEST_THREADS`
1449
- retains its independent inherited/configured ceiling. `BOUNDED_EXEC_CPU_TOKENS`, the sub-ledger and telemetry still name
1450
- the actual held grant. The gateway shares tokens fairly between checkouts (Nx workspace roots). `timeoutMs` and
1451
- `idleTimeoutMs` start at the grant. The tokens go back when the command exits, or with the executor's socket when it is
1452
- killed. The wait prints one `cowshed: cpu-tokens wait done elapsed=… tokens=<granted>/<asked>` line. On a host whose
1453
- gateway socket does not exist (a CI runner, a machine without cowshed), the plugin's `preTasksExecution` serves each Nx
1454
- run that inherits no pool its own `BOUNDED_EXEC_CPU_POOL` of one token per core, and `postTasksExecution` closes it: the
1455
- run's targets, started side by side under `NX_PARALLEL=100%`, queue for its cores instead of each sizing its runner to
1456
- the whole host (`specs/cowshed/05_gateway.md`, "A run without a gateway budgets itself"). Its scope is one run. A
1457
- command no pool and no gateway answers runs exactly as configured and nothing is said; a gateway from before the budget
1458
- runs it unbudgeted and stderr says so.
1459
-
1460
- A granted executor serves a private `BOUNDED_EXEC_CPU_POOL` with its actual token count. A nested default executor asks
1461
- that immediate parent pool for its own demand, instead of taking from the host while the parent holds its grant; the
1462
- pool grants at most what it can. A lent pool accounts for siblings together; each admitted child serves only its own
1463
- allocation to grandchildren. Closing a child's connection returns its local allocation, never the parent's upstream
1464
- grant. Upstream loss revokes the downstream pool, so a dead parent grants nothing more; a command whose grant closes
1465
- while it runs (a gateway restart, or the lending parent's exit) runs on over budget to its own exit, and stderr says
1466
- `cowshed: cpu-tokens grant ended`. A bare count or absent endpoint follows normal host admission. A connected parent
1467
- pool's refusal or protocol failure instead fails admission: taking from the host then could wait on the parent's own
1468
- grant. `options.env` cannot inject either marker. Parent-pool grants record `cpu.inherited: true` and their actual local
1469
- wait; the span also says `inherited=true`. Pool setup, listener and cleanup errors fail rather than bypassing
1470
- accounting. Command bounds stay unchanged.
1456
+ cargo-mutants' jobserver tasks, `--jobs` and per-process test threads, and a cargo build's libtest and nextest test
1457
+ threads are sized to that limit. Cargo's rustc count needs no flag: the run's sub-pool is a GNU make jobserver fifo that
1458
+ `CARGO_MAKEFLAGS` and `MAKEFLAGS` name, so Cargo, its build scripts and every nested `cargo` share the grant's count
1459
+ with the sub-pool's socket children, and no grant sets `CARGO_BUILD_JOBS`. A command whose runner the executor cannot
1460
+ see (a script) gets `RUST_TEST_THREADS` and `NEXTEST_TEST_THREADS` set to its whole held grant, since test threads take
1461
+ no jobserver token. A runner that starts its own workers or jobserver (cargo-mutants, Stryker, Vitest, `go test`)
1462
+ ignores that fifo, so it must run under `bounded-exec`, whose runner kinds size its own flag; the inferred `mutation`
1463
+ target does. Test threads retain their independent inherited/configured ceilings. `BOUNDED_EXEC_CPU_TOKENS`, the
1464
+ sub-ledger and telemetry still name the actual held grant. The gateway shares tokens fairly between checkouts (Nx
1465
+ workspace roots). `timeoutMs` and `idleTimeoutMs` start at the grant. The tokens go back when the command exits, or with
1466
+ the executor's socket when it is killed. The wait prints one
1467
+ `cowshed: cpu-tokens wait done elapsed=… tokens=<granted>/<asked>` line. On a host whose gateway socket does not exist
1468
+ (a CI runner, a machine without cowshed), the plugin's `preTasksExecution` serves each Nx run that inherits no pool its
1469
+ own `BOUNDED_EXEC_CPU_POOL` of one token per core, with its jobserver fifo in `CARGO_MAKEFLAGS` for the Cargo that
1470
+ `nx:run-commands` starts, and `postTasksExecution` closes it: the run's targets, started side by side under
1471
+ `NX_PARALLEL=100%`, queue for its cores instead of each sizing its runner to the whole host
1472
+ (`specs/cowshed/05_gateway.md`, "A run without a gateway budgets itself"). Its scope is one run. A command no pool and
1473
+ no gateway answers runs exactly as configured and nothing is said; a gateway from before the budget runs it unbudgeted
1474
+ and stderr says so.
1475
+
1476
+ A granted executor serves a private `BOUNDED_EXEC_CPU_POOL` with its actual token count, and the same count as a make
1477
+ jobserver fifo beside it: `g − 1` token bytes, the command holding the implicit first, which the pool lends a socket
1478
+ child only once the fifo is empty. A socket grant takes fifo bytes first and that slot last, and its release writes the
1479
+ bytes back; the pool waits for a fifo byte on the event loop, so a token Cargo writes back wakes the queued child. Its
1480
+ close drains and removes the fifo. A nested default executor asks that immediate parent pool for its own demand, instead
1481
+ of taking from the host while the parent holds its grant; the pool grants at most what it can. A lent pool accounts for
1482
+ siblings together; each admitted child serves only its own allocation to grandchildren. Closing a child's connection
1483
+ returns its local allocation, never the parent's upstream grant. Upstream loss revokes the downstream pool, so a dead
1484
+ parent grants nothing more; a command whose grant closes while it runs (a gateway restart, or the lending parent's exit)
1485
+ runs on over budget to its own exit, and stderr says `cowshed: cpu-tokens grant ended`. A bare count or absent endpoint
1486
+ follows normal host admission. A connected parent pool's refusal or protocol failure instead fails admission: taking
1487
+ from the host then could wait on the parent's own grant. `options.env` cannot inject either marker, nor a jobserver
1488
+ (`CARGO_MAKEFLAGS`, `MAKEFLAGS`, `MFLAGS`); a parent make's jobserver the executor inherits still reaches an ungranted
1489
+ command. Parent-pool grants record `cpu.inherited: true` and their actual local wait; the span also says
1490
+ `inherited=true`. Pool setup, listener and cleanup errors fail rather than bypassing accounting. Command bounds stay
1491
+ unchanged.
1471
1492
 
1472
1493
  The absent-parent fixture uses the executor's injectable budget with a real, controlled outer pool as its backing. It
1473
1494
  proves a positive allocation and re-acquires it after the command ends, rather than depending on free tokens in the
@@ -18,12 +18,12 @@
18
18
  * two machines ever agree and no cargo target can share a cache entry with a
19
19
  * peer or with CI — a remote cache for Rust was dead on arrival. And the dump
20
20
  * differs between a bare shell and a devenv profile for the SAME sources: in
21
- * the `linux-cross` profile `AR` becomes `x86_64-unknown-linux-gnu-ar`,
22
- * `CARGO_INSTALL_ROOT` moves under `profiles/linux-cross/`, and
23
- * `CC_x86_64_unknown_linux_gnu` appears, so the entry `check:linux` writes
24
- * inside the profile could never be hit by the pre-push probe, which runs
25
- * bare. Measured on one repository-root archive target with the dump still in
26
- * place: bare 18197306115812424011, in-profile 12567954759860890767.
21
+ * the `linux-cross` profile `CARGO_INSTALL_ROOT` moves under
22
+ * `profiles/linux-cross/`, and every variable the profile's tools set appears,
23
+ * so the entry `check:linux` writes inside the profile could never be hit by
24
+ * the pre-push probe, which runs bare. Measured on one repository-root archive
25
+ * target with the dump still in place: bare 18197306115812424011, in-profile
26
+ * 12567954759860890767.
27
27
  *
28
28
  * A file input has neither defect. The lock's bytes are identical bare and
29
29
  * in-profile and on every machine holding the checkout, while the toolchain
@@ -19,12 +19,12 @@ import { runtimeInput, shellWord } from './runtime-input.js';
19
19
  * two machines ever agree and no cargo target can share a cache entry with a
20
20
  * peer or with CI — a remote cache for Rust was dead on arrival. And the dump
21
21
  * differs between a bare shell and a devenv profile for the SAME sources: in
22
- * the `linux-cross` profile `AR` becomes `x86_64-unknown-linux-gnu-ar`,
23
- * `CARGO_INSTALL_ROOT` moves under `profiles/linux-cross/`, and
24
- * `CC_x86_64_unknown_linux_gnu` appears, so the entry `check:linux` writes
25
- * inside the profile could never be hit by the pre-push probe, which runs
26
- * bare. Measured on one repository-root archive target with the dump still in
27
- * place: bare 18197306115812424011, in-profile 12567954759860890767.
22
+ * the `linux-cross` profile `CARGO_INSTALL_ROOT` moves under
23
+ * `profiles/linux-cross/`, and every variable the profile's tools set appears,
24
+ * so the entry `check:linux` writes inside the profile could never be hit by
25
+ * the pre-push probe, which runs bare. Measured on one repository-root archive
26
+ * target with the dump still in place: bare 18197306115812424011, in-profile
27
+ * 12567954759860890767.
28
28
  *
29
29
  * A file input has neither defect. The lock's bytes are identical bare and
30
30
  * in-profile and on every machine holding the checkout, while the toolchain
@@ -5,11 +5,12 @@
5
5
  * compiles is invisible to every check a macOS host can run: a full local lint
6
6
  * passes and CI still goes red on unused imports, unresolved names and dead code
7
7
  * inside the `not(target_os = "macos")` branch. Closing that needs three pieces
8
- * to agree — a devenv profile carrying the cross C toolchain, an Nx target per
9
- * Cargo workspace that asks for the triple, and a root script that runs the
10
- * second inside the first. They live here together because the plugin infers the
11
- * target while the CLI installs the script and reports a project missing it; kept
12
- * apart, the three spellings drift and the gate silently stops gating.
8
+ * to agree — a devenv profile carrying the Linux toolchain (zig, cargo-zigbuild
9
+ * and the Linux rust-std set), an Nx target per Cargo workspace that asks for
10
+ * the triple, and a root script that runs the second inside the first. They
11
+ * live here together because the plugin infers the target while the CLI
12
+ * installs the script and reports a project missing it; kept apart, the three
13
+ * spellings drift and the gate silently stops gating.
13
14
  */
14
15
  /**
15
16
  * The triple CI's Linux job compiles, and the one a macOS host can cross-check.
@@ -17,9 +18,10 @@
17
18
  */
18
19
  export declare const CARGO_LINUX_TRIPLE = "x86_64-unknown-linux-gnu";
19
20
  /**
20
- * The devenv profile carrying the cross C compiler, defined in the managed
21
- * `tooling/direnv/devenv.smoo.nix`. Opt-in because its closure is 0.4 GiB and
22
- * nothing on Darwin links a Linux object.
21
+ * The devenv profile carrying the Linux toolchain — zig, cargo-zigbuild and the
22
+ * Linux rust-std set — defined in the managed `tooling/direnv/devenv.smoo.nix`.
23
+ * Opt-in on macOS because zig alone is a 380 MiB closure that nothing but a
24
+ * Linux artifact or this check uses.
23
25
  */
24
26
  export declare const DEVENV_CROSS_PROFILE = "linux-cross";
25
27
  /**
@@ -34,12 +36,21 @@ export declare const DEVENV_CROSS_PROFILE = "linux-cross";
34
36
  * build-output families, so no aggregate `build` picks it up either.
35
37
  */
36
38
  export declare const CARGO_CROSS_LINT_TARGET = "cargo-lint-cross";
39
+ /**
40
+ * What the cross lint prints when it refuses to compile without cargo-zigbuild
41
+ * on PATH: on a Darwin cache miss this line, and only this line, means the
42
+ * key missed. The managed pre-push hook reads its output for exactly this text
43
+ * to tell a miss from any other Nx failure.
44
+ */
45
+ export declare const CARGO_CROSS_LINT_REFUSAL = "cargo-lint-cross needs cargo-zigbuild from the linux-cross toolchain; run: bun run check:linux";
37
46
  /**
38
47
  * The prefix `cargoFrozen` writes. Exported so target inference can recognize
39
48
  * the commands whose precondition `CARGO_FETCH_TARGET` supplies without
40
49
  * re-spelling the flag; a second copy would silently stop matching.
41
50
  */
42
51
  export declare const CARGO_FROZEN_PREFIX = "cargo --frozen ";
52
+ /** Does this command text run frozen cargo, directly or through cargo-zigbuild? */
53
+ export declare function runsFrozenCargo(text: string): boolean;
43
54
  /**
44
55
  * `--frozen` is cargo's `--locked` + `--offline`. Cargo.lock and the registry
45
56
  * cache are inputs: inferred cargo must not rewrite the lockfile or fetch.
@@ -109,8 +120,13 @@ export declare const CARGO_DENY_WARNINGS = "--config 'build.warnings=\"deny\"'";
109
120
  * must then refuse to launch.
110
121
  *
111
122
  * `--target` is explicit rather than inherited from a CARGO_BUILD_TARGET exported
112
- * by the profile, so running this outside the cross shell fails loudly on a
113
- * missing tool instead of quietly linting the host and reporting green.
123
+ * by the profile, so running this outside the cross shell fails loudly on the
124
+ * missing cargo-zigbuild instead of quietly linting the host and reporting green.
125
+ *
126
+ * cargo-zigbuild rather than plain cargo because ring compiles C for the target
127
+ * from its build script, and build scripts run even under clippy: zig is the
128
+ * C compiler for every Linux triple on every host, the same one the Linux
129
+ * artifacts build with, so the check needs no per-triple cross gcc.
114
130
  *
115
131
  * `cargo fmt` is absent on purpose: formatting is target-independent and already
116
132
  * covered by `cargo-lint`, so repeating it here would only cost time.
@@ -126,7 +142,7 @@ export declare const CARGO_DENY_WARNINGS = "--config 'build.warnings=\"deny\"'";
126
142
  * are distinct anyway, and its own lock keeps the cross check from queueing
127
143
  * behind host builds.
128
144
  */
129
- export declare const CARGO_CROSS_LINT_COMMAND: string;
145
+ export declare const CARGO_CROSS_LINT_COMMAND = "command -v cargo-zigbuild >/dev/null || { echo 'cargo-lint-cross needs cargo-zigbuild from the linux-cross toolchain; run: bun run check:linux' >&2; exit 2; }; cargo-zigbuild clippy --frozen --workspace --all-targets --target x86_64-unknown-linux-gnu --target-dir target/cargo-lint-cross --config 'build.warnings=\"deny\"'";
130
146
  /**
131
147
  * No `--target-dir`: clippy writes the workspace's own `target/`, beside every
132
148
  * dev build. Check units carry their mode in the unit hash, so they never
@@ -150,9 +166,10 @@ export declare const CROSS_CHECK_SCRIPT_NAME = "check:linux";
150
166
  * cache and refuses a push that has no hit, never entering a profile or starting
151
167
  * a compile of its own. That makes this script the only place the gate ever
152
168
  * runs, and a human watching it needs devenv's progress too — the cross profile
153
- * is a 0.4 GiB closure and the clippy behind it is unbounded, so a silent
154
- * terminal is indistinguishable from a hang. Suppressing that output only paid
155
- * while a hook ran this for you and nobody read it.
169
+ * adds about 0.9 GiB (zig plus three rust-std targets) and the clippy behind it
170
+ * is unbounded, so a silent terminal is indistinguishable from a hang.
171
+ * Suppressing that output only paid while a hook ran this for you and nobody
172
+ * read it.
156
173
  */
157
174
  export declare const CROSS_CHECK_SCRIPT_COMMAND = "tooling/devenv -P linux-cross shell -- nx run-many -t cargo-lint-cross";
158
175
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"cross-check-policy.d.ts","sourceRoot":"","sources":["../src/cross-check-policy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH;;;GAGG;AACH,eAAO,MAAM,kBAAkB,6BAA6B,CAAC;AAE7D;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,gBAAgB,CAAC;AAElD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,uBAAuB,qBAAqB,CAAC;AAI1D;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,oBAAoB,CAAC;AAErD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEhD;AAED;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,gBAAgB,CAAC;AAEhD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,mBAAmB,yBAAyB,CAAC;AAE1D;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,mBAAmB,uCAAqC,CAAC;AAEtE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,eAAO,MAAM,wBAAwB,QAElC,CAAC;AAEJ;;;;;;;;;;GAUG;AACH,eAAO,MAAM,yBAAyB,QAAyE,CAAC;AAEhH,6EAA6E;AAC7E,eAAO,MAAM,uBAAuB,gBAAgB,CAAC;AAErD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,0BAA0B,2EAAiG,CAAC;AAEzI;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,+BAA+B,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEtE;AAED,6DAA6D;AAC7D,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CA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;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,+BAA+B,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEtE;AAED,6DAA6D;AAC7D,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAE/D;AAED;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEhE;AAID,iFAAiF;AACjF,wBAAgB,qCAAqC,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAKvF"}
@@ -5,11 +5,12 @@
5
5
  * compiles is invisible to every check a macOS host can run: a full local lint
6
6
  * passes and CI still goes red on unused imports, unresolved names and dead code
7
7
  * inside the `not(target_os = "macos")` branch. Closing that needs three pieces
8
- * to agree — a devenv profile carrying the cross C toolchain, an Nx target per
9
- * Cargo workspace that asks for the triple, and a root script that runs the
10
- * second inside the first. They live here together because the plugin infers the
11
- * target while the CLI installs the script and reports a project missing it; kept
12
- * apart, the three spellings drift and the gate silently stops gating.
8
+ * to agree — a devenv profile carrying the Linux toolchain (zig, cargo-zigbuild
9
+ * and the Linux rust-std set), an Nx target per Cargo workspace that asks for
10
+ * the triple, and a root script that runs the second inside the first. They
11
+ * live here together because the plugin infers the target while the CLI
12
+ * installs the script and reports a project missing it; kept apart, the three
13
+ * spellings drift and the gate silently stops gating.
13
14
  */
14
15
  /**
15
16
  * The triple CI's Linux job compiles, and the one a macOS host can cross-check.
@@ -17,9 +18,10 @@
17
18
  */
18
19
  export const CARGO_LINUX_TRIPLE = 'x86_64-unknown-linux-gnu';
19
20
  /**
20
- * The devenv profile carrying the cross C compiler, defined in the managed
21
- * `tooling/direnv/devenv.smoo.nix`. Opt-in because its closure is 0.4 GiB and
22
- * nothing on Darwin links a Linux object.
21
+ * The devenv profile carrying the Linux toolchain — zig, cargo-zigbuild and the
22
+ * Linux rust-std set — defined in the managed `tooling/direnv/devenv.smoo.nix`.
23
+ * Opt-in on macOS because zig alone is a 380 MiB closure that nothing but a
24
+ * Linux artifact or this check uses.
23
25
  */
24
26
  export const DEVENV_CROSS_PROFILE = 'linux-cross';
25
27
  /**
@@ -34,13 +36,33 @@ export const DEVENV_CROSS_PROFILE = 'linux-cross';
34
36
  * build-output families, so no aggregate `build` picks it up either.
35
37
  */
36
38
  export const CARGO_CROSS_LINT_TARGET = 'cargo-lint-cross';
37
- const CARGO_CROSS_LINT_GUARD = `[ -n "\${CC_x86_64_unknown_linux_gnu:-}" ] || [ "$(uname -s)" = Linux ] || { echo 'cargo-lint-cross needs the linux-cross C toolchain; run: bun run check:linux' >&2; exit 2; }`;
39
+ /**
40
+ * What the cross lint prints when it refuses to compile without cargo-zigbuild
41
+ * on PATH: on a Darwin cache miss this line, and only this line, means the
42
+ * key missed. The managed pre-push hook reads its output for exactly this text
43
+ * to tell a miss from any other Nx failure.
44
+ */
45
+ export const CARGO_CROSS_LINT_REFUSAL = 'cargo-lint-cross needs cargo-zigbuild from the linux-cross toolchain; run: bun run check:linux';
46
+ const CARGO_CROSS_LINT_GUARD = `command -v cargo-zigbuild >/dev/null || { echo '${CARGO_CROSS_LINT_REFUSAL}' >&2; exit 2; }`;
38
47
  /**
39
48
  * The prefix `cargoFrozen` writes. Exported so target inference can recognize
40
49
  * the commands whose precondition `CARGO_FETCH_TARGET` supplies without
41
50
  * re-spelling the flag; a second copy would silently stop matching.
42
51
  */
43
52
  export const CARGO_FROZEN_PREFIX = 'cargo --frozen ';
53
+ /**
54
+ * cargo-zigbuild's spelling of frozen clippy. The flag sits on the subcommand
55
+ * because cargo does not forward a global `--frozen` to an external one:
56
+ * `cargo --frozen zigbuild` resolves and writes Cargo.lock as if unflagged
57
+ * (measured). And `cargo-zigbuild` is run directly rather than as
58
+ * `cargo zigbuild`, so its inner `cargo` is the one on PATH rather than the
59
+ * real binary cargo would hand it through `CARGO`.
60
+ */
61
+ const CARGO_ZIGBUILD_CLIPPY_FROZEN_PREFIX = 'cargo-zigbuild clippy --frozen ';
62
+ /** Does this command text run frozen cargo, directly or through cargo-zigbuild? */
63
+ export function runsFrozenCargo(text) {
64
+ return text.includes(CARGO_FROZEN_PREFIX) || text.includes(CARGO_ZIGBUILD_CLIPPY_FROZEN_PREFIX);
65
+ }
44
66
  /**
45
67
  * `--frozen` is cargo's `--locked` + `--offline`. Cargo.lock and the registry
46
68
  * cache are inputs: inferred cargo must not rewrite the lockfile or fetch.
@@ -112,8 +134,13 @@ export const CARGO_DENY_WARNINGS = `--config 'build.warnings="deny"'`;
112
134
  * must then refuse to launch.
113
135
  *
114
136
  * `--target` is explicit rather than inherited from a CARGO_BUILD_TARGET exported
115
- * by the profile, so running this outside the cross shell fails loudly on a
116
- * missing tool instead of quietly linting the host and reporting green.
137
+ * by the profile, so running this outside the cross shell fails loudly on the
138
+ * missing cargo-zigbuild instead of quietly linting the host and reporting green.
139
+ *
140
+ * cargo-zigbuild rather than plain cargo because ring compiles C for the target
141
+ * from its build script, and build scripts run even under clippy: zig is the
142
+ * C compiler for every Linux triple on every host, the same one the Linux
143
+ * artifacts build with, so the check needs no per-triple cross gcc.
117
144
  *
118
145
  * `cargo fmt` is absent on purpose: formatting is target-independent and already
119
146
  * covered by `cargo-lint`, so repeating it here would only cost time.
@@ -129,7 +156,7 @@ export const CARGO_DENY_WARNINGS = `--config 'build.warnings="deny"'`;
129
156
  * are distinct anyway, and its own lock keeps the cross check from queueing
130
157
  * behind host builds.
131
158
  */
132
- export const CARGO_CROSS_LINT_COMMAND = `${CARGO_CROSS_LINT_GUARD}; ${cargoFrozen(`clippy --workspace --all-targets --target ${CARGO_LINUX_TRIPLE} --target-dir target/cargo-lint-cross ${CARGO_DENY_WARNINGS}`)}`;
159
+ export const CARGO_CROSS_LINT_COMMAND = `${CARGO_CROSS_LINT_GUARD}; ${CARGO_ZIGBUILD_CLIPPY_FROZEN_PREFIX}--workspace --all-targets --target ${CARGO_LINUX_TRIPLE} --target-dir target/cargo-lint-cross ${CARGO_DENY_WARNINGS}`;
133
160
  /**
134
161
  * No `--target-dir`: clippy writes the workspace's own `target/`, beside every
135
162
  * dev build. Check units carry their mode in the unit hash, so they never
@@ -153,9 +180,10 @@ export const CROSS_CHECK_SCRIPT_NAME = 'check:linux';
153
180
  * cache and refuses a push that has no hit, never entering a profile or starting
154
181
  * a compile of its own. That makes this script the only place the gate ever
155
182
  * runs, and a human watching it needs devenv's progress too — the cross profile
156
- * is a 0.4 GiB closure and the clippy behind it is unbounded, so a silent
157
- * terminal is indistinguishable from a hang. Suppressing that output only paid
158
- * while a hook ran this for you and nobody read it.
183
+ * adds about 0.9 GiB (zig plus three rust-std targets) and the clippy behind it
184
+ * is unbounded, so a silent terminal is indistinguishable from a hang.
185
+ * Suppressing that output only paid while a hook ran this for you and nobody
186
+ * read it.
159
187
  */
160
188
  export const CROSS_CHECK_SCRIPT_COMMAND = `tooling/devenv -P ${DEVENV_CROSS_PROFILE} shell -- nx run-many -t ${CARGO_CROSS_LINT_TARGET}`;
161
189
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"ensure-built.d.ts","sourceRoot":"","sources":["../src/ensure-built.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAe3C,OAAO,KAAK,KAAK,eAAe,MAAM,uBAAuB,CAAC;AAC9D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,EAAE,YAAY,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACzF,OAAO,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,KAAK,KAAK,cAAc,MAAM,6BAA6B,CAAC;AACnE,OAAO,KAAK,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAC3D,OAAO,KAAK,KAAK,YAAY,MAAM,2BAA2B,CAAC;AAC/D,OAAO,KAAK,KAAK,QAAQ,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,KAAK,kBAAkB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AChG,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC;CAC7B;AAkJD;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,SAAS,YAAY,EAAE,GAAG,MAAM,GAAG,IAAI,CAwBhF;AA6DD,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC;CACxC;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,UAAU,EAClB,IAAI,EAAE,SAAS,EACf,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,OAAO,GAAG,IAAI,KAAK,MAAM,GACtD,iBAAiB,CAQnB"}
@@ -45,7 +45,7 @@ export function describeMiss(reason) {
45
45
  case 'cache-disabled':
46
46
  return `the Nx cache is disabled, so ${reason.taskId} must run`;
47
47
  case 'no-daemon':
48
- return `the Nx daemon is disabled, so ${reason.taskId} cannot be checked without running it`;
48
+ return `no Nx daemon serves this workspace, so ${reason.taskId} cannot be checked without running it`;
49
49
  }
50
50
  }
51
51
  /**
@@ -380,19 +380,23 @@ export function missBeforeProbe(env, taskId) {
380
380
  }
381
381
  return null;
382
382
  }
383
- async function prepareWorkspaceProbe(workspaceRoot, selector, forceGraphRpc = false) {
383
+ async function prepareWorkspaceProbe(workspaceRoot, selector, operation) {
384
384
  const taskId = selectorTaskId(selector);
385
+ const noDaemon = { kind: 'no-daemon', reason: { kind: 'no-daemon', taskId } };
385
386
  // This explicit fallback path loads no Nx. The build operation may run the
386
387
  // checkout-local CLI; the read-only operation can only report the miss.
387
388
  if (process.env.NX_DAEMON === 'false') {
388
- return { kind: 'no-daemon', reason: { kind: 'no-daemon', taskId } };
389
+ return noDaemon;
389
390
  }
390
391
  // Runtime modules always belong to the provider's installed Nx version.
391
392
  const requireNx = createWorkspaceNxRequire(workspaceRoot);
392
393
  bindWorkspaceRoot(workspaceRoot, requireNx);
393
394
  const { daemonClient } = requireNx('nx/src/daemon/client/client');
394
395
  if (!daemonClient.enabled()) {
395
- return { kind: 'no-daemon', reason: { kind: 'no-daemon', taskId } };
396
+ return noDaemon;
397
+ }
398
+ if (operation === 'read-only' && !(await daemonClient.isServerAvailable())) {
399
+ return noDaemon;
396
400
  }
397
401
  assignEnvironment(process.env, withoutOuterTaskCacheBypass(process.env));
398
402
  const { readNxJson } = requireNx('nx/src/config/nx-json');
@@ -405,7 +409,7 @@ async function prepareWorkspaceProbe(workspaceRoot, selector, forceGraphRpc = fa
405
409
  const loadDotEnvFiles = process.env.NX_LOAD_DOT_ENV_FILES !== 'false';
406
410
  setEnvVarsBasedOnArgs(nxArgs, loadDotEnvFiles);
407
411
  performance.mark('ensureBuilt:graph:start');
408
- const projectGraph = await currentProjectGraph(workspaceRoot, nxJson, requireNx, forceGraphRpc);
412
+ const projectGraph = await currentProjectGraph(workspaceRoot, nxJson, requireNx, operation === 'read-only');
409
413
  nxJson = readNxJson();
410
414
  requireProject(projectGraph, selector.project);
411
415
  const taskGraph = createTaskGraph(projectGraph, {}, [selector.project], [selector.target], selector.configuration, overrides, false);
@@ -438,7 +442,7 @@ async function withTaskHooks(workspaceRoot, selector, prepared, operation) {
438
442
  return result;
439
443
  }
440
444
  async function ensureBuiltInWorkspace(workspaceRoot, selector) {
441
- const prepared = await prepareWorkspaceProbe(workspaceRoot, selector);
445
+ const prepared = await prepareWorkspaceProbe(workspaceRoot, selector, 'build');
442
446
  if (prepared.kind === 'no-daemon')
443
447
  return runViaCli(workspaceRoot, selector, prepared.reason);
444
448
  return withTaskHooks(workspaceRoot, selector, prepared, buildPreparedTarget);
@@ -456,9 +460,10 @@ async function probeBuiltInWorkspace(workspaceRoot, selector) {
456
460
  const receipt = readProducerReceipt(workspaceRoot, taskId);
457
461
  if (receipt.ok)
458
462
  return { disposition: 'hit', receipt: receipt.value };
459
- // A failed publication proof asks Nx for the authoritative generation, but
460
- // never hashes against the consumer environment or starts a provider runner.
461
- const prepared = await prepareWorkspaceProbe(workspaceRoot, selector, true);
463
+ // A failed publication proof asks a serving Nx daemon for the authoritative
464
+ // generation, but never hashes against the consumer environment, starts a
465
+ // provider runner or starts the provider's daemon.
466
+ const prepared = await prepareWorkspaceProbe(workspaceRoot, selector, 'read-only');
462
467
  const detail = prepared.kind === 'no-daemon'
463
468
  ? `${receipt.detail}; authoritative graph unavailable: ${describeMiss(prepared.reason)}`
464
469
  : receipt.detail;
@@ -10,6 +10,13 @@ import { type TokenGrant } from './cpu-tokens.js';
10
10
  * its FIFO queue. A grant lasts while its connection does, so a child that dies returns its tokens
11
11
  * with its socket. A pool grants only from its own count, and a pool whose upstream grant has gone
12
12
  * grants nothing.
13
+ *
14
+ * The same count is a GNU make jobserver fifo beside the socket, mode 0600, which Cargo, its build
15
+ * scripts and every nested `cargo` read through `CARGO_MAKEFLAGS`/`MAKEFLAGS` (specs/cowshed/05_gateway.md,
16
+ * "The jobserver fifo"). A pool of `g` holds `g − 1` token bytes there; the holder's own command holds the
17
+ * implicit first token. A socket grant takes fifo bytes first and that implicit slot last, which the holder
18
+ * is not using while it waits on the child it lends it to; release writes the bytes back and frees the slot.
19
+ * A Cargo reading the fifo and a nested runner holding a socket grant so share one count.
13
20
  */
14
21
  /** The environment name a child reads its parent's pool endpoint from; its count is `CPU_TOKENS_ENV`. */
15
22
  export declare const CPU_POOL_ENV = "BOUNDED_EXEC_CPU_POOL";
@@ -21,12 +28,12 @@ export interface InheritedCpuPool {
21
28
  }
22
29
  /** A running pool: the environment a child inherits to reach it, and how to close it. */
23
30
  export interface CpuPool {
24
- /** The endpoint and the count the pool actually holds. */
31
+ /** The endpoint, the count the pool actually holds, and its make jobserver fifo. */
25
32
  readonly environment: Record<string, string>;
26
33
  /**
27
- * Refuses new grants, ends every child connection and removes the pool's directory. The outcome is
28
- * cached: every call, and an upstream-loss close, returns the first close's outcome. A failed
29
- * cleanup is an `ok: false` value, never a rejection.
34
+ * Refuses new grants, ends every child connection, drains and closes the jobserver fifo, and removes the pool's
35
+ * directory with the fifo in it. The outcome is cached: every call, and an upstream-loss close, returns the first
36
+ * close's outcome. A failed cleanup is an `ok: false` value, never a rejection.
30
37
  */
31
38
  close(): Promise<CloseOutcome>;
32
39
  }
@@ -63,9 +70,9 @@ export declare function readInheritedCpuPool(environment: Readonly<NodeJS.Proces
63
70
  export declare function takeParentCpuTokens(parent: InheritedCpuPool, want: number): Promise<TokenGrant>;
64
71
  /**
65
72
  * Make a pool of `tokens` that lives while `closed` does: when `closed` resolves the pool refuses
66
- * grants, ends its child connections and removes its directory. A child's `host-wait` is reported
67
- * to `waits` for as long as its connection holds it; a sub-pool reports to the same `waits`.
68
- * Setup failures are values; a non-positive or unsafe count is a programmer bug and throws.
73
+ * grants, ends its child connections, drains its jobserver fifo and removes its directory. A child's
74
+ * `host-wait` is reported to `waits` for as long as its connection holds it; a sub-pool reports to the
75
+ * same `waits`. Setup failures are values; a non-positive or unsafe count is a programmer bug and throws.
69
76
  */
70
77
  export declare function createCpuPool(tokens: number, closed: Promise<void>, waits: HostWaits): Promise<{
71
78
  ok: true;
@@ -1 +1 @@
1
- {"version":3,"file":"cpu-pool.d.ts","sourceRoot":"","sources":["../../../src/executors/bounded-exec/cpu-pool.ts"],"names":[],"mappings":"AAKA,OAAO,EAAwC,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAGxF;;;;;;;;;;;GAWG;AAEH,yGAAyG;AACzG,eAAO,MAAM,YAAY,0BAA0B,CAAC;AAEpD,6FAA6F;AAC7F,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,2GAA2G;IAC3G,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,yFAAyF;AACzF,MA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