@smoothbricks/nx-plugin 0.7.3 → 0.7.5

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.
@@ -25,8 +25,9 @@ import { TEST_FAILURES_FILE, TEST_RESULTS_FILE } from './test-results.js';
25
25
  * - `no-space`: the run failed and its output said a write found no space (ENOSPC). Whatever its tests then reported,
26
26
  * they failed on the disk, not on their own: the verdict names the line that said so and, when the task held one,
27
27
  * its RAM temp volume as it stood when that line arrived.
28
- * - `queued`: the command failed before any admission after a live task PID was explicitly seen waiting in mbx.
29
- * Its observed wait and public queue positions describe admission pressure, never a wedged test.
28
+ * - `queued`: the command failed before any admission after a live task PID was explicitly seen waiting in mbx, or
29
+ * while its reserved leaf's request waited on its run's mbx reservation endpoint. Its observed wait, and any public
30
+ * queue positions, describe admission pressure, never a wedged test.
30
31
  * - `failed`: anything else that did not pass. That includes an assertion named in the report,
31
32
  * or a non-zero exit with no report to say why.
32
33
  */
@@ -672,9 +673,13 @@ export async function failedTasksOfRun(runJson: unknown, workspaceData: string):
672
673
 
673
674
  /** The same honest admission diagnostic in live output and a terminal verdict. */
674
675
  export function describeAdmissionQueue(wait: AdmissionQueueWait): string {
675
- return `queued for admission ${(wait.waitedMs / 1_000).toFixed(1)} s; mbx ${wait.requests
676
- .map((request) => `pid=${request.pid} ticket=${request.ticket} queue position=${request.queuePosition}`)
677
- .join(', ')}`;
676
+ const where =
677
+ wait.requests.length === 0
678
+ ? "on its run's mbx reservation endpoint"
679
+ : `mbx ${wait.requests
680
+ .map((request) => `pid=${request.pid} ticket=${request.ticket} queue position=${request.queuePosition}`)
681
+ .join(', ')}`;
682
+ return `queued for admission ${(wait.waitedMs / 1_000).toFixed(1)} s; ${where}`;
678
683
  }
679
684
  export function describeVerdict(verdict: BoundedExecVerdict): string {
680
685
  switch (verdict.outcome) {
package/src/index.ts CHANGED
@@ -82,6 +82,7 @@ import {
82
82
  type AllVerdictsOptions,
83
83
  ESLINT_SOURCES_TOKEN,
84
84
  } from './executors/all-verdicts/schema.js';
85
+ import { closeRunReservations, serveRunReservations } from './executors/bounded-exec/mbx-reservations.js';
85
86
  import { closeRunCpuPool, serveRunCpuPool } from './executors/bounded-exec/run-cpu-pool.js';
86
87
  import { ffiPathProblem } from './executors/scriptc-native/ffi-paths.js';
87
88
  import type { ScriptcNativeFfi } from './executors/scriptc-native/schema.js';
@@ -1219,7 +1220,7 @@ function isBuildOutputPackageJson(packageJsonPath: string): boolean {
1219
1220
  * hint and the opt-in producer completion receipts. Each sees the same options and run context; neither reads the
1220
1221
  * other's output. The hint is recorded first so a producer-receipt bug cannot cost the controller its evidence. The
1221
1222
  * pair also serves a run that inherits no CPU pool its own, which every task inherits (`run-cpu-pool.ts`), and closes
1222
- * it when the run ends. Last, once every task has finished, the post hook starts the reclaim of the
1223
+ * it when the run ends, and a run with mbx's pool its mbx reservation endpoint (`mbx-reservations.ts`), which it ends then too. Last, once every task has finished, the post hook starts the reclaim of the
1223
1224
  * superseded Cargo unit generations of each Cargo workspace the run built into, in a process of its own, never on
1224
1225
  * Nx's thread (`@smoothbricks/cargo-retain`).
1225
1226
  */
@@ -1230,11 +1231,13 @@ export const preTasksExecution: PreTasksExecution<ProducerReceiptsOptions> = asy
1230
1231
  preTaskResults(options, context);
1231
1232
  await preProducerReceipts(options, context);
1232
1233
  await serveRunCpuPool(context);
1234
+ await serveRunReservations(context);
1233
1235
  };
1234
1236
  export const postTasksExecution: PostTasksExecution<ProducerReceiptsOptions> = async (options, context) => {
1235
1237
  await postTaskResults(options, context);
1236
1238
  await postProducerReceipts(options, context);
1237
1239
  await closeRunCpuPool(context);
1240
+ await closeRunReservations(context);
1238
1241
  await postCargoRetention(options, context);
1239
1242
  };
1240
1243
 
package/test-timings.json CHANGED
@@ -99,6 +99,7 @@
99
99
  "src/manifest-hash.test.ts": 49,
100
100
  "src/workspace-config-policy.test.ts": 47,
101
101
  "src/executors/wrangler-deploy/hasher.test.ts": 39,
102
+ "src/executors/bounded-exec/mbx-reservations.test.ts": 39,
102
103
  "src/generators/create-package/generator.test.ts": 33,
103
104
  "src/cargo-toolchain-paths.test.ts": 31,
104
105
  "src/eslint-sources.test.ts": 31,