@smoothbricks/nx-plugin 0.5.7 → 0.6.0

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 (432) hide show
  1. package/README.md +1086 -360
  2. package/dist/.build-inputs.json +138 -0
  3. package/dist/bin/smoo-nx-cargo-toolchain.d.ts +3 -0
  4. package/dist/bin/smoo-nx-cargo-toolchain.d.ts.map +1 -0
  5. package/dist/bin/smoo-nx-cargo-toolchain.js +8 -0
  6. package/dist/bin/smoo-nx-forbidden-spellings.d.ts +3 -0
  7. package/dist/bin/smoo-nx-forbidden-spellings.d.ts.map +1 -0
  8. package/dist/bin/smoo-nx-forbidden-spellings.js +32 -0
  9. package/dist/bin/smoo-nx-nextest-timings.d.ts +3 -0
  10. package/dist/bin/smoo-nx-nextest-timings.d.ts.map +1 -0
  11. package/dist/bin/smoo-nx-nextest-timings.js +28 -0
  12. package/dist/bounded-test-policy.d.ts +1 -1
  13. package/dist/bounded-test-policy.d.ts.map +1 -1
  14. package/dist/bounded-test-policy.js +14 -15
  15. package/dist/build-state-output-policy.d.ts +95 -1
  16. package/dist/build-state-output-policy.d.ts.map +1 -1
  17. package/dist/build-state-output-policy.js +368 -30
  18. package/dist/bun-lock-scope.d.ts +44 -0
  19. package/dist/bun-lock-scope.d.ts.map +1 -0
  20. package/dist/bun-lock-scope.js +97 -0
  21. package/dist/cargo-build-script-env.d.ts +49 -0
  22. package/dist/cargo-build-script-env.d.ts.map +1 -0
  23. package/dist/cargo-build-script-env.js +324 -0
  24. package/dist/cargo-closure-input.d.ts +31 -4
  25. package/dist/cargo-closure-input.d.ts.map +1 -1
  26. package/dist/cargo-closure-input.js +66 -6
  27. package/dist/cargo-retention-hook.d.ts +17 -0
  28. package/dist/cargo-retention-hook.d.ts.map +1 -0
  29. package/dist/cargo-retention-hook.js +85 -0
  30. package/dist/cargo-source-hash.d.ts +25 -7
  31. package/dist/cargo-source-hash.d.ts.map +1 -1
  32. package/dist/cargo-source-hash.js +108 -43
  33. package/dist/cargo-toolchain-paths.d.ts +40 -0
  34. package/dist/cargo-toolchain-paths.d.ts.map +1 -0
  35. package/dist/cargo-toolchain-paths.js +84 -0
  36. package/dist/cargo-toolchain-policy.d.ts +25 -8
  37. package/dist/cargo-toolchain-policy.d.ts.map +1 -1
  38. package/dist/cargo-toolchain-policy.js +39 -5
  39. package/dist/cargo-workspace.d.ts +10 -4
  40. package/dist/cargo-workspace.d.ts.map +1 -1
  41. package/dist/cargo-workspace.js +65 -95
  42. package/dist/cross-check-policy.d.ts +9 -9
  43. package/dist/cross-check-policy.d.ts.map +1 -1
  44. package/dist/cross-check-policy.js +11 -11
  45. package/dist/disk-command-policy.d.ts.map +1 -1
  46. package/dist/disk-command-policy.js +1 -0
  47. package/dist/ensure-built-receipt.d.ts +13 -5
  48. package/dist/ensure-built-receipt.d.ts.map +1 -1
  49. package/dist/ensure-built-receipt.js +126 -47
  50. package/dist/ensure-built-witness.d.ts +27 -8
  51. package/dist/ensure-built-witness.d.ts.map +1 -1
  52. package/dist/ensure-built-witness.js +45 -15
  53. package/dist/ensure-built.d.ts.map +1 -1
  54. package/dist/ensure-built.js +9 -1
  55. package/dist/eslint-config-closure.d.ts +7 -0
  56. package/dist/eslint-config-closure.d.ts.map +1 -0
  57. package/dist/eslint-config-closure.js +346 -0
  58. package/dist/executors/bounded-exec/bounds.d.ts +56 -0
  59. package/dist/executors/bounded-exec/bounds.d.ts.map +1 -0
  60. package/dist/executors/bounded-exec/bounds.js +43 -0
  61. package/dist/executors/bounded-exec/cpu-pool.d.ts +33 -36
  62. package/dist/executors/bounded-exec/cpu-pool.d.ts.map +1 -1
  63. package/dist/executors/bounded-exec/cpu-pool.js +54 -119
  64. package/dist/executors/bounded-exec/executor.d.ts +19 -12
  65. package/dist/executors/bounded-exec/executor.d.ts.map +1 -1
  66. package/dist/executors/bounded-exec/executor.js +371 -239
  67. package/dist/executors/bounded-exec/gateway-lease.d.ts +22 -19
  68. package/dist/executors/bounded-exec/gateway-lease.d.ts.map +1 -1
  69. package/dist/executors/bounded-exec/gateway-lease.js +81 -28
  70. package/dist/executors/bounded-exec/hang-diagnostics.d.ts +18 -1
  71. package/dist/executors/bounded-exec/hang-diagnostics.d.ts.map +1 -1
  72. package/dist/executors/bounded-exec/hang-diagnostics.js +148 -30
  73. package/dist/executors/bounded-exec/lease-wait.d.ts +43 -0
  74. package/dist/executors/bounded-exec/lease-wait.d.ts.map +1 -0
  75. package/dist/executors/bounded-exec/lease-wait.js +68 -0
  76. package/dist/executors/bounded-exec/lock-wait.d.ts +51 -0
  77. package/dist/executors/bounded-exec/lock-wait.d.ts.map +1 -0
  78. package/dist/executors/bounded-exec/lock-wait.js +108 -0
  79. package/dist/executors/bounded-exec/owned-subtree.d.ts +84 -0
  80. package/dist/executors/bounded-exec/owned-subtree.d.ts.map +1 -0
  81. package/dist/executors/bounded-exec/owned-subtree.js +178 -0
  82. package/dist/executors/bounded-exec/progress.d.ts +4 -1
  83. package/dist/executors/bounded-exec/progress.d.ts.map +1 -1
  84. package/dist/executors/bounded-exec/progress.js +5 -2
  85. package/dist/executors/bounded-exec/ram-attach.d.ts +19 -0
  86. package/dist/executors/bounded-exec/ram-attach.d.ts.map +1 -0
  87. package/dist/executors/bounded-exec/ram-attach.js +207 -0
  88. package/dist/executors/bounded-exec/ram-detach.d.ts +25 -0
  89. package/dist/executors/bounded-exec/ram-detach.d.ts.map +1 -0
  90. package/dist/executors/bounded-exec/ram-detach.js +207 -0
  91. package/dist/executors/bounded-exec/ram-temp-fixtures.d.ts +76 -0
  92. package/dist/executors/bounded-exec/ram-temp-fixtures.d.ts.map +1 -1
  93. package/dist/executors/bounded-exec/ram-temp-fixtures.js +296 -0
  94. package/dist/executors/bounded-exec/ram-temp.d.ts +388 -88
  95. package/dist/executors/bounded-exec/ram-temp.d.ts.map +1 -1
  96. package/dist/executors/bounded-exec/ram-temp.js +1213 -399
  97. package/dist/executors/bounded-exec/run-cpu-pool.d.ts +4 -4
  98. package/dist/executors/bounded-exec/run-cpu-pool.d.ts.map +1 -1
  99. package/dist/executors/bounded-exec/run-cpu-pool.js +20 -30
  100. package/dist/executors/bounded-exec/runner-hook.js +14 -5
  101. package/dist/executors/bounded-exec/runner-lifecycle.d.ts +14 -1
  102. package/dist/executors/bounded-exec/runner-lifecycle.d.ts.map +1 -1
  103. package/dist/executors/bounded-exec/runner-lifecycle.js +27 -6
  104. package/dist/executors/bounded-exec/{cpu-tokens.d.ts → runner-sizing.d.ts} +14 -42
  105. package/dist/executors/bounded-exec/runner-sizing.d.ts.map +1 -0
  106. package/dist/executors/bounded-exec/{cpu-tokens.js → runner-sizing.js} +5 -35
  107. package/dist/executors/bounded-exec/runtime-pin.d.ts +73 -0
  108. package/dist/executors/bounded-exec/runtime-pin.d.ts.map +1 -0
  109. package/dist/executors/bounded-exec/runtime-pin.js +167 -0
  110. package/dist/executors/bounded-exec/schema.d.ts +18 -1
  111. package/dist/executors/bounded-exec/schema.d.ts.map +1 -1
  112. package/dist/executors/bounded-exec/verdict.d.ts +40 -11
  113. package/dist/executors/bounded-exec/verdict.d.ts.map +1 -1
  114. package/dist/executors/bounded-exec/verdict.js +88 -19
  115. package/dist/executors/cargo-zigbuild/executor.d.ts +21 -0
  116. package/dist/executors/cargo-zigbuild/executor.d.ts.map +1 -1
  117. package/dist/executors/cargo-zigbuild/executor.js +67 -12
  118. package/dist/executors/clean-outputs/executor.js +1 -0
  119. package/dist/executors/scriptc-native/executor.d.ts +79 -0
  120. package/dist/executors/scriptc-native/executor.d.ts.map +1 -0
  121. package/dist/executors/scriptc-native/executor.js +367 -0
  122. package/dist/executors/scriptc-native/ffi-paths.d.ts +9 -0
  123. package/dist/executors/scriptc-native/ffi-paths.d.ts.map +1 -0
  124. package/dist/executors/scriptc-native/ffi-paths.js +25 -0
  125. package/dist/executors/scriptc-native/schema.d.ts +34 -0
  126. package/dist/executors/scriptc-native/schema.d.ts.map +1 -0
  127. package/dist/executors/scriptc-native/schema.js +1 -0
  128. package/dist/executors/typescript-emit/executor.d.ts +3 -1
  129. package/dist/executors/typescript-emit/executor.d.ts.map +1 -1
  130. package/dist/executors/typescript-emit/executor.js +164 -33
  131. package/dist/forbidden-spelling-policy.d.ts +56 -0
  132. package/dist/forbidden-spelling-policy.d.ts.map +1 -0
  133. package/dist/forbidden-spelling-policy.js +176 -0
  134. package/dist/generators/create-package/generator.d.ts.map +1 -1
  135. package/dist/generators/create-package/generator.js +3 -4
  136. package/dist/graph-input-contract.d.ts +14 -0
  137. package/dist/graph-input-contract.d.ts.map +1 -1
  138. package/dist/graph-input-contract.js +67 -2
  139. package/dist/index.d.ts +23 -6
  140. package/dist/index.d.ts.map +1 -1
  141. package/dist/index.js +672 -214
  142. package/dist/managed-assets.d.ts +2 -0
  143. package/dist/managed-assets.d.ts.map +1 -1
  144. package/dist/managed-files/files.d.ts +3 -3
  145. package/dist/managed-files/files.d.ts.map +1 -1
  146. package/dist/managed-files/files.js +28 -3
  147. package/dist/managed-files/managed-format.d.ts.map +1 -1
  148. package/dist/managed-files/managed-format.js +1 -0
  149. package/dist/nextest-code-bound.js +1 -0
  150. package/dist/nextest-timings.d.ts +35 -0
  151. package/dist/nextest-timings.d.ts.map +1 -0
  152. package/dist/nextest-timings.js +168 -0
  153. package/dist/owned-installation.d.ts +6 -5
  154. package/dist/owned-installation.d.ts.map +1 -1
  155. package/dist/owned-installation.js +150 -26
  156. package/dist/package-target-policy.d.ts.map +1 -1
  157. package/dist/package-target-policy.js +2 -3
  158. package/dist/process-children.d.ts +7 -0
  159. package/dist/process-children.d.ts.map +1 -0
  160. package/dist/process-children.darwin.d.ts +7 -0
  161. package/dist/process-children.darwin.d.ts.map +1 -0
  162. package/dist/process-children.darwin.js +13 -0
  163. package/dist/process-children.js +14 -0
  164. package/dist/process-children.linux.d.ts +8 -0
  165. package/dist/process-children.linux.d.ts.map +1 -0
  166. package/dist/process-children.linux.js +25 -0
  167. package/dist/process-group.d.ts +108 -0
  168. package/dist/process-group.d.ts.map +1 -0
  169. package/dist/process-group.js +171 -0
  170. package/dist/process-listing.d.ts +7 -0
  171. package/dist/process-listing.d.ts.map +1 -0
  172. package/dist/process-listing.js +51 -0
  173. package/dist/producer-receipts.d.ts +8 -2
  174. package/dist/producer-receipts.d.ts.map +1 -1
  175. package/dist/producer-receipts.js +75 -48
  176. package/dist/task-graph-policy.d.ts +21 -0
  177. package/dist/task-graph-policy.d.ts.map +1 -0
  178. package/dist/task-graph-policy.js +91 -0
  179. package/dist/test-timings.js +4 -4
  180. package/dist/test-walk-policy.d.ts +14 -5
  181. package/dist/test-walk-policy.d.ts.map +1 -1
  182. package/dist/test-walk-policy.js +8 -2
  183. package/dist/testing.d.ts +73 -28
  184. package/dist/testing.d.ts.map +1 -1
  185. package/dist/testing.js +217 -223
  186. package/dist/tool-bins.d.ts +33 -0
  187. package/dist/tool-bins.d.ts.map +1 -0
  188. package/dist/tool-bins.js +72 -0
  189. package/dist/typecheck-test-policy.d.ts.map +1 -1
  190. package/dist/typecheck-test-policy.js +3 -4
  191. package/dist/wait-why-policy.d.ts +28 -0
  192. package/dist/wait-why-policy.d.ts.map +1 -0
  193. package/dist/wait-why-policy.js +223 -0
  194. package/dist/workspace-config-policy.d.ts +14 -8
  195. package/dist/workspace-config-policy.d.ts.map +1 -1
  196. package/dist/workspace-config-policy.js +60 -16
  197. package/dist/workspace-manifest.d.ts +41 -6
  198. package/dist/workspace-manifest.d.ts.map +1 -1
  199. package/dist/workspace-manifest.js +57 -0
  200. package/executors.json +16 -1
  201. package/loader.js +2 -0
  202. package/managed/raw/envrc +11 -0
  203. package/managed/raw/patches/nx@23.2.1.patch +2840 -199
  204. package/managed/raw/patches/ttsc@0.34.1.patch +119 -0
  205. package/managed/raw/tooling/direnv/cargo-fetch-bound.ts +245 -0
  206. package/managed/raw/tooling/direnv/cargo-fetch-run.ts +299 -0
  207. package/managed/raw/tooling/direnv/compiler-variables.sh +42 -0
  208. package/managed/raw/tooling/direnv/developer-links.ts +464 -25
  209. package/managed/raw/tooling/direnv/devenv.smoo.nix +78 -38
  210. package/managed/raw/tooling/direnv/github-actions-bootstrap.sh +14 -12
  211. package/managed/raw/tooling/direnv/installed-bun-links.ts +308 -0
  212. package/managed/raw/tooling/direnv/linked-snapshots.ts +62 -3
  213. package/managed/raw/tooling/direnv/nx-socket-dir.sh +56 -17
  214. package/managed/raw/tooling/direnv/repo-path +68 -6
  215. package/managed/raw/tooling/direnv/secret-references.ts +13 -4
  216. package/managed/raw/tooling/direnv/setup-environment.ts +128 -537
  217. package/managed/raw/tooling/direnv/toolchain-stamp.ts +4 -2
  218. package/managed/raw/tooling/direnv/ttsc-env.sh +9 -0
  219. package/managed/raw/tooling/direnv/uv-relocation.ts +227 -0
  220. package/managed/raw/tooling/git-hooks/commit-msg.sh +2 -1
  221. package/managed/raw/tooling/git-hooks/pre-commit.sh +2 -1
  222. package/managed/raw/tooling/git-hooks/pre-push.sh +2 -1
  223. package/managed/templates/github/actions/cache-ttsc-plugins/action.yml +85 -7
  224. package/managed/templates/github/actions/save-nix-devenv/action.yml +12 -2
  225. package/managed/templates/github/actions/setup-devenv/action.yml +2 -0
  226. package/package.json +77 -13
  227. package/src/bin/smoo-nx-cargo-toolchain.ts +11 -0
  228. package/src/bin/smoo-nx-forbidden-spellings.ts +33 -0
  229. package/src/bin/smoo-nx-nextest-timings.ts +31 -0
  230. package/src/bounded-test-policy.ts +12 -14
  231. package/src/build-state-output-policy.ts +458 -34
  232. package/src/bun-lock-scope.ts +108 -0
  233. package/src/cargo-build-script-env.ts +265 -0
  234. package/src/cargo-closure-input.ts +74 -7
  235. package/src/cargo-retention-hook.ts +94 -0
  236. package/src/cargo-source-hash.ts +138 -41
  237. package/src/cargo-toolchain-paths.ts +95 -0
  238. package/src/cargo-toolchain-policy.ts +49 -5
  239. package/src/cargo-workspace.ts +72 -123
  240. package/src/cross-check-policy.ts +12 -10
  241. package/src/disk-command-policy.ts +1 -0
  242. package/src/ensure-built-receipt.ts +132 -39
  243. package/src/ensure-built-witness.ts +62 -10
  244. package/src/ensure-built.ts +11 -1
  245. package/src/eslint-config-closure.ts +357 -0
  246. package/src/executors/bounded-exec/bounds.ts +76 -0
  247. package/src/executors/bounded-exec/cpu-pool.ts +51 -117
  248. package/src/executors/bounded-exec/executor.ts +423 -259
  249. package/src/executors/bounded-exec/gateway-lease.ts +82 -33
  250. package/src/executors/bounded-exec/hang-diagnostics.ts +173 -31
  251. package/src/executors/bounded-exec/lease-wait.ts +89 -0
  252. package/src/executors/bounded-exec/lock-wait.ts +141 -0
  253. package/src/executors/bounded-exec/owned-subtree.ts +235 -0
  254. package/src/executors/bounded-exec/progress.ts +9 -3
  255. package/src/executors/bounded-exec/ram-attach.ts +238 -0
  256. package/src/executors/bounded-exec/ram-detach.ts +226 -0
  257. package/src/executors/bounded-exec/ram-temp-fixtures.ts +358 -0
  258. package/src/executors/bounded-exec/ram-temp-registry.txt +440 -0
  259. package/src/executors/bounded-exec/ram-temp.ts +1497 -460
  260. package/src/executors/bounded-exec/run-cpu-pool.ts +22 -30
  261. package/src/executors/bounded-exec/runner-hook.ts +14 -6
  262. package/src/executors/bounded-exec/runner-lifecycle.ts +31 -8
  263. package/src/executors/bounded-exec/{cpu-tokens.ts → runner-sizing.ts} +13 -59
  264. package/src/executors/bounded-exec/runtime-pin.ts +232 -0
  265. package/src/executors/bounded-exec/schema.json +11 -2
  266. package/src/executors/bounded-exec/schema.ts +19 -1
  267. package/src/executors/bounded-exec/verdict.ts +137 -34
  268. package/src/executors/cargo-zigbuild/executor.ts +82 -8
  269. package/src/executors/clean-outputs/executor.ts +1 -0
  270. package/src/executors/scriptc-native/executor.ts +394 -0
  271. package/src/executors/scriptc-native/ffi-paths.ts +29 -0
  272. package/src/executors/scriptc-native/schema.json +60 -0
  273. package/src/executors/scriptc-native/schema.ts +34 -0
  274. package/src/executors/typescript-emit/executor.ts +205 -38
  275. package/src/forbidden-spelling-policy.ts +226 -0
  276. package/src/generators/create-package/generator.ts +7 -7
  277. package/src/graph-input-contract.ts +61 -2
  278. package/src/index.ts +788 -224
  279. package/src/managed-assets.ts +3 -0
  280. package/src/managed-files/files.ts +28 -3
  281. package/src/managed-files/managed-format.ts +1 -0
  282. package/src/nextest-code-bound.ts +1 -0
  283. package/src/nextest-timings.ts +106 -0
  284. package/src/owned-installation.ts +150 -23
  285. package/src/package-target-policy.ts +2 -3
  286. package/src/process-children.darwin.ts +14 -0
  287. package/src/process-children.linux.ts +33 -0
  288. package/src/process-children.ts +22 -0
  289. package/src/process-group.ts +209 -0
  290. package/src/process-listing.ts +54 -0
  291. package/src/producer-receipts.ts +68 -45
  292. package/src/task-graph-policy.ts +98 -0
  293. package/src/test-walk-policy.ts +23 -8
  294. package/src/testing.ts +240 -232
  295. package/src/tool-bins.ts +108 -0
  296. package/src/typecheck-test-policy.ts +2 -3
  297. package/src/wait-why-policy.ts +226 -0
  298. package/src/workspace-config-policy.ts +63 -15
  299. package/src/workspace-manifest.ts +89 -6
  300. package/test-timings.json +122 -98
  301. package/dist/bin/smoo-nx-failures.d.ts +0 -3
  302. package/dist/bin/smoo-nx-failures.d.ts.map +0 -1
  303. package/dist/bin/smoo-nx-failures.js +0 -3
  304. package/dist/bin/smoo-nx-nextest-extract.d.ts +0 -3
  305. package/dist/bin/smoo-nx-nextest-extract.d.ts.map +0 -1
  306. package/dist/bin/smoo-nx-nextest-extract.js +0 -42
  307. package/dist/executors/bounded-exec/cpu-tokens.d.ts.map +0 -1
  308. package/dist/failure-summary.d.ts +0 -5
  309. package/dist/failure-summary.d.ts.map +0 -1
  310. package/dist/failure-summary.js +0 -118
  311. package/dist/nextest-extraction.d.ts +0 -117
  312. package/dist/nextest-extraction.d.ts.map +0 -1
  313. package/dist/nextest-extraction.js +0 -303
  314. package/managed/raw/patches/ttsc@0.30.4.patch +0 -2255
  315. package/src/__tests__/cargo-closure-filesets.ts +0 -94
  316. package/src/__tests__/cargo-closure-fixture.ts +0 -113
  317. package/src/__tests__/counted-cargo-process.ts +0 -286
  318. package/src/__tests__/counted-cargo.ts +0 -713
  319. package/src/__tests__/directory-change.ts +0 -27
  320. package/src/__tests__/fixture-cargo-home.ts +0 -36
  321. package/src/__tests__/fixture-nx-env.ts +0 -193
  322. package/src/__tests__/owned-installation.ts +0 -13
  323. package/src/__tests__/past-tick.ts +0 -12
  324. package/src/__tests__/progress-clock.ts +0 -43
  325. package/src/__tests__/runtime-input.ts +0 -23
  326. package/src/bin/smoo-nx-bound-failures.test.ts +0 -127
  327. package/src/bin/smoo-nx-failures.ts +0 -4
  328. package/src/bin/smoo-nx-nextest-extract.ts +0 -44
  329. package/src/bounded-test-policy.test.ts +0 -1029
  330. package/src/build-state-output-policy.test.ts +0 -115
  331. package/src/bun-bootstrap.test.ts +0 -102
  332. package/src/bun-file-packages.test.ts +0 -47
  333. package/src/cargo-closure-filesets.test.ts +0 -63
  334. package/src/cargo-closure-input.property.test.ts +0 -50
  335. package/src/cargo-closure-input.test.ts +0 -506
  336. package/src/cargo-closure-key.test.ts +0 -240
  337. package/src/cargo-resolve-cache.test.ts +0 -1181
  338. package/src/cargo-source-hash.test.ts +0 -707
  339. package/src/cargo-workspace.test.ts +0 -615
  340. package/src/cross-check-policy.test.ts +0 -316
  341. package/src/disk-command-policy.test.ts +0 -61
  342. package/src/ensure-built-receipt.test.ts +0 -279
  343. package/src/ensure-built-witness.test.ts +0 -688
  344. package/src/ensure-built.test.ts +0 -1462
  345. package/src/executors/all-verdicts/executor.test.ts +0 -135
  346. package/src/executors/bounded-exec/cargo-progress-host.test.ts +0 -332
  347. package/src/executors/bounded-exec/cpu-pool.test.ts +0 -684
  348. package/src/executors/bounded-exec/cpu-tokens.test.ts +0 -519
  349. package/src/executors/bounded-exec/disk-lease.test.ts +0 -219
  350. package/src/executors/bounded-exec/executor-host.test.ts +0 -800
  351. package/src/executors/bounded-exec/executor.test.ts +0 -1819
  352. package/src/executors/bounded-exec/go-progress-host.test.ts +0 -171
  353. package/src/executors/bounded-exec/hang-diagnostics.test.ts +0 -291
  354. package/src/executors/bounded-exec/progress.test.ts +0 -139
  355. package/src/executors/bounded-exec/ram-temp-held.test.ts +0 -264
  356. package/src/executors/bounded-exec/ram-temp-host.test.ts +0 -635
  357. package/src/executors/bounded-exec/ram-temp.test.ts +0 -750
  358. package/src/executors/bounded-exec/run-cpu-pool.test.ts +0 -79
  359. package/src/executors/bounded-exec/runner-hook.test.ts +0 -193
  360. package/src/executors/bounded-exec/runner-lifecycle.test.ts +0 -82
  361. package/src/executors/bounded-exec/verdict.test.ts +0 -545
  362. package/src/executors/cargo-zigbuild/executor.test.ts +0 -129
  363. package/src/executors/clean-outputs/executor.test.ts +0 -20
  364. package/src/executors/typescript-emit/executor.test.ts +0 -83
  365. package/src/failure-summary.ts +0 -119
  366. package/src/generators/bounded-test-targets/generator.test.ts +0 -138
  367. package/src/generators/bun-test-tracing/generator.test.ts +0 -250
  368. package/src/generators/create-package/generator.test.ts +0 -190
  369. package/src/generators/make-public/generator.test.ts +0 -137
  370. package/src/graph-input-contract.test.ts +0 -379
  371. package/src/host-controller-wiring.test.ts +0 -31
  372. package/src/index.test.ts +0 -3321
  373. package/src/linked-snapshots.nx.test.ts +0 -254
  374. package/src/managed-files/forgejo-artifact.test.ts +0 -395
  375. package/src/managed-files/generator.test.ts +0 -243
  376. package/src/managed-files/github-host-cache-isolation.test.ts +0 -86
  377. package/src/managed-files/json-edit.test.ts +0 -216
  378. package/src/managed-files/managed-content.test.ts +0 -166
  379. package/src/managed-files/managed-format-json.test.ts +0 -308
  380. package/src/managed-files/repo-path.test.ts +0 -172
  381. package/src/managed-files/setup-devenv-free-disk.test.ts +0 -95
  382. package/src/managed-files/trace-db-artifact.test.ts +0 -7
  383. package/src/managed-files/tree-permissions.test.ts +0 -109
  384. package/src/managed-files/tree.test.ts +0 -123
  385. package/src/manifest-hash.test.ts +0 -219
  386. package/src/nextest-code-bound.test.ts +0 -161
  387. package/src/nextest-extraction.test.ts +0 -216
  388. package/src/nextest-extraction.ts +0 -371
  389. package/src/nextest-partitions.test.ts +0 -501
  390. package/src/nx-cache-bound.test.ts +0 -109
  391. package/src/nx-cache-restore-mtime.test.ts +0 -170
  392. package/src/nx-daemon-claim.test.ts +0 -279
  393. package/src/nx-daemon-idle-cpu.test.ts +0 -80
  394. package/src/nx-daemon-idle-policy.test.ts +0 -111
  395. package/src/nx-daemon-ignore-files.test.ts +0 -210
  396. package/src/nx-daemon-root-normalization.test.ts +0 -105
  397. package/src/nx-daemon-start-never.test.ts +0 -292
  398. package/src/nx-daemon-validity.test.ts +0 -1055
  399. package/src/nx-dot-input-policy.test.ts +0 -353
  400. package/src/nx-failure-life-cycles.test.ts +0 -207
  401. package/src/nx-files-archive-racy.test.ts +0 -97
  402. package/src/nx-foreign-workspace-env.test.ts +0 -329
  403. package/src/nx-incomplete-run-summary.test.ts +0 -70
  404. package/src/nx-plugin-load-errors.test.ts +0 -120
  405. package/src/nx-project-graph-errors.test.ts +0 -70
  406. package/src/nx-project-resolution-cache.test.ts +0 -176
  407. package/src/nx-raw-inputs.test.ts +0 -166
  408. package/src/nx-resident-graph-workers.test.ts +0 -112
  409. package/src/nx-run-information.test.ts +0 -118
  410. package/src/nx-skipped-task-exit.test.ts +0 -180
  411. package/src/nx-state-location.test.ts +0 -63
  412. package/src/nx-store-resolution.test.ts +0 -81
  413. package/src/nx-task-graph-cycles.test.ts +0 -148
  414. package/src/nx-task-output-lease.test.ts +0 -550
  415. package/src/nx-use-local.test.ts +0 -105
  416. package/src/owned-installation.test.ts +0 -105
  417. package/src/package-target-policy.test.ts +0 -1014
  418. package/src/producer-receipts.test.ts +0 -285
  419. package/src/release-config-policy.test.ts +0 -311
  420. package/src/runtime-input.test.ts +0 -393
  421. package/src/serial-group-wiring.test.ts +0 -326
  422. package/src/task-history-namespace.test.ts +0 -181
  423. package/src/task-results.test.ts +0 -228
  424. package/src/test-clock-policy.test.ts +0 -338
  425. package/src/test-program.test.ts +0 -303
  426. package/src/test-timings.test.ts +0 -240
  427. package/src/test-walk-policy.test.ts +0 -620
  428. package/src/testing.test.ts +0 -509
  429. package/src/typecheck-test-policy.test.ts +0 -1468
  430. package/src/typescript-resolution.test.ts +0 -76
  431. package/src/version-actions.test.ts +0 -80
  432. package/src/workspace-config-policy.test.ts +0 -737
