@smoothbricks/nx-plugin 0.7.16 → 0.7.18

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 (119) hide show
  1. package/README.md +210 -64
  2. package/dist/.build-inputs.json +28 -23
  3. package/dist/bun-lock-scope.d.ts +128 -20
  4. package/dist/bun-lock-scope.d.ts.map +1 -1
  5. package/dist/bun-lock-scope.js +267 -44
  6. package/dist/cargo-closure-input.d.ts +8 -6
  7. package/dist/cargo-closure-input.d.ts.map +1 -1
  8. package/dist/cargo-closure-input.js +14 -11
  9. package/dist/cargo-source-hash.d.ts +23 -4
  10. package/dist/cargo-source-hash.d.ts.map +1 -1
  11. package/dist/cargo-source-hash.js +80 -14
  12. package/dist/cargo-workspace.d.ts +20 -2
  13. package/dist/cargo-workspace.d.ts.map +1 -1
  14. package/dist/cargo-workspace.js +42 -22
  15. package/dist/compile-environment.d.ts +8 -0
  16. package/dist/compile-environment.d.ts.map +1 -0
  17. package/dist/compile-environment.js +80 -0
  18. package/dist/dependency-manifests.d.ts +13 -0
  19. package/dist/dependency-manifests.d.ts.map +1 -0
  20. package/dist/dependency-manifests.js +20 -0
  21. package/dist/ensure-built-receipt.d.ts +3 -2
  22. package/dist/ensure-built-receipt.d.ts.map +1 -1
  23. package/dist/ensure-built-receipt.js +3 -2
  24. package/dist/eslint-config-closure.d.ts +8 -3
  25. package/dist/eslint-config-closure.d.ts.map +1 -1
  26. package/dist/eslint-config-closure.js +24 -5
  27. package/dist/executors/bounded-exec/bounds.d.ts +12 -1
  28. package/dist/executors/bounded-exec/bounds.d.ts.map +1 -1
  29. package/dist/executors/bounded-exec/bounds.js +8 -4
  30. package/dist/executors/bounded-exec/cpu-rise.d.ts +73 -0
  31. package/dist/executors/bounded-exec/cpu-rise.d.ts.map +1 -0
  32. package/dist/executors/bounded-exec/cpu-rise.js +111 -0
  33. package/dist/executors/bounded-exec/executor.d.ts +1 -1
  34. package/dist/executors/bounded-exec/executor.d.ts.map +1 -1
  35. package/dist/executors/bounded-exec/executor.js +54 -22
  36. package/dist/executors/bounded-exec/hang-diagnostics.d.ts +8 -0
  37. package/dist/executors/bounded-exec/hang-diagnostics.d.ts.map +1 -1
  38. package/dist/executors/bounded-exec/hang-diagnostics.js +66 -6
  39. package/dist/executors/bounded-exec/mbx-pool.d.ts +16 -2
  40. package/dist/executors/bounded-exec/mbx-pool.d.ts.map +1 -1
  41. package/dist/executors/bounded-exec/mbx-pool.js +18 -2
  42. package/dist/executors/bounded-exec/mbx-reservations.d.ts +5 -2
  43. package/dist/executors/bounded-exec/mbx-reservations.d.ts.map +1 -1
  44. package/dist/executors/bounded-exec/mbx-reservations.js +5 -3
  45. package/dist/executors/bounded-exec/progress-channel.d.ts +38 -0
  46. package/dist/executors/bounded-exec/progress-channel.d.ts.map +1 -0
  47. package/dist/executors/bounded-exec/progress-channel.js +113 -0
  48. package/dist/executors/bounded-exec/progress.d.ts +2 -1
  49. package/dist/executors/bounded-exec/progress.d.ts.map +1 -1
  50. package/dist/executors/bounded-exec/ram-temp.d.ts +24 -1
  51. package/dist/executors/bounded-exec/ram-temp.d.ts.map +1 -1
  52. package/dist/executors/bounded-exec/ram-temp.js +123 -16
  53. package/dist/executors/bounded-exec/schema.d.ts +5 -0
  54. package/dist/executors/bounded-exec/schema.d.ts.map +1 -1
  55. package/dist/executors/bounded-exec/schema.js +17 -1
  56. package/dist/executors/bounded-exec/verdict.d.ts +13 -6
  57. package/dist/executors/bounded-exec/verdict.d.ts.map +1 -1
  58. package/dist/executors/bounded-exec/verdict.js +34 -9
  59. package/dist/index.d.ts.map +1 -1
  60. package/dist/index.js +216 -97
  61. package/dist/managed-files/files.d.ts +3 -3
  62. package/dist/managed-files/files.js +3 -3
  63. package/dist/managed-files/generator.d.ts +5 -1
  64. package/dist/managed-files/generator.d.ts.map +1 -1
  65. package/dist/managed-files/generator.js +22 -7
  66. package/dist/managed-files/render-memo.d.ts +13 -0
  67. package/dist/managed-files/render-memo.d.ts.map +1 -0
  68. package/dist/managed-files/render-memo.js +94 -0
  69. package/dist/test-program.d.ts +11 -6
  70. package/dist/test-program.d.ts.map +1 -1
  71. package/dist/test-program.js +39 -35
  72. package/dist/tool-bins.d.ts +12 -0
  73. package/dist/tool-bins.d.ts.map +1 -1
  74. package/dist/tool-bins.js +31 -6
  75. package/dist/typecheck-route.d.ts +3 -4
  76. package/dist/typecheck-route.d.ts.map +1 -1
  77. package/dist/typecheck-route.js +4 -15
  78. package/dist/typecheck-test-policy.d.ts +10 -1
  79. package/dist/typecheck-test-policy.d.ts.map +1 -1
  80. package/dist/typecheck-test-policy.js +40 -24
  81. package/dist/workspace-index.d.ts +14 -1
  82. package/dist/workspace-index.d.ts.map +1 -1
  83. package/dist/workspace-index.js +36 -4
  84. package/managed/raw/patches/nx@24.0.3.patch +703 -119
  85. package/managed/raw/patches/{ttsc@0.34.1.patch → ttsc@0.36.3.patch} +728 -71
  86. package/managed/raw/tooling/direnv/developer-links.ts +17 -3
  87. package/managed/raw/tooling/direnv/devenv.smoo.nix +1 -1
  88. package/managed/templates/github/actions/save-nix-devenv/action.yml +19 -1
  89. package/managed/templates/github/actions/setup-devenv/action.yml +2 -0
  90. package/package.json +5 -4
  91. package/src/bun-lock-scope.ts +293 -40
  92. package/src/cargo-closure-input.ts +19 -11
  93. package/src/cargo-source-hash.ts +103 -13
  94. package/src/cargo-workspace.ts +59 -20
  95. package/src/compile-environment.ts +35 -0
  96. package/src/dependency-manifests.ts +30 -0
  97. package/src/ensure-built-receipt.ts +3 -2
  98. package/src/eslint-config-closure.ts +27 -6
  99. package/src/executors/bounded-exec/bounds.ts +13 -4
  100. package/src/executors/bounded-exec/cpu-rise.ts +156 -0
  101. package/src/executors/bounded-exec/executor.ts +65 -21
  102. package/src/executors/bounded-exec/hang-diagnostics.ts +88 -6
  103. package/src/executors/bounded-exec/mbx-pool.ts +24 -3
  104. package/src/executors/bounded-exec/mbx-reservations.ts +7 -5
  105. package/src/executors/bounded-exec/progress-channel.ts +129 -0
  106. package/src/executors/bounded-exec/progress.ts +2 -1
  107. package/src/executors/bounded-exec/ram-temp.ts +137 -17
  108. package/src/executors/bounded-exec/schema.ts +19 -0
  109. package/src/executors/bounded-exec/verdict.ts +44 -16
  110. package/src/index.ts +272 -106
  111. package/src/managed-files/files.ts +3 -3
  112. package/src/managed-files/generator.ts +21 -6
  113. package/src/managed-files/render-memo.ts +135 -0
  114. package/src/test-program.ts +36 -41
  115. package/src/tool-bins.ts +35 -6
  116. package/src/typecheck-route.ts +5 -14
  117. package/src/typecheck-test-policy.ts +49 -24
  118. package/src/workspace-index.ts +40 -5
  119. package/test-timings.json +6 -0
