@smoothbricks/nx-plugin 0.7.17 → 0.7.19

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 (199) hide show
  1. package/README.md +315 -114
  2. package/dist/.build-inputs.json +47 -38
  3. package/dist/built-output-packages.js +1 -1
  4. package/dist/bun-lock-scope.d.ts +128 -20
  5. package/dist/bun-lock-scope.d.ts.map +1 -1
  6. package/dist/bun-lock-scope.js +267 -44
  7. package/dist/cargo-closure-input.d.ts +8 -6
  8. package/dist/cargo-closure-input.d.ts.map +1 -1
  9. package/dist/cargo-closure-input.js +15 -12
  10. package/dist/cargo-source-hash.d.ts +26 -25
  11. package/dist/cargo-source-hash.d.ts.map +1 -1
  12. package/dist/cargo-source-hash.js +84 -105
  13. package/dist/cargo-toolchain-paths.d.ts +2 -2
  14. package/dist/cargo-toolchain-paths.js +2 -2
  15. package/dist/cargo-workspace.d.ts +20 -2
  16. package/dist/cargo-workspace.d.ts.map +1 -1
  17. package/dist/cargo-workspace.js +43 -22
  18. package/dist/ensure-built-receipt.d.ts +3 -2
  19. package/dist/ensure-built-receipt.d.ts.map +1 -1
  20. package/dist/ensure-built-receipt.js +3 -2
  21. package/dist/eslint-config-closure.d.ts +8 -3
  22. package/dist/eslint-config-closure.d.ts.map +1 -1
  23. package/dist/eslint-config-closure.js +24 -5
  24. package/dist/executors/bounded-exec/admission-queue.d.ts +3 -1
  25. package/dist/executors/bounded-exec/admission-queue.d.ts.map +1 -1
  26. package/dist/executors/bounded-exec/admission-queue.js +9 -10
  27. package/dist/executors/bounded-exec/awake-clock.d.ts +5 -0
  28. package/dist/executors/bounded-exec/awake-clock.d.ts.map +1 -0
  29. package/dist/executors/bounded-exec/awake-clock.js +22 -0
  30. package/dist/executors/bounded-exec/bounds.d.ts +19 -6
  31. package/dist/executors/bounded-exec/bounds.d.ts.map +1 -1
  32. package/dist/executors/bounded-exec/bounds.js +22 -15
  33. package/dist/executors/bounded-exec/case-gate.d.ts +114 -0
  34. package/dist/executors/bounded-exec/case-gate.d.ts.map +1 -0
  35. package/dist/executors/bounded-exec/case-gate.js +342 -0
  36. package/dist/executors/bounded-exec/cpu-pool-thread.d.ts +1 -0
  37. package/dist/executors/bounded-exec/cpu-pool-thread.d.ts.map +1 -1
  38. package/dist/executors/bounded-exec/cpu-pool-thread.js +2 -2
  39. package/dist/executors/bounded-exec/cpu-pool.d.ts +28 -1
  40. package/dist/executors/bounded-exec/cpu-pool.d.ts.map +1 -1
  41. package/dist/executors/bounded-exec/cpu-pool.js +102 -16
  42. package/dist/executors/bounded-exec/cpu-rise.d.ts +73 -0
  43. package/dist/executors/bounded-exec/cpu-rise.d.ts.map +1 -0
  44. package/dist/executors/bounded-exec/cpu-rise.js +111 -0
  45. package/dist/executors/bounded-exec/endpoint-life.d.ts +146 -0
  46. package/dist/executors/bounded-exec/endpoint-life.d.ts.map +1 -0
  47. package/dist/executors/bounded-exec/endpoint-life.js +228 -0
  48. package/dist/executors/bounded-exec/executor.d.ts +1 -1
  49. package/dist/executors/bounded-exec/executor.d.ts.map +1 -1
  50. package/dist/executors/bounded-exec/executor.js +256 -86
  51. package/dist/executors/bounded-exec/gateway-lease.d.ts +1 -1
  52. package/dist/executors/bounded-exec/gateway-lease.d.ts.map +1 -1
  53. package/dist/executors/bounded-exec/gateway-lease.js +8 -1
  54. package/dist/executors/bounded-exec/go-run-summary.d.ts +51 -0
  55. package/dist/executors/bounded-exec/go-run-summary.d.ts.map +1 -0
  56. package/dist/executors/bounded-exec/go-run-summary.js +98 -0
  57. package/dist/executors/bounded-exec/hang-diagnostics.d.ts +11 -3
  58. package/dist/executors/bounded-exec/hang-diagnostics.d.ts.map +1 -1
  59. package/dist/executors/bounded-exec/hang-diagnostics.js +125 -47
  60. package/dist/executors/bounded-exec/lease-wait.d.ts +1 -0
  61. package/dist/executors/bounded-exec/lease-wait.d.ts.map +1 -1
  62. package/dist/executors/bounded-exec/lease-wait.js +1 -0
  63. package/dist/executors/bounded-exec/mbx-pool.d.ts +42 -7
  64. package/dist/executors/bounded-exec/mbx-pool.d.ts.map +1 -1
  65. package/dist/executors/bounded-exec/mbx-pool.js +45 -8
  66. package/dist/executors/bounded-exec/mbx-reservations.d.ts +12 -6
  67. package/dist/executors/bounded-exec/mbx-reservations.d.ts.map +1 -1
  68. package/dist/executors/bounded-exec/mbx-reservations.js +190 -284
  69. package/dist/executors/bounded-exec/parent-grant.d.ts +2 -0
  70. package/dist/executors/bounded-exec/parent-grant.d.ts.map +1 -1
  71. package/dist/executors/bounded-exec/parent-grant.js +1 -0
  72. package/dist/executors/bounded-exec/pool-admission.d.ts +29 -3
  73. package/dist/executors/bounded-exec/pool-admission.d.ts.map +1 -1
  74. package/dist/executors/bounded-exec/pool-admission.js +47 -1
  75. package/dist/executors/bounded-exec/progress-channel.d.ts +38 -0
  76. package/dist/executors/bounded-exec/progress-channel.d.ts.map +1 -0
  77. package/dist/executors/bounded-exec/progress-channel.js +113 -0
  78. package/dist/executors/bounded-exec/progress.d.ts +5 -1
  79. package/dist/executors/bounded-exec/progress.d.ts.map +1 -1
  80. package/dist/executors/bounded-exec/progress.js +31 -1
  81. package/dist/executors/bounded-exec/ram-temp.d.ts +24 -1
  82. package/dist/executors/bounded-exec/ram-temp.d.ts.map +1 -1
  83. package/dist/executors/bounded-exec/ram-temp.js +123 -16
  84. package/dist/executors/bounded-exec/reservation-connection.d.ts +90 -0
  85. package/dist/executors/bounded-exec/reservation-connection.d.ts.map +1 -0
  86. package/dist/executors/bounded-exec/reservation-connection.js +248 -0
  87. package/dist/executors/bounded-exec/run-cpu-pool.d.ts.map +1 -1
  88. package/dist/executors/bounded-exec/run-cpu-pool.js +3 -0
  89. package/dist/executors/bounded-exec/runner-sizing.d.ts +9 -5
  90. package/dist/executors/bounded-exec/runner-sizing.d.ts.map +1 -1
  91. package/dist/executors/bounded-exec/runner-sizing.js +13 -9
  92. package/dist/executors/bounded-exec/schema.d.ts +7 -2
  93. package/dist/executors/bounded-exec/schema.d.ts.map +1 -1
  94. package/dist/executors/bounded-exec/schema.js +17 -1
  95. package/dist/executors/bounded-exec/suite-minimum.d.ts +21 -0
  96. package/dist/executors/bounded-exec/suite-minimum.d.ts.map +1 -0
  97. package/dist/executors/bounded-exec/suite-minimum.js +85 -0
  98. package/dist/executors/bounded-exec/test-result-writer.d.ts +2 -0
  99. package/dist/executors/bounded-exec/test-result-writer.d.ts.map +1 -1
  100. package/dist/executors/bounded-exec/test-result-writer.js +1 -0
  101. package/dist/executors/bounded-exec/test-results.d.ts +5 -0
  102. package/dist/executors/bounded-exec/test-results.d.ts.map +1 -1
  103. package/dist/executors/bounded-exec/test-results.js +2 -2
  104. package/dist/executors/bounded-exec/verdict.d.ts +39 -10
  105. package/dist/executors/bounded-exec/verdict.d.ts.map +1 -1
  106. package/dist/executors/bounded-exec/verdict.js +60 -14
  107. package/dist/executors/cargo-zigbuild/executor.d.ts +10 -8
  108. package/dist/executors/cargo-zigbuild/executor.d.ts.map +1 -1
  109. package/dist/executors/cargo-zigbuild/executor.js +32 -19
  110. package/dist/index.d.ts.map +1 -1
  111. package/dist/index.js +294 -152
  112. package/dist/managed-files/ci-workflow.d.ts +4 -1
  113. package/dist/managed-files/ci-workflow.d.ts.map +1 -1
  114. package/dist/managed-files/ci-workflow.js +9 -14
  115. package/dist/managed-files/files.d.ts +3 -3
  116. package/dist/managed-files/files.js +3 -3
  117. package/dist/managed-files/generator.d.ts +5 -1
  118. package/dist/managed-files/generator.d.ts.map +1 -1
  119. package/dist/managed-files/generator.js +22 -7
  120. package/dist/managed-files/render-memo.d.ts +13 -0
  121. package/dist/managed-files/render-memo.d.ts.map +1 -0
  122. package/dist/managed-files/render-memo.js +94 -0
  123. package/dist/task-results.js +2 -1
  124. package/dist/test-program.d.ts +11 -6
  125. package/dist/test-program.d.ts.map +1 -1
  126. package/dist/test-program.js +39 -35
  127. package/dist/tool-bins.d.ts +12 -0
  128. package/dist/tool-bins.d.ts.map +1 -1
  129. package/dist/tool-bins.js +31 -6
  130. package/dist/typecheck-test-policy.d.ts +10 -1
  131. package/dist/typecheck-test-policy.d.ts.map +1 -1
  132. package/dist/typecheck-test-policy.js +40 -24
  133. package/dist/workspace-config-policy.d.ts.map +1 -1
  134. package/dist/workspace-config-policy.js +135 -42
  135. package/dist/workspace-index.d.ts +14 -1
  136. package/dist/workspace-index.d.ts.map +1 -1
  137. package/dist/workspace-index.js +36 -4
  138. package/executors.json +2 -0
  139. package/managed/raw/envrc +24 -0
  140. package/managed/raw/patches/nx@24.0.3.patch +1851 -221
  141. package/managed/raw/patches/ttsc@0.37.1.patch +1055 -0
  142. package/managed/raw/tooling/direnv/developer-links.ts +122 -14
  143. package/managed/raw/tooling/direnv/devenv.smoo.nix +20 -19
  144. package/managed/templates/github/actions/save-nix-devenv/action.yml +19 -1
  145. package/managed/templates/github/actions/setup-devenv/action.yml +2 -0
  146. package/package.json +68 -11
  147. package/runtime/nx-publish/.build-inputs.json +2 -2
  148. package/runtime/nx-publish/cache_adapter.js +293 -3
  149. package/runtime/nx-publish/nx_publish.js +36 -14
  150. package/src/built-output-packages.ts +1 -1
  151. package/src/bun-lock-scope.ts +293 -40
  152. package/src/cargo-closure-input.ts +20 -12
  153. package/src/cargo-source-hash.ts +119 -145
  154. package/src/cargo-toolchain-paths.ts +2 -2
  155. package/src/cargo-workspace.ts +59 -21
  156. package/src/ensure-built-receipt.ts +3 -2
  157. package/src/eslint-config-closure.ts +27 -6
  158. package/src/executors/bounded-exec/admission-queue.ts +11 -10
  159. package/src/executors/bounded-exec/awake-clock.ts +20 -0
  160. package/src/executors/bounded-exec/bounds.ts +41 -19
  161. package/src/executors/bounded-exec/case-gate.ts +365 -0
  162. package/src/executors/bounded-exec/cpu-pool-thread.ts +3 -3
  163. package/src/executors/bounded-exec/cpu-pool.ts +139 -12
  164. package/src/executors/bounded-exec/cpu-rise.ts +156 -0
  165. package/src/executors/bounded-exec/endpoint-life.ts +279 -0
  166. package/src/executors/bounded-exec/executor.ts +341 -123
  167. package/src/executors/bounded-exec/gateway-lease.ts +6 -0
  168. package/src/executors/bounded-exec/go-run-summary.ts +137 -0
  169. package/src/executors/bounded-exec/hang-diagnostics.ts +150 -50
  170. package/src/executors/bounded-exec/lease-wait.ts +1 -0
  171. package/src/executors/bounded-exec/mbx-pool.ts +57 -9
  172. package/src/executors/bounded-exec/mbx-reservations.ts +216 -183
  173. package/src/executors/bounded-exec/parent-grant.ts +3 -0
  174. package/src/executors/bounded-exec/pool-admission.ts +59 -2
  175. package/src/executors/bounded-exec/progress-channel.ts +129 -0
  176. package/src/executors/bounded-exec/progress.ts +39 -3
  177. package/src/executors/bounded-exec/ram-temp.ts +137 -17
  178. package/src/executors/bounded-exec/reservation-connection.ts +221 -0
  179. package/src/executors/bounded-exec/run-cpu-pool.ts +2 -0
  180. package/src/executors/bounded-exec/runner-sizing.ts +13 -8
  181. package/src/executors/bounded-exec/schema.json +1 -1
  182. package/src/executors/bounded-exec/schema.ts +21 -2
  183. package/src/executors/bounded-exec/suite-minimum.ts +81 -0
  184. package/src/executors/bounded-exec/test-result-writer.ts +3 -0
  185. package/src/executors/bounded-exec/test-results.ts +5 -0
  186. package/src/executors/bounded-exec/verdict.ts +83 -22
  187. package/src/executors/cargo-zigbuild/executor.ts +30 -19
  188. package/src/index.ts +357 -166
  189. package/src/managed-files/ci-workflow.ts +13 -17
  190. package/src/managed-files/files.ts +3 -3
  191. package/src/managed-files/generator.ts +21 -6
  192. package/src/managed-files/render-memo.ts +135 -0
  193. package/src/test-program.ts +36 -41
  194. package/src/tool-bins.ts +35 -6
  195. package/src/typecheck-test-policy.ts +49 -24
  196. package/src/workspace-config-policy.ts +161 -43
  197. package/src/workspace-index.ts +40 -5
  198. package/test-timings.json +157 -141
  199. package/managed/raw/patches/ttsc@0.36.3.patch +0 -1660