@@ -1 +1 @@
1
- {"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../src/testing.ts"],"names":[],"mappings":"AAsDA,oCAAoC;AACpC,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,+DAA+D;IAC/D,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED,4EAA4E;AAC5E,wBAAsB,YAAY,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC,CAe5D;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,SAAS,YAAY,EAAE,EAAE,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,YAAY,EAAE,CAYvG;AAMD,iFAAiF;AACjF,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAc9C;AAED,iEAAiE;AACjE,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,GAAE,MAAM,CAAC,OAAmB,GAAG,IAAI,CAQ/E;AAED;;;GAGG;AACH,wBAAsB,SAAS,CAC7B,SAAS,EAAE,SAAS,YAAY,EAAE,EAClC,KAAK,EAAE,MAAM,EACb,SAAS,SAAkB,GAC1B,OAAO,CAAC,IAAI,CAAC,CAoBf;AAED,uGAAuG;AACvG,wBAAsB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAgDnE;AAED;;;;;;GAMG;AACH,wBAAsB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAkDpE;AAED;;;;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* `<parent>/smoothbricks-fixtures/<suite>/run-<pid>`, where the caller names
11
11
  * the parent: the temp directory, or the directory of a volume the fixture has
12
12
  * to lie on. A process that gets SIGTERM, SIGINT or SIGHUP (a bounded test
13
- * leg's timeout sends SIGTERM, and SIGKILL 10 s later) first stops whatever
14
- * still works in every run it holds, then dies of that signal. One killed
15
- * outright cannot, so the first fixture a process creates for a suite under a
16
- * parent reclaims every run of that suite there whose owner is gone: each
17
- * process working in it is stopped, then the run is deleted. A run whose owner
18
- * still exists is never touched by another process, so nothing outside a dead
19
- * or dying run of the same suite is ever signalled.
13
+ * leg's timeout sends SIGTERM, and SIGKILL 10 s later) first names its own
14
+ * descendants that still run and deletes every run it holds, then dies of that
15
+ * signal. One killed outright cannot, so the first fixture a process creates
16
+ * for a suite under a parent deletes every run of that suite there whose owner
17
+ * is gone. A run whose owner still exists is never touched by another process.
18
+ * Nothing is signalled for working in a run: what a fixture left running is
19
+ * ended by the job's supervisor with the test command's subtree (bounded-exec).
20
+ *
21
+ * No helper here reads a process it was not given. Each starts from pids its
22
+ * caller holds (a child it spawned, a daemon's record, this process) and walks
23
+ * down their children, never across the host's process table: any process of
24
+ * the user caught in an uninterruptible kernel wait holds a reader of its
25
+ * files or arguments there with it.
20
26
  *
21
27
  * The module also says where a fixture's sockets and loopback listeners may
22
28
  * live, because a Cowshed sandbox admits only its own: a Unix socket under its
@@ -24,20 +30,20 @@
24
30
  * literal `/tmp/x.sock` or a port-0 listener still binds there, and then no
25
31
  * process of the workspace can reach it (specs/cowshed/04_sandbox.md).
26
32
  *
27
- * Node APIs and the library's public workspace-root finder only: this module
28
- * is built with the library and imported by Bun tests in other packages.
33
+ * Node APIs and the library's own modules only: this module is built with the
34
+ * library and imported by Bun tests in other packages.
29
35
  */
30
- import { execFile } from 'node:child_process';
31
36
  import { createHash } from 'node:crypto';
32
37
  import { lstatSync, readlinkSync, realpathSync, statSync } from 'node:fs';
33
38
  import { lstat, mkdir, mkdtemp, readdir, readFile, readlink, realpath, rm, symlink, writeFile } from 'node:fs/promises';
34
- import { tmpdir, userInfo } from 'node:os';
39
+ import { createServer } from 'node:net';
40
+ import { tmpdir } from 'node:os';
35
41
  import { dirname, isAbsolute, join, sep } from 'node:path';
36
42
  import { setTimeout as sleep } from 'node:timers/promises';
37
- import { promisify } from 'node:util';
38
43
  import { findNxWorkspaceRoot } from './ensure-built.js';
44
+ import { childPids } from './process-children.js';
45
+ import { listing } from './process-listing.js';
39
46
  import { BOUNDED_TEST_IDLE_TIMEOUT_MS } from './test-backstop.js';
40
- const run = promisify(execFile);
41
47
  /**
42
48
  * How long a stopped process may take to exit when no caller names a grace: the leg's no-progress backstop
43
49
  * (specs/cowshed/08_testing.md), so the exit itself decides and a hung one is the leg's to report. A smaller literal
@@ -45,21 +51,34 @@ const run = promisify(execFile);
45
51
  * 10 s on a loaded gate host and failed teardown of a test that had passed.
46
52
  */
47
53
  const EXIT_TIMEOUT_MS = BOUNDED_TEST_IDLE_TIMEOUT_MS;
48
- /** Under half of the SIGTERM-to-SIGKILL grace a bounded test leg gives, per round of signals. */
49
- const SIGNALLED_GRACE_MS = 3_000;
50
54
  const FIXTURE_HOME = 'smoothbricks-fixtures';
51
55
  const RUN_NAME = /^run-(\d+)$/;
52
56
  const SWEEP_LOCK = 'sweep.lock';
53
- /** Every process on the host, as `ps` lists it on macOS and Linux alike. */
54
- export async function processTable() {
55
- const { stdout } = await run('ps', ['-A', '-o', 'pid=', '-o', 'ppid=', '-o', 'stat=', '-o', 'command='], {
56
- maxBuffer: 64 * 1024 * 1024,
57
- });
57
+ /**
58
+ * The processes among `pids` that still exist, zombies included, as `ps -p` lists them on macOS and Linux alike, in
59
+ * `ps`'s order. Only the named processes are read.
60
+ */
61
+ export async function processesOf(pids) {
62
+ if (pids.length === 0) {
63
+ return [];
64
+ }
65
+ const stdout = await listing('ps', [
66
+ '-o',
67
+ 'pid=',
68
+ '-o',
69
+ 'ppid=',
70
+ '-o',
71
+ 'stat=',
72
+ '-o',
73
+ 'command=',
74
+ '-p',
75
+ pids.join(','),
76
+ ]);
58
77
  return stdout
59
78
  .split('\n')
60
79
  .filter((line) => line.trim() !== '')
61
80
  .map((line) => {
62
- const match = /^\s*(\d+)\s+(\d+)\s+(\S+)\s?(.*)$/.exec(line);
81
+ const match = /^\s*(\d+)\s+(\d+)\s+(\S+)\s*(.*)$/.exec(line);
63
82
  if (match === null) {
64
83
  throw new Error(`Unable to parse ps line: ${line}`);
65
84
  }
@@ -67,6 +86,34 @@ export async function processTable() {
67
86
  return { pid: Number(pid), ppid: Number(ppid), stat: stat ?? '', command: command ?? '' };
68
87
  });
69
88
  }
89
+ /**
90
+ /**
91
+ * `roots` and every process descending from one, each once, in the order found: generation by generation, each the
92
+ * children `children` lists for the pids the one before added. A pid already found is not walked again, so a reused
93
+ * pid listed as a child of its own descendant ends the walk instead of looping it. The walk reads nothing but
94
+ * `children`, and keeps a root that no longer runs: whoever reads the processes drops it.
95
+ */
96
+ export async function walkTree(roots, children) {
97
+ const found = new Set();
98
+ for (let generation = roots; generation.length > 0;) {
99
+ const added = [...new Set(generation)].filter((pid) => !found.has(pid));
100
+ for (const pid of added) {
101
+ found.add(pid);
102
+ }
103
+ generation = added.length === 0 ? [] : await children(added);
104
+ }
105
+ return [...found];
106
+ }
107
+ /**
108
+ * The processes of `roots` that still exist and every process descending from one, roots first, in the order
109
+ * {@link walkTree} found them. Only those processes are read. A child forked after its parent's children were listed,
110
+ * or reparented away before, is not in it.
111
+ */
112
+ export async function processTree(roots) {
113
+ const order = await walkTree(roots, childPids);
114
+ const listed = new Map((await processesOf(order)).map((entry) => [entry.pid, entry]));
115
+ return order.flatMap((pid) => listed.get(pid) ?? []);
116
+ }
70
117
  /**
71
118
  * The listed processes among `pids`, and every process descending from one, each once: a pid that
72
119
  * descends from another in `pids` is not listed twice.
@@ -125,7 +172,9 @@ export async function awaitExit(processes, owner, timeoutMs = EXIT_TIMEOUT_MS) {
125
172
  for (let waiting = processes.filter((entry) => isRunning(entry.pid)); waiting.length > 0;) {
126
173
  if (performance.now() > deadline) {
127
174
  // A signal probe also answers for a zombie, which has already exited.
128
- const live = new Set((await processTable()).filter((entry) => !entry.stat.startsWith('Z')).map((entry) => entry.pid));
175
+ const live = new Set((await processesOf(waiting.map((entry) => entry.pid)))
176
+ .filter((entry) => !entry.stat.startsWith('Z'))
177
+ .map((entry) => entry.pid));
129
178
  const survivors = waiting.filter((entry) => live.has(entry.pid));
130
179
  if (survivors.length === 0) {
131
180
  return;
@@ -136,110 +185,24 @@ export async function awaitExit(processes, owner, timeoutMs = EXIT_TIMEOUT_MS) {
136
185
  waiting = waiting.filter((entry) => isRunning(entry.pid));
137
186
  }
138
187
  }
139
- /** Every process of this user whose working directory is `root` or lies beneath it, deleted or not. */
140
- export async function pidsWorkingIn(root) {
141
- const under = (cwd) => cwd === root || cwd.startsWith(`${root}/`);
142
- switch (process.platform) {
143
- case 'linux': {
144
- const found = [];
145
- for (const pid of (await readdir('/proc')).filter((name) => /^\d+$/.test(name))) {
146
- const cwd = await readlink(`/proc/${pid}/cwd`).catch((error) => {
147
- // Another user's process, or one that exited since the listing.
148
- if (errorCode(error) === 'EACCES' || errorCode(error) === 'ENOENT' || errorCode(error) === 'ESRCH') {
149
- return null;
150
- }
151
- throw error;
152
- });
153
- if (cwd !== null && under(cwd.replace(/ \(deleted\)$/, ''))) {
154
- found.push(Number(pid));
155
- }
156
- }
157
- return found;
158
- }
159
- case 'darwin': {
160
- // lsof keeps naming a working directory after it has been deleted. It
161
- // exits 1 when a listed process vanished before it was read; what it
162
- // printed for the rest is still the answer.
163
- const fields = await run('/usr/sbin/lsof', ['-nP', '-a', '-d', 'cwd', '-u', String(userInfo().uid), '-Fpn'], {
164
- maxBuffer: 64 * 1024 * 1024,
165
- }).then(({ stdout }) => stdout, (error) => {
166
- if (error instanceof Error && 'code' in error && error.code === 1 && 'stdout' in error) {
167
- return String(error.stdout);
168
- }
169
- throw error;
170
- });
171
- const found = [];
172
- let pid = 0;
173
- for (const line of fields.split('\n')) {
174
- if (line.startsWith('p')) {
175
- pid = Number(line.slice(1));
176
- }
177
- else if (line.startsWith('n') && under(line.slice(1))) {
178
- found.push(pid);
179
- }
180
- }
181
- return found;
182
- }
183
- default:
184
- throw new Error(`No working-directory scan for ${process.platform}`);
185
- }
186
- }
187
188
  /**
188
- * Every process of this user started with `TMPDIR` set to `root` or beneath it. Such a process
189
- * writes there whatever its working directory: a ttsc plugin build copies its Go sources into
190
- * `$TMPDIR` from a process working in its project, and Node and Bun write their compile cache
191
- * there on the way out. The environment is the one the process was started with, which is the
192
- * one its children inherit unless it changed it for them.
189
+ * This process's descendants that still run, as text for a failure report about `subject`, or null when none does.
190
+ * A process is named as this process's own, never for where it works, and no caller signals anything on its word: a
191
+ * process is ended by the owner that started it, the supervisor's observed tree (specs/cowshed/11_shell.md, "Process
192
+ * identity and signal ownership"). One reparented away when its parent exited is no longer this process's to see. A
193
+ * listing that cannot be read says so instead of failing the report it serves.
193
194
  */
194
- export async function pidsWithTempIn(root) {
195
- // The value as it follows `TMPDIR=`: `root` itself, with or without its trailing slash, or below it.
196
- const names = (value) => value.startsWith(root) && ['', '/', ' '].includes(value.charAt(root.length));
197
- switch (process.platform) {
198
- case 'linux': {
199
- const found = [];
200
- for (const pid of (await readdir('/proc')).filter((name) => /^\d+$/.test(name))) {
201
- const environ = await readFile(`/proc/${pid}/environ`, 'utf8').catch((error) => {
202
- // Another user's process, or one that exited since the listing.
203
- if (errorCode(error) === 'EACCES' || errorCode(error) === 'ENOENT' || errorCode(error) === 'ESRCH') {
204
- return null;
205
- }
206
- throw error;
207
- });
208
- const entry = environ?.split('\0').find((variable) => variable.startsWith('TMPDIR='));
209
- if (entry !== undefined && names(entry.slice('TMPDIR='.length))) {
210
- found.push(Number(pid));
211
- }
212
- }
213
- return found;
214
- }
215
- case 'darwin': {
216
- // `ps -E` follows each command line with the environment it was started with, as words
217
- // separated by spaces, and only for this user's processes. A word `TMPDIR=<root>` is matched
218
- // with what follows it in that word, so a root containing a space is still found whole. An
219
- // argument spelled `TMPDIR=<root>` names the same directory and counts too: an `env` that
220
- // sets it is about to run something there. `/bin/ps` by path: a procps `ps` has no `-E`.
221
- const { stdout } = await run('/bin/ps', ['-E', '-ww', '-U', String(userInfo().uid), '-o', 'pid=,command='], {
222
- maxBuffer: 256 * 1024 * 1024,
223
- });
224
- const token = ` TMPDIR=${root}`;
225
- const found = [];
226
- for (const line of stdout.split('\n')) {
227
- const row = /^\s*(\d+) (.*)$/.exec(line);
228
- if (row === null) {
229
- continue;
230
- }
231
- const words = ` ${row[2]}`;
232
- for (let at = words.indexOf(token); at !== -1; at = words.indexOf(token, at + 1)) {
233
- if (names(words.slice(at + ' TMPDIR='.length))) {
234
- found.push(Number(row[1]));
235
- break;
236
- }
237
- }
238
- }
239
- return found;
240
- }
241
- default:
242
- throw new Error(`No TMPDIR scan for ${process.platform}`);
195
+ export async function descendantsDiagnostic(subject) {
196
+ try {
197
+ const named = (await processTree([process.pid]))
198
+ .filter((entry) => entry.pid !== process.pid && !entry.stat.startsWith('Z'))
199
+ .map((entry) => `${entry.pid} (${entry.command.slice(0, 160)})`);
200
+ return named.length === 0
201
+ ? null
202
+ : `descendants of this process still run at ${subject}: ${named.join(', ')} (diagnostic only: nothing was signalled)`;
203
+ }
204
+ catch (error) {
205
+ return `descendants of this process at ${subject} could not be listed: ${error instanceof Error ? error.message : String(error)}`;
243
206
  }
244
207
  }
245
208
  /**
@@ -267,7 +230,7 @@ export async function nxDaemonProcesses(workspace) {
267
230
  !Number.isSafeInteger(parsed.processId)) {
268
231
  throw new Error(`Nx daemon record ${record} names no process id`);
269
232
  }
270
- return withDescendants(await processTable(), [parsed.processId]);
233
+ return processTree([parsed.processId]);
271
234
  }
272
235
  /**
273
236
  * Release the Nx daemon `workspace` started and wait until the daemon and
@@ -277,45 +240,26 @@ export async function nxDaemonProcesses(workspace) {
277
240
  * is free to delete; the processes can. The daemon also leaves what it
278
241
  * spawned to end on its own: plugin workers once they see it gone, the editor
279
242
  * extension probe it starts at launch never. Those get SIGTERM with it, the
280
- * ones it started while it was stopping included. A child that outlives the
281
- * daemon is reparented to init and leaves the daemon's process tree, but it
282
- * still works in the workspace, so the workspace census ends what is left.
283
- * A missing record can mean startup has not published it yet: skip the
284
- * daemon-stop command, but never skip the working-directory census.
243
+ * ones it started while it was stopping included: the daemon's own record
244
+ * names the root, and the walk down its children the rest. A child that
245
+ * outlives the daemon is reparented and leaves that tree; it stays in the
246
+ * tree the job's supervisor observes, which ends it with the test command's
247
+ * subtree (bounded-exec). A missing record can mean startup has not published
248
+ * it yet: then nothing is stopped here.
285
249
  */
286
250
  export async function stopNxDaemon(workspace, stop) {
287
251
  const [daemon, ...before] = await nxDaemonProcesses(workspace);
288
- if (daemon !== undefined) {
289
- await stop();
290
- const known = new Set([daemon.pid, ...before.map((entry) => entry.pid)]);
291
- const after = withDescendants(await processTable(), [daemon.pid]).filter((entry) => !known.has(entry.pid));
292
- const spawned = [...before, ...after];
293
- for (const entry of spawned) {
294
- terminate(entry.pid);
295
- }
296
- await awaitExit([daemon, ...spawned], `Nx daemon of ${workspace}`);
252
+ if (daemon === undefined) {
253
+ return;
297
254
  }
298
- await endWorkspaceProcesses(workspace, `Nx processes of ${workspace}`);
299
- }
300
- /**
301
- * End every process still working in `workspace`, round after round, until a
302
- * census finds none. The daemon has exited by now, so a process can start
303
- * another under the workspace only while it is alive, and a child started
304
- * just before its parent was ended is in the next census. A zombie has
305
- * exited already, and this process never ends itself.
306
- */
307
- async function endWorkspaceProcesses(workspace, owner) {
308
- for (;;) {
309
- const working = new Set(await pidsWorkingIn(workspace));
310
- const leftovers = (await processTable()).filter((entry) => working.has(entry.pid) && entry.pid !== process.pid && !entry.stat.startsWith('Z'));
311
- if (leftovers.length === 0) {
312
- return;
313
- }
314
- for (const entry of leftovers) {
315
- terminate(entry.pid);
316
- }
317
- await awaitExit(leftovers, owner);
255
+ await stop();
256
+ const known = new Set([daemon.pid, ...before.map((entry) => entry.pid)]);
257
+ const after = (await processTree([daemon.pid])).filter((entry) => !known.has(entry.pid));
258
+ const spawned = [...before, ...after];
259
+ for (const entry of spawned) {
260
+ terminate(entry.pid);
318
261
  }
262
+ await awaitExit([daemon, ...spawned], `Nx daemon of ${workspace}`);
319
263
  }
320
264
  /**
321
265
  * The run this process holds in each suite directory, opened or still opening,
@@ -387,15 +331,20 @@ function ownRunSignals() {
387
331
  * open failed included, and one failing cuts no other short; each failure is
388
332
  * written to stderr with the suite directory of its run. A repeated signal
389
333
  * meets a handler, not the default, so it waits for this and neither starts a
390
- * second reclaim nor kills the first. That wait is the reclaim's own: for each
391
- * run, after any sweep it was still opening with, the scans, two rounds of
392
- * `SIGNALLED_GRACE_MS` (SIGTERM, then SIGKILL) for its processes, and the
393
- * delete. A bounded test leg's SIGKILL ends it whatever it is.
334
+ * second reclaim nor kills the first. That wait is the reclaim's own: the
335
+ * report of this process's descendants still running, then for each run, after
336
+ * any sweep it was still opening with, the delete. What a fixture left running
337
+ * is ended by the job's supervisor with the test command's subtree
338
+ * (bounded-exec), not here. A bounded test leg's SIGKILL ends this whatever it
339
+ * is.
394
340
  */
395
341
  async function retireRuns(signal) {
342
+ const left = await descendantsDiagnostic(`its ${signal}`);
343
+ if (left !== null) {
344
+ process.stderr.write(`reclaiming this process's fixture runs: ${left}\n`);
345
+ }
396
346
  const runs = [...runDirectories];
397
- // Inside the 10 s a bounded leg grants between SIGTERM and SIGKILL.
398
- const outcomes = await Promise.allSettled(runs.map(async ([, opened]) => reclaimRun(await opened, 'signalled fixture run', SIGNALLED_GRACE_MS)));
347
+ const outcomes = await Promise.allSettled(runs.map(async ([, opened]) => reclaimRun(await opened)));
399
348
  for (const [index, outcome] of outcomes.entries()) {
400
349
  if (outcome.status === 'rejected') {
401
350
  const reason = outcome.reason instanceof Error ? outcome.reason.message : String(outcome.reason);
@@ -413,12 +362,13 @@ function refuseWhileRetiring() {
413
362
  }
414
363
  }
415
364
  /**
416
- * Stop every process working in a run of `suite` under `parentDirectory` whose
417
- * owner is gone, then delete the run, and return the suite's directory there.
418
- * The first fixture root of a suite under a parent in a process does this; a
419
- * test that just watched a fixture-owning process die may too. An owner's pid
420
- * reused by an unrelated process makes its run look alive; it is reclaimed once
421
- * that process is gone too, never early.
365
+ * Delete every run of `suite` under `parentDirectory` whose owner is gone, and
366
+ * return the suite's directory there. The first fixture root of a suite under a
367
+ * parent in a process does this; a test that just watched a fixture-owning
368
+ * process die may too. An owner's pid reused by an unrelated process makes its
369
+ * run look alive; it is reclaimed once that process is gone too, never early.
370
+ * Nothing still working in a dead run is signalled here: whatever its owner
371
+ * left running belongs to that owner's subtree, which its supervisor retires.
422
372
  */
423
373
  export async function reclaimDeadFixtureRuns(parentDirectory, suite) {
424
374
  const suiteDirectory = join(await realpath(parentDirectory), FIXTURE_HOME, suite);
@@ -448,45 +398,14 @@ async function reclaimDeadRuns(suiteDirectory) {
448
398
  }
449
399
  try {
450
400
  for (const directory of dead) {
451
- await reclaimRun(directory, 'dead fixture run');
401
+ await reclaimRun(directory);
452
402
  }
453
403
  }
454
404
  finally {
455
405
  await rm(lock, { force: true });
456
406
  }
457
407
  }
458
- async function reclaimRun(directory, owner, graceMs = EXIT_TIMEOUT_MS) {
459
- const roots = await readdir(directory).catch((error) => {
460
- if (errorCode(error) === 'ENOENT') {
461
- return null;
462
- }
463
- throw error;
464
- });
465
- if (roots === null) {
466
- return;
467
- }
468
- // A fixture deletes its root only once nothing runs in it, so an emptied
469
- // run holds no process and needs no scan.
470
- if (roots.length > 0) {
471
- const working = await pidsWorkingIn(directory);
472
- const processes = (await processTable()).filter((entry) => working.includes(entry.pid));
473
- if (processes.length > 0) {
474
- process.stderr.write(`reclaiming ${owner} ${directory}: ${processes.map((entry) => `${entry.pid} (${entry.command})`).join(', ')}\n`);
475
- for (const entry of processes) {
476
- terminate(entry.pid);
477
- }
478
- try {
479
- await awaitExit(processes, `processes of ${owner} ${directory}`, graceMs);
480
- }
481
- catch (error) {
482
- process.stderr.write(`${error instanceof Error ? error.message : String(error)}; sending SIGKILL\n`);
483
- for (const entry of processes) {
484
- terminate(entry.pid, 'SIGKILL');
485
- }
486
- await awaitExit(processes, `processes of ${owner} ${directory} after SIGKILL`, graceMs);
487
- }
488
- }
489
- }
408
+ async function reclaimRun(directory) {
490
409
  // A killed fixture may never have reached its own alias retirement, and its
491
410
  // workspace may be gone. The alias is its own record: one whose target is the
492
411
  // socket state of a workspace in this reclaimed run, and whose name is that
@@ -849,15 +768,47 @@ function portBlockEnvironment(env) {
849
768
  }
850
769
  return { kind: 'block', base, size };
851
770
  }
771
+ /** The block's service ports from `base+first` on, lowest first: its odd offsets (08_testing.md). */
772
+ function servicePorts(block, first) {
773
+ const ports = [];
774
+ for (let offset = first; offset < block.size; offset += 2)
775
+ ports.push(block.base + offset);
776
+ return ports;
777
+ }
778
+ /**
779
+ * `bind` on each of `candidates` in turn, and the first that binds. Only `EADDRINUSE` (by `code`) moves on to
780
+ * the next; any other failure is that bind's own and surfaces as is, and so does the last candidate's, so an exhausted
781
+ * block reports `EADDRINUSE`, never a silent port 0.
782
+ */
783
+ async function bindFirstFree(block, candidates, bind) {
784
+ const last = candidates.at(-1);
785
+ if (last === undefined) {
786
+ throw new Error(`the Cowshed port block ${block.base}+${block.size} has no service port to bind`);
787
+ }
788
+ for (const port of candidates.slice(0, -1)) {
789
+ try {
790
+ return await bind(port);
791
+ }
792
+ catch (error) {
793
+ if (errorCode(error) !== 'EADDRINUSE') {
794
+ throw error;
795
+ }
796
+ }
797
+ }
798
+ return bind(last);
799
+ }
852
800
  /**
853
801
  * Bind a real listener where a Cowshed job's other processes can connect to
854
- * it. In a block, `bind` is called with each candidate `base+1 … base+size-1`,
855
- * lowest first (a long-lived test listener scans from the bottom), and the
856
- * first that binds is kept: only a real bind claims a port, so nothing probes
857
- * and closes. Only `EADDRINUSE` (by `code`) moves on to the next candidate;
858
- * any other failure is that bind's own and surfaces as is, and so does the
859
- * last candidate's, so an exhausted block reports `EADDRINUSE`, never a silent
860
- * port 0. Outside a block `bind` is called with 0, and the kernel picks.
802
+ * it. In a block, `bind` is called with each service port `base+1, base+3, …
803
+ * base+size-1`, lowest first (a long-lived test listener scans from the
804
+ * bottom), and the first that binds is kept: only a real bind claims a port, so
805
+ * nothing probes and closes. Even offsets are never candidates: each is the
806
+ * session port of the service port above it, bound by that port's holder or by
807
+ * nobody (08_testing.md), which is what `claimRefusingPort` relies on. Only
808
+ * `EADDRINUSE` (by `code`) moves on to the next candidate; any other failure
809
+ * is that bind's own and surfaces as is, and so does the last candidate's, so an
810
+ * exhausted block reports `EADDRINUSE`, never a silent port 0. Outside a block
811
+ * `bind` is called with 0, and the kernel picks.
861
812
  *
862
813
  * `bind` creates and binds one listener per call and returns it, and a failed
863
814
  * bind leaves nothing behind. It may throw (`Bun.serve` does) or reject (a
@@ -872,19 +823,62 @@ export async function bindListener(bind) {
872
823
  return bind(0);
873
824
  case 'broken':
874
825
  throw new Error(`a listener cannot bind in a broken Cowshed port-block environment: ${block.reason}`);
826
+ case 'block':
827
+ return bindFirstFree(block, servicePorts(block, 1), bind);
828
+ }
829
+ }
830
+ /** A `net` server on 127.0.0.1:`port` that hangs up on whoever connects; rejects with the bind's own error. */
831
+ function listenHangingUp(port) {
832
+ return new Promise((resolve, reject) => {
833
+ const server = createServer((socket) => socket.destroy());
834
+ server.once('error', reject);
835
+ server.listen(port, '127.0.0.1', () => {
836
+ server.off('error', reject);
837
+ resolve(server);
838
+ });
839
+ });
840
+ }
841
+ function closeServer(server) {
842
+ return new Promise((resolve, reject) => server.close((error) => (error ? reject(error) : resolve())));
843
+ }
844
+ /** The TCP port `server` listens on. */
845
+ function listeningPort(server) {
846
+ const address = server.address();
847
+ if (address === null || typeof address === 'string')
848
+ throw new Error(`not a TCP listener: ${String(address)}`);
849
+ return address.port;
850
+ }
851
+ /**
852
+ * A port where nothing listens, for a client that must be refused (a cache
853
+ * server that is down). In a block it is the session port of a service port
854
+ * this process holds for as long as the claim is held: no allocator binds a
855
+ * session port but its service port's holder (08_testing.md), so a connect to
856
+ * it is refused at once, and no other test's listener takes it while the client
857
+ * is still asking. A port bound and closed would be the next lowest-first
858
+ * allocator's to bind; a socket bound and never listening is no refusal either,
859
+ * since macOS drops the SYNs it gets and the connect times out. The service
860
+ * ports start at `base+3`, because the session port of `base+1` is the
861
+ * gateway's own `base`; a block of two ports has no session port to give.
862
+ *
863
+ * Outside a block (Linux, or no Cowshed) there is no shared allocator to claim
864
+ * against, so there is no claim: the port is one the kernel picked for a
865
+ * listener this process then closed, and another process's port-0 listener may
866
+ * be given it before the client connects.
867
+ */
868
+ export async function claimRefusingPort() {
869
+ const block = portBlockEnvironment(process.env);
870
+ switch (block.kind) {
871
+ case 'none': {
872
+ const server = await listenHangingUp(0);
873
+ const port = listeningPort(server);
874
+ await closeServer(server);
875
+ return { port, [Symbol.asyncDispose]: async () => { } };
876
+ }
877
+ case 'broken':
878
+ throw new Error(`a refusing port cannot be claimed in a broken Cowshed port-block environment: ${block.reason}`);
875
879
  case 'block': {
876
- const last = block.base + block.size - 1;
877
- for (let port = block.base + 1; port < last; port += 1) {
878
- try {
879
- return await bind(port);
880
- }
881
- catch (error) {
882
- if (errorCode(error) !== 'EADDRINUSE') {
883
- throw error;
884
- }
885
- }
886
- }
887
- return bind(last);
880
+ const service = await bindFirstFree(block, servicePorts(block, 3), listenHangingUp);
881
+ return { port: listeningPort(service) - 1, [Symbol.asyncDispose]: () => closeServer(service) };
888
882
  }
889
883
  }
890
884
  }
@@ -0,0 +1,33 @@
1
+ import type { TargetConfiguration } from 'nx/src/devkit-exports.js';
2
+ /** The tool packages whose executables inferred commands run. */
3
+ declare const NATIVE_TOOL_PACKAGES: readonly ['build-inputs', 'cargo-retain', 'nextest-extract'];
4
+ export type NativeToolPackage = (typeof NATIVE_TOOL_PACKAGES)[number];
5
+ type TargetDependency = NonNullable<TargetConfiguration['dependsOn']>[number];
6
+ /**
7
+ * The tool packages' executables as the inferring host runs them. Every scriptc package ships each platform's
8
+ * executable under `dist/bin/<platform>/`, so an installed tool package already carries this host's. A tool package
9
+ * that is a project of the workspace being inferred (a checkout of the repository that builds it) has only what its
10
+ * `scriptc-<arch>-<family>` target last wrote, so a command running it depends on that target.
11
+ */
12
+ export interface NativeTools {
13
+ /** The host's directory under a tool package's `dist/bin`. */
14
+ readonly platform: string;
15
+ /** The host's scriptc target, the one that writes `dist/bin/<platform>/`. */
16
+ readonly target: string;
17
+ /** Each tool package that is a project of this workspace, to its project name. */
18
+ readonly projects: ReadonlyMap<NativeToolPackage, string>;
19
+ }
20
+ /**
21
+ * The tools of the workspace at `workspaceRoot`, whose project manifests are `projectManifests` (workspace-relative):
22
+ * a tool package is a project when the plugin's link resolves beside one of them.
23
+ */
24
+ export declare function resolveNativeTools(workspaceRoot: string, projectManifests: readonly string[], platform: string, target: string): Promise<NativeTools>;
25
+ /**
26
+ * The command running `tool`'s executable `bin` from `cwd`. `tools` is null on a host no scriptc platform covers,
27
+ * where no tool package carries an executable to run.
28
+ */
29
+ export declare function nativeToolCommand(tools: Pick<NativeTools, 'platform'> | null, cwd: string, tool: NativeToolPackage, bin: string): string;
30
+ /** The task that builds `tool`'s executables for this host, when this workspace builds them. */
31
+ export declare function nativeToolDependsOn(tools: NativeTools | null, tool: NativeToolPackage): TargetDependency[];
32
+ export {};
33
+ //# sourceMappingURL=tool-bins.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool-bins.d.ts","sourceRoot":"","sources":["../src/tool-bins.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAsBpE,iEAAiE;AACjE,QAAA,MAAM,oBAAoB,YAAI,cAAc,EAAE,cAAc,EAAE,iBAAiB,CAAU,CAAC;AAE1F,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEtE,KAAK,gBAAgB,GAAG,WAAW,CAAC,mBAAmB,CAAC,WAAW,CAAC,CAAC,CAAC,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