@@ -485,6 +485,7 @@ export class RamTempVolume {
485
485
  directory: value.directory,
486
486
  mountpoint: this.paths.mountpoint,
487
487
  attach: value.volume.attach,
488
+ registryEntry: value.volume.registryEntry,
488
489
  },
489
490
  held: [...value.held, ...settled.value.held].map((lease) => lease.text),
490
491
  reaped: [...settled.value.reaped],
@@ -519,7 +520,15 @@ export class RamTempVolume {
519
520
  const directory = await this.make(op);
520
521
  return {
521
522
  ledger: next,
522
- value: { ok: true, value: { directory, mountpoint: this.paths.mountpoint, attach: volume.attach } },
523
+ value: {
524
+ ok: true,
525
+ value: {
526
+ directory,
527
+ mountpoint: this.paths.mountpoint,
528
+ attach: volume.attach,
529
+ registryEntry: volume.registryEntry,
530
+ },
531
+ },
523
532
  };
524
533
  });
525
534
  if (!placed.ok) {
@@ -585,7 +594,7 @@ export class RamTempVolume {
585
594
  // A lease that went while its task held it is said, never released as though it were there.
586
595
  const held = leaseOn(lease, volume);
587
596
  if ('lost' in held) {
588
- return { ledger, value: { kind: 'lost', detail: held.lost } };
597
+ return { ledger, value: { kind: 'lost', detail: held.lost, stranded: volume?.attach !== lease.attach } };
589
598
  }
590
599
  if (ledger.lifecycle !== null) {
591
600
  return { ledger, value: { kind: 'wait', claim: ledger.lifecycle } };
@@ -604,7 +613,9 @@ export class RamTempVolume {
604
613
  case 'lost':
605
614
  return {
606
615
  ok: false,
607
- error: { kind: 'lease-lost', lease: lease.directory, mountpoint: lease.mountpoint, detail: value.detail },
616
+ error: value.stranded
617
+ ? await this.releaseLost(op, lease, value.detail)
618
+ : { kind: 'lease-lost', lease: lease.directory, mountpoint: lease.mountpoint, detail: value.detail },
608
619
  };
609
620
  case 'wait': {
610
621
  const yielded = await this.yieldTo(op, value.claim, waited);
@@ -656,6 +667,83 @@ export class RamTempVolume {
656
667
  }
657
668
  }
658
669
  }
670
+ /**
671
+ * Release a lease whose volume went from the mountpoint while its task held it. A volume that lost its mount leaves its
672
+ * disk attached and mounted nowhere: no path reaches its files and no lease can be taken on it, yet its pages stay
673
+ * resident until it is detached (on 2026-11-10 a restart of fseventsd stranded the user's 8 GiB disk so, owned by no
674
+ * lease). The lease's own registry entry, which the registry proved when the lease was taken, makes the disk this
675
+ * volume's: the release detaches it through the gateway's registry-bound `ram-detach`, under a detach claim no other
676
+ * caller passes, and the lease is said lost with what became of its disk. A disk mounted anywhere is left as it is and
677
+ * named, and one already gone is said so; nothing is forced.
678
+ */
679
+ async releaseLost(op, lease, lost) {
680
+ const said = (detail) => ({
681
+ kind: 'lease-lost',
682
+ lease: lease.directory,
683
+ mountpoint: lease.mountpoint,
684
+ detail: `${lost}; ${detail}`,
685
+ });
686
+ const entry = lease.registryEntry;
687
+ let waited = null;
688
+ for (;;) {
689
+ const found = await this.diskOf(entry);
690
+ if (!found.ok)
691
+ return said(`its disk (registry ${entry}) could not be read: ${describeRamTempError(found.error)}`);
692
+ const disk = found.value;
693
+ if (disk === null)
694
+ return said(`its disk (registry ${entry}) is no longer attached`);
695
+ if (disk.mountpoints.length > 0) {
696
+ return said(`its disk ${disk.physical} (registry ${entry}) is mounted at ${disk.mountpoints.join(', ')}, so this release left it attached`);
697
+ }
698
+ const stranded = `its disk ${disk.physical} (registry ${entry}) stayed attached with its mount at ${lease.mountpoint} lost`;
699
+ const taken = await this.locked(op, 'release', async (ledger) => ledger.lifecycle !== null
700
+ ? { ledger, value: ledger.lifecycle }
701
+ : { ledger: { ...ledger, lifecycle: { kind: 'detach', owner: op.owner } }, value: null });
702
+ if (!taken.ok) {
703
+ const why = taken.error.kind === 'lock-denied' ? taken.error.detail : describeRamTempError(taken.error);
704
+ return said(`${stranded}, and no detach claim could be taken: ${why}`);
705
+ }
706
+ if (taken.value !== null) {
707
+ // Another caller is creating or detaching: look at the disk again once it has.
708
+ const yielded = await this.yieldTo(op, taken.value, waited);
709
+ if (!yielded.ok) {
710
+ const why = yielded.error.kind === 'lock-denied' ? yielded.error.detail : describeRamTempError(yielded.error);
711
+ return said(`${stranded}, and waiting on another caller's ${taken.value.kind} failed: ${why}`);
712
+ }
713
+ waited = yielded.value;
714
+ continue;
715
+ }
716
+ const command = await this.runDetach(op, disk.physical, entry);
717
+ if (!command.ok)
718
+ return said(`${stranded}, and its detach failed: ${describeRamTempError(command.error)}`);
719
+ if (command.value.pending !== undefined) {
720
+ return said(`${stranded}; its detach still runs in the gateway (${commandText(command.value)})`);
721
+ }
722
+ const detached = detachOutcome(command.value, disk, 'hdiutil detach (lost mount)');
723
+ return said(detached.ok
724
+ ? `${stranded}, and this release detached it`
725
+ : `${stranded}, and its detach failed: ${describeRamTempError(detached.error)}`);
726
+ }
727
+ }
728
+ /** The RAM disk of this volume's user and size that registry entry `entry` registers, as one read finds it; else null. */
729
+ async diskOf(entry) {
730
+ const registry = await this.commands.run('/usr/sbin/ioreg', ['-r', '-c', 'IOHDIXHDDriveOutKernel', '-l', '-w0']);
731
+ if (registry.status !== 0)
732
+ return failed('ioreg (RAM disks)', commandText(registry));
733
+ const table = await this.commands.run('/sbin/mount', []);
734
+ if (table.status !== 0)
735
+ return failed('mount (mount table)', commandText(table));
736
+ const disks = ramDisksIn(registry.stdout, table.stdout);
737
+ if (!disks.ok)
738
+ return failed('ioreg (RAM disks)', disks.error);
739
+ const disk = disks.value.find((candidate) => candidate.entry === entry && candidate.uid === this.paths.uid && candidate.sectors === this.sectors);
740
+ if (disk === undefined)
741
+ return { ok: true, value: null };
742
+ const { physical } = disk;
743
+ return physical === null
744
+ ? failed('ioreg (RAM disks)', `registry entry ${entry} has published no whole disk`)
745
+ : { ok: true, value: { ...disk, physical } };
746
+ }
659
747
  /**
660
748
  * Wait out another caller's creation or detach. Liveness of its owner is its pid's, so a crashed
661
749
  * owner whose pid was reused holds every caller here; past each `CLAIM_WAIT_NOTICE_MS` on the same
@@ -1310,24 +1398,43 @@ export class RamTempVolume {
1310
1398
  }
1311
1399
  return confirmed;
1312
1400
  }
1313
- /** Check the root the volume mounts below, detach what earlier creators left, then attach and provision the volume. */
1401
+ /**
1402
+ * Check the root the volume mounts below, detach what earlier creators left, then attach and provision the volume. An
1403
+ * unmounted mountpoint with contents is never mounted over and its files never touched: the volume is unavailable.
1404
+ * Only the disk the ledger records as kept is still detached first, by that registry entry, since a lost mount
1405
+ * strands it beside such a directory: tasks that held leases on it may have written there after the loss. With no
1406
+ * kept record the refusal inspects nothing on the host.
1407
+ */
1314
1408
  async provisionVolume(op) {
1409
+ let unowned;
1315
1410
  try {
1316
- const [root, parent] = await Promise.all([stat(this.paths.mountpoint), stat(join(this.paths.mountpoint, '..'))]);
1317
- if (root.dev === parent.dev && (await readdir(this.paths.mountpoint)).length !== 0) {
1318
- return {
1319
- ok: false,
1320
- error: {
1321
- kind: 'ram-unavailable',
1322
- reason: 'unproven-owner',
1323
- detail: `${this.paths.mountpoint} is an unmounted directory with unowned contents; nothing removed or hidden by a new mount`,
1324
- },
1325
- };
1326
- }
1411
+ const [mount, parent] = await Promise.all([stat(this.paths.mountpoint), stat(join(this.paths.mountpoint, '..'))]);
1412
+ unowned = mount.dev === parent.dev && (await readdir(this.paths.mountpoint)).length !== 0;
1327
1413
  }
1328
1414
  catch (error) {
1329
1415
  if (errorCode(error) !== 'ENOENT')
1330
1416
  return failed('provenance', errorText(error));
1417
+ unowned = false;
1418
+ }
1419
+ if (unowned) {
1420
+ const read = await this.readLedger();
1421
+ if (!read.ok) {
1422
+ return read;
1423
+ }
1424
+ if (read.value.ledger.kept !== null) {
1425
+ const strays = await this.reclaimStrays(op, this.holdersPass());
1426
+ if (!strays.ok) {
1427
+ return strays;
1428
+ }
1429
+ }
1430
+ return {
1431
+ ok: false,
1432
+ error: {
1433
+ kind: 'ram-unavailable',
1434
+ reason: 'unproven-owner',
1435
+ detail: `${this.paths.mountpoint} is an unmounted directory with unowned contents; nothing removed or hidden by a new mount`,
1436
+ },
1437
+ };
1331
1438
  }
1332
1439
  const root = await rootReadiness(this.paths);
1333
1440
  if (!root.ok) {
@@ -1747,7 +1854,7 @@ async function removeMountDirectories(directories) {
1747
1854
  function leaseOn(lease, volume) {
1748
1855
  if (volume === null) {
1749
1856
  return {
1750
- lost: `no marked volume is mounted at ${lease.mountpoint} any more: it was detached while the task held its lease`,
1857
+ lost: `no marked volume is mounted at ${lease.mountpoint} any more: it was unmounted or detached while the task held its lease`,
1751
1858
  };
1752
1859
  }
1753
1860
  if (volume.attach !== lease.attach) {
@@ -65,4 +65,9 @@ export interface BoundedExecCommand {
65
65
  args?: string | string[];
66
66
  __unparsed__?: string[];
67
67
  }
68
+ /**
69
+ * The command line a run of `options` starts: `command`, then `args`, then the arguments Nx forwards from its own
70
+ * command line unless `forwardAllArgs` is false. The executor runs it and graph inference reads its runner from it.
71
+ */
72
+ export declare function boundedCommand(options: Pick<BoundedExecCommand, 'command' | 'args' | 'forwardAllArgs' | '__unparsed__'>): string;
68
73
  //# sourceMappingURL=schema.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/executors/bounded-exec/schema.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG,kBAAkB,GAAG,iBAAiB,CAAC;AAExE,MAAM,MAAM,iBAAiB,GACzB;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,aAAa,CAAC,EAAE,MAAM,CAAA;CAAE,GAC7C;IAAE,SAAS,CAAC,EAAE,SAAS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G,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;;;OAQG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;;;;;;;;;;OAYG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;;OAKG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,IAAI,CAAC,kBAAkB,EAAE,SAAS,GAAG,MAAM,GAAG,gBAAgB,GAAG,cAAc,CAAC,GACxF,MAAM,CAWR"}
@@ -1 +1,17 @@
1
- export {};
1
+ /**
2
+ * The command line a run of `options` starts: `command`, then `args`, then the arguments Nx forwards from its own
3
+ * command line unless `forwardAllArgs` is false. The executor runs it and graph inference reads its runner from it.
4
+ */
5
+ export function boundedCommand(options) {
6
+ const parts = [options.command];
7
+ if (Array.isArray(options.args)) {
8
+ parts.push(...options.args);
9
+ }
10
+ else if (options.args) {
11
+ parts.push(options.args);
12
+ }
13
+ if (options.forwardAllArgs !== false && options.__unparsed__?.length) {
14
+ parts.push(...options.__unparsed__);
15
+ }
16
+ return parts.join(' ');
17
+ }
@@ -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,12 +13,14 @@ 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.
@@ -48,6 +51,8 @@ export type BoundedExecVerdict = {
48
51
  readonly tests: readonly string[];
49
52
  /** Lock waits the snapshot named: holder evidence (open handles), not a kernel lock owner. */
50
53
  readonly lockWaits: readonly LockWait[];
54
+ /** Processes of the run's tree whose CPU time rose while the bound counted down: a build inside the test. */
55
+ readonly cpuRising: readonly CpuRise[];
51
56
  } | ({
52
57
  readonly outcome: 'no-space';
53
58
  readonly exitCode: number;
@@ -172,6 +177,8 @@ export interface RunEnd {
172
177
  readonly noSpace: NoSpaceSighting | null;
173
178
  /** The lock waits the expiry's snapshot named; empty when none, or when that capture did not complete. */
174
179
  readonly lockWaits: readonly LockWait[];
180
+ /** The processes the expiry's snapshot saw gain CPU time; empty when none did, or when that capture did not finish. */
181
+ readonly cpuRising: readonly CpuRise[];
175
182
  /** Explicit observed queue evidence before first admission; absent after any grant. */
176
183
  readonly admissionQueue?: AdmissionQueueWait | null;
177
184
  }
@@ -1 +1 @@
1
- {"version":3,"file":"verdict.d.ts","sourceRoot":"","sources":["../../../src/executors/bounded-exec/verdict.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAErD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAmB,KAAK,QAAQ,EAAe,MAAM,gBAAgB,CAAC;AAC7E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAGhE;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,MAAM,kBAAkB,GAC1B;IAAE,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAA;CAAE,GAC9B,CAAC;IAAE,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GAAG,kBAAkB,CAAC,GAChF;IACE,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,SAAS,CAAC;IACpC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B,GACD;IAAE,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,SA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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,10 @@ 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 isCpuRising = (() => {
16
+ 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);
17
+ return input => Array.isArray(input) && input.every(elem => "object" === typeof elem && null !== elem && _io0(elem));
18
+ })();
13
19
  /** The environment variable naming the absolute path a command writes its JUnit report to. */
14
20
  export const JUNIT_REPORT_ENV = 'BOUNDED_EXEC_JUNIT';
15
21
  /**
@@ -208,7 +214,14 @@ export function judgeRun(run) {
208
214
  }
209
215
  if (run.expiry?.kind === 'idle') {
210
216
  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 };
217
+ return {
218
+ outcome: 'wedged',
219
+ idleMs: run.expiry.limitMs,
220
+ elapsedMs: run.elapsedMs,
221
+ tests,
222
+ lockWaits: run.lockWaits,
223
+ cpuRising: run.cpuRising,
224
+ };
212
225
  }
213
226
  if (run.report !== null && run.report.failed.length > 0) {
214
227
  return { outcome: 'failed', exitCode: run.exitCode, tests: run.report.failed };
@@ -379,13 +392,23 @@ function parseVerdict(value) {
379
392
  }
380
393
  break;
381
394
  case 'wedged': {
382
- // A record written before lock waits were named carries none.
395
+ // A record written before lock waits or CPU rises were named carries none.
383
396
  const lockWaits = value.lockWaits === undefined ? [] : parseLockWaits(value.lockWaits);
397
+ const recorded = value.cpuRising;
398
+ const cpuRising = recorded === undefined ? [] : isCpuRising(recorded) ? recorded : null;
384
399
  if (typeof value.idleMs === 'number' &&
385
400
  typeof value.elapsedMs === 'number' &&
386
401
  isStrings(value.tests) &&
387
- lockWaits !== null) {
388
- return { outcome: 'wedged', idleMs: value.idleMs, elapsedMs: value.elapsedMs, tests: value.tests, lockWaits };
402
+ lockWaits !== null &&
403
+ cpuRising !== null) {
404
+ return {
405
+ outcome: 'wedged',
406
+ idleMs: value.idleMs,
407
+ elapsedMs: value.elapsedMs,
408
+ tests: value.tests,
409
+ lockWaits,
410
+ cpuRising,
411
+ };
389
412
  }
390
413
  break;
391
414
  }
@@ -524,12 +547,14 @@ export function describeVerdict(verdict) {
524
547
  : verdict.bound === 'fixture'
525
548
  ? `its fixture outlived its ${verdict.limitMs}ms bound (${verdict.elapsedMs}ms)`
526
549
  : `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
550
+ case 'wedged': {
551
+ const locks = verdict.lockWaits.map((wait) => `; waiting on a lock: ${wait.path} held open by ${describeHolders(wait.holders)}`);
552
+ const cpu = verdict.cpuRising.length > 0 ? [`; ${CPU_RISING_CLASS}: ${describeCpuRises(verdict.cpuRising)}`] : [];
553
+ const running = verdict.tests.length > 0
529
554
  ? `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('')}`;
555
+ : 'the runner named no test still running';
556
+ return `wedged: no test finished or reported progress for ${verdict.idleMs}ms after ${verdict.elapsedMs}ms; ${running}${[...locks, ...cpu].join('')}`;
557
+ }
533
558
  case 'no-space':
534
559
  return `${describeNoSpace(verdict)}${verdict.tests.length > 0 ? `; the tests that then failed: ${verdict.tests.join(', ')}` : ''}`;
535
560
  case 'failed':
@@ -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;AAqElC,OAAO,EACL,KAAK,uBAAuB,EAG7B,MAAM,wBAAwB,CAAC;AAqBhC,gEAAgE;AAChE,eAAO,MAAM,aAAa,WAAW,CAAC;AACtC,uEAAuE;AACvE,eAAO,MAAM,mBAAmB,iBAAiB,CAAC;AA0elD;;;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,uBAAuB,CAQxE,CAAC;AACF,eAAO,MAAM,kBAAkB,EAAE,kBAAkB,CAAC,uBAAuB,CAM1E,CAAC;AAEF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