package/README.md CHANGED
@@ -190,7 +190,13 @@ Fixtures the suite infers in its own process own their Nx state the same way. Th
190
190
  resolves its own `.nx`. Nx's native file index shares one walk among every context of one workspace-data directory: the
191
191
  walk holds `nx_files.lock` there, and a context that waits on it loads the archive that walk wrote instead of walking
192
192
  its own root. Resolved through the job's absolute directory, a fixture's context gets the files of whichever root walked
193
- there last.
193
+ there last. `globIndexedFiles`, `freshIndexedFiles` and `freshIndexedFileData` (`src/workspace-index.ts`) close the same
194
+ hole outside the suite's preload: a root other than this process's workspace is walked under Nx's default data directory
195
+ inside that root, never under the inherited variable. The compiled-in Markdown check's fixtures
196
+ (`tooling/checks/compiled-in-docs.fixtures.ts`) run without the preload; under CI's absolute
197
+ `NX_WORKSPACE_DATA_DIRECTORY` their fixture's walk wrote its archive into the repository's shared directory, and Linux
198
+ CI found no planted crate (run 42738719423), as a walk that waits on the repository's walk and loads its archive would.
199
+ The fixtures plant that variable and require the directory it names to stay empty.
194
200
 
195
201
  Fixture sockets and loopback listeners live where a Cowshed sandbox admits them, never at a literal `/tmp` path or on
196
202
  port 0. A fixture's short socket parent alias lives beside the Nx socket directory the job supplies (the parent of
@@ -413,14 +419,14 @@ all three. The object moves when the toolchain moves, once, and nothing else in
413
419
  sources are not hashed instead: the managed module alone changed 43 times in the 30 days to 2026-10-26, and each edit
414
420
  would have rekeyed every cargo verdict; evaluated at those commits on Linux x86_64, the observed store objects did not
415
421
  change. rustc and cargo are not in the list on purpose. Cargo keys units on the output of rustc's version command, which
