@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
@@ -7,6 +7,8 @@ export interface NativeTestResult {
7
7
  readonly source: ClosedTestResult['source'];
8
8
  readonly contradictsCursor?: number;
9
9
  readonly durationMs: number | null;
10
+ /** How long the case waited at its leaf's gate before it ran, which `durationMs` leaves out; absent for none. */
11
+ readonly waitMs?: number;
10
12
  readonly sourceRef: string | null;
11
13
  readonly failureOutput: string | null;
12
14
  }
@@ -1 +1 @@
1
- {"version":3,"file":"test-result-writer.d.ts","sourceRoot":"","sources":["../../../src/executors/bounded-exec/test-result-writer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,gBAAgB,EAA6D,MAAM,mBAAmB,CAAC;AAErH,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAM7C,wFAAwF;AACxF,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IAC5C,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IAC5C,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,QAAQ,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;CACvC;AAED,MAAM,WAAW,gBAAgB;IAC/B,iFAAiF;IACjF,MAAM,CAAC,MAAM,EAAE,gBAAgB,GAAG,MAAM,GAAG,IAAI,CAAC;IAChD,SAAS,CAAC,OAAO,EAAE,SAAS,gBAAgB,EAAE,GAAG,MAAM,GAAG,IAAI,CAAC;IAC/D,KAAK,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;CACjC;AA6BD,8FAA8F;AAC9F,wBAAsB,sBAAsB,CAC1C,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE;IAAE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAC1D,OAAO,CAAC;IAAE,Q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EACjB,UAAU,EAAE;IAAE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAC1D,OAAO,CAAC;IAAE,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAA;CAAE,GAAG;IAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CA+FpH"}
@@ -87,6 +87,7 @@ export async function createTestResultWriter(directory, sourceRoot) {
87
87
  source: result.source,
88
88
  ...(result.contradictsCursor === undefined ? {} : { contradictsCursor: result.contradictsCursor }),
89
89
  durationMs: result.durationMs,
90
+ ...(result.waitMs === undefined ? {} : { waitMs: result.waitMs }),
90
91
  sourceRef: normalizeSourceRef(result.sourceRef, sourceRoot),
91
92
  causeRef,
92
93
  }, offset);
