@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
@@ -15,7 +15,7 @@ export class AdmissionObservation {
15
15
  * and ends nothing: the bounds decide, and an idle expiry names it.
16
16
  */
17
17
  failure = null;
18
- /** When the last successful snapshot completed (`Date.now()`): credit runs to it and no further. */
18
+ /** When the last successful snapshot completed on the awake clock: credit runs to it and no further. */
19
19
  confirmedAt = null;
20
20
  abort = new AbortController();
21
21
  timer;
@@ -37,11 +37,11 @@ export class AdmissionObservation {
37
37
  queueWait(reserved) {
38
38
  return this.admitted || (this.requests.length === 0 && !reserved)
39
39
  ? null
40
- : { waitedMs: admissionWaitMs(this.wait, performance.now()), requests: this.requests };
40
+ : { waitedMs: admissionWaitMs(this.wait, this.host.awakeNow()), requests: this.requests };
41
41
  }
42
42
  /** A reserved leaf's request began to wait on its run's endpoint. */
43
43
  waiting() {
44
- this.wait = stepAdmissionWait(this.wait, { kind: 'snapshot', at: performance.now(), waiting: true });
44
+ this.wait = stepAdmissionWait(this.wait, { kind: 'snapshot', at: this.host.awakeNow(), waiting: true });
45
45
  }
46
46
  /** Only mbx's activity report says whether a Cargo leaf's compiler or test waits in the pool: poll it. */
47
47
  poll() {
@@ -52,7 +52,7 @@ export class AdmissionObservation {
52
52
  }
53
53
  /** The run ended: the wait stops counting and no snapshot is taken or credited again. */
54
54
  stop() {
55
- this.wait = stepAdmissionWait(this.wait, { kind: 'stop', at: performance.now() });
55
+ this.wait = stepAdmissionWait(this.wait, { kind: 'stop', at: this.host.awakeNow() });
56
56
  clearInterval(this.timer);
57
57
  this.abort.abort();
58
58
  }
@@ -68,11 +68,11 @@ export class AdmissionObservation {
68
68
  }
69
69
  this.failure = detail;
70
70
  this.requests = [];
71
- this.wait = stepAdmissionWait(this.wait, { kind: 'snapshot', at: performance.now(), waiting: false });
71
+ this.wait = stepAdmissionWait(this.wait, { kind: 'snapshot', at: this.host.awakeNow(), waiting: false });
72
72
  // The wait since the last confirmed snapshot is unconfirmed: the idle bound resumes from that snapshot.
73
73
  this.host.step({
74
74
  kind: 'admission-queue',
75
- at: this.confirmedAt ?? Date.now(),
75
+ at: this.confirmedAt ?? this.host.awakeNow(),
76
76
  waiting: false,
77
77
  testing: this.host.testing(),
78
78
  });
@@ -98,9 +98,8 @@ export class AdmissionObservation {
98
98
  }
99
99
  this.lastSnapshotDiagnostics = diagnostics;
100
100
  const waiting = snapshot.requests.length > 0;
101
- const observedAt = Date.now();
102
- const observedWaitAt = performance.now();
103
- this.wait = stepAdmissionWait(this.wait, { kind: 'snapshot', at: observedWaitAt, waiting });
101
+ const observedAt = this.host.awakeNow();
102
+ this.wait = stepAdmissionWait(this.wait, { kind: 'snapshot', at: observedAt, waiting });
104
103
  this.failure = null;
105
104
  this.confirmedAt = observedAt;
106
105
  if (waiting) {
@@ -109,7 +108,7 @@ export class AdmissionObservation {
109
108
  if (positions !== this.lastDiagnostic ||
110
109
  this.lastDiagnosticAt === null ||
111
110
  Date.now() - this.lastDiagnosticAt >= HANG_CAPTURE_MS) {
112
- const waitedMs = admissionWaitMs(this.wait, observedWaitAt);
111
+ const waitedMs = admissionWaitMs(this.wait, observedAt);
113
112
  this.host.tell(`cowshed: mbx ${describeAdmissionQueue({ waitedMs, requests: snapshot.requests })}\n`);
114
113
  this.lastDiagnostic = positions;
115
114
  this.lastDiagnosticAt = Date.now();
@@ -0,0 +1,5 @@
1
+ /** The idle clock tracks awake time, not wall time or CPU consumed by this process. */
2
+ export declare function openAwakeClock(): Promise<() => number>;
3
+ /** A timer is only a wake-up. An early callback arms the remaining time on the same clock. */
4
+ export declare function atClockDeadline(at: number, now: () => number, reached: () => void): () => void;
5
+ //# sourceMappingURL=awake-clock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"awake-clock.d.ts","sourceRoot":"","sources":["../../../src/executors/bounded-exec/awake-clock.ts"],"names":[],"mappings":"AAAA,uFAAuF;AACvF,wBAAsB,cAAc,IAAI,OAAO,CAAC,MAAM,MAAM,CAAC,CAO5D;AAED,8FAA8F;AAC9F,wBAAgB,eAAe,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,MAAM,EAAE,OAAO,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAQ9F"}
@@ -0,0 +1,22 @@
1
+ /** The idle clock tracks awake time, not wall time or CPU consumed by this process. */
2
+ export async function openAwakeClock() {
3
+ // Bun 1.4.4 uses Rust Instant, and Linux Node uses CLOCK_MONOTONIC. Darwin Node's libuv uses
4
+ // mach_continuous_time, which includes sleep; its awake reading comes from the cowshed addon.
5
+ if (process.platform !== 'darwin' || process.versions.bun !== undefined)
6
+ return () => performance.now();
7
+ const { awakeTimeMs } = await import('@smoothbricks/cowshed/awake-clock');
8
+ awakeTimeMs(); // Refuse a missing or stale addon before the executor spawns anything.
9
+ return awakeTimeMs;
10
+ }
11
+ /** A timer is only a wake-up. An early callback arms the remaining time on the same clock. */
12
+ export function atClockDeadline(at, now, reached) {
13
+ const wake = () => {
14
+ const remaining = at - now();
15
+ if (remaining > 0)
16
+ timer = setTimeout(wake, Math.ceil(remaining));
17
+ else
18
+ reached();
19
+ };
20
+ let timer = setTimeout(wake, Math.ceil(Math.max(0, at - now())));
21
+ return () => clearTimeout(timer);
22
+ }
@@ -7,7 +7,9 @@
7
7
  * ceiling starts at spawn. Later zero-hold intervals pause only the idle budget.
8
8
  * - Any explicitly queued task process pauses idle, including alongside held grants; ceilings keep running.
9
9
  * - The fixture ceiling ends with its segment. The idle clock also stops outside the testing lifecycle.
10
- * - Finished tests reset the idle budget whether their release byte arrived before or after their output.
10
+ * - Finished tests reset the idle budget whether their release byte arrived before or after their output, and so does
11
+ * progress a running test reports on the run's progress channel (progress-channel.ts). The run's CPU is no event:
12
+ * it never resets the budget.
11
13
  */
12
14
  /** The limits a run was given, in milliseconds; an absent one never expires. */
13
15
  export interface BoundLimits {
@@ -16,8 +18,8 @@ export interface BoundLimits {
16
18
  readonly totalMs?: number;
17
19
  }
18
20
  /**
19
- * When each armed bound expires, in the clock's milliseconds; `null` when it is not armed. `queued`: the run waits for
20
- * its pool's grant, so none is armed yet but a fixture ceiling started at spawn (`fixtureFirst`).
21
+ * When each armed bound expires: idle on the awake clock, fixture and total on the wall clock. A null bound is not
22
+ * armed. A queued run waits for its pool's grant, so only a fixture started at spawn can have a ceiling then.
21
23
  */
22
24
  export interface Bounds {
23
25
  readonly idle: number | null;
@@ -33,11 +35,12 @@ export type BoundEvent =
33
35
  /**
34
36
  * The command started; `testing` is the lifecycle's answer then, `fixture` whether a supervised fixture leads it,
35
37
  * `queued` whether mbx schedules this leaf, as known before spawn, and `fixtureFirst` whether that fixture runs
36
- * before the leaf's reservation (it counts the leaf's units), so its ceiling starts now, not at the grant.
38
+ * before the leaf's reservation (every reserved leaf's does), so its ceiling starts now, not at the grant.
37
39
  */
38
40
  {
39
41
  readonly kind: 'spawn';
40
42
  readonly at: number;
43
+ readonly wallAt: number;
41
44
  readonly testing: boolean;
42
45
  readonly fixture: boolean;
43
46
  readonly queued: boolean;
@@ -47,6 +50,7 @@ export type BoundEvent =
47
50
  | {
48
51
  readonly kind: 'granted';
49
52
  readonly at: number;
53
+ readonly wallAt: number;
50
54
  readonly testing: boolean;
51
55
  readonly fixture: boolean;
52
56
  } | {
@@ -71,6 +75,15 @@ export type BoundEvent =
71
75
  readonly wasTesting: boolean;
72
76
  readonly finished: boolean;
73
77
  }
78
+ /**
79
+ * A running test reported progress on the run's progress channel: it restarts the idle bound as a finished test
80
+ * does, and moves no phase, so `testing` is the answer before and after it.
81
+ */
82
+ | {
83
+ readonly kind: 'reported';
84
+ readonly at: number;
85
+ readonly testing: boolean;
86
+ }
74
87
  /** The fixture's segment ended: its ceiling no longer applies. */
75
88
  | {
76
89
  readonly kind: 'fixture-done';
@@ -79,9 +92,9 @@ export declare const UNARMED: Bounds;
79
92
  /** The bounds after `event`. */
80
93
  export declare function stepBounds(bounds: Bounds, limits: BoundLimits, event: BoundEvent): Bounds;
81
94
  /** The bound that expires first, or `null` when none is armed. A tie names the total, then the fixture, then idle. */
82
- export declare function earliestBound(bounds: Bounds): {
95
+ export declare function earliestBound(bounds: Bounds, awakeNow: number, wallNow: number): {
83
96
  readonly kind: BoundKind;
84
- readonly at: number;
97
+ readonly remainingMs: number;
85
98
  } | null;
86
99
  /** Observed queue duration on a monotonic clock; stopping closes its interval permanently, before cleanup begins. */
87
100
  export type AdmissionWait = {
@@ -1 +1 @@
1
- {"version":3,"file":"bounds.d.ts","sourceRoot":"","sources":["../../../src/executors/bounded-exec/bounds.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,gFAAgF;AAChF,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;;GAGG;AACH,MAAM,WAAW,MAAM;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,QAAQ,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,QAAQ,CAAC,gBAAgB,EAAE,OAAO,CAAC;CACpC;AAED,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC;AAErD,MAAM,MAAM,UAAU;AACpB;;;;GAIG;AACD;IACE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;CAChC;AACH,qFAAqF;GACnF;IAAE,QAAQ,CAAC,IAAI,EAAE,SAA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QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;CAAE,GAC7E;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;CAAE,CAAC;AAEnD,eAAO,MAAM,iBAAiB,EAAE,aAA+D,CAAC;AAEhG,2GAA2G;AAC3G,wBAAgB,eAAe,CAAC,IAAI,EAAE,aAAa,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAEvE;AAED,0GAA0G;AAC1G,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,kBAAkB,GAAG,aAAa,CAK/F"}
@@ -7,7 +7,9 @@
7
7
  * ceiling starts at spawn. Later zero-hold intervals pause only the idle budget.
8
8
  * - Any explicitly queued task process pauses idle, including alongside held grants; ceilings keep running.
9
9
  * - The fixture ceiling ends with its segment. The idle clock also stops outside the testing lifecycle.
10
- * - Finished tests reset the idle budget whether their release byte arrived before or after their output.
10
+ * - Finished tests reset the idle budget whether their release byte arrived before or after their output, and so does
11
+ * progress a running test reports on the run's progress channel (progress-channel.ts). The run's CPU is no event:
12
+ * it never resets the budget.
11
13
  */
12
14
  export const UNARMED = {
13
15
  idle: null,
@@ -18,12 +20,12 @@ export const UNARMED = {
18
20
  holds: null,
19
21
  idleRemaining: null,
20
22
  };
21
- /** The bounds a command that starts running at `at` arms. */
22
- function armed(limits, at, testing, fixture) {
23
+ /** The bounds a command arms when it starts running. */
24
+ function armed(limits, event) {
23
25
  return {
24
- idle: testing && limits.idleMs !== undefined ? at + limits.idleMs : null,
25
- fixture: fixture && limits.fixtureMs !== undefined ? at + limits.fixtureMs : null,
26
- total: limits.totalMs !== undefined ? at + limits.totalMs : null,
26
+ idle: event.testing && limits.idleMs !== undefined ? event.at + limits.idleMs : null,
27
+ fixture: event.fixture && limits.fixtureMs !== undefined ? event.wallAt + limits.fixtureMs : null,
28
+ total: limits.totalMs !== undefined ? event.wallAt + limits.totalMs : null,
27
29
  queued: false,
28
30
  admissionWaiting: false,
29
31
  holds: null,
@@ -40,14 +42,14 @@ export function stepBounds(bounds, limits, event) {
40
42
  queued: true,
41
43
  holds: 0,
42
44
  idleRemaining: limits.idleMs ?? null,
43
- fixture: event.fixtureFirst && limits.fixtureMs !== undefined ? event.at + limits.fixtureMs : null,
45
+ fixture: event.fixtureFirst && limits.fixtureMs !== undefined ? event.wallAt + limits.fixtureMs : null,
44
46
  }
45
- : armed(limits, event.at, event.testing, event.fixture);
47
+ : armed(limits, event);
46
48
  case 'granted': {
47
49
  if (bounds.holds === null)
48
50
  return bounds;
49
51
  if (bounds.queued) {
50
- const admitted = armed(limits, event.at, event.testing, event.fixture);
52
+ const admitted = armed(limits, event);
51
53
  return {
52
54
  ...admitted,
53
55
  holds: 1,
@@ -94,12 +96,14 @@ export function stepBounds(bounds, limits, event) {
94
96
  idleRemaining: bounds.idle === null ? bounds.idleRemaining : Math.max(0, bounds.idle - event.at),
95
97
  };
96
98
  }
97
- case 'progress': {
99
+ case 'progress':
100
+ case 'reported': {
101
+ const moved = event.kind === 'reported' || event.finished;
98
102
  if (bounds.queued)
99
- return event.finished ? { ...bounds, idleRemaining: limits.idleMs ?? null } : bounds;
103
+ return moved ? { ...bounds, idleRemaining: limits.idleMs ?? null } : bounds;
100
104
  if (!event.testing)
101
105
  return { ...bounds, idle: null, idleRemaining: limits.idleMs ?? null };
102
- const restart = event.finished || !event.wasTesting;
106
+ const restart = moved || (event.kind === 'progress' && !event.wasTesting);
103
107
  if (!restart || limits.idleMs === undefined)
104
108
  return bounds;
105
109
  return {
@@ -113,12 +117,15 @@ export function stepBounds(bounds, limits, event) {
113
117
  }
114
118
  }
115
119
  /** The bound that expires first, or `null` when none is armed. A tie names the total, then the fixture, then idle. */
116
- export function earliestBound(bounds) {
120
+ export function earliestBound(bounds, awakeNow, wallNow) {
117
121
  let earliest = null;
118
122
  for (const kind of ['total', 'fixture', 'idle']) {
119
123
  const at = bounds[kind];
120
- if (at !== null && (earliest === null || at < earliest.at))
121
- earliest = { kind, at };
124
+ if (at === null)
125
+ continue;
126
+ const remainingMs = at - (kind === 'idle' ? awakeNow : wallNow);
127
+ if (earliest === null || remainingMs < earliest.remainingMs)
128
+ earliest = { kind, remainingMs };
122
129
  }
123
130
  return earliest;
124
131
  }
@@ -0,0 +1,114 @@
1
+ /**
2
+ * A reserved nextest leaf's case gate (specs/cowshed/05_gateway.md, "A case starts on a core"). The leaf's runner
3
+ * starts every thread of its ask, and each case takes a core before it runs: one of the leaf's grant when one is free,
4
+ * else one reserved for that case alone, which the leaf's executor asks its run's endpoint for and gives back when the
5
+ * case ends. A grant never grows, so this is how the cores other work frees after the leaf's grant reach it.
6
+ *
7
+ * The gate is a Unix stream socket the executor serves for one run and names in the command's environment as
8
+ * {@link TEST_GATE_ENV}. mbx's test shim, through which nextest starts every case, connects before the case starts,
9
+ * writes one line ({@link CaseLine}), starts the case when the line {@link GO} answers, and keeps the connection until
10
+ * the case has exited: the connection's end is the case's end.
11
+ */
12
+ export declare const TEST_GATE_ENV = "MBX_TEST_GATE";
13
+ /**
14
+ * Set to `1` in a run's environment once its endpoint answered that the installed mbx's shim gates its cases
15
+ * (endpoint-life.ts, `gatesTests`): without it a leaf's runner is sized to its grant.
16
+ */
17
+ export declare const TEST_GATE_SERVED_ENV = "BOUNDED_EXEC_MBX_TEST_GATE";
18
+ /** The line that starts a case. */
19
+ export declare const GO = "go";
20
+ /** A case's id as its result names it (progress.ts): the binary id, `::`, the test. */
21
+ export declare function caseId(binary: string, test: string): string;
22
+ /** What the gate does outside itself. */
23
+ export interface CaseGateEffects {
24
+ /** Start the case: answer its connection. */
25
+ readonly start: (id: string) => void;
26
+ /** Ask the pool for one core in the case's name. */
27
+ readonly reserve: (id: string) => void;
28
+ /** Give the case's core back to the pool, or withdraw its request while it waits. */
29
+ readonly release: (id: string) => void;
30
+ }
31
+ /** What a leaf's cases did at its gate. */
32
+ export interface CaseGateSummary {
33
+ /** Cases that ran on the leaf's grant, and on a core of their own. */
34
+ readonly own: number;
35
+ readonly lent: number;
36
+ /** How long the cases on a core of their own held it, summed. */
37
+ readonly lentCoreMs: number;
38
+ /** How long the cases waited at the gate, summed. */
39
+ readonly waitedCaseMs: number;
40
+ }
41
+ /**
42
+ * The gate's decisions, as a state machine over three events: a case arrived, the pool granted a case's request, a
43
+ * case ended. `own` is the leaf's granted cores; `wall` a case's last recorded wall, by which a freed core of the
44
+ * grant picks the longest waiting case, so the cores the pool gives go to the shorter ones and come back soonest.
45
+ */
46
+ export declare class CaseGate {
47
+ #private;
48
+ private readonly own;
49
+ private readonly wall;
50
+ private readonly effects;
51
+ private readonly now;
52
+ constructor(own: number, wall: (id: string) => number, effects: CaseGateEffects, now?: () => number);
53
+ /** A case's shim connected. False for a case already at the gate, which its second connection may not join. */
54
+ arrived(id: string): boolean;
55
+ /** The pool granted the case's request. One whose case no longer waits gives the core straight back. */
56
+ granted(id: string): void;
57
+ /** A case's connection ended: its core goes back where it came from, a waiting case's request is withdrawn. */
58
+ ended(id: string): void;
59
+ /** How long the case waited at the gate before it started, in ms; zero for one that never did. */
60
+ waitedMs(id: string): number;
61
+ /** The last recorded walls of the cases that ran and ended, summed. */
62
+ ranWallMs(): number;
63
+ summary(): CaseGateSummary;
64
+ }
65
+ /** One core asked of a pool for one case: whether the pool granted it, and how it is given back or withdrawn. */
66
+ export interface CaseCore {
67
+ /** Settles once the pool grants the core (true), or refuses, loses or is withdrawn the request (false). */
68
+ readonly granted: Promise<boolean>;
69
+ /** Gives the core back, or withdraws the request while it waits. Later calls do nothing. */
70
+ release(): void;
71
+ }
72
+ /** A leaf's gate decisions and the cores its waiting cases asked their pool for. */
73
+ export interface GatedCases {
74
+ readonly cases: CaseGate;
75
+ /** Gives back every core a case still holds and withdraws every request that waits. */
76
+ releaseAll(): void;
77
+ }
78
+ /**
79
+ * The gate of a leaf that holds `own` cores, over whichever pool `ask` asks: mbx's, through the run's reservation
80
+ * endpoint, or the run's own token pool (cpu-pool.ts, `lendParentToken`). `start` answers a case's connection.
81
+ * `walls` are the cases' last recorded walls; a request is told the work the leaf has left, their sum less the walls
82
+ * of the cases that ran, by which a token pool lends to the leaf that would otherwise end last.
83
+ */
84
+ export declare function gateCases(own: number, walls: ReadonlyMap<string, number>, start: (id: string) => void, ask: (id: string, leftMs: number) => CaseCore): GatedCases;
85
+ /**
86
+ * A case's wall as its result records it: nextest times a case from the shim's start, so its own duration includes the
87
+ * wait at the gate, which is taken off. Never below zero.
88
+ */
89
+ export declare function runWallMs(nextestMs: number, waitedMs: number): number;
90
+ export interface CaseGateServer {
91
+ /** The socket's path, as the command's environment names it. */
92
+ readonly socket: string;
93
+ /** Answer the case's connection: it starts. */
94
+ start(id: string): void;
95
+ /** Ends every connection and removes the socket's directory; the error that left something behind, or null. */
96
+ close(): Promise<string | null>;
97
+ }
98
+ export interface CaseGateHandlers {
99
+ /** A case's shim connected and named it. False refuses the connection. */
100
+ readonly arrived: (id: string) => boolean;
101
+ /** A named case's connection ended. */
102
+ readonly ended: (id: string) => void;
103
+ /** A client wrote something that is no case line, or named a case already at the gate; its connection is ended. */
104
+ readonly invalid: (detail: string) => void;
105
+ }
106
+ /** Serve one run's case gate; a gate that cannot be served is the run's refusal. */
107
+ export declare function serveCaseGate(handlers: CaseGateHandlers): Promise<{
108
+ ok: true;
109
+ gate: CaseGateServer;
110
+ } | {
111
+ ok: false;
112
+ error: string;
113
+ }>;
114
+ //# sourceMappingURL=case-gate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"case-gate.d.ts","sourceRoot":"","sources":["../../../src/executors/bounded-exec/case-gate.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,aAAa,kBAAkB,CAAC;AAC7C;;;GAGG;AACH,eAAO,MAAM,oBAAoB,+BAA+B,CAAC;AACjE,mCAAmC;AACnC,eAAO,MAAM,EAAE,OAAO,CAAC;AASvB,uFAAuF;AACvF,wBAAgB,MAAM,CAAC,MAAM,EAAE,MAA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