416
- is hashed beside this input, never on rustc's path. On a non-Linux host the default shell and its linux-cross profile
417
- carry different rust-std sets, so that path would split one target's key between the two shells. Only a path in the Nix
418
- store counts; a path elsewhere is ignored. A linker named only by Cargo configuration is outside this environment probe:
419
- a target that runs one must name the script itself as an input. Workspace test runners additionally hash the manifest of
420
- every package the workspace build compiles inside the Nx workspace (a member's, and a path package's that reaches the
421
- build only as some crate's dev-dependency), because those affect unified features, and the nextest
422
- executable/configuration. While the build compiles a path package outside the Nx workspace, every runner also names
423
- externalRustCrates, which then must be declared: a runner's key does not follow the test build's outputs.
422
+ is hashed beside this input, never on rustc's path. The shells of one host may carry different rust-std sets, so that
423
+ path would split one target's key between them. Only a path in the Nix store counts; a path elsewhere is ignored. A
424
+ linker named only by Cargo configuration is outside this environment probe: a target that runs one must name the script
425
+ itself as an input. Workspace test runners additionally hash the manifest of every package the workspace build compiles
426
+ inside the Nx workspace (a member's, and a path package's that reaches the build only as some crate's dev-dependency),
427
+ because those affect unified features, and the nextest executable/configuration. While the build compiles a path package
428
+ outside the Nx workspace, every runner also names externalRustCrates, which then must be declared: a runner's key does
429
+ not follow the test build's outputs.
424
430
 
425
431
  Nothing machine-local takes part. The ambient cargo environment as a whole and the global `$CARGO_HOME/config.toml` are
426
432
  deliberately not hashed: their values carry per-checkout state directories (`CARGO_INSTALL_ROOT` moves under the active
@@ -461,11 +467,39 @@ this repository once loaded it through one, and the land gate refused the graph)
461
467
  lock-scope node of the crates the target builds (`cargoClosure` carries it; a target that names neither gets the node of
462
468
  the directory it runs in). An entry naming only `cargo-lock:` nodes does not count as naming npm packages.
463
469
 
464
- No input declaration removes a project's own configuration from a task's key. Nx 24.0.3 adds `ProjectConfiguration` to
465
- every task (`hash_planner.rs` `gather_self_inputs`), and `hash_project_config.rs` hashes the executor, outputs, options,
466
- configurations and parallelism of every target in the project, plus its tags and named inputs (not `inputs`,
467
- `dependsOn`, `cache` or `//`). An edit to one target's command therefore re-keys every target of that project, including
468
- each inferred `cargo-test-*` runner. Only the project a target lives in decides that sensitivity.
470
+ No input declaration removes a task's own target from its key. Nx 24.0.3 adds a `ProjectConfiguration` node to every
471
+ task for its own project and for each project its `^` inputs reach (`hash_planner.rs` `gather_self_inputs`). The
472
+ project-configuration hunk of `nx@24.0.3.patch` (`patches/README.md`) hashes that node for the task's own project from
473
+ the project's root, tags and the named inputs its `inputs` reach (a name, `^name` or `{ input }` entry, and the names
474
+ those named inputs name in turn, in `nx.json` and in any project) and the task's own target: its executor, outputs,
475
+ options, configurations and parallelism (not `inputs`, `dependsOn`, `cache` or `//`). For a project the task's `^`
476
+ inputs reach, the node hashes that project's root, tags and the same named inputs. A named input no input of the task
477
+ reaches moves none of its keys, so a project's inferred `cargoClosure` re-keys the tasks that name it and no other. An
478
+ edit to one target's command re-keys that target's tasks. Its sibling targets, each inferred `cargo-test-*` runner among
479
+ them, keep their keys unless they read the edited file.
480
+
481
+ That keying is sound only while no executor reads another target's configuration at run time. An executor that does must
482
+ have that target named in the project-configuration hunk, which then hashes it beside the reading task's own target, for
483
+ that executor's tasks only and never for a whole project. The hunk names no target today, because no executor below
484
+ reads one. Every new executor, this plugin's or one a consumer adopts, gets a row here before it runs.
485
+
486
+ | Executor | Reads at run time | Verdict | Evidence |
487
+ | ------------------------------------------ | -------------------------------------------------------------------- | -------- | ---------------------------------------------------------------------------------------------------- |
488
+ | `@smoothbricks/nx-plugin:bounded-exec` | its options, the workspace root, its own task's id and hash | own only | `src/executors/bounded-exec/executor.ts:266-271`, `:337` |
489
+ | `@smoothbricks/nx-plugin:all-verdicts` | its options and the workspace root | own only | `src/executors/all-verdicts/executor.ts:157-166` |
490
+ | `@smoothbricks/nx-plugin:typescript-emit` | its options and the tsconfig they name | own only | `src/executors/typescript-emit/executor.ts:66-68` |
491
+ | `@smoothbricks/nx-plugin:scriptc-native` | its options and the workspace root | own only | `src/executors/scriptc-native/executor.ts:101` |
492
+ | `@smoothbricks/nx-plugin:cargo-zigbuild` | its options and the workspace root | own only | `src/executors/cargo-zigbuild/executor.ts:226-227` |
493
+ | `@smoothbricks/nx-plugin:shard-timings` | its options, its project's name and the workspace root | own only | `src/executors/shard-timings/executor.ts:19-23` |
494
+ | `@smoothbricks/nx-plugin:wrangler-deploy` | its project's root; its hasher reads its own target's `stage` option | own only | `src/executors/wrangler-deploy/executor.ts:25-39`, `src/executors/wrangler-deploy/hasher.ts:102-103` |
495
+ | `nx:run-commands` | its options and its own target's `ultracache` and `continuous` | own only | `nx/dist/src/executors/run-commands/run-commands.impl.js:78` |
496
+ | `nx:run-script` | its options and its project's root | own only | `nx/dist/src/executors/run-script/run-script.impl.js:14` |
497
+ | `nx:noop` | nothing | none | `nx/dist/src/executors/noop/noop.impl.js` |
498
+ | `@nx/js:verdaccio` | its options and the workspace root | own only | `@nx/js/dist/src/executors/verdaccio/verdaccio.impl.js:30`, `:55` |
499
+ | A consumer's local plugins (`createNodes`) | nothing at run time: they shape targets while the graph is built | n/a | a derived target's options are part of its own configuration, so its own key carries them |
500
+
501
+ A test or script that reads its own package's targets (`package.json` `nx.targets`) keys that `package.json` as a file
502
+ input; a check that reads the whole graph keys `{workspaceRoot}/**/*` or a runtime key of the graph it reads.
469
503
 
470
504
  Workspace policy defaults non-production tasks to `["{projectRoot}/**/*", "!{projectRoot}/**/*.md"]`, without a forced
471
505
  CI workflow input. It migrates the old CI-only `sharedGlobals` reference out of `default` and never re-injects that
@@ -710,9 +744,11 @@ computed paths and arbitrary build-script reads still need explicit inputs. A co
710
744
  file index holds both it and the source including it: an ignored one is a build output, whose bytes no fileset can hash
711
745
  and which reaches consumers through its producer's dependency outputs. Naming it would only key the project graph on the
712
746
  names the last producer run left on disk, so a run regenerating content-named files would move every key it was hashed
713
- under. External path-package digests include the same literal data bytes. Inferred `napi-*` and repository-root
714
- `cargo-wasm` builds use this resolved closure rather than every Rust file in the workspace, while retaining their
715
- toolchain pins, wrapper scripts, N-API configuration and CLI version.
747
+ under. The scan reads a package's Rust sources and nested packages from that same index, and reads a source's text only
748
+ when Nx's content hash of it is one no earlier scan saw: an unchanged tree's recomputation reads no Rust source and
749
+ lists no directory. External path-package digests include the same literal data bytes. Inferred `napi-*` and
750
+ repository-root `cargo-wasm` builds use this resolved closure rather than every Rust file in the workspace, while
751
+ retaining their toolchain pins, wrapper scripts, N-API configuration and CLI version.
716
752
 
717
753
  Runtime file identities are rooted in Cargo package name/version and the declared input role, not in the consuming
718
754
  checkout's absolute path or depth. Source paths are package-relative; compiled-in data keeps its declaring source and
@@ -856,17 +892,44 @@ change re-keys the tasks that can load what changed and no other.
856
892
 
857
893
  - `bun-lock:<projectRoot>`, one per `package.json` project (`bun-lock:.` for the root manifest). Its edges, added by the
858
894
  plugin's `createDependencies`, go to the npm nodes the manifest's dependencies resolve to (resolved exactly as Nx
859
- resolves a project's own package edges); a member's also go to the node of each workspace member it depends on and to
860
- `bun-lock:.`, since a member's `node_modules` lookup ends in the root's. The root's node has no member edges: every
861
- member reaches it, and a member loads another only through its own declaration. Nx's lockfile parser links every npm
862
- node to the packages it depends on and hashes each by the integrity bun.lock records, so the node keys a target on the
863
- closure its manifest reaches. Every inferred TypeScript target (`tsc-js`, `typecheck`, `typecheck-tests`, `lint`)
864
- names its project's node.
895
+ resolves a project's own package edges) and to the runtime node (`bun-lock-runtime:<projectRoot>`) of each workspace
896
+ member it depends on: the closure of that member's `dependencies`, `optionalDependencies` and `peerDependencies`,
897
+ which a dependent loads through it, so a member's devDependencies key only its own targets. Nx's lockfile parser links
898
+ every versioned npm node (`npm:<name>@<version>`) to the packages it depends on and hashes each by the integrity
899
+ bun.lock records. It also publishes a hoisted package as `npm:<name>` with no edges, and Nx's locator resolves a
900
+ declaration or an import to either name, so the plugin links each such alias to its versioned node: a key on either
901
+ holds the package's closure, and the undeclared-import check compares packages by name and version. The node keys a
902
+ target on the closure its manifest reaches. A member's node has no edge to the root's. Bun's isolated linker links
903
+ into a directory's `node_modules` exactly what its manifest declares, but Node's lookup from a member goes on into the
904
+ root's, so a member can load anything the root declares. Two rules make the member's own closure the whole of what its
905
+ targets load:
906
+ - `createMetadata` refuses the graph when a member's sources import a package its node does not reach (Nx's own
907
+ `static` and `dynamic` edges to npm nodes), naming the member and the package. Declaring the package in the member's
908
+ `package.json` puts it in the member's closure.
909
+ - A tool a target runs keys each package it loads by name by the scope that declares it where it loads: the nearest
910
+ manifest at or above the loading directory that declares the package. A member's declaration is keyed by its node,
911
+ the root's by the package itself, since the root's node would key all of the root's tooling. Every inferred
912
+ TypeScript target (`tsc-js`, `typecheck`, `typecheck-tests`, `lint`) names its project's node, the `@types` packages
913
+ the manifests above it declare and `tslib` (TypeScript loads both by ancestry), and the packages holding the
914
+ installed configs its `tsconfig` chain extends. `tsc-js` adds `typescript` (ttsc loads the project's compiler API),
915
+ `ttsc` and `@typescript/native` (run from the root's `node_modules/.bin`), and each transform plugin its configs
916
+ name. `lint` adds `eslint` and `@biomejs/biome` when it runs them, and every package the ESLint configs load by
917
+ name.
918
+
919
+ An edit to a package only the root's tooling reaches, such as a dependency of an Nx generator, re-keys the root's
920
+ targets and no member's.
921
+
865
922
  - `cargo-lock:<directory>`, for the crates under a directory: its hash digests, per Cargo workspace, every package of
866
923
  the locked resolve closure of those crates (a locked package by Cargo package id and source, a path package by name,
867
924
  each with what its dependencies resolved to). `cargoClosure` names its project's node; each `cargo-test-*` runner
868
925
  names its crates' nodes; workspace-wide cargo targets name the workspace root's.
869
926
 
927
+ A Cargo build's input record (`.build-inputs.json`) states the same closure, from the same resolve by the same
928
+ `buildClosure` (`@smoothbricks/build-inputs/cargo-closure`, which this plugin imports), spelled as the lockfile's own
929
+ entries so a link check can verify it without Cargo. A lockfile change therefore moves a Cargo task's key and makes
930
+ its restored output's record stale together, or does neither; a record of the whole file would refuse every output Nx
931
+ rightly restored after another crate's dependency changed.
932
+
870
933
  A hand-written target names the same nodes in its `externalDependencies`:
871
934
 
872
935
  ```json
@@ -874,10 +937,18 @@ A hand-written target names the same nodes in its `externalDependencies`:
874
937
  ```
875
938
 
876
939
  A `cargo-lock:` node exists when an input of a `package.json` project names it (inferred or declared), computed from the
877
- Cargo resolves the plugin already holds. `externalDependencies` takes no `{projectRoot}` token, so a workspace-wide
878
- named input or target default can name only `bun-lock:.`; with a `^` input the project's own npm edges come from Nx. A
879
- target that names no `externalDependencies` at all is still keyed on every package in every lockfile
880
- (`AllExternalDependencies`), the Cargo nodes included.
940
+ Cargo resolves the plugin already holds. A target that names no `externalDependencies` at all is still keyed on every
941
+ package in every lockfile (`AllExternalDependencies`), the Cargo nodes included.
942
+
943
+ Every `package.json` project defines the named input `bunLockScope` as its own node
944
+ (`[{ "externalDependencies": ["bun-lock:<projectRoot>"] }]`). `externalDependencies` takes no `{projectRoot}` token, so
945
+ a workspace-wide named input or target default names `bunLockScope` to key each project's targets on its own closure; Nx
946
+ resolves a named input from the project first and `nx.json` second. A workspace defines it in `nx.json` as `bun-lock:.`
947
+ for the projects no `package.json` stands for, whose lookup ends in the root's `node_modules`:
948
+
949
+ ```json
950
+ { "namedInputs": { "bunLockScope": [{ "externalDependencies": ["bun-lock:."] }] } }
951
+ ```
881
952
 
882
953
  The root project owns the lockfiles, so its `default` fileset holds them. Its versionless check inputs exclude
883
954
  `bun.lock`, `bun.lockb` and `Cargo.lock`; the nodes key what they decide.
@@ -907,10 +978,13 @@ integrity. Nx merges its default plugin's lockfile nodes after every configured
907
978
  on they would replace these: the plugin refuses the option then, and refuses a name the lockfile installs nowhere
908
979
  (`src/built-output-packages.ts`, `src/built-output-packages.test.ts`).
909
980
 
910
- The option covers the lockfile only. A member manifest that declares a named package's version is still an input
911
- wherever its project's files are; a workspace keeps the version out of member manifests by declaring it once, in the
912
- root manifest's `catalog`, and `catalog:` in each member. Inferred validation inputs omit the root's install-only pins
913
- as described below; targets producing shipped artifacts retain the raw manifests.
981
+ For a Bun text lockfile the pinned parser also keys each installed node on the selected patch bytes. The plugin
982
+ refreshes that projection even when the lock text is unchanged. A named built-output package still uses its
983
+ `built-output:<name>` identity: its actual output bytes are the task's input. Its dependencies keep their own keys,
984
+ including any patches they use. The option covers the lockfile only. A member manifest that declares a named package's
985
+ version is still an input wherever its project's files are; a workspace keeps the version out of member manifests by
986
+ declaring it once, in the root manifest's `catalog`, and `catalog:` in each member. Inferred validation inputs omit the
987
+ root's install-only pins as described below; targets producing shipped artifacts retain the raw manifests.
914
988
 
915
989
  ### Manifest versions and validation inputs
916
990
 
@@ -973,10 +1047,12 @@ Declared gates use the emitted `smoo-nx-publish` executable from this package; t
973
1047
  `hashes <run.json> <since-epoch-seconds>` prints the distinct succeeded task hashes as JSON, refusing a summary begun
974
1048
  before that invocation. Capture each list immediately, before another Nx call overwrites the summary.
975
1049
  `publish <absolute-checkout> <hashes.json>` sends existing local cache entries to that checkout's accepted-store route.
976
- Call it only after every gate check passes. Red gates publish nothing, and ordinary shed clients stay read-only.
977
- Publication prints stored/existing/skipped counts; an operational refusal exits nonzero with its cause. The gate reports
978
- that cache finding distinctly without changing the checks' verdict (cowshed specs 03, "Nx accepted-task artifact
979
- service", and 05, "Publication"). No task is rebuilt and no shell is evaluated by the publisher.
1050
+ It asks the store for each key first and never archives a stored one; a missing one it archives itself, in Nx's native
1051
+ layout at gzip level 1, and sends in one `PUT`. Call it only after every gate check passes. Red gates publish nothing,
1052
+ and ordinary shed clients stay read-only. Publication prints stored/existing/skipped counts; an operational refusal
1053
+ exits nonzero with its cause. The gate reports that cache finding distinctly without changing the checks' verdict
1054
+ (cowshed specs 03, "Nx accepted-task artifact service", and 05, "Publication"). No task is rebuilt and no shell is
1055
+ evaluated by the publisher.
980
1056
 
981
1057
  The canonical cache adapter and native publisher remain in
982
1058
  `packages/cowshed/crates/cowshed-core/src/build_volume/{cache_adapter.js,nx_publish.js}`. The cached
@@ -1212,14 +1288,15 @@ Concrete targets come from concrete files:
1212
1288
  `outDir`, only when the record changed: the SHA-256 of every file the config's `include` matches less its `exclude`,
1213
1289
  taken before the emit, and those globs as Git pathspecs. Native targets write the same record from rustc's dep-info
1214
1290
  through `@smoothbricks/build-inputs`: macOS uses its `smoo-nx-build-inputs` CLI and Linux's `cargo-zigbuild` executor
1215
- calls that same collector. A record produced under Nx also carries its producer's project, target and optional
1216
- configuration, taken from the actual task environment. Shell entry uses that identity to judge the selected
1217
- development receipts, including inferred targets absent from package manifests, and name their actual cached rebuild.
1218
- It constructs no Nx graph, shadow output registry or second interpolation policy. The record is inside the target's
1219
- outputs, so a cache hit restores it with them; a live developer link (`@smoothbricks/cli`, "Declared Links") checks it
1220
- to tell a current build from a stale one by content. The shell entry that bootstraps the plugin
1221
- (`tooling/direnv/enter-shell.ts`) keeps its build marker under `node_modules/.cache`, not under `outDir`, where the
1222
- executor would remove it as a file its emit did not write.
1291
+ calls that same collector. Such a record states its lockfile input as `cargoLock`, the closure a `cargo-lock:` node
1292
+ digests (Lockfile scope), and never lists `Cargo.lock` as a file. A record produced under Nx also carries its
1293
+ producer's project, target and optional configuration, taken from the actual task environment. Shell entry uses that
1294
+ identity to judge the selected development receipts, including inferred targets absent from package manifests, and
1295
+ name their actual cached rebuild. It constructs no Nx graph, shadow output registry or second interpolation policy.
1296
+ The record is inside the target's outputs, so a cache hit restores it with them; a live developer link
1297
+ (`@smoothbricks/cli`, "Declared Links") checks it to tell a current build from a stale one by content. The shell entry
1298
+ that bootstraps the plugin (`tooling/direnv/enter-shell.ts`) keeps its build marker under `node_modules/.cache`, not
1299
+ under `outDir`, where the executor would remove it as a file its emit did not write.
1223
1300
  - `scriptc-<arch>-<family>` (`scriptc-arm64-macos`, `scriptc-x64-macos`, `scriptc-arm64-linux`, `scriptc-x64-linux`) are
1224
1301
  inferred for a package that lists `scriptc` in `devDependencies` (that pin is the compiler the targets run; the
1225
1302
  workspace root lists `scriptc` in `trustedDependencies` so its install links the platform compiler) together with each
@@ -1272,13 +1349,25 @@ Concrete targets come from concrete files:
1272
1349
  `ttsc -p tsconfig.lib.json --noEmit` instead. A dialect is a construct the stock checker refuses and the package's
1273
1350
  ttsc plugin lowers before emit; its refusal is withdrawn through the driver's `DiagnosticPlugin` seam (the managed
1274
1351
  ttsc patch: `LoweredDiagnostics` names the checker diagnostics whose cause the plugin's `ProgramPlugin` removes, and
1275
- every lane that gates on the program's diagnostics drops exactly those). The pinned compiler cannot judge such a
1276
- project. The declaring package says so in its manifest,
1352
+ every lane that gates on the program's diagnostics drops exactly those). When a transform host fails, stock ttsc
1353
+ checks the project again with the stock compiler, which loads no plugin and reads each referenced project's
1354
+ declaration outputs where the host read its sources, and appends whatever the host had not printed. The managed patch
1355
+ limits that pass in two ways. A host that printed an error diagnostic of its own has reported its program, so ttsc
1356
+ skips the pass (`PluginFailureDiagnostics.transformHostReported`): no withdrawn refusal and no error of a reference
1357
+ that is not built yet comes back after the real error. A host that printed none (a panic, or a hook or write error
1358
+ after a program that came out clean once its refusals were withdrawn) still gets the pass, and there the host's record
1359
+ of what it withdrew, in the file `TTSC_WITHDRAWN_DIAGNOSTICS_PATH` names, keeps the refusal out of it. The pinned
1360
+ compiler cannot judge such a project. The declaring package says so in its manifest,
1277
1361
  `"smoo": { "typecheck": { "compiler": "ttsc", "dependsOn": ["<project>:<target>"] } }`, where `dependsOn` names the
1278
1362
  targets that prepare the plugin binaries ttsc loads. The routed typecheck depends on them, so it loads built plugins
1279
1363
  and never compiles one, and the inference guesses no workspace target. A declaration of another shape refuses the
1280
1364
  inference by its manifest path. Its compiler is the installed ttsc, which `bun.lock` and the patches in the check
1281
1365
  inputs already key. A project that depends only on typia stays on the pinned compiler.
1366
+ - A project whose inferred `typecheck` runs the native compiler defines the named input `typecheckCompiler` as
1367
+ `[{ "env": "SMOO_TYPECHECK_TSC" }]`; a ttsc-routed project, and one whose declared `typecheck` runs another command
1368
+ (another executor, a top-level `command`, or `options.command`/`options.commands`), defines none. A workspace whose
1369
+ `targetDefaults.typecheck` replaces the inferred inputs names it to key the compiler the command runs, and defines the
1370
+ fallback in `nx.json` empty, for the projects that define none: `{ "namedInputs": { "typecheckCompiler": [] } }`.
1282
1371
  - A direct dependency whose ttsc plugin lowers by environment variables declares them in its manifest,
1283
1372
  `"smoo": { "compileEnv": ["NODE_ENV"] }` (`@smoothbricks/lmao-ttsc` does: it compiles trace statements away unless
1284
1373
  `NODE_ENV` is `test`). The transformed JavaScript is then a function of those variables, so `tsc-js` and every scriptc
@@ -1303,10 +1392,17 @@ Concrete targets come from concrete files:
1303
1392
  that key in the target directory it built. Nx cache restoration must never replace Cargo's `target` link. Its inputs,
1304
1393
  like every cargo-derived fileset, are anchored at `{workspaceRoot}`: Nx resolves a `{projectRoot}` glob against only
1305
1394
  the files its project owns, and a nested package owns the crates under it, so a root workspace's test build spelled
1306
- that way hashes none of its members and replays stale binaries against edited crates. Each member crate gets a cached
1307
- `cargo-test-<package>` run (30s slow-test warning, no per-test kill) whose inputs include the crates Cargo builds for
1308
- that crate's tests (from Cargo's locked resolve: its dependencies and its own dev-dependencies, never the
1309
- dev-dependencies of the crates below it), and whose command runs
1395
+ that way hashes none of its members and replays stale binaries against edited crates. The test build, `cargo-lint`,
1396
+ the cross check and archives, mutation and bench also hash the outputs of the producers a repository adds to their
1397
+ `dependsOn` that a compile can read: one `{dependentTasksOutputFiles: "<fileset>", transitive: false}` per positive
1398
+ file set of that union, its `{workspaceRoot}/` anchor dropped because Nx matches the glob against each output's
1399
+ workspace-relative path. A generated crate source, a compiled-in file or a manifest a producer writes keys them; a
1400
+ producer's output anywhere else, such as a TypeScript package's `dist`, keys none of them. The test build (`record`)
1401
+ and every runner, each crate's pieces and the serial groups (`target-dir` in the command, `ensure` in the fixture),
1402
+ key the local nextest helper they run (`**/dist/bin/<platform>/smoo-nx-nextest-binaries`) where the workspace builds
1403
+ it. Each member crate gets a cached `cargo-test-<package>` run (30s slow-test warning, no per-test kill) whose inputs
1404
+ include the crates Cargo builds for that crate's tests (from Cargo's locked resolve: its dependencies and its own
1405
+ dev-dependencies, never the dev-dependencies of the crates below it), and whose command runs
1310
1406
  `cargo --frozen nextest run --binaries-metadata … --cargo-metadata … --target-dir-remap … --workspace-remap . -E 'package(<crate>)'`
1311
1407
  in place, against the binaries the build left in Cargo's target directory. Runners therefore execute rather than
1312
1408
  build: they compile nothing in cargo's build tree, copy nothing, and fan out instead of chaining. A test archive
@@ -1332,10 +1428,11 @@ Concrete targets come from concrete files:
1332
1428
  so one cache entry serves every checkout of the same commit; nextest re-points
1333
1429
  `CARGO_BIN_EXE_<name>`/`NEXTEST_BIN_EXE_<name>` at the remapped binaries at runtime, but a test that reads them
1334
1430
  through the compile-time `env!` macro keeps the producing tree's path. Per-crate runners accept an empty nextest
1335
- selection because a valid workspace member may have no tests and a hash partition may legitimately be empty. A crate
1336
- in the project that builds the debug cdylib runs after `napi-debug`, because its tests load that addon from
1337
- `target/debug`. A crate declaring `[package.metadata.smoothbricks.wasm-bindgen]` also receives the cacheable
1338
- `cargo-wasm` output target in its owning project.
1431
+ selection because a valid workspace member may have no tests and a hash partition may legitimately be empty. No Rust
1432
+ test runner waits on `napi-debug`: a test binary loads no debug addon, and a test that runs the package's JavaScript
1433
+ loads the host addon `napi-native` writes, which the runner names itself; only a target that sets `NAPI_DEBUG_ADDON=1`
1434
+ reads `napi-debug`'s (below). A crate declaring `[package.metadata.smoothbricks.wasm-bindgen]` also receives the
1435
+ cacheable `cargo-wasm` output target in its owning project.
1339
1436
  - The plugin's own `nextest.toml` is passed as
1340
1437
  `--tool-config-file "smoo:$PWD/<to workspace root>/node_modules/@smoothbricks/nx-plugin/nextest.toml"`, so it is a
1341
1438
  layer BENEATH the repository's `<cargo-workspace>/.config/nextest.toml` rather than a replacement for it: a repository
@@ -1435,8 +1532,7 @@ Concrete targets come from concrete files:
1435
1532
  executor with `bin` set; a static CLI targets `<arch>-unknown-linux-musl`. The executor runs `cargo-zigbuild`
1436
1533
  directly, removes any compiler or linker the shell names for its triple (a Linux shell pins its host compiler for
1437
1534
  `x86_64-unknown-linux-gnu`), and reads the artifact path from cargo's JSON messages. zig and cargo-zigbuild come from
1438
- the managed devenv module, in every shell; the Linux rust-std set beyond `x86_64-unknown-linux-gnu` comes with a Linux
1439
- shell, and on macOS only inside the `linux-cross` profile (`tooling/devenv -P linux-cross shell -- …`).
1535
+ the managed devenv module, and so does the whole Linux rust-std set, in every shell on every host.
1440
1536
  - `build` is inferred only when the project has at least one concrete build target to run, such as inferred `tsc-js`, a
1441
1537
  package-local target like `tsdown-js`, or `cargo-wasm` from this plugin. It depends on output-family wildcard targets:
1442
1538
  `*-js`, `*-web`, `*-html`, `*-css`, `*-ios`, `*-android`, `*-native`, `*-napi`, `*-bun`, and `*-wasm`.
@@ -1462,22 +1558,47 @@ A wildcard without a caret selects the current project instead. For example, a w
1462
1558
  this local relationship explicit for inferred `tsc-js` targets that also have inferred `cargo-wasm`. Package-managed
1463
1559
  JavaScript targets with another platform prerequisite must likewise declare that local edge themselves.
1464
1560
 
1465
- A self-hosted workspace that owns the plugin's cowshed dependency builds its declared `napi-native` and independent
1466
- `lineage-js` producers before **every bounded-exec task**, including declared Bun targets, inferred Cargo shards and
1467
- root serial groups. Native tool discovery resolves that local owner from the linked package manifest, not a repository
1561
+ A self-hosted workspace that owns the plugin's cowshed dependency builds its `napi-native` and independent `lineage-js`
1562
+ producers before every Darwin `bounded-exec` task with an idle bound, to supply Node's awake clock
1563
+ (specs/cowshed/08_testing.md, "Integration tests (real substrate)"). On both Darwin and Linux it also builds them before
1564
+ a bounded task that runs as an mbx Cargo leaf: `cargo test`, `cargo nextest run` without `--binaries-metadata` or
1565
+ `--archive-file`, or `cargo mutants`, as the executor classifies the command in the declaration, inference, or any
1566
+ configuration. Only those leaves read mbx's activity report and its waiters' native lineage (specs/cowshed/11_shell.md,
1567
+ "Cargo test-runner boundaries"). Neither reading changes a passing run, so no bounded target keys these bytes for those
1568
+ reads (Bounded exec key, below); a command that itself reads a producer's output depends on that producer and keys its
1569
+ output, as cowshed's Cargo runners do for the `dist/ts` entry and host addon their Node embedder loads (`nx.json`
1570
+ `targetDefaults`). Native tool discovery resolves the local owner from the linked package manifest, not a repository
1468
1571
  path or project-name alias; an installed consumer takes no local producer edge because its package ships the addon and