@@ -12,6 +12,11 @@ export interface ClosedTestResult {
12
12
  readonly contradictsCursor?: ByteOffset;
13
13
  /** Null when the native runner reports no duration (for example a skipped test). */
14
14
  readonly durationMs: (number & tags.Minimum<0>) | null;
15
+ /**
16
+ * How long the case waited for a core at its leaf's gate before it ran (specs/cowshed/05_gateway.md, "A case starts
17
+ * on a core"), which `durationMs` leaves out; absent for a case that did not wait.
18
+ */
19
+ readonly waitMs?: number & tags.Minimum<0>;
15
20
  /** Native file:line, never a location inferred from human output. */
16
21
  readonly sourceRef: string | null;
17
22
  /** UTF-8 byte range [startByte, endByte), relative to the task artifact directory. */
@@ -1 +1 @@
1
- {"version":3,"file":"test-results.d.ts","sourceRoot":"","sources":["../../../src/executors/bounded-exec/test-results.ts"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,IAAI,EAAE,MAAM,OAAO,CAAC;AAEzC,eAAO,MAAM,iBAAiB,uBAAuB,CAAC;AACtD,eAAO,MAAM,kBAAkB,sBAAsB,CAAC;AAEtD,KAAK,UA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AAED,eAAO,MAAM,kBAAkB,+CAAyC,CAAC;AAEzE,sGAAsG;AACtG,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAMlG"}
@@ -4,8 +4,8 @@ import typia from 'typia';
4
4
  export const TEST_RESULTS_FILE = 'test-results.jsonl';
5
5
  export const TEST_FAILURES_FILE = 'test-failures.log';
6
6
  export const isClosedTestResult = (() => {
7
- const _io0 = (input, _exceptionable = true) => "string" === typeof input.runId && _isFormatUuid_1._isFormatUuid(input.runId) && "string" === typeof input.id && ("fail" === input.status || "pass" === input.status || "skip" === input.status) && ("junit" === input.source || "native" === input.source || "progress" === input.source) && (undefined === input.contradictsCursor || "number" === typeof input.contradictsCursor && (_isTypeUint64_1._isTypeUint64(input.contradictsCursor) && input.contradictsCursor <= 9007199254740991)) && (null === input.durationMs || "number" === typeof input.durationMs && 0 <= input.durationMs) && (null === input.sourceRef || "string" === typeof input.sourceRef) && (null === input.causeRef || "object" === typeof input.causeRef && null !== input.causeRef && _io1(input.causeRef, true && _exceptionable)) && ("number" === typeof input.cursor && (_isTypeUint64_1._isTypeUint64(input.cursor) && input.cursor <= 9007199254740991)) && (8 === Object.keys(input).length || Object.keys(input).every(key => {
8
- if (["runId", "id", "status", "source", "contradictsCursor", "durationMs", "sourceRef", "causeRef", "cursor"].some(prop => key === prop))
7
+ const _io0 = (input, _exceptionable = true) => "string" === typeof input.runId && _isFormatUuid_1._isFormatUuid(input.runId) && "string" === typeof input.id && ("fail" === input.status || "pass" === input.status || "skip" === input.status) && ("junit" === input.source || "native" === input.source || "progress" === input.source) && (undefined === input.contradictsCursor || "number" === typeof input.contradictsCursor && (_isTypeUint64_1._isTypeUint64(input.contradictsCursor) && input.contradictsCursor <= 9007199254740991)) && (null === input.durationMs || "number" === typeof input.durationMs && 0 <= input.durationMs) && (undefined === input.waitMs || "number" === typeof input.waitMs && 0 <= input.waitMs) && (null === input.sourceRef || "string" === typeof input.sourceRef) && (null === input.causeRef || "object" === typeof input.causeRef && null !== input.causeRef && _io1(input.causeRef, true && _exceptionable)) && ("number" === typeof input.cursor && (_isTypeUint64_1._isTypeUint64(input.cursor) && input.cursor <= 9007199254740991)) && (8 === Object.keys(input).length || Object.keys(input).every(key => {
8
+ if (["runId", "id", "status", "source", "contradictsCursor", "durationMs", "waitMs", "sourceRef", "causeRef", "cursor"].some(prop => key === prop))
9
9
  return true;
10
10
  const value = input[key];
11
11
  if (undefined === value)
@@ -1,4 +1,5 @@
1
1
  import type { CpuGrantRecord } from './cpu-grant.js';
2
+ import { type CpuRise } from './cpu-rise.js';
2
3
  import type { CpuWaitRow } from './lease-wait.js';
3
4
  import { type LockWait } from './lock-wait.js';
4
5
  import type { MbxQueuedRequest } from './mbx-queue.js';
@@ -12,18 +13,25 @@ import type { NativeTestResult } from './test-result-writer.js';
12
13
  * outlived `timeoutMs` (`total`), its fixture segment outlived `fixtureTimeoutMs`
13
14
  * (`fixture`), or every failing test in the runner's report failed on
14
15
  * its runner's per-test timeout (`test`). A loaded host produces exactly these.
15
- * - `wedged`: `idleTimeoutMs` fired: no test finished for that long during a chargeable test interval. This proves
16
- * the suite's completion bound was exceeded, not that every process stopped: an expensive active fixture can
17
- * exceed it too. The verdict names tests reported running but never finished and tests the report says were
18
- * aborted; diagnostics distinguish a stalled wait from a progressing but oversized lifecycle.
19
- * When the snapshot named a lock wait, `lockWaits` names the file the run holds on a numbered descriptor and the
20
- * processes outside the run that also hold it open: open-handle evidence, not a kernel lock owner.
16
+ * - `wedged`: `idleTimeoutMs` fired: no test finished and no running test reported progress for that long during a
17
+ * chargeable test interval. This proves the suite's completion bound was exceeded, not that every process stopped:
18
+ * an expensive active fixture can exceed it too. The verdict names tests reported running but never finished and
19
+ * tests the report says were aborted; diagnostics distinguish a stalled wait from a progressing but oversized
20
+ * lifecycle. When the snapshot named a lock wait, `lockWaits` names the file the run holds on a numbered descriptor
21
+ * and the processes outside the run that also hold it open: open-handle evidence, not a kernel lock owner. When it
22
+ * named a process whose CPU time rose, `cpuRising` names it: a build inside the test, which is a defect and not a
23
+ * hang. CPU never restarts the bound, which counts finished tests and the progress running tests report.
21
24
  * - `no-space`: the run failed and its output said a write found no space (ENOSPC). Whatever its tests then reported,
22
25
  * they failed on the disk, not on their own: the verdict names the line that said so and, when the task held one,
23
26
  * its RAM temp volume as it stood when that line arrived.
24
27
  * - `queued`: the command failed before any admission after a live task PID was explicitly seen waiting in mbx, or
25
28
  * while its reserved leaf's request waited on its run's mbx reservation endpoint. Its observed wait, and any public
26
29
  * queue positions, describe admission pressure, never a wedged test.
30
+ * - `operational`: bounded-exec itself ended or refused the run for a cause its command did not make, and `cause` says
31
+ * which: its leaf's mbx reservation was refused (`reservation-refused`, naming the endpoint asked and the connect
32
+ * error's code, `ENOENT` when the endpoint's socket is gone), or the executor's own machinery failed (`executor`: a
33
+ * lost CPU grant or pool, a broken progress channel or runner lifecycle, leftovers it could not retire). The tests the
34
+ * report named are failures, never bounds, and the run never records exit 0.
27
35
  * - `failed`: anything else that did not pass. That includes an assertion named in the report,
28
36
  * or a non-zero exit with no report to say why.
29
37
  */
@@ -48,6 +56,8 @@ export type BoundedExecVerdict = {
48
56
  readonly tests: readonly string[];
49
57
  /** Lock waits the snapshot named: holder evidence (open handles), not a kernel lock owner. */
50
58
  readonly lockWaits: readonly LockWait[];
59
+ /** Processes of the run's tree whose CPU time rose while the bound counted down: a build inside the test. */
60
+ readonly cpuRising: readonly CpuRise[];
51
61
  } | ({
52
62
  readonly outcome: 'no-space';
53
63
  readonly exitCode: number;
@@ -56,6 +66,23 @@ export type BoundedExecVerdict = {
56
66
  readonly outcome: 'failed';
57
67
  readonly exitCode: number;
58
68
  readonly tests: readonly string[];
69
+ } | {
70
+ readonly outcome: 'operational';
71
+ readonly exitCode: number;
72
+ readonly tests: readonly string[];
73
+ readonly cause: OperationalCause;
74
+ };
75
+ /** Why bounded-exec ended or refused a run whatever its command did (`operational`). */
76
+ export type OperationalCause = {
77
+ readonly kind: 'reservation-refused';
78
+ /** The run's mbx reservation endpoint the leaf asked. */
79
+ readonly endpoint: string;
80
+ /** The code of the error that ended the connection (`ENOENT`: the endpoint's socket is gone), else null. */
81
+ readonly errno: string | null;
82
+ readonly message: string;
83
+ } | {
84
+ readonly kind: 'executor';
85
+ readonly message: string;
59
86
  };
60
87
  /** Observed admission wait, supplied only while the command has never received a grant. */
61
88
  export interface AdmissionQueueWait {
@@ -172,6 +199,8 @@ export interface RunEnd {
172
199
  readonly noSpace: NoSpaceSighting | null;
173
200
  /** The lock waits the expiry's snapshot named; empty when none, or when that capture did not complete. */
174
201
  readonly lockWaits: readonly LockWait[];
202
+ /** The processes the expiry's snapshot saw gain CPU time; empty when none did, or when that capture did not finish. */
203
+ readonly cpuRising: readonly CpuRise[];
175
204
  /** Explicit observed queue evidence before first admission; absent after any grant. */
176
205
  readonly admissionQueue?: AdmissionQueueWait | null;
177
206
  }
@@ -185,11 +214,11 @@ export interface RunEnd {
185
214
  */
186
215
  export declare function judgeRun(run: RunEnd): BoundedExecVerdict;
187
216
  /**
188
- * A run that failed for a reason its command did not cause: its CPU grant was lost, or its sub-pool did not close
189
- * cleanly. It is an ordinary failure whatever the command exited with and whatever bound also fired, and the tests it
190
- * reports are failures, never bounds. A failed run never records exit 0.
217
+ * A run that failed for a reason its command did not cause (`OperationalCause`): its reservation was refused, its CPU
218
+ * grant was lost, or its sub-pool did not close cleanly. It is operational whatever the command exited with and
219
+ * whatever bound also fired, and the tests it reports are failures, never bounds. It never records exit 0.
191
220
  */
192
- export declare function judgeOperationalFailure(exitCode: number, report: JunitFailures | null): BoundedExecVerdict;
221
+ export declare function judgeOperationalFailure(exitCode: number, report: JunitFailures | null, cause: OperationalCause): BoundedExecVerdict;
193
222
  /** Where `task`'s verdict and report live: this checkout's own Nx workspace-data directory. */
194
223
  export declare function taskDirectory(workspaceData: string, taskId: string): string;
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;GAIG;AACH,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC,CA6BrG;AAED,kFAAkF;AAClF,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,kBAAkB,GAAG,MAAM,CAQvE;AACD,wBAAgB,eAAe,CAAC,OAAO,EAAE,kBAAkB,GAAG,MAAM,CAgCnE;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,eAAe,GAAG,MAAM,CAgBjE"}
@@ -1,7 +1,9 @@
1
+ import * as _isTypeUint32_1 from "typia/lib/internal/_isTypeUint32";
1
2
  import { mkdir, readFile, rename, rm, writeFile } from 'node:fs/promises';
2
3
  import { join } from 'node:path';
3
4
  import typia from 'typia';
4
5
  import { parseCpuGrant } from './cpu-grant.js';
6
+ import { CPU_RISING_CLASS, describeCpuRises } from './cpu-rise.js';
5
7
  import { describeHolders } from './lock-wait.js';
6
8
  import { TEST_FAILURES_FILE, TEST_RESULTS_FILE } from './test-results.js';
7
9
  const isQueuedVerdict = (() => {
@@ -10,6 +12,25 @@ const isQueuedVerdict = (() => {
10
12
  const _io2 = input => "number" === typeof input.pid && "number" === typeof input.ticket && "number" === typeof input.queuePosition;
11
13
  return input => "object" === typeof input && null !== input && _io0(input);
12
14
  })();
15
+ const isOperationalVerdict = (() => {
16
+ const _ip0 = input => "string" === typeof input["message"];
17
+ const _io0 = input => "operational" === input.outcome && "number" === typeof input.exitCode && (Array.isArray(input.tests) && input.tests.every(elem => "string" === typeof elem)) && ("object" === typeof input.cause && null !== input.cause && _iu0(input.cause));
18
+ const _io1 = input => "reservation-refused" === input.kind && "string" === typeof input.endpoint && (null === input.errno || "string" === typeof input.errno) && _ip0(input);
19
+ const _io2 = input => "executor" === input.kind && _ip0(input);
20
+ const _iu0 = input => (() => {
21
+ if ("reservation-refused" === input.kind)
22
+ return _io1(input);
23
+ else if ("executor" === input.kind)
24
+ return _io2(input);
25
+ else
26
+ return false;
27
+ })();
28
+ return input => "object" === typeof input && null !== input && _io0(input);
29
+ })();
30
+ const isCpuRising = (() => {
31
+ const _io0 = input => "number" === typeof input.pid && (_isTypeUint32_1._isTypeUint32(input.pid) && 1 <= input.pid) && "string" === typeof input.command && ("number" === typeof input.gainedMs && 0 <= input.gainedMs);
32
+ return input => Array.isArray(input) && input.every(elem => "object" === typeof elem && null !== elem && _io0(elem));
33
+ })();
13
34
  /** The environment variable naming the absolute path a command writes its JUnit report to. */
14
35
  export const JUNIT_REPORT_ENV = 'BOUNDED_EXEC_JUNIT';
15
36
  /**
@@ -208,7 +229,14 @@ export function judgeRun(run) {
208
229
  }
209
230
  if (run.expiry?.kind === 'idle') {
210
231
  const tests = [...new Set([...run.expiry.tests, ...(run.report?.cancelled ?? [])])];
211
- return { outcome: 'wedged', idleMs: run.expiry.limitMs, elapsedMs: run.elapsedMs, tests, lockWaits: run.lockWaits };
232
+ return {
233
+ outcome: 'wedged',
234
+ idleMs: run.expiry.limitMs,
235
+ elapsedMs: run.elapsedMs,
236
+ tests,
237
+ lockWaits: run.lockWaits,
238
+ cpuRising: run.cpuRising,
239
+ };
212
240
  }
213
241
  if (run.report !== null && run.report.failed.length > 0) {
214
242
  return { outcome: 'failed', exitCode: run.exitCode, tests: run.report.failed };
@@ -231,13 +259,13 @@ export function judgeRun(run) {
231
259
  return { outcome: 'failed', exitCode: run.exitCode, tests: [] };
232
260
  }
233
261
  /**
234
- * A run that failed for a reason its command did not cause: its CPU grant was lost, or its sub-pool did not close
235
- * cleanly. It is an ordinary failure whatever the command exited with and whatever bound also fired, and the tests it
236
- * reports are failures, never bounds. A failed run never records exit 0.
262
+ * A run that failed for a reason its command did not cause (`OperationalCause`): its reservation was refused, its CPU
263
+ * grant was lost, or its sub-pool did not close cleanly. It is operational whatever the command exited with and
264
+ * whatever bound also fired, and the tests it reports are failures, never bounds. It never records exit 0.
237
265
  */
238
- export function judgeOperationalFailure(exitCode, report) {
266
+ export function judgeOperationalFailure(exitCode, report, cause) {
239
267
  const tests = report === null ? [] : [...report.failed, ...report.timedOut, ...report.cancelled];
240
- return { outcome: 'failed', exitCode: exitCode === 0 ? 1 : exitCode, tests };
268
+ return { outcome: 'operational', exitCode: exitCode === 0 ? 1 : exitCode, tests, cause };
241
269
  }
242
270
  /** Where `task`'s verdict and report live: this checkout's own Nx workspace-data directory. */
243
271
  export function taskDirectory(workspaceData, taskId) {
@@ -379,13 +407,23 @@ function parseVerdict(value) {
379
407
  }
380
408
  break;
381
409
  case 'wedged': {
382
- // A record written before lock waits were named carries none.
410
+ // A record written before lock waits or CPU rises were named carries none.
383
411
  const lockWaits = value.lockWaits === undefined ? [] : parseLockWaits(value.lockWaits);
412
+ const recorded = value.cpuRising;
413
+ const cpuRising = recorded === undefined ? [] : isCpuRising(recorded) ? recorded : null;
384
414
  if (typeof value.idleMs === 'number' &&
385
415
  typeof value.elapsedMs === 'number' &&
386
416
  isStrings(value.tests) &&
387
- lockWaits !== null) {
388
- return { outcome: 'wedged', idleMs: value.idleMs, elapsedMs: value.elapsedMs, tests: value.tests, lockWaits };
417
+ lockWaits !== null &&
418
+ cpuRising !== null) {
419
+ return {
420
+ outcome: 'wedged',
421
+ idleMs: value.idleMs,
422
+ elapsedMs: value.elapsedMs,
423
+ tests: value.tests,
424
+ lockWaits,
425
+ cpuRising,
426
+ };
389
427
  }
390
428
  break;
391
429
  }
@@ -402,6 +440,10 @@ function parseVerdict(value) {
402
440
  }
403
441
  break;
404
442
  }
443
+ case 'operational':
444
+ if (isOperationalVerdict(value))
445
+ return value;
446
+ break;
405
447
  case 'failed':
406
448
  if (typeof value.exitCode === 'number' && isStrings(value.tests)) {
407
449
  return { outcome: 'failed', exitCode: value.exitCode, tests: value.tests };
@@ -524,18 +566,22 @@ export function describeVerdict(verdict) {
524
566
  : verdict.bound === 'fixture'
525
567
  ? `its fixture outlived its ${verdict.limitMs}ms bound (${verdict.elapsedMs}ms)`
526
568
  : `outlived its ${verdict.limitMs}ms bound (${verdict.elapsedMs}ms)`;
527
- case 'wedged':
528
- return `wedged: no test finished for ${verdict.idleMs}ms after ${verdict.elapsedMs}ms; ${verdict.tests.length > 0
569
+ case 'wedged': {
570
+ const locks = verdict.lockWaits.map((wait) => `; waiting on a lock: ${wait.path} held open by ${describeHolders(wait.holders)}`);
571
+ const cpu = verdict.cpuRising.length > 0 ? [`; ${CPU_RISING_CLASS}: ${describeCpuRises(verdict.cpuRising)}`] : [];
572
+ const running = verdict.tests.length > 0
529
573
  ? `still running: ${verdict.tests.join(', ')}`
530
- : 'the runner named no test still running'}${verdict.lockWaits
531
- .map((wait) => `; waiting on a lock: ${wait.path} held open by ${describeHolders(wait.holders)}`)
532
- .join('')}`;
574
+ : 'the runner named no test still running';
575
+ return `wedged: no test finished or reported progress for ${verdict.idleMs}ms after ${verdict.elapsedMs}ms; ${running}${[...locks, ...cpu].join('')}`;
576
+ }
533
577
  case 'no-space':
534
578
  return `${describeNoSpace(verdict)}${verdict.tests.length > 0 ? `; the tests that then failed: ${verdict.tests.join(', ')}` : ''}`;
535
579
  case 'failed':
536
580
  return verdict.tests.length > 0
537
581
  ? `failed: ${verdict.tests.join(', ')}`
538
582
  : `exited ${verdict.exitCode} with no report naming a timeout`;
583
+ case 'operational':
584
+ return `${verdict.cause.message}${verdict.tests.length > 0 ? `; the tests that failed: ${verdict.tests.join(', ')}` : ''}`;
539
585
  }
540
586
  }
541
587
  /**
@@ -1,5 +1,6 @@
1
1
  import { type BuildInputProducer, type BuildInputRecord } from '@smoothbricks/build-inputs';
2
- import { type Result } from '@smoothbricks/cargo-retain';
2
+ import type { CargoLockResolve } from '@smoothbricks/build-inputs/cargo-closure';
3
+ import type { Result } from '@smoothbricks/cargo-retain';
3
4
  import type { CargoZigbuildOptions } from './schema.js';
4
5
  interface CargoZigbuildContext {
5
6
  root: string;
@@ -39,12 +40,12 @@ export declare function zigbuildArgs(options: CargoZigbuildOptions, manifestPath
39
40
  /** `x86_64-unknown-linux-gnu.2.17` → `x86_64-unknown-linux-gnu`. */
40
41
  export declare function cargoTriple(target: string): string;
41
42
  /**
42
- * The remedy for a failed build of `target` on this host, when rustc has no standard library for its triple: every
43
- * managed shell carries `x86_64-unknown-linux-gnu`'s, and on macOS the rest of the Linux set is the `linux-cross`
44
- * profile's. A build outside it fails in rustc, which names the missing target but not the profile. `libdir` is what
43
+ * The remedy for a failed build of `target`, when rustc has no standard library for its triple: every managed shell
44
+ * carries the whole Linux rust-std set, so that rustc is not the one the checkout's shell provides. A build outside it
45
+ * fails in rustc, which names the missing target but not the shell. `libdir` is what
45
46
  * `rustc --print target-libdir --target <triple>` printed, or null when rustc could not answer.
46
47
  */
47
- export declare function missingRustStdRemedy(command: string, target: string, platform: NodeJS.Platform, libdir: {
48
+ export declare function missingRustStdRemedy(command: string, target: string, libdir: {
48
49
  readonly path: string;
49
50
  readonly exists: boolean;
50
51
  } | null): string | null;
@@ -74,10 +75,11 @@ export declare function depInfoPath(built: string): string;
74
75
  /**
75
76
  * The input record (build-inputs.ts) of the build that wrote `built`, or why none can be made: the record
76
77
  * `smoo-nx-build-inputs` writes after a macOS build, from the dep-info beside the artifact, so one link check judges
77
- * both. `cargoRoot` is the Cargo workspace root, whose manifest and lock the record names as well. `producer` is the
78
- * Nx task running the build, which the executor reads from its environment.
78
+ * both. `cargo` is the resolve Cargo reports for the build's manifest, which names the workspace manifest and the
79
+ * lockfile closure the record states. `producer` is the Nx task running the build, which the executor reads from its
80
+ * environment.
79
81
  */
80
- export declare function buildInputsOf(built: string, manifestPath: string, cargoRoot: string, producer?: BuildInputProducer): Result<BuildInputRecord, string>;
82
+ export declare function buildInputsOf(built: string, manifestPath: string, cargo: CargoLockResolve, producer?: BuildInputProducer): Result<BuildInputRecord, string>;
81
83
  /**
82
84
  * Writes the artifact and its input record into the directory `output` is in, which the target declares as its Nx
83
85
  * output (`{options.output}/../`), so a cache hit restores both. The artifact is copied then renamed, so the output
@@ -1 +1 @@
1
- {"version":3,"file":"executor.d.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ED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,gBAAgB,GAAG,MAAM,GAAG,IAAI,CAqB1G;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAGjD;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,MAAM,EACb,YAAY,EAAE,MAAM,EACpB,KAAK,EAAE,gBAAgB,EACvB,QAAQ,CAAC,EAAE,kBAAkB,GAC5B,MAAM,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAkBlC;AAED;;;;GAIG;AACH,wBAAsB,eAAe,CACnC,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,gBAAgB,EAC1B,MAAM,EAAE,gBAAgB,GACvB,OAAO,CAAC,IAAI,CAAC,CAUf;AAED,wBAA8B,qBAAqB,CACjD,OAAO,EAAE,oBAAoB,EAC7B,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC,CAsE/B"}
@@ -6,8 +6,8 @@ import { chmod, copyFile, mkdir, rename } from 'node:fs/promises';
6
6
  import path from 'node:path';
7
7
  import { createInterface } from 'node:readline';
8
8
  import { buildInputProducer, cargoBuildInputs, gitWorkspaceRoot, writeBuildInputs, } from '@smoothbricks/build-inputs';
9
- import { cargoWorkspace, describeRetentionError } from '@smoothbricks/cargo-retain';
10
9
  import typia from 'typia';
10
+ import { CargoMetadataError, readCargoResolve } from '../../cargo-source-hash.js';
11
11
  const validateReason = (() => {
12
12
  let errors;
13
13
  let _report;
@@ -166,17 +166,17 @@ export function cargoTriple(target) {
166
166
  return glibcSuffix === null ? target : target.slice(0, glibcSuffix.index);
167
167
  }
168
168
  /**
169
- * The remedy for a failed build of `target` on this host, when rustc has no standard library for its triple: every
170
- * managed shell carries `x86_64-unknown-linux-gnu`'s, and on macOS the rest of the Linux set is the `linux-cross`
171
- * profile's. A build outside it fails in rustc, which names the missing target but not the profile. `libdir` is what
169
+ * The remedy for a failed build of `target`, when rustc has no standard library for its triple: every managed shell
170
+ * carries the whole Linux rust-std set, so that rustc is not the one the checkout's shell provides. A build outside it
171
+ * fails in rustc, which names the missing target but not the shell. `libdir` is what
172
172
  * `rustc --print target-libdir --target <triple>` printed, or null when rustc could not answer.
173
173
  */
174
- export function missingRustStdRemedy(command, target, platform, libdir) {
175
- if (platform !== 'darwin' || libdir === null || libdir.exists)
174
+ export function missingRustStdRemedy(command, target, libdir) {
175
+ if (libdir === null || libdir.exists)
176
176
  return null;
177
- return (`${command}: rustc has no standard library for ${cargoTriple(target)} (${libdir.path} is absent). On macOS the ` +
178
- "Linux rust-std set beyond x86_64-unknown-linux-gnu is the linux-cross profile's: tooling/devenv -P linux-cross " +
179
- 'shell -- nx run <project>:<target>');
177
+ return (`${command}: rustc has no standard library for ${cargoTriple(target)} (${libdir.path} is absent). Every managed ` +
178
+ "shell carries the Linux rust-std set, so this rustc is not the checkout's shell's: enter it (direnv reload) and " +
179
+ 'run nx run <project>:<target> again');
180
180
  }
181
181
  /** What `rustc --print target-libdir` names for the triple of `target`, and whether it exists; null if rustc failed. */
182
182
  async function rustLibdir(target) {
@@ -256,10 +256,11 @@ export function depInfoPath(built) {
256
256
  /**
257
257
  * The input record (build-inputs.ts) of the build that wrote `built`, or why none can be made: the record
258
258
  * `smoo-nx-build-inputs` writes after a macOS build, from the dep-info beside the artifact, so one link check judges
259
- * both. `cargoRoot` is the Cargo workspace root, whose manifest and lock the record names as well. `producer` is the
260
- * Nx task running the build, which the executor reads from its environment.
259
+ * both. `cargo` is the resolve Cargo reports for the build's manifest, which names the workspace manifest and the
260
+ * lockfile closure the record states. `producer` is the Nx task running the build, which the executor reads from its
261
+ * environment.
261
262
  */
262
- export function buildInputsOf(built, manifestPath, cargoRoot, producer) {
263
+ export function buildInputsOf(built, manifestPath, cargo, producer) {
263
264
  const directory = path.dirname(manifestPath);
264
265
  const workspaceRoot = gitWorkspaceRoot(directory);
265
266
  if (workspaceRoot === null) {
@@ -269,7 +270,13 @@ export function buildInputsOf(built, manifestPath, cargoRoot, producer) {
269
270
  if (!existsSync(depInfo)) {
270
271
  return { ok: false, error: `${depInfo} does not exist: cargo wrote no dep-info beside ${built}` };
271
272
  }
272
- const record = cargoBuildInputs(workspaceRoot, readFileSync(depInfo, 'utf8'), cargoRoot, producer);
273
+ let record;
274
+ try {
275
+ record = cargoBuildInputs(workspaceRoot, readFileSync(depInfo, 'utf8'), cargo, producer);
276
+ }
277
+ catch (error) {
278
+ return { ok: false, error: `${depInfo}: ${error instanceof Error ? error.message : String(error)}` };
279
+ }
273
280
  if (record === null)
274
281
  return { ok: false, error: `${depInfo} names no file of ${workspaceRoot}` };
275
282
  return { ok: true, value: record };
@@ -327,7 +334,7 @@ export default async function cargoZigbuildExecutor(options, context) {
327
334
  }
328
335
  if (status.code !== 0) {
329
336
  console.error(`${command}: exited with ${status.signal ?? `status ${status.code}`}`);
330
- const remedy = missingRustStdRemedy(command, options.target, process.platform, await rustLibdir(options.target));
337
+ const remedy = missingRustStdRemedy(command, options.target, await rustLibdir(options.target));
331
338
  if (remedy !== null)
332
339
  console.error(remedy);
333
340
  return { success: false };
@@ -338,13 +345,19 @@ export default async function cargoZigbuildExecutor(options, context) {
338
345
  return { success: false };
339
346
  }
340
347
  // From the dep-info cargo just wrote, before the artifact is copied: a build whose inputs cannot be named leaves the
341
- // output as it was, and a source edited while the artifact is copied is not recorded with its new bytes.
342
- const cargo = await cargoWorkspace(path.dirname(manifestPath));
343
- if (!cargo.ok) {
344
- console.error(`${command}: ${describeRetentionError(cargo.error)}`);
348
+ // output as it was, and a source edited while the artifact is copied is not recorded with its new bytes. The resolve
349
+ // is the one the task's key was computed from (readCargoResolve), so the record states the key's lockfile closure.
350
+ let cargo;
351
+ try {
352
+ cargo = await readCargoResolve(manifestPath, context.root);
353
+ }
354
+ catch (error) {
355
+ if (!(error instanceof CargoMetadataError))
356
+ throw error;
357
+ console.error(`${command}: ${error.message}`);
345
358
  return { success: false };
346
359
  }
347
- const inputs = buildInputsOf(built, manifestPath, cargo.value.workspaceRoot, producer);
360
+ const inputs = buildInputsOf(built, manifestPath, cargo, producer);
348
361
  if (!inputs.ok) {
349
362
  console.error(`${command}: ${inputs.error}`);
350
363
  return { success: false };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAWA,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,cAAc,EAGnB,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EAGtB,KAAK,mBAAmB,EACzB,MAAM,0BAA0B,CAAC;AAuElC,OAAO,EACL,KAAK,uBAAuB,EAG7B,MAAM,wBAAwB,CAAC;AAqBhC,gEAAgE;AAChE,eAAO,MAAM,aAAa,WAAW,CAAC;AACtC,uEAAuE;AACvE,eAAO,MAAM,mBAAmB,iBAAiB,CAAC;AAuelD;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,CAMtE;AA4aD;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAC/B,aAAa,EAAE,MAAM,EACrB,qBAAqB,UAAkC,GACtD,OAAO,CAoBT;AACD;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,mBAAmB,EAC3B,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,OAAO,GACjB,MAAM,EAAE,CAKV;AA6JD,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,YAAY,EAAE,MAAM,GAAG,aAAa,CAEvG;AAED,eAAO,MAAM,aAAa,EAAE,aAG3B,CAAC;AAeF;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB,EAAE,iBAAiB,CAAC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