1469
- lineage entry. The plugin's compile and typecheck targets require only `lineage-js`, never the addon or cowshed's full
1470
- API build. Its runtime-only cowshed project dependency is excluded from ordinary caret build edges, avoiding the
1471
- executor bootstrap cycle. Bounded targets key on the produced addon and lineage JavaScript bytes through their producer
1472
- edges, not the workspace’s Rust sources. Declarations that replace `dependsOn` or `inputs` keep the inferred
1473
- preconditions with Nx’s `"..."` token. When a declaration changes an inferred executor to bounded-exec, its compatible
1474
- inferred base contains only these runtime prerequisites and output inputs; the incompatible executor’s command and
1475
- inputs do not leak across the normal Nx override. The canonical dependency-free `release-check` is the exception: it
1476
- judges already assembled shipping artifacts and verifies the addon is present, without compiling at runtime or disabling
1477
- the observer (specs/cowshed/06_cli.md, `release-check`).
1478
-
1479
- N-API binaries are not prerequisites of TypeScript declaration emission, so compiler targets do not pull them in by
1480
- default. Aggregate `build` remains the package-completeness boundary and includes every published local output family.
1572
+ both runtime entries. The plugin's compile and typecheck targets require only `lineage-js`, never the addon or cowshed's
1573
+ full API build. Its runtime-only cowshed project dependency is excluded from ordinary caret build edges, avoiding the
1574
+ executor bootstrap cycle. Declarations that replace `dependsOn` keep the inferred preconditions with Nx’s `"..."` token.
1575
+ When a declaration changes an inferred executor to bounded-exec, its compatible inferred base contains only these
1576
+ runtime prerequisites; the incompatible executor’s command and inputs do not leak across the normal Nx override. The
1577
+ canonical dependency-free `release-check` is the exception: it judges already assembled shipping artifacts and verifies
1578
+ the addon is present, without compiling at runtime or disabling the observer (specs/cowshed/06_cli.md, `release-check`).
1579
+
1580
+ A target of a napi package whose run sets `NAPI_DEBUG_ADDON=1`, in its declaration or inference, loads the package's
1581
+ dev-profile addon from `napi-debug`'s `.cache/native-debug`: it depends on `napi-debug` and keys
1582
+ `{dependentTasksOutputFiles: "**/*.node", transitive: false}`.
1583
+
1584
+ <a id="smoo/nx-plugin!n/debug-addon-staging"></a>When the package declares this host's platform addon, `napi-debug`
1585
+ copies that producer's development `.node` to `.cache/native-debug` as a separate file. It keys only on the selected
1586
+ producer's addon bytes, never on its receipt, declarations or Cargo sources, and never depends on a release build.
1587
+ Without a declared host platform addon, `napi-debug` builds its own addon as before.
1588
+
1589
+ <a id="smoo/nx-plugin!n/executor-build-edge"></a>A self-hosted workspace that owns this plugin's package also orders
1590
+ **every target that runs one of the plugin's executors**, in every project but the plugin, after the plugin's own
1591
+ `build`. An executor is a file that build writes (`dist/executors/<name>/executor.js`), so a task that starts before it
1592
+ ends loads the dist a previous build left, which lacks an executor the plugin gained since: a checkout restored from a
1593
+ cache that predated `cargo-zigbuild` failed `Could not resolve "./dist/executors/cargo-zigbuild/executor.js"` on
1594
+ `cli-x64-linux` while `nx-plugin:build` was still restoring it. The edge is one rule, inferred for declared and inferred
1595
+ targets alike (`{ "projects": ["<the plugin's project>"], "target": "build" }`), never written per executor or per
1596
+ target. Three things take none: the executors the plugin's own build runs (`typescript-emit` and `scriptc-native`, which
1597
+ load from the dist an earlier build left, so waiting for that build would be a cycle), the plugin's own targets (its
1598
+ graph orders them), and the canonical dependency-free `release-check`. An installed plugin ships its executors built, so
1599
+ a consumer takes no edge. Declarations that replace `dependsOn` keep it with Nx's `"..."` token. N-API binaries are not
1600
+ prerequisites of TypeScript declaration emission, so compiler targets do not pull them in by default. Aggregate `build`
1601
+ remains the package-completeness boundary and includes every published local output family.
1481
1602
 
1482
1603
  Do not use colon-style Nx target names such as `build:wasm` or `lint:fix`. Nx CLI syntax already uses colons for
1483
1604
  `project:target:configuration`, so colon target names are hard to read, easy to confuse with configurations, and awkward
@@ -1850,6 +1971,16 @@ The Nx patch repairs upstream Nx runtime behavior, separately from this plugin's
1850
1971
  which untars the artifact with its stored mtimes and restores it with the same copy. Restoring one directory output of
1851
1972
  10,000 1 KiB files took a median 3.4 s for the native remove and copy and 0.79 s more for the stamp, on a machine at
1852
1973
  load average 70–120. Not yet proposed upstream.
1974
+ - **A cache hit writes only the outputs that changed, and removes the outputs its entry lacks.** Nx's native restore
1975
+ removed each output and copied it whole, so a hit on outputs that already held the entry's bytes (a run on an input
1976
+ they do not depend on, an output edited and put back) gave every file a new inode and, with the stamp above, a new
1977
+ mtime, and every consumer judging freshness by either redid its work. It also copied only the outputs the entry held,
1978
+ so an output a run on other inputs wrote stayed beside the restored ones. The patched local restore
1979
+ (`restoreChangedOutputs` in `tasks-runner/cache.js`) keeps each output file whose size, mode and bytes match its
1980
+ cached copy and each link with the same target, removes what a cached directory lacks, hands the rest to the native
1981
+ copy output by output, and stamps only those. Every hit, remote included, removes an output its entry lacks. A remote
1982
+ hit still restores each output its artifact holds whole: the native call records the entry's size as the bytes it
1983
+ copies. `nx-cache-restore-mtime.test.ts` holds both. Not yet proposed upstream.
1853
1984
  - **A workspace has one daemon, and a second one leaves it alone.** Every daemon overwrote `server-process.json` with
1854
1985
  its own pid, so two clients that each found no daemon started two, and the later one displaced the earlier. A client
1855
1986
  of the displaced daemon lost its socket mid-request (`EPIPE` on `RECORD_OUTPUTS_HASH_BATCH`) after the run had printed
@@ -2018,16 +2149,28 @@ line or dot, or a Vitest default-reporter file/test result. Timed Vitest `✓` a
2018
2149
  duration for skipped files. Reporter headers, failure stack locations and final summary counts do not count. Output that
2019
2150
  finishes no test is not progress: the nextest `SLOW` warning, repeated every slow-timeout period for a test still
2020
2151
  running, and a hung test heartbeat both keep printing. A suite that keeps finishing tests therefore runs as long as it
2021
- needs, however slow the host, and a test that never returns ends the run 180 s after the last test that finished. bun
2022
- prints nothing per passing test when it believes an agent runs it, so the executor asks a lone `bun test` for `--dots`,
2023
- one dot per finished test. Without a recognised execution lifecycle, the clock starts at command spawn; a command that
2024
- reports no tests makes progress only by exiting. nextest's slow-timeout and the serial groups' code-time classes only
2025
- warn; no per-test bound kills a test or fails one that passed. Bun has a per-test deadline of its own, 5000 ms unless
2026
- the command sets one, and it reads no bunfig for it, so every bun leg deletes it with `bun test --timeout=0`
2027
- (`BUN_TEST_TIMEOUT_FLAG`; `0` means no deadline, measured on the pinned Bun 1.4.2). A test waits for the event it is
2028
- waiting for, however long a loaded host makes the work take; one that never returns still ends the run through
2029
- `idleTimeoutMs`. `timeoutMs`, an absolute ceiling, is for commands that report no tests; a target names at least one of
2030
- the two.
2152
+ needs, however slow the host, and a test that never returns ends the run after 180 s of awake idle time following the
2153
+ last test that finished.
2154
+
2155
+ On macOS and Linux the idle clock excludes host suspension, including for its final ten-second diagnostic window. An
2156
+ early timer notification is not an expiry: the executor arms the remaining awake budget. Wall timestamps and the
2157
+ explicit fixture and total ceilings still use wall time. A running test may also report its own progress. Each run with
2158
+ an idle bound is served a progress channel, a Unix socket in a fresh 0700 directory named in the command's environment
2159
+ as `BOUNDED_EXEC_PROGRESS_SOCKET` (`progress-channel.ts`). Each line a client writes there is one record and must be
2160
+ `moved`; the record restarts the bound exactly as a finished test does, and anything else fails the run as a broken
2161
+ reporter. The executor ends its side of a connection when the client ends its own, after reading every record on it, so
2162
+ a client that waits for that end knows its records counted. An agent harness that enforces its own no-progress bound
2163
+ over what its run does reports each movement that check sees, so a long test that keeps moving is not ended for being
2164
+ the last one running. The run's CPU is never a record: a compile inside a test reports nothing and still ends at the
2165
+ bound, where the snapshot names it. bun prints nothing per passing test when it believes an agent runs it, so the
2166
+ executor asks a lone `bun test` for `--dots`, one dot per finished test. Without a recognised execution lifecycle, the
2167
+ clock starts at command spawn; a command that reports no tests makes progress only by exiting. nextest's slow-timeout
2168
+ and the serial groups' code-time classes only warn; no per-test bound kills a test or fails one that passed. Bun has a
2169
+ per-test deadline of its own, 5000 ms unless the command sets one, and it reads no bunfig for it, so every bun leg
2170
+ deletes it with `bun test --timeout=0` (`BUN_TEST_TIMEOUT_FLAG`; `0` means no deadline, measured on the pinned Bun
2171
+ 1.4.2). A test waits for the event it is waiting for, however long a loaded host makes the work take; one that never
2172
+ returns still ends the run through `idleTimeoutMs`. `timeoutMs`, an absolute ceiling, is for commands that report no
2173
+ tests; a target names at least one of the two.
2031
2174
 
2032
2175
  With mbx admission, a supported Cargo/nextest test leaf inherits a private grant pipe: mbx writes `g` on every admission
2033
2176
  and `r` on permit drop (`MBX_GRANT_FD=5`). The executor counts overlapping holds: while no hold exists it pauses the
@@ -2040,9 +2183,10 @@ own (specs/cowshed/05_gateway.md, "An Nx run serves its leaves one reservation e
2040
2183
  `preTasksExecution` starts `mbx reservations <socket>` once for a run with mbx's pool and publishes the socket in
2041
2184
  `MBX_RESERVATIONS_SOCKET`; its `postTasksExecution` ends it. The leaf's shell writes the count it asks for on descriptor
2042
2185
  5 and reads back the cores granted. The executor asks the endpoint over its process's one connection, says
2043
- `cowshed: mbx reserve wait start cpus=<asked> priority=<p>` and then
2044
- `cowshed: mbx reserve granted elapsed=<ms> priority=<p>`, and gives the grant back once the leaf's subtree is retired;
2045
- the grant starts the leaf's total and fixture ceilings as a first `g` does. The shell runs the command with
2186
+ `cowshed: mbx reserve wait start cpus=<asked> priority=<p>` (with ` min=<m>` after the count when the leaf names a
2187
+ minimum: the fewest threads at which the walls its last run recorded keep a test finishing within its `idleTimeoutMs`)
2188
+ and then `cowshed: mbx reserve granted elapsed=<ms> priority=<p>`, and gives the grant back once the leaf's subtree is
2189
+ retired; the grant starts the leaf's total and fixture ceilings as a first `g` does. The shell runs the command with
2046
2190
  `MBX_RESERVE_CPUS`, `MBX_SCHED_DISABLE=1` and an empty `MBX_SCHED_DIR`. A refusal fails the leaf, naming mbx's error,
2047
2191
  and a run with no endpoint refuses its reserved leaves.
2048
2192
 
@@ -2120,24 +2264,24 @@ so a package pattern that matched no tests cannot pass. It exits 1 when any bina
2120
2264
  be run.
2121
2265
 
2122
2266
  A target may name a `fixtureCommand` with its `fixtureTimeoutMs`: a compiler-fixture producer the executor runs first,
2123
- in the same cwd, environment and CPU grant (under mbx inside the leaf's reservation, or before it when its units are
2124
- counted, below; a build's compilers are admitted one by one), as segment 0 of the same lifecycle — a build interval for
2125
- its whole life, under its own supervisor and acknowledged like a runner's phases. The command follows under `&&` (a
2126
- direct Go/Cargo chain keeps its phases behind a brace group; any other command runs as one segment active from its
2127
- spawn), so a fixture failure ends the run before a test starts, and fixture output earns no progress. `fixtureTimeoutMs`
2128
- is the segment's own wall-clock ceiling, a build budget; the segment's terminal retires it, and expiring it records a
2129
- `fixture` bound, since no test was running. The pair is refused unpaired, and a run that names it names no shadow record
2130
- of warmth. This exists for warmth that lives outside Nx outputs — a compiler plugin cache, a Cargo `target/`: it cannot
2131
- be a cacheable output, and as a `cache: false` prerequisite it executed even when every consumer then restored its
2132
- verdict from cache, because Nx runs an uncached dependency before reaching its cached consumer. Inside the consumer's
2133
- own task the cache decides: a hit restores the verdict and warms nothing; an execution warms first. Without the
2134
- lifecycle channel (Windows) the fixture is plain shell text ahead of the command, bounded from spawn like any wrapper,
2135
- and its ceiling does not apply.
2267
+ in the same cwd, environment and CPU grant (under mbx's pool before the leaf's reservation, never inside it: a build's
2268
+ compilers are admitted one by one, and a build waiting on Cargo's build-directory lock holds no core), as segment 0 of
2269
+ the same lifecycle — a build interval for its whole life, under its own supervisor and acknowledged like a runner's
2270
+ phases. The command follows under `&&` (a direct Go/Cargo chain keeps its phases behind a brace group; any other command
2271
+ runs as one segment active from its spawn), so a fixture failure ends the run before a test starts, and fixture output
2272
+ earns no progress. `fixtureTimeoutMs` is the segment's own wall-clock ceiling, a build budget; the segment's terminal
2273
+ retires it, and expiring it records a `fixture` bound, since no test was running. The pair is refused unpaired, and a
2274
+ run that names it names no shadow record of warmth. This exists for warmth that lives outside Nx outputs — a compiler
2275
+ plugin cache, a Cargo `target/`: it cannot be a cacheable output, and as a `cache: false` prerequisite it executed even
2276
+ when every consumer then restored its verdict from cache, because Nx runs an uncached dependency before reaching its
2277
+ cached consumer. Inside the consumer's own task the cache decides: a hit restores the verdict and warms nothing; an
2278
+ execution warms first. Without the lifecycle channel (Windows) the fixture is plain shell text ahead of the command,
2279
+ bounded from spawn like any wrapper, and its ceiling does not apply.
2136
2280
 
2137
2281
  Under mbx, a reserved leaf whose target names a `unitsCommand` (a shell command printing one line per unit `command`
2138
2282
  runs; the plugin's nextest pieces name the same `nextest list -T oneline` of their selection and partition) runs that
2139
- command at the end of its fixture segment, under the fixture's ceiling, which then starts at spawn, with the fixture's
2140
- own output on stderr; the fixture runs before the reservation, not inside it. The leaf then asks its run's endpoint for
2283
+ command at the end of its fixture segment, under the fixture's ceiling, which under mbx starts at spawn for every
2284
+ reserved leaf, with the fixture's own output on stderr. The leaf then asks its run's endpoint for
2141
2285
  `min(units, its runner's count)` cores, at least one, and its reservation says
2142
2286
  `cowshed: mbx reserve running cpus=<granted> asked=<asked>`. A count that fails fails the run before anything is
2143
2287
  reserved, named as the fixture segment. `unitsCommand` is refused without `fixtureCommand`.
@@ -2148,8 +2292,11 @@ again. Darwin can answer `EPERM` for an unreaped zombie-only group, and an ambie
2148
2292
  Failed fixtures retain their cleanup obligation rather than suppressing signal errors.
2149
2293
 
2150
2294
  The final-ten-second pre-signal snapshot attributes the runner's process tree, its leader and leaf call stacks and
2151
- observed resources, with explicit incomplete/raced results and no delay to termination. Its timing, visibility and
2152
- evidence contract is defined in `specs/cowshed/08_testing.md`, "Integration tests (real substrate)".
2295
+ observed resources, with explicit incomplete/raced results and no delay to termination. Its two process censuses, at
2296
+ least five seconds apart inside that window, name each process whose CPU time rose by at least the larger of 0.5 s and
2297
+ twice the coarser resolution of its two readings (two counted seconds where ps counts whole seconds, 0.5 s where it
2298
+ counts centiseconds) and classify the expiry as a build inside the test; CPU never restarts the idle bound. Its timing,
2299
+ visibility and evidence contract is defined in `specs/cowshed/08_testing.md`, "Integration tests (real substrate)".
2153
2300
 
2154
2301
  The snapshot-reset regression orders capture, test completion, and expiry through IPC, not heartbeat cadence. It
2155
2302
  deliberately holds the first capture's progress publication while another heartbeat arrives; only the observed PASS
@@ -2217,7 +2364,14 @@ attach and the lease is still on it. Once the attach is gone the mountpoint is a
2217
2364
  volume, where a write through `TMPDIR` can make the lease path again, and that free space is not the lease's: the ENOSPC
2218
2365
  line then says the lease was lost and why, or that the volume could not be read. Its release says it the same way
2219
2366
  (`RAM temp volume: lease <lease> was lost while its task held it: …`) and is never taken as a release of a lease that
2220
- was there.
2367
+ was there. When the volume itself went from the mountpoint, the disk the lease was taken on can still be attached,
2368
+ mounted nowhere: its mount was lost (on 2026-11-10 a restart of `fseventsd` left the user's 8 GiB disk so, owned by no
2369
+ lease). No path reaches its files and no lease can be taken on it, so that release detaches it, by the registry entry
2370
+ the lease was taken on, through the gateway's `ram-detach` under a detach claim, and its message names the disk, the
2371
+ lost mount and what the detach did; a disk mounted anywhere is left attached and named. A creator that finds the bare
2372
+ mountpoint holding files still refuses to mount over them and touches none of them, but first detaches the disk its
2373
+ ledger records as kept, by that registry entry: what the lost tasks wrote there after the loss never keeps the old disk
2374
+ resident. With no kept record that refusal inspects nothing on the host.
2221
2375
 
2222
2376
  What a command leaves running is ended by its owner, never chosen by where it works (`specs/cowshed/11_shell.md`,
2223
2377
  "Process identity and signal ownership"; `specs/cowshed/07_api.md`, `JobSubtreeHandle`). When the job's supervisor
@@ -2559,21 +2713,37 @@ task id and the hash it ran at:
2559
2713
  `process aborted with signal 15 (SIGTERM)` (SIGKILL once the force-kill follows); they are the bound's casualties and
2560
2714
  do not make the run `failed`. A test that dies of any other signal, or that is aborted with no bound to explain it,
2561
2715
  does.
2562
- - `wedged`: `idleTimeoutMs` fired: no test finished during that much active test time. This proves the completion
2563
- interval was exceeded, not that every process stopped: an oversized fixture can exceed it too. Its `tests` name those
2564
- the runner reported running (nextest's `SLOW`, libtest's `has been running for over`) and never finished, and those
2565
- the JUnit report says it aborted when the bound stopped it. Its `lockWaits` lists only regular files the run holds on
2566
- numbered descriptors that processes outside the run also hold open, naming those holders' pids and commands. This is
2567
- open-handle evidence, not kernel lock-owner proof. The open-file census runs only on macOS, so on every other platform
2568
- `lockWaits` is always empty. An incomplete or raced capture records none.
2716
+ - `wedged`: `idleTimeoutMs` fired: no test finished and no running test reported progress during that much active test
2717
+ time. This proves the completion interval was exceeded, not that every process stopped: an oversized fixture can
2718
+ exceed it too. Its `tests` name those the runner reported running (nextest's `SLOW`, libtest's
2719
+ `has been running for over`) and never finished, and those the JUnit report says it aborted when the bound stopped it.
2720
+ Its `lockWaits` lists only regular files the run holds on numbered descriptors that processes outside the run also
2721
+ hold open, naming those holders' pids and commands. This is open-handle evidence, not kernel lock-owner proof; the
2722
+ snapshot also stack-samples each named waiter its leaf samples left out, so its text shows the call that waiter blocks
2723
+ in. The open-file census runs only on macOS, so on every other platform `lockWaits` is always empty. An incomplete or
2724
+ raced capture records none. Its `cpuRising` lists each process of the run's tree whose CPU time rose between the
2725
+ snapshot's two process censuses by at least the larger of 0.5 s and twice the coarser resolution of its two readings
2726
+ (2 s at whole seconds, 0.5 s at centiseconds), with its pid, command and gain: a build inside the test, which is a
2727
+ defect and not a hang. It is empty when no process rose or the closing census did not complete, and a record written
2728
+ before it carries none.
2569
2729
  - `no-space`: the command failed after its output said a write found no space (`ENOSPC` or `No space left on device`).
2570
2730
  Its tests failed on the disk, not on their own, whatever bound or hang followed: it records that line and, when the
2571
2731
  task held a RAM lease, the lease, the volume and its free bytes when the line arrived, or why none were read: the
2572
2732
  lease was no longer on its volume (`lost`) or the volume could not be read (`unread`). A passing run that printed such
2573
2733
  a line passed.
2734
+ - `operational`: bounded-exec itself ended or refused the run, whatever its command did, and `cause` says why. A
2735
+ `reservation-refused` cause names the run's mbx reservation endpoint the leaf asked, the connect error's code
2736
+ (`ENOENT` when the endpoint's socket is gone) and mbx's message; an `executor` cause names the executor's own failure
2737
+ (a refused or lost CPU pool, a broken progress channel or runner lifecycle, leftovers it could not retire, a refusal
2738
+ before the command started). The output's last line then says `Command was ended by bounded-exec because <cause>`,
2739
+ never a signal as if it came from outside. Its `tests` are the report's failures, never bounds.
2574
2740
  - `failed`: a test failed on its own, or the command exited non-zero with no report naming a timeout.
2575
2741
  - `passed`.
2576
2742
 
2743
+ A consumer reads a task's record through `@smoothbricks/nx-plugin/bounded-exec-verdict` (`readRecord` over
2744
+ `taskDirectory(<workspace data>, <task id>)`, the `BoundedExecRecord` and `BoundedExecVerdict` types), never by parsing
2745
+ the command's output: an Nx worker that judges a test task from it tells an `operational` refusal from a red.
2746
+
2577
2747
  The record also holds `peakBytes`, the command's memory peak: the exited command's rusage `ru_maxrss`, the largest
2578
2748
  resident set any one process of its tree reached, in bytes. Node reaps a child without its rusage, so the command runs
2579
2749
  under a Bun waiter (`peak-waiter.ts`, on the executor's Bun or the first `bun` on its PATH) that reads it, passes the
@@ -2684,8 +2854,17 @@ output, reads the referenced UTF-8 cause before releasing the held test, then ch
2684
2854
  JUnit and verdict. `nx-plugin:cargo-stream-archive` produces the smoke's nextest archive before any Bun shard starts;
2685
2855
  the smoke executes that archive and never compiles inside the test progress interval. The reporter smoke likewise
2686
2856
  executes the transformed `dist/bin/smoo-nx-bound-failures.js` supplied by the shards' `build` dependency, not raw
2687
- TypeScript whose imports may require schema generation. Test ownership and readiness follow
2688
- [`specs/cowshed/08_testing.md`](../../specs/cowshed/08_testing.md), “Unit tests” and “Fixtures”.
2857
+ TypeScript whose imports may require schema generation. `nx-plugin:ttsc-plugin-hosts` builds, through `ttsc prepare`,
2858
+ every ttsc plugin host the Bun shards load: this package's own (`tsconfig.test.json` and `tsconfig.lib.json`, which the
2859
+ Bun preload transforms the suite through) and those of the TypeScript emit executor's fixtures (`PLUGIN_HOST_FIXTURES`
2860
+ in `src/__tests__/typescript-emit-fixtures.ts`: typia alone, `@smoothbricks/lmao-ttsc` on the utility host, and the
2861
+ side-output and dialect fixture plugins on the utility and typia hosts). It builds them into its own `TTSC_CACHE_DIR`,
2862
+ `.cache/ttsc-plugin-hosts`, whose host binaries (`plugins/*/plugin`) are its Nx output. The shards depend on it and name
2863
+ the same directory, which the `src/__tests__/ttsc-cache-dir.ts` preload resolves against the package before any ttsc the
2864
+ suite runs in a fixture reads it, so those tests load built hosts and never compile one inside the progress interval.
2865
+ The checkout's shared `.cache/ttsc-plugins` cannot be that output: it is cowshed build state, which no Nx output may
2866
+ cover (`src/build-state-output-policy.ts`), and every plugin build of the checkout writes into it. Test ownership and
2867
+ readiness follow [`specs/cowshed/08_testing.md`](../../specs/cowshed/08_testing.md), “Unit tests” and “Fixtures”.
2689
2868
  `smoo-nx-bound-failures` reads the workspace's last Nx run (`run.json` in Nx's `cacheDir`, the directory
2690
2869
  `StoreRunInformationLifeCycle` writes: the checkout's own `.nx/cache` under smoo's workspace policy) against those
2691
2870
  records and prints one line per failed task. It exits 0 only when the run failed and every failed task's record, for
@@ -2751,6 +2930,12 @@ to the command, which the keyed modules decide. Each entry, and what the executo
2751
2930
  - `parent-grant.js`: what a run asks its parent's pool for and says of the answer, `peak-charge.js` and `cpu-grant.js`:
2752
2931
  the charge the task's last record names and the grant a record states. A grant reaches the command as a token count
2753
2932
  and nothing else, through `runner-sizing.js`; a record that cannot be read refuses the run.
2933
+ - `case-gate.js`: the gate a reserved nextest leaf's cases each take a core at, one of its grant or one reserved for the
2934
+ case. It decides when a case starts and on which core; the leaf's thread count still reaches the command through
2935
+ `runner-sizing.js`.
2936
+ - `suite-minimum.js`: the minimum a reserved test leaf names on its reservation, from the walls its last run recorded.
2937
+ It decides how many cores the leaf waits for before it starts; the grant still reaches the command as a token count
2938
+ through `runner-sizing.js`, and a leaf with no recorded wall names none.
2754
2939
  - `memory-retry.js`: whether a command the kernel killed for memory (a SIGKILL this executor did not send, to a command
2755
2940
  no bound of it ended) runs once more, alone in its run's pool, and how the two runs' output joins. The second run is
2756
2941
  the same command; only the pool it is lent from differs, and a pass after it is a pass of that command.
@@ -2758,8 +2943,9 @@ to the command, which the keyed modules decide. Each entry, and what the executo
2758
2943
  the run's view of it. Its text is said on stderr and its waiting decides whether the idle bound is credited, which can
2759
2944
  fail a run and never changes one that passes. `bounds.js` stays keyed: it decides when a bound fires.
2760
2945
  - `hang-diagnostics.js`: the snapshot taken shortly before the no-progress bound fires. It probes with `ps`, `lsof` and
2761
- `sample`, which suspends the runner for about a second, and signals nothing but its own probes. Its text and lock
2762
- waits are read only once the bound has expired the run, which fails it.
2946
+ `sample`, which suspends the runner for about a second, and signals nothing but its own probes. Its two `ps` censuses
2947
+ are its two CPU samples, paused apart inside its window to be at least five seconds apart. Its text, lock waits and
2948
+ CPU rises are read only once the bound has expired the run, which fails it.
2763
2949
  - `testing.js` (and `ensure-built`, whose workspace-root finder it uses, and the producer receipt modules it imports):
2764
2950
  the host census the executor quotes when a lease release fails, and the directory a CPU pool binds its socket in. A
2765
2951
  directory that cannot be made refuses the run.
@@ -2769,8 +2955,9 @@ decides what a token count does to the command's parallelism flags and test-thre
2769
2955
  writes the pool endpoint, its count and the jobserver flags into `MAKEFLAGS` and `CARGO_MAKEFLAGS` (`cpu-pool.js` serves
2770
2956
  the pool and writes none of them), and `withProgressReport` adds `--dots` to `bun test` and `-json` to `go test`. They
2771
2957
  stay keyed until those functions move into modules of their own. A module that comes to decide what a value does to the
2772
- command, its environment or a passing verdict leaves `outputNeutral` in the same commit; `executor-key.test.ts` names
2773
- the keyed modules and refuses a neutral one that writes those variables.
2958
+ command, its environment or a passing verdict leaves `outputNeutral` in the same commit. The
2959
+ [executor-key law](../../specs/cowshed/laws/executor_key.bend) shows when a module is keyed: a neutral boundary stops
2960
+ its path, not a separate path that reaches the same module without crossing it.
2774
2961
 
2775
2962
  ## Test Fixtures That Run Nx
2776
2963
 
@@ -2891,6 +3078,20 @@ The plugin owns the packaged templates, pure rendering and content-preservation
2891
3078
  files through Nx `Tree` and uses Nx's resolved project graph for inferred targets. The CLI only supplies the filesystem
2892
3079
  and process boundary. There is no separate serialized change plan.
2893
3080
 
3081
+ A project's TypeScript sources, which decide its `tsconfig.test.json` include, come from Nx's workspace file index for
3082
+ the Tree's root (.gitignore and .nxignore applied) with the Tree's pending edits over it, as devkit's `getProjects`
3083
+ lists project files: one pass over that listing answers every project, so a render lists no directory and probes no
3084
+ file, and a gitignored build output never shapes a committed config. The render (policy, JSON edits, formatter runs) is
3085
+ a function of the derived context, that listing and what it reads through the Tree, and the generator keeps the last
3086
+ one: a later run whose context and listing are equal, and whose every read gives the same bytes, stages that render
3087
+ again rather than rendering. A Tree with pending edits is always rendered. Prettier and Biome read their own
3088
+ configuration from disk, so it is not part of that check; Prettier already holds it for the life of the process.
3089
+
3090
+ The daemon runs a global sync generator on every graph computation and reports what it would change, but only `nx sync`
3091
+ writes it: a task run applies task sync generators alone. A managed file edited in a consuming repository is therefore
3092
+ drift every computation reports and nothing converges until `nx sync` reverts it. Change the packaged template instead,
3093
+ here.
3094
+
2894
3095
  The idempotence witness compares the second pass's managed-target roster with the populated first pass before checking
2895
3096
  unchanged actions, an empty staged diff and retained bytes. An empty result is not evidence that generation inspected
2896
3097
  the managed files.