@smoothbricks/nx-plugin 0.7.15 → 0.7.16

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.
package/README.md CHANGED
@@ -2494,6 +2494,15 @@ and says so. A host CI scope's first run of a task it holds no record of is the
2494
2494
  release workflow's CI's) and takes, at each run, the record of every task the scope lacks
2495
2495
  (`specs/cowshed/05_gateway.md`, "Without mbx, every Nx run budgets itself").
2496
2496
 
2497
+ A child-runtime owner can diagnose a death without guessing from its WebSocket close. `bounded-exec` passes the
2498
+ memory-bearing grant's immutable charge/bound and its installed observer module URL through
2499
+ `BOUNDED_EXEC_MEMORY_DIAGNOSTICS` / `BOUNDED_EXEC_DIAGNOSTICS_MODULE`. `observeChildMemory(pid, context)` returns a
2500
+ stop-and-snapshot function called at the child's exit: the last readable, timestamped RSS and the existing bound's live
2501
+ anon/shmem reading at exit. An unavailable reading carries its reason. Nested sub-pools retain the memory-bearing
2502
+ ancestor's facts; these fields never change admission, runner sizing or retry policy. The runtime owner adds the actual
2503
+ exit code/signal and prints its structured diagnostic before its existing crash handling. See 05_gateway's “A dead child
2504
+ keeps its diagnosis”; a SIGKILL without kernel evidence is not an OOM verdict.
2505
+
2497
2506
  The pool runs on a worker thread of its own (`cpu-pool-thread.ts`). The process that serves the run, the Nx daemon when
2498
2507
  installed plugins load in it or the Nx CLI without one, hashes tasks and builds the project graph in synchronous calls
2499
2508
  on its main thread; a pool on that thread wrote no heartbeat behind a 14.2 s `hashPlans`, and every runner queued on it
@@ -37,16 +37,17 @@
37
37
  "packages/nx-plugin/src/executors/all-verdicts/schema.ts": "2ca6bd8d2f19d851f291ab6a5227167399b9dc8ed0fda0248b69896d77e471f1",
38
38
  "packages/nx-plugin/src/executors/bounded-exec/admission-queue.ts": "86664180f8296032f7c96022a790285799e666d92360a10b7a5cc6f3facd58eb",
39
39
  "packages/nx-plugin/src/executors/bounded-exec/bounds.ts": "fecc48ea66df1c2ba526dc0322ab7760cfc1a4e85d99a72a7a43f040448970f0",
40
+ "packages/nx-plugin/src/executors/bounded-exec/child-exit-diagnostics.ts": "fdcd4e074577814d9b7b9d014d2c39297e9c763bd570d9fab0db172349e039b2",
40
41
  "packages/nx-plugin/src/executors/bounded-exec/cpu-grant.ts": "c5217349c23be537d9b6a0a52445f3ee442402fdbd08f1d33a3095c52051616d",
41
42
  "packages/nx-plugin/src/executors/bounded-exec/cpu-pool-thread.ts": "47697a9531df5fd6fcdf4e706fc7e5874bca1717c838496673bf148c691f1e9e",
42
43
  "packages/nx-plugin/src/executors/bounded-exec/cpu-pool.ts": "bc122174ccf628b769c73197b7a78987d033b5e7ea6cb5ddbeac384310fdd22a",
43
44
  "packages/nx-plugin/src/executors/bounded-exec/disk-lease.ts": "1a3f6a6fa590d9a2550490bb6906dc91b6c05fbef235b025eaf257eb5310e92d",
44
- "packages/nx-plugin/src/executors/bounded-exec/executor.ts": "36174568082dc0e37b26a67e082aec64898df43aebb47826c8f9ec3ead81b83a",
45
+ "packages/nx-plugin/src/executors/bounded-exec/executor.ts": "0840b55ecbb2e12b0a9821513a786f5f027b93cf940606ca4f2a11fde4a38c31",
45
46
  "packages/nx-plugin/src/executors/bounded-exec/gateway-lease.ts": "f3f73bd92db30e4857f98fb8bd2b9a75b2a5a2a318f094e075ed803c1f9a0117",
46
47
  "packages/nx-plugin/src/executors/bounded-exec/hang-diagnostics.ts": "bcaa9e52384f6c481a9cc2835ba6e8ffe167afa3cb51623fdf8dc3493876f335",
47
- "packages/nx-plugin/src/executors/bounded-exec/host-memory.darwin.ts": "ce1c12e3f8ebe06034d2e9ecd332f907c567fb2d0a71f3c1c5acccb687488fc8",
48
- "packages/nx-plugin/src/executors/bounded-exec/host-memory.linux.ts": "465171b065355df13af73fad9c8101d48f6bb060cf41cb50d8dd272abf693b08",
49
- "packages/nx-plugin/src/executors/bounded-exec/host-memory.ts": "6d02f33e950c89162deb9131bd3c0819ab19bf54dd600da557d7869491eaf99a",
48
+ "packages/nx-plugin/src/executors/bounded-exec/host-memory.darwin.ts": "fe89fc99f85f48caec7c614cfd976c362253b9707797c2c849a3aa9664e65dbe",
49
+ "packages/nx-plugin/src/executors/bounded-exec/host-memory.linux.ts": "752519893ed6fc3b9d7d17b0b0801d7103129f7a838743d129057debf043f0c1",
50
+ "packages/nx-plugin/src/executors/bounded-exec/host-memory.ts": "d3eef7fb06bf259f0f7f7dc67fc7f246a39adf5e4e80850fd4565e91626b1ec5",
50
51
  "packages/nx-plugin/src/executors/bounded-exec/leaf-peak.ts": "0b1b94992b2cbb9e3759785424ceb202667053c5571edf3a79cdd0b206e54a1d",
51
52
  "packages/nx-plugin/src/executors/bounded-exec/lease-wait.ts": "59d8ac94d0b8b75858971c5bb28ee421fca4f7685577274fe8bbaf0c01ba462a",
52
53
  "packages/nx-plugin/src/executors/bounded-exec/lock-wait.ts": "b14a23b49759a777f4b3338ced003adaf76837c2c38462458f76a7fef1b95d9e",
@@ -0,0 +1,45 @@
1
+ import { type LiveUsageReading, type ResidentUsageReading, type RunMemoryReading } from './host-memory.js';
2
+ /** Diagnostic facts, not configuration: neither value changes a grant or a runner's parallelism. */
3
+ export declare const DIAGNOSTIC_CONTEXT_ENV = "BOUNDED_EXEC_MEMORY_DIAGNOSTICS";
4
+ export declare const DIAGNOSTIC_MODULE_ENV = "BOUNDED_EXEC_DIAGNOSTICS_MODULE";
5
+ /** A sub-pool charges no memory: descendants retain the memory-bearing ancestor's facts. */
6
+ export declare function grantMemoryEnvironment(chargedBytes: number | null, inherited: Readonly<NodeJS.ProcessEnv>, readMemory?: () => Promise<RunMemoryReading>): Promise<Record<string, string>>;
7
+ export interface ResidentSample {
8
+ readonly sampledAtMs: number;
9
+ readonly reading: ResidentUsageReading;
10
+ }
11
+ /** The original grant plus the bound's live reading at exit, never a new accounting ledger. */
12
+ export declare function childExitMemory(contextText: string | undefined, lastResident: ResidentSample, readLive?: (bound: string) => LiveUsageReading): {
13
+ lastResident: ResidentSample;
14
+ pool: {
15
+ ok: false;
16
+ reason: string;
17
+ };
18
+ } | {
19
+ lastResident: ResidentSample;
20
+ pool: {
21
+ chargedBytes: number;
22
+ bound: RunMemoryReading;
23
+ reason?: undefined;
24
+ ok: true;
25
+ live: LiveUsageReading;
26
+ };
27
+ };
28
+ /** Retains the last readable sample through PID exit; stop is called by the child's exit event. */
29
+ export declare function observeChildMemory(pid: number, contextText: string | undefined): () => {
30
+ lastResident: ResidentSample;
31
+ pool: {
32
+ ok: false;
33
+ reason: string;
34
+ };
35
+ } | {
36
+ lastResident: ResidentSample;
37
+ pool: {
38
+ chargedBytes: number;
39
+ bound: RunMemoryReading;
40
+ reason?: undefined;
41
+ ok: true;
42
+ live: LiveUsageReading;
43
+ };
44
+ };
45
+ //# sourceMappingURL=child-exit-diagnostics.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"child-exit-diagnostics.d.ts","sourceRoot":"","sources":["../../../src/executors/bounded-exec/child-exit-diagnostics.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EAGtB,MAAM,kBAAkB,CAAC;AAE1B,oGAAoG;AACpG,eAAO,MAAM,sBAAsB,oCAAoC,CAAC;AACxE,eAAO,MAAM,qBAAqB,oCAAoC,CAAC;AAQvE,4FAA4F;AAC5F,wBAAsB,sBAAsB,CAC1C,YAAY,EAAE,MAAM,GAAG,IAAI,EAC3B,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,UAAU,CAAC,EACtC,UAAU,GAAE,MAAM,OAAO,CAAC,gBAAgB,CAAiB,GAC1D,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CASjC;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,OAAO,EAAE,oBAAoB,CAAC;CACxC;AAED,+FAA+F;AAC/F,wBAAgB,eAAe,CAC7B,WAAW,EAAE,MAAM,GAAG,SAAS,EAC/B,YAAY,EAAE,cAAc,EAC5B,QAAQ,GAAE,CAAC,KAAK,EAAE,MAAM,KAAK,gBAAgC;;;QAG5B,EAAE;QAAkB,MAAM;;;;;sBAjCpC,MAAM;eACb,gBAAgB;;;;;EAiDjC;AAED,mGAAmG;AACnG,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,SAAS;;;QApB5C,EAAE;QAAkB,MAAM;;;;;sBAjCpC,MAAM;eACb,gBAAgB;;;;;EAsEjC"}
@@ -0,0 +1,188 @@
1
+ import * as _assertGuard_1 from "typia/lib/internal/_assertGuard";
2
+ import typia from 'typia';
3
+ import { HOST_MEMORY, readLiveUsage, readRunMemory, } from './host-memory.js';
4
+ /** Diagnostic facts, not configuration: neither value changes a grant or a runner's parallelism. */
5
+ export const DIAGNOSTIC_CONTEXT_ENV = 'BOUNDED_EXEC_MEMORY_DIAGNOSTICS';
6
+ export const DIAGNOSTIC_MODULE_ENV = 'BOUNDED_EXEC_DIAGNOSTICS_MODULE';
7
+ const parseContext = (() => {
8
+ let _errorFactory;
9
+ const _ao0 = (input, _path, _exceptionable = true) => ("number" === typeof input.chargedBytes || _assertGuard_1._assertGuard(_exceptionable, {
10
+ method: "typia.json.createAssertParse",
11
+ path: _path + ".chargedBytes",
12
+ expected: "number",
13
+ value: input.chargedBytes
14
+ }, _errorFactory)) && (("object" === typeof input.bound && null !== input.bound || _assertGuard_1._assertGuard(_exceptionable, {
15
+ method: "typia.json.createAssertParse",
16
+ path: _path + ".bound",
17
+ expected: "({ readonly ok: false; readonly error: RunMemoryError; } | { readonly ok: true; readonly memory: RunMemory; })",
18
+ value: input.bound
19
+ }, _errorFactory)) && _au0(input.bound, _path + ".bound", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
20
+ method: "typia.json.createAssertParse",
21
+ path: _path + ".bound",
22
+ expected: "({ readonly ok: false; readonly error: RunMemoryError; } | { readonly ok: true; readonly memory: RunMemory; })",
23
+ value: input.bound
24
+ }, _errorFactory));
25
+ const _ao1 = (input, _path, _exceptionable = true) => (true === input.ok || _assertGuard_1._assertGuard(_exceptionable, {
26
+ method: "typia.json.createAssertParse",
27
+ path: _path + ".ok",
28
+ expected: "true",
29
+ value: input.ok
30
+ }, _errorFactory)) && (("object" === typeof input.memory && null !== input.memory || _assertGuard_1._assertGuard(_exceptionable, {
31
+ method: "typia.json.createAssertParse",
32
+ path: _path + ".memory",
33
+ expected: "RunMemory",
34
+ value: input.memory
35
+ }, _errorFactory)) && _ao2(input.memory, _path + ".memory", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
36
+ method: "typia.json.createAssertParse",
37
+ path: _path + ".memory",
38
+ expected: "RunMemory",
39
+ value: input.memory
40
+ }, _errorFactory));
41
+ const _ao2 = (input, _path, _exceptionable = true) => ("number" === typeof input.bytes || _assertGuard_1._assertGuard(_exceptionable, {
42
+ method: "typia.json.createAssertParse",
43
+ path: _path + ".bytes",
44
+ expected: "number",
45
+ value: input.bytes
46
+ }, _errorFactory)) && ("string" === typeof input.source || _assertGuard_1._assertGuard(_exceptionable, {
47
+ method: "typia.json.createAssertParse",
48
+ path: _path + ".source",
49
+ expected: "string",
50
+ value: input.source
51
+ }, _errorFactory));
52
+ const _ao3 = (input, _path, _exceptionable = true) => (false === input.ok || _assertGuard_1._assertGuard(_exceptionable, {
53
+ method: "typia.json.createAssertParse",
54
+ path: _path + ".ok",
55
+ expected: "false",
56
+ value: input.ok
57
+ }, _errorFactory)) && (("object" === typeof input.error && null !== input.error || _assertGuard_1._assertGuard(_exceptionable, {
58
+ method: "typia.json.createAssertParse",
59
+ path: _path + ".error",
60
+ expected: "RunMemoryError",
61
+ value: input.error
62
+ }, _errorFactory)) && _ao4(input.error, _path + ".error", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
63
+ method: "typia.json.createAssertParse",
64
+ path: _path + ".error",
65
+ expected: "RunMemoryError",
66
+ value: input.error
67
+ }, _errorFactory));
68
+ const _ao4 = (input, _path, _exceptionable = true) => ("read-run-memory" === input.operation || _assertGuard_1._assertGuard(_exceptionable, {
69
+ method: "typia.json.createAssertParse",
70
+ path: _path + ".operation",
71
+ expected: "\"read-run-memory\"",
72
+ value: input.operation
73
+ }, _errorFactory)) && ("malformed" === input.code || "unmounted" === input.code || "unreadable" === input.code || "unsupported-platform" === input.code || _assertGuard_1._assertGuard(_exceptionable, {
74
+ method: "typia.json.createAssertParse",
75
+ path: _path + ".code",
76
+ expected: "(\"malformed\" | \"unmounted\" | \"unreadable\" | \"unsupported-platform\")",
77
+ value: input.code
78
+ }, _errorFactory)) && ("string" === typeof input.subject || _assertGuard_1._assertGuard(_exceptionable, {
79
+ method: "typia.json.createAssertParse",
80
+ path: _path + ".subject",
81
+ expected: "string",
82
+ value: input.subject
83
+ }, _errorFactory)) && ("string" === typeof input.cause || _assertGuard_1._assertGuard(_exceptionable, {
84
+ method: "typia.json.createAssertParse",
85
+ path: _path + ".cause",
86
+ expected: "string",
87
+ value: input.cause
88
+ }, _errorFactory));
89
+ const _au0 = (input, _path, _exceptionable = true) => (() => {
90
+ if (true === input.ok)
91
+ return _ao1(input, _path, true && _exceptionable);
92
+ else if (false === input.ok)
93
+ return _ao3(input, _path, true && _exceptionable);
94
+ else
95
+ return _assertGuard_1._assertGuard(_exceptionable, {
96
+ method: "typia.json.createAssertParse",
97
+ path: _path,
98
+ expected: "({ readonly ok: true; readonly memory: RunMemory; } | { readonly ok: false; readonly error: RunMemoryError; })",
99
+ value: input
100
+ }, _errorFactory);
101
+ })();
102
+ const _io0 = input => "number" === typeof input.chargedBytes && ("object" === typeof input.bound && null !== input.bound && _iu0(input.bound));
103
+ const _io1 = input => true === input.ok && ("object" === typeof input.memory && null !== input.memory && _io2(input.memory));
104
+ const _io2 = input => "number" === typeof input.bytes && "string" === typeof input.source;
105
+ const _io3 = input => false === input.ok && ("object" === typeof input.error && null !== input.error && _io4(input.error));
106
+ const _io4 = input => "read-run-memory" === input.operation && ("malformed" === input.code || "unmounted" === input.code || "unreadable" === input.code || "unsupported-platform" === input.code) && "string" === typeof input.subject && "string" === typeof input.cause;
107
+ const _iu0 = input => (() => {
108
+ if (true === input.ok)
109
+ return _io1(input);
110
+ else if (false === input.ok)
111
+ return _io3(input);
112
+ else
113
+ return false;
114
+ })();
115
+ const __is = input => "object" === typeof input && null !== input && _io0(input);
116
+ const __assert = (input, errorFactory) => {
117
+ if (false === __is(input)) {
118
+ _errorFactory = errorFactory;
119
+ ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _assertGuard_1._assertGuard(true, {
120
+ method: "typia.json.createAssertParse",
121
+ path: _path + "",
122
+ expected: "GrantMemoryContext",
123
+ value: input
124
+ }, _errorFactory)) && _ao0(input, _path + "", true) || _assertGuard_1._assertGuard(true, {
125
+ method: "typia.json.createAssertParse",
126
+ path: _path + "",
127
+ expected: "GrantMemoryContext",
128
+ value: input
129
+ }, _errorFactory))(input, "$input", true);
130
+ }
131
+ return input;
132
+ };
133
+ return (input, errorFactory) => __assert(JSON.parse(input), errorFactory);
134
+ })();
135
+ /** A sub-pool charges no memory: descendants retain the memory-bearing ancestor's facts. */
136
+ export async function grantMemoryEnvironment(chargedBytes, inherited, readMemory = readRunMemory) {
137
+ if (chargedBytes === null) {
138
+ return {
139
+ [DIAGNOSTIC_CONTEXT_ENV]: inherited[DIAGNOSTIC_CONTEXT_ENV] ?? '',
140
+ [DIAGNOSTIC_MODULE_ENV]: inherited[DIAGNOSTIC_MODULE_ENV] ?? '',
141
+ };
142
+ }
143
+ const context = { chargedBytes, bound: await readMemory() };
144
+ return { [DIAGNOSTIC_CONTEXT_ENV]: JSON.stringify(context), [DIAGNOSTIC_MODULE_ENV]: import.meta.url };
145
+ }
146
+ /** The original grant plus the bound's live reading at exit, never a new accounting ledger. */
147
+ export function childExitMemory(contextText, lastResident, readLive = readLiveUsage) {
148
+ if (!contextText)
149
+ return { lastResident, pool: { ok: false, reason: 'no memory-bearing CPU grant was inherited' } };
150
+ let context;
151
+ try {
152
+ context = parseContext(contextText);
153
+ }
154
+ catch (error) {
155
+ return {
156
+ lastResident,
157
+ pool: {
158
+ ok: false,
159
+ reason: `invalid inherited memory diagnostic: ${error instanceof Error ? error.message : String(error)}`,
160
+ },
161
+ };
162
+ }
163
+ const live = context.bound.ok
164
+ ? readLive(context.bound.memory.source)
165
+ : { ok: false, reason: `${context.bound.error.subject}: ${context.bound.error.cause}` };
166
+ return { lastResident, pool: { ok: true, ...context, live } };
167
+ }
168
+ /** Retains the last readable sample through PID exit; stop is called by the child's exit event. */
169
+ export function observeChildMemory(pid, contextText) {
170
+ const sample = () => ({
171
+ sampledAtMs: Date.now(),
172
+ reading: HOST_MEMORY?.residentUsage(pid) ?? {
173
+ ok: false,
174
+ reason: `${process.platform} has no per-process RSS reader`,
175
+ },
176
+ });
177
+ let lastResident = sample();
178
+ const timer = setInterval(() => {
179
+ const next = sample();
180
+ if (next.reading.ok || !lastResident.reading.ok)
181
+ lastResident = next;
182
+ }, 250);
183
+ timer.unref();
184
+ return () => {
185
+ clearInterval(timer);
186
+ return childExitMemory(contextText, lastResident);
187
+ };
188
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"executor.d.ts","sourceRoot":"","sources":["../../../src/executors/bounded-exec/executor.ts"],"names":[],"mappings":"AAeA,OAAO,EAAwB,KAAK,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAK5E,OAAO,EAAE,sBAAsB,EAAmB,MAAM,uBAAuB,CAAC;AAahF,OAAO,EAAqB,KAAK,UAAU,EAA8B,MAAM,mBAAmB,CAAC;AAEnG,OAAO,EAOL,KAAK,YAAY,EAClB,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAgB,KAAK,gBAAgB,EAAwB,MAAM,uBAAuB,CAAC;AAElG,OAAO,EASL,aAAa,EAEd,MAAM,eAAe,CAAC;AAIvB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEtD,OAAO,EAEL,KA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embersLeft, killProcessGroup, processGroupHasMembers, signalProcessGroup, } from '../../process-group.js';
10
10
  import { AdmissionObservation } from './admission-queue.js';
11
11
  import { earliestBound, stepBounds, UNARMED } from './bounds.js';
12
+ import { DIAGNOSTIC_CONTEXT_ENV, DIAGNOSTIC_MODULE_ENV, grantMemoryEnvironment } from './child-exit-diagnostics.js';
12
13
  import { createCpuPool } from './cpu-pool.js';
13
14
  import { GATEWAY_SOCKET } from './gateway-lease.js';
14
15
  import { captureHangDiagnostics, HANG_CAPTURE_MS } from './hang-diagnostics.js';
@@ -37,7 +38,14 @@ const POOL_ENV = [CPU_TOKENS_ENV, CPU_POOL_ENV];
37
38
  * itself inherits, a parent make's or its cowshed job's, still reaches an ungranted command by Cargo's own rule; a
38
39
  * granted one's sub-pool names its own fifo over it.
39
40
  */
40
- const BUDGET_ENV = [...POOL_ENV, 'CARGO_MAKEFLAGS', 'MAKEFLAGS', 'MFLAGS'];
41
+ const BUDGET_ENV = [
42
+ ...POOL_ENV,
43
+ 'CARGO_MAKEFLAGS',
44
+ 'MAKEFLAGS',
45
+ 'MFLAGS',
46
+ DIAGNOSTIC_CONTEXT_ENV,
47
+ DIAGNOSTIC_MODULE_ENV,
48
+ ];
41
49
  /** Workspace-provided cowshed launchers, in the order a workspace that provides one names them. */
42
50
  const WORKSPACE_COWSHED_LAUNCHERS = [
43
51
  'packages/cowshed/bin/cowshed',
@@ -535,6 +543,7 @@ async function runCommand(options, context, killer, tempVolume, inherited, captu
535
543
  ...sized.env,
536
544
  ...native.env,
537
545
  ...(pool?.environment ?? {}),
546
+ ...(await grantMemoryEnvironment(grant?.charged ?? null, process.env)),
538
547
  ...(leaf?.kind === 'cargo' ? { MBX_GRANT_FD: String(MBX_GRANT_FD) } : {}),
539
548
  };
540
549
  // A fixture rides as segment 0 of the lifecycle. Without the channel (Windows) it is plain shell text ahead
@@ -6,6 +6,8 @@
6
6
  export interface HostMemory {
7
7
  /** The memory the run's pool charges its leaves' peaks against. */
8
8
  readRunMemory(): Promise<RunMemoryReading>;
9
+ /** One process's resident set for an exit diagnostic; unavailable is never a zero RSS sample. */
10
+ residentUsage(pid: number): ResidentUsageReading;
9
11
  /**
10
12
  * A leaf's peak in bytes, from the `maxRSS` that Bun's `Subprocess.resourceUsage()` on `bunVersion` reports for
11
13
  * it: the exited leaf's `ru_maxrss`.
@@ -39,6 +41,15 @@ export type LiveUsageReading = {
39
41
  readonly ok: false;
40
42
  readonly reason: string;
41
43
  };
44
+ /** A process's resident bytes and source, or why no sample could be read. */
45
+ export type ResidentUsageReading = {
46
+ readonly ok: true;
47
+ readonly bytes: number;
48
+ readonly source: string;
49
+ } | {
50
+ readonly ok: false;
51
+ readonly reason: string;
52
+ };
42
53
  /** The run's memory in bytes, and where it was read: the file or sysctl that holds it. */
43
54
  export interface RunMemory {
44
55
  readonly bytes: number;
@@ -1 +1 @@
1
- {"version":3,"file":"host-memory.d.ts","sourceRoot":"","sources":["../../../src/executors/bounded-exec/host-memory.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,MAAM,WAAW,UAAU;IACzB,mEAAmE;IACnE,aAAa,IAAI,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAC3C;;;OAGG;IACH,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC;IACtD;;;;;OAKG;IACH,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACjD;;;;;OAKG;IACH,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,gBAAgB,CAAC;CAC5C;AAED,wEAAwE;AACxE,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,MAAM,gBAAgB,GACxB;IAAE,QAAQ,CAAC,EAAE,EAAE,IAAI,CA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CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,4FAA4F;AAC5F,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,SAAS,EAAE,iBAAiB,CAAC;IACtC;;;OAGG;IACH,QAAQ,CAAC,IAAI,EAAE,YAAY,GAAG,WAAW,GAAG,WAAW,GAAG,sBAAsB,CAAC;IACjF,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,MAAM,gBAAgB,GACxB;IAAE,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAA;CAAE,GACjD;IAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAA;CAAE,CAAC;AAE3D,sFAAsF;AACtF,qBAAa,mBAAoB,SAAQ,KAAK;IAChC,QAAQ,CAAC,KAAK,EAAE,cAAc;IAA1C,YAAqB,KAAK,EAAE,cAAc,EAKzC;CACF;AAID,kGAAkG;AAClG,eAAO,MAAM,WAAW,EAAE,UAAU,GAAG,IAA0C,CAAC;AAElF,mEAAmE;AACnE,wBAAgB,aAAa,IAAI,OAAO,CAAC,gBAAgB,CAAC,CAazD;AAED,4GAA4G;AAC5G,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,gBAAgB,CAI7D"}
@@ -1 +1 @@
1
- {"version":3,"file":"host-memory.darwin.d.ts","sourceRoot":"","sources":["../../../src/executors/bounded-exec/host-memory.darwin.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAoB,MAAM,kBAAkB,CAAC;AAqIrE,eAAO,MAAM,YAAY,EAAE,UAM1B,CAAC"}
1
+ {"version":3,"file":"host-memory.darwin.d.ts","sourceRoot":"","sources":["../../../src/executors/bounded-exec/host-memory.darwin.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAoB,MAAM,kBAAkB,CAAC;AAqIrE,eAAO,MAAM,YAAY,EAAE,UAO1B,CAAC"}
@@ -103,6 +103,7 @@ export const darwinMemory = {
103
103
  readRunMemory,
104
104
  peakBytes: (maxRss) => maxRss,
105
105
  treeResidentBytes,
106
+ residentUsage: () => ({ ok: false, reason: 'Node has no macOS per-process RSS reader' }),
106
107
  // macOS has no cgroup, and its anonymous and shared pages are not read from a file the pool may open.
107
108
  liveUsage: () => ({ ok: false, reason: 'macOS keeps no anonymous and shared memory of a run to read' }),
108
109
  };
@@ -1,4 +1,4 @@
1
- import type { HostMemory, LiveUsageReading, RunMemoryReading } from './host-memory.js';
1
+ import type { HostMemory, LiveUsageReading, ResidentUsageReading, RunMemoryReading } from './host-memory.js';
2
2
  /** A file's text, or the errno code and message its read failed with. */
3
3
  export type FileRead = {
4
4
  readonly ok: true;
@@ -12,5 +12,7 @@ export type FileRead = {
12
12
  export declare function linuxRunMemory(read: (path: string) => Promise<FileRead>): Promise<RunMemoryReading>;
13
13
  /** The memory a bound holds live: `memory.stat`'s `anon` and `shmem` beside a cgroup's `memory.max`, meminfo's `AnonPages` and `Shmem` for the host's. */
14
14
  export declare function linuxLiveUsage(read: (path: string) => FileRead, bound: string): LiveUsageReading;
15
+ /** The same VmRSS field the peak waiter reads, without turning an unreadable or exited PID into zero. */
16
+ export declare function linuxResidentUsage(read: (path: string) => FileRead, pid: number): ResidentUsageReading;
15
17
  export declare const linuxMemory: HostMemory;
16
18
  //# sourceMappingURL=host-memory.linux.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"host-memory.linux.d.ts","sourceRoot":"","sources":["../../../src/executors/bounded-exec/host-memory.linux.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAA6B,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAclH,yEAAyE;AACzE,MAAM,MAAM,QAAQ,GAChB;IAAE,QAAQ,CAAC,EAAE,EAAE,IAAI,CAA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,IAAI,EAAE,MAAM,KAAK,QAAQ,EAAE,KAAK,EAAE,MAAM,GAAG,gBAAgB,CAuBhG;AAuDD,yGAAyG;AACzG,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,oBAAoB,CAQtG;AAED,eAAO,MAAM,WAAW,EAAE,UAMzB,CAAC"}
@@ -168,12 +168,27 @@ async function residentBytes(pid) {
168
168
  return 0;
169
169
  throw error;
170
170
  }
171
- const kib = /^VmRSS:\s+(\d+) kB$/m.exec(status)?.[1];
171
+ const kib = residentKib(status);
172
172
  return kib === undefined ? 0 : Number(kib) * 1024;
173
173
  }
174
+ function residentKib(status) {
175
+ return /^VmRSS:\s+(\d+) kB$/m.exec(status)?.[1];
176
+ }
177
+ /** The same VmRSS field the peak waiter reads, without turning an unreadable or exited PID into zero. */
178
+ export function linuxResidentUsage(read, pid) {
179
+ const source = `/proc/${pid}/status`;
180
+ const status = read(source);
181
+ if (!status.ok)
182
+ return { ok: false, reason: `${source}: ${status.code}: ${status.message}` };
183
+ const kib = residentKib(status.text);
184
+ return kib === undefined
185
+ ? { ok: false, reason: `${source} names no VmRSS in kB` }
186
+ : { ok: true, bytes: Number(kib) * 1024, source };
187
+ }
174
188
  export const linuxMemory = {
175
189
  readRunMemory: () => linuxRunMemory(readText),
176
190
  peakBytes,
177
191
  treeResidentBytes,
192
+ residentUsage: (pid) => linuxResidentUsage(readTextSync, pid),
178
193
  liveUsage: (bound) => linuxLiveUsage(readTextSync, bound),
179
194
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smoothbricks/nx-plugin",
3
- "version": "0.7.15",
3
+ "version": "0.7.16",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "main": "./loader.js",
@@ -33,6 +33,11 @@
33
33
  "import": "./dist/bounded-test-policy.js",
34
34
  "default": "./dist/bounded-test-policy.js"
35
35
  },
36
+ "./bounded-exec-diagnostics": {
37
+ "types": "./dist/executors/bounded-exec/child-exit-diagnostics.d.ts",
38
+ "import": "./dist/executors/bounded-exec/child-exit-diagnostics.js",
39
+ "default": "./dist/executors/bounded-exec/child-exit-diagnostics.js"
40
+ },
36
41
  "./test-results": {
37
42
  "types": "./dist/executors/bounded-exec/test-results.d.ts",
38
43
  "import": "./dist/executors/bounded-exec/test-results.js",
@@ -0,0 +1,87 @@
1
+ import typia from 'typia';
2
+ import {
3
+ HOST_MEMORY,
4
+ type LiveUsageReading,
5
+ type ResidentUsageReading,
6
+ type RunMemoryReading,
7
+ readLiveUsage,
8
+ readRunMemory,
9
+ } from './host-memory.js';
10
+
11
+ /** Diagnostic facts, not configuration: neither value changes a grant or a runner's parallelism. */
12
+ export const DIAGNOSTIC_CONTEXT_ENV = 'BOUNDED_EXEC_MEMORY_DIAGNOSTICS';
13
+ export const DIAGNOSTIC_MODULE_ENV = 'BOUNDED_EXEC_DIAGNOSTICS_MODULE';
14
+
15
+ interface GrantMemoryContext {
16
+ readonly chargedBytes: number;
17
+ readonly bound: RunMemoryReading;
18
+ }
19
+ const parseContext = typia.json.createAssertParse<GrantMemoryContext>();
20
+
21
+ /** A sub-pool charges no memory: descendants retain the memory-bearing ancestor's facts. */
22
+ export async function grantMemoryEnvironment(
23
+ chargedBytes: number | null,
24
+ inherited: Readonly<NodeJS.ProcessEnv>,
25
+ readMemory: () => Promise<RunMemoryReading> = readRunMemory,
26
+ ): Promise<Record<string, string>> {
27
+ if (chargedBytes === null) {
28
+ return {
29
+ [DIAGNOSTIC_CONTEXT_ENV]: inherited[DIAGNOSTIC_CONTEXT_ENV] ?? '',
30
+ [DIAGNOSTIC_MODULE_ENV]: inherited[DIAGNOSTIC_MODULE_ENV] ?? '',
31
+ };
32
+ }
33
+ const context: GrantMemoryContext = { chargedBytes, bound: await readMemory() };
34
+ return { [DIAGNOSTIC_CONTEXT_ENV]: JSON.stringify(context), [DIAGNOSTIC_MODULE_ENV]: import.meta.url };
35
+ }
36
+
37
+ export interface ResidentSample {
38
+ readonly sampledAtMs: number;
39
+ readonly reading: ResidentUsageReading;
40
+ }
41
+
42
+ /** The original grant plus the bound's live reading at exit, never a new accounting ledger. */
43
+ export function childExitMemory(
44
+ contextText: string | undefined,
45
+ lastResident: ResidentSample,
46
+ readLive: (bound: string) => LiveUsageReading = readLiveUsage,
47
+ ) {
48
+ if (!contextText)
49
+ return { lastResident, pool: { ok: false as const, reason: 'no memory-bearing CPU grant was inherited' } };
50
+ let context: GrantMemoryContext;
51
+ try {
52
+ context = parseContext(contextText);
53
+ } catch (error) {
54
+ return {
55
+ lastResident,
56
+ pool: {
57
+ ok: false as const,
58
+ reason: `invalid inherited memory diagnostic: ${error instanceof Error ? error.message : String(error)}`,
59
+ },
60
+ };
61
+ }
62
+ const live: LiveUsageReading = context.bound.ok
63
+ ? readLive(context.bound.memory.source)
64
+ : { ok: false, reason: `${context.bound.error.subject}: ${context.bound.error.cause}` };
65
+ return { lastResident, pool: { ok: true as const, ...context, live } };
66
+ }
67
+
68
+ /** Retains the last readable sample through PID exit; stop is called by the child's exit event. */
69
+ export function observeChildMemory(pid: number, contextText: string | undefined) {
70
+ const sample = (): ResidentSample => ({
71
+ sampledAtMs: Date.now(),
72
+ reading: HOST_MEMORY?.residentUsage(pid) ?? {
73
+ ok: false,
74
+ reason: `${process.platform} has no per-process RSS reader`,
75
+ },
76
+ });
77
+ let lastResident = sample();
78
+ const timer = setInterval(() => {
79
+ const next = sample();
80
+ if (next.reading.ok || !lastResident.reading.ok) lastResident = next;
81
+ }, 250);
82
+ timer.unref();
83
+ return () => {
84
+ clearInterval(timer);
85
+ return childExitMemory(contextText, lastResident);
86
+ };
87
+ }
@@ -15,6 +15,7 @@ import {
15
15
  } from '../../process-group.js';
16
16
  import { AdmissionObservation, type QueueHost } from './admission-queue.js';
17
17
  import { type BoundEvent, type BoundKind, type Bounds, earliestBound, stepBounds, UNARMED } from './bounds.js';
18
+ import { DIAGNOSTIC_CONTEXT_ENV, DIAGNOSTIC_MODULE_ENV, grantMemoryEnvironment } from './child-exit-diagnostics.js';
18
19
  import { type CpuPool, createCpuPool } from './cpu-pool.js';
19
20
  import { GATEWAY_SOCKET } from './gateway-lease.js';
20
21
  import type { HangDiagnostics } from './hang-diagnostics.js';
@@ -94,7 +95,14 @@ const POOL_ENV = [CPU_TOKENS_ENV, CPU_POOL_ENV];
94
95
  * itself inherits, a parent make's or its cowshed job's, still reaches an ungranted command by Cargo's own rule; a
95
96
  * granted one's sub-pool names its own fifo over it.
96
97
  */
97
- const BUDGET_ENV = [...POOL_ENV, 'CARGO_MAKEFLAGS', 'MAKEFLAGS', 'MFLAGS'];
98
+ const BUDGET_ENV = [
99
+ ...POOL_ENV,
100
+ 'CARGO_MAKEFLAGS',
101
+ 'MAKEFLAGS',
102
+ 'MFLAGS',
103
+ DIAGNOSTIC_CONTEXT_ENV,
104
+ DIAGNOSTIC_MODULE_ENV,
105
+ ];
98
106
 
99
107
  export interface BoundedExecContext {
100
108
  root: string;
@@ -730,6 +738,7 @@ async function runCommand(
730
738
  ...sized.env,
731
739
  ...native.env,
732
740
  ...(pool?.environment ?? {}),
741
+ ...(await grantMemoryEnvironment(grant?.charged ?? null, process.env)),
733
742
  ...(leaf?.kind === 'cargo' ? { MBX_GRANT_FD: String(MBX_GRANT_FD) } : {}),
734
743
  };
735
744
  // A fixture rides as segment 0 of the lifecycle. Without the channel (Windows) it is plain shell text ahead
@@ -136,6 +136,7 @@ export const darwinMemory: HostMemory = {
136
136
  readRunMemory,
137
137
  peakBytes: (maxRss) => maxRss,
138
138
  treeResidentBytes,
139
+ residentUsage: () => ({ ok: false, reason: 'Node has no macOS per-process RSS reader' }),
139
140
  // macOS has no cgroup, and its anonymous and shared pages are not read from a file the pool may open.
140
141
  liveUsage: () => ({ ok: false, reason: 'macOS keeps no anonymous and shared memory of a run to read' }),
141
142
  };
@@ -2,7 +2,14 @@ import { readFileSync } from 'node:fs';
2
2
  import { readFile } from 'node:fs/promises';
3
3
  import { posix } from 'node:path';
4
4
  import { childPids } from '../../process-children.linux.js';
5
- import type { HostMemory, LiveUsageReading, RunMemory, RunMemoryError, RunMemoryReading } from './host-memory.js';
5
+ import type {
6
+ HostMemory,
7
+ LiveUsageReading,
8
+ ResidentUsageReading,
9
+ RunMemory,
10
+ RunMemoryError,
11
+ RunMemoryReading,
12
+ } from './host-memory.js';
6
13
 
7
14
  /**
8
15
  * Linux's memory mechanisms. The run's memory is the least of the host's `MemTotal` and every finite `memory.max` of
@@ -175,13 +182,29 @@ async function residentBytes(pid: number): Promise<number> {
175
182
  if (error instanceof Error && 'code' in error && (error.code === 'ENOENT' || error.code === 'ESRCH')) return 0;
176
183
  throw error;
177
184
  }
178
- const kib = /^VmRSS:\s+(\d+) kB$/m.exec(status)?.[1];
185
+ const kib = residentKib(status);
179
186
  return kib === undefined ? 0 : Number(kib) * 1024;
180
187
  }
181
188
 
189
+ function residentKib(status: string): string | undefined {
190
+ return /^VmRSS:\s+(\d+) kB$/m.exec(status)?.[1];
191
+ }
192
+
193
+ /** The same VmRSS field the peak waiter reads, without turning an unreadable or exited PID into zero. */
194
+ export function linuxResidentUsage(read: (path: string) => FileRead, pid: number): ResidentUsageReading {
195
+ const source = `/proc/${pid}/status`;
196
+ const status = read(source);
197
+ if (!status.ok) return { ok: false, reason: `${source}: ${status.code}: ${status.message}` };
198
+ const kib = residentKib(status.text);
199
+ return kib === undefined
200
+ ? { ok: false, reason: `${source} names no VmRSS in kB` }
201
+ : { ok: true, bytes: Number(kib) * 1024, source };
202
+ }
203
+
182
204
  export const linuxMemory: HostMemory = {
183
205
  readRunMemory: () => linuxRunMemory(readText),
184
206
  peakBytes,
185
207
  treeResidentBytes,
208
+ residentUsage: (pid) => linuxResidentUsage(readTextSync, pid),
186
209
  liveUsage: (bound) => linuxLiveUsage(readTextSync, bound),
187
210
  };
@@ -9,6 +9,8 @@ import { linuxMemory } from './host-memory.linux.js';
9
9
  export interface HostMemory {
10
10
  /** The memory the run's pool charges its leaves' peaks against. */
11
11
  readRunMemory(): Promise<RunMemoryReading>;
12
+ /** One process's resident set for an exit diagnostic; unavailable is never a zero RSS sample. */
13
+ residentUsage(pid: number): ResidentUsageReading;
12
14
  /**
13
15
  * A leaf's peak in bytes, from the `maxRSS` that Bun's `Subprocess.resourceUsage()` on `bunVersion` reports for
14
16
  * it: the exited leaf's `ru_maxrss`.
@@ -41,6 +43,11 @@ export type LiveUsageReading =
41
43
  | { readonly ok: true; readonly usage: LiveUsage }
42
44
  | { readonly ok: false; readonly reason: string };
43
45
 
46
+ /** A process's resident bytes and source, or why no sample could be read. */
47
+ export type ResidentUsageReading =
48
+ | { readonly ok: true; readonly bytes: number; readonly source: string }
49
+ | { readonly ok: false; readonly reason: string };
50
+
44
51
  /** The run's memory in bytes, and where it was read: the file or sysctl that holds it. */
45
52
  export interface RunMemory {
46
53
  readonly bytes: number;
package/test-timings.json CHANGED
@@ -2,149 +2,150 @@
2
2
  "version": 1,
3
3
  "files": {
4
4
  "src/executors/bounded-exec/go-progress-host.test.ts": 113358,
5
- "src/executors/typescript-emit/executor.test.ts": 45661,
6
- "src/nx-daemon-validity.test.ts": 42478,
7
- "src/executors/bounded-exec/executor.test.ts": 39065,
5
+ "src/ensure-built.test.ts": 70082,
6
+ "src/executors/typescript-emit/executor.test.ts": 44826,
7
+ "src/nx-daemon-validity.test.ts": 43285,
8
+ "src/executors/bounded-exec/executor.test.ts": 40109,
8
9
  "src/executors/bounded-exec/cargo-progress-host.test.ts": 38973,
9
- "src/cargo-resolve-cache.test.ts": 38299,
10
- "src/process-group.test.ts": 26361,
11
- "src/executors/bounded-exec/run-cpu-pool.test.ts": 24908,
12
- "src/index.test.ts": 23964,
13
- "src/ensure-built-receipt.test.ts": 16577,
14
- "src/built-output-packages.test.ts": 15805,
15
- "src/linked-snapshots.nx.test.ts": 15029,
16
- "src/cargo-retention.test.ts": 12864,
17
- "src/nx-use-local.test.ts": 12512,
18
- "src/cargo-source-hash.test.ts": 9974,
19
- "src/nx-daemon-idle-policy.test.ts": 9178,
20
- "src/executors/bounded-exec/ram-temp.test.ts": 8668,
21
- "src/nx-daemon-claim.test.ts": 8497,
22
- "src/task-results.test.ts": 8488,
23
- "src/cargo-closure-input.test.ts": 7891,
24
- "src/nx-dot-input-policy.test.ts": 7267,
25
- "src/ensure-built.test.ts": 6866,
26
- "src/nextest-partitions.test.ts": 6022,
27
- "src/typecheck-test-policy.test.ts": 5886,
28
- "src/cross-check-policy.test.ts": 5723,
29
- "src/nx-task-output-lease.test.ts": 5668,
30
- "src/bounded-test-policy.test.ts": 5532,
31
- "src/executors/bounded-exec/hang-diagnostics.test.ts": 4977,
32
- "src/cargo-closure-key.test.ts": 4702,
33
- "src/nx-plugin-load-errors.test.ts": 4500,
34
- "src/nx-skipped-task-exit.test.ts": 4321,
35
- "src/nx-daemon-start-never.test.ts": 4273,
36
- "src/nx-project-graph-errors.test.ts": 4130,
37
- "src/typescript-resolution.test.ts": 4023,
38
- "src/managed-files/repo-path.test.ts": 4007,
39
- "src/nx-daemon-ignore-files.test.ts": 3649,
40
- "src/task-graph-policy.nx.test.ts": 3484,
41
- "src/executors/bounded-exec/verdict.test.ts": 3092,
42
- "src/nx-cache-restore-mtime.test.ts": 2970,
43
- "src/nx-daemon-watch-filter.test.ts": 2752,
44
- "src/serial-group-wiring.test.ts": 2694,
45
- "src/nx-critical-path-schedule.test.ts": 2671,
46
- "src/runtime-input.test.ts": 2510,
47
- "src/cargo-child-kill.test.ts": 2418,
48
- "src/cargo-workspace.test.ts": 2265,
49
- "src/task-history-namespace.test.ts": 2221,
50
- "src/nextest-code-bound.test.ts": 2153,
51
- "src/nx-cache-kept-outputs.test.ts": 1902,
52
- "src/managed-files/unserved-workspace-hooks.test.ts": 1734,
53
- "src/cargo-build-script-env.test.ts": 1723,
54
- "src/managed-files/forgejo-artifact.test.ts": 1703,
55
- "src/managed-files/managed-format-json.test.ts": 1639,
56
- "src/nx-daemon-env-identity.test.ts": 1344,
57
- "src/executors/bounded-exec/runtime-pin.test.ts": 1302,
58
- "src/nx-foreign-workspace-env.test.ts": 1302,
59
- "src/nx-failure-life-cycles.test.ts": 1240,
60
- "src/testing.test.ts": 1226,
61
- "src/executors/all-verdicts/executor.test.ts": 1203,
62
- "src/nx-raw-inputs.test.ts": 1179,
63
- "src/nx-remote-cache-outage.test.ts": 1168,
64
- "src/owned-installation.test.ts": 1065,
65
- "src/nx-resident-graph-workers.test.ts": 1058,
66
- "src/nx-cache-bound.test.ts": 1007,
67
- "src/managed-files/generator.test.ts": 924,
68
- "src/executors/bounded-exec/test-results-run.test.ts": 897,
69
- "src/executors/bounded-exec/mbx-pool.test.ts": 889,
70
- "src/nx-local-plugin-hook-env.test.ts": 844,
71
- "src/managed-files/setup-devenv-task-records.test.ts": 728,
72
- "src/managed-files/devenv-wrapper.test.ts": 715,
73
- "src/executors/bounded-exec/mbx-reservations.test.ts": 646,
74
- "src/nx-files-archive-racy.test.ts": 637,
75
- "src/test-walk-policy.test.ts": 633,
76
- "src/nx-incomplete-run-summary.test.ts": 607,
77
- "src/nx-daemon-root-normalization.test.ts": 602,
78
- "src/nx-store-resolution.test.ts": 563,
79
- "src/executors/bounded-exec/runner-hook.test.ts": 562,
80
- "src/graph-input-contract.test.ts": 560,
81
- "src/bin/smoo-nx-bound-failures.test.ts": 555,
82
- "src/executors/bounded-exec/cpu-pool.test.ts": 514,
83
- "src/lock-scope.test.ts": 444,
84
- "src/package-target-policy.test.ts": 442,
85
- "src/ensure-built-witness.test.ts": 440,
86
- "src/executors/wrangler-deploy/executor.test.ts": 382,
87
- "src/executors/wrangler-deploy/hasher.test.ts": 352,
88
- "src/bun-bootstrap.test.ts": 322,
89
- "src/managed-files/github-host-cache-isolation.test.ts": 277,
90
- "src/test-clock-policy.test.ts": 274,
91
- "src/forbidden-spelling-policy.test.ts": 251,
92
- "src/test-timings.test.ts": 237,
93
- "src/managed-files/setup-devenv-stable-path.test.ts": 204,
94
- "src/version-actions.test.ts": 193,
95
- "src/executors/bounded-exec/pool-sim.property.test.ts": 168,
96
- "src/manifest-hash.test.ts": 138,
97
- "src/cargo-closure-filesets.test.ts": 134,
98
- "src/executors/cargo-zigbuild/executor.test.ts": 114,
99
- "src/release-config-policy.test.ts": 112,
100
- "src/workspace-config-policy.test.ts": 91,
101
- "src/generators/make-public/generator.test.ts": 74,
102
- "src/producer-receipts.test.ts": 69,
103
- "src/executors/bounded-exec/runner-sizing.test.ts": 66,
104
- "src/managed-files/cache-ttsc-plugins.test.ts": 65,
105
- "src/managed-files/setup-devenv-free-disk.test.ts": 64,
106
- "src/executors/bounded-exec/host-memory.test.ts": 63,
107
- "src/executors/scriptc-native/executor.test.ts": 47,
108
- "src/eslint-sources.test.ts": 38,
109
- "src/generators/create-package/generator.test.ts": 32,
110
- "src/nx-state-location.test.ts": 31,
111
- "src/executors/bounded-exec/ram-provenance.test.ts": 29,
112
- "src/generators/bun-test-tracing/generator.test.ts": 29,
10
+ "src/nextest-partitions.test.ts": 36611,
11
+ "src/cargo-resolve-cache.test.ts": 20025,
12
+ "src/executors/bounded-exec/run-cpu-pool.test.ts": 19052,
13
+ "src/linked-snapshots.nx.test.ts": 17026,
14
+ "src/ensure-built-receipt.test.ts": 15880,
15
+ "src/process-group.test.ts": 15352,
16
+ "src/index.test.ts": 15133,
17
+ "src/cargo-source-hash.test.ts": 12215,
18
+ "src/cargo-retention.test.ts": 10686,
19
+ "src/cargo-closure-input.test.ts": 9328,
20
+ "src/managed-files/repo-path.test.ts": 8962,
21
+ "src/nx-daemon-claim.test.ts": 8359,
22
+ "src/managed-files/forgejo-artifact.test.ts": 7370,
23
+ "src/managed-files/setup-devenv-task-records.test.ts": 6855,
24
+ "src/nx-daemon-idle-policy.test.ts": 6475,
25
+ "src/nx-daemon-start-never.test.ts": 5775,
26
+ "src/executors/bounded-exec/ram-temp.test.ts": 5690,
27
+ "src/bounded-test-policy.test.ts": 5522,
28
+ "src/task-results.test.ts": 4930,
29
+ "src/nx-dot-input-policy.test.ts": 4878,
30
+ "src/serial-group-wiring.test.ts": 4764,
31
+ "src/bin/smoo-nx-bound-failures.test.ts": 4406,
32
+ "src/nx-daemon-ignore-files.test.ts": 3890,
33
+ "src/executors/bounded-exec/hang-diagnostics.test.ts": 3781,
34
+ "src/cargo-closure-key.test.ts": 3482,
35
+ "src/testing.test.ts": 3249,
36
+ "src/nx-task-output-lease.test.ts": 3242,
37
+ "src/managed-files/generator.test.ts": 2902,
38
+ "src/cargo-workspace.test.ts": 2843,
39
+ "src/nx-cache-restore-mtime.test.ts": 2722,
40
+ "src/nx-remote-cache-outage.test.ts": 2702,
41
+ "src/runtime-input.test.ts": 2595,
42
+ "src/managed-files/unserved-workspace-hooks.test.ts": 2550,
43
+ "src/nx-daemon-watch-filter.test.ts": 2538,
44
+ "src/executors/bounded-exec/verdict.test.ts": 2499,
45
+ "src/task-history-namespace.test.ts": 2420,
46
+ "src/nx-critical-path-schedule.test.ts": 2283,
47
+ "src/nx-skipped-task-exit.test.ts": 2280,
48
+ "src/nx-project-graph-errors.test.ts": 2264,
49
+ "src/nx-daemon-env-identity.test.ts": 2260,
50
+ "src/managed-files/managed-format-json.test.ts": 2169,
51
+ "src/managed-files/github-host-cache-isolation.test.ts": 2149,
52
+ "src/typecheck-test-policy.test.ts": 1691,
53
+ "src/nx-cache-kept-outputs.test.ts": 1656,
54
+ "src/nx-plugin-load-errors.test.ts": 1563,
55
+ "src/nx-foreign-workspace-env.test.ts": 1536,
56
+ "src/typescript-resolution.test.ts": 1463,
57
+ "src/owned-installation.test.ts": 1458,
58
+ "src/cargo-build-script-env.test.ts": 1451,
59
+ "src/graph-input-contract.test.ts": 1423,
60
+ "src/cargo-child-kill.test.ts": 1412,
61
+ "src/nx-resident-graph-workers.test.ts": 1394,
62
+ "src/nx-use-local.test.ts": 1393,
63
+ "src/cross-check-policy.test.ts": 1322,
64
+ "src/executors/bounded-exec/test-results-run.test.ts": 1300,
65
+ "src/task-graph-policy.nx.test.ts": 1242,
66
+ "src/managed-files/cache-ttsc-plugins.test.ts": 1113,
67
+ "src/executors/all-verdicts/executor.test.ts": 957,
68
+ "src/nextest-code-bound.test.ts": 957,
69
+ "src/nx-files-archive-racy.test.ts": 869,
70
+ "src/nx-local-plugin-hook-env.test.ts": 657,
71
+ "src/nx-raw-inputs.test.ts": 622,
72
+ "src/nx-daemon-root-normalization.test.ts": 561,
73
+ "src/test-walk-policy.test.ts": 561,
74
+ "src/nx-cache-bound.test.ts": 529,
75
+ "src/bun-bootstrap.test.ts": 521,
76
+ "src/nx-incomplete-run-summary.test.ts": 515,
77
+ "src/package-target-policy.test.ts": 515,
78
+ "src/test-timings.test.ts": 468,
79
+ "src/executors/bounded-exec/runner-hook.test.ts": 433,
80
+ "src/built-output-packages.test.ts": 432,
81
+ "src/managed-files/devenv-wrapper.test.ts": 423,
82
+ "src/ensure-built-witness.test.ts": 394,
83
+ "src/nx-store-resolution.test.ts": 376,
84
+ "src/nx-failure-life-cycles.test.ts": 360,
85
+ "src/lock-scope.test.ts": 313,
86
+ "src/managed-files/setup-devenv-stable-path.test.ts": 289,
87
+ "src/test-clock-policy.test.ts": 284,
88
+ "src/executors/bounded-exec/cpu-pool.test.ts": 270,
89
+ "src/forbidden-spelling-policy.test.ts": 250,
90
+ "src/executors/cargo-zigbuild/executor.test.ts": 245,
91
+ "src/executors/bounded-exec/pool-sim.property.test.ts": 223,
92
+ "src/cargo-closure-filesets.test.ts": 163,
93
+ "src/managed-files/setup-devenv-free-disk.test.ts": 131,
94
+ "src/executors/bounded-exec/mbx-pool.test.ts": 128,
95
+ "src/executors/bounded-exec/runtime-pin.test.ts": 115,
96
+ "src/executors/bounded-exec/host-memory.test.ts": 107,
97
+ "src/executors/scriptc-native/executor.test.ts": 101,
98
+ "src/release-config-policy.test.ts": 80,
99
+ "src/generators/make-public/generator.test.ts": 78,
100
+ "src/producer-receipts.test.ts": 77,
101
+ "src/workspace-config-policy.test.ts": 75,
102
+ "src/nx-state-location.test.ts": 72,
103
+ "src/executors/wrangler-deploy/executor.test.ts": 67,
104
+ "src/version-actions.test.ts": 65,
105
+ "src/manifest-hash.test.ts": 63,
106
+ "src/managed-files/tree-permissions.test.ts": 62,
107
+ "src/executors/bounded-exec/runner-sizing.test.ts": 59,
108
+ "src/eslint-sources.test.ts": 52,
109
+ "src/wait-why-policy.test.ts": 47,
110
+ "src/executors/wrangler-deploy/hasher.test.ts": 46,
111
+ "src/executors/bounded-exec/ram-detach.test.ts": 44,
112
+ "src/executors/bounded-exec/mbx-reservations.test.ts": 43,
113
+ "src/executors/bounded-exec/pool-admission.test.ts": 43,
114
+ "src/executors/bounded-exec/ram-provenance.test.ts": 41,
115
+ "src/managed-files/trace-db-artifact.test.ts": 40,
116
+ "src/cargo-toolchain-paths.test.ts": 28,
113
117
  "src/executors/nextest-group/executor.test.ts": 28,
114
- "src/generators/bounded-test-targets/generator.test.ts": 28,
115
- "src/cargo-toolchain-paths.test.ts": 26,
116
- "src/managed-files/trace-db-artifact.test.ts": 25,
117
- "src/executors/bounded-exec/disk-lease.test.ts": 24,
118
- "src/executors/bounded-exec/test-results.test.ts": 24,
119
- "src/cargo-closure-input.property.test.ts": 20,
120
- "src/wait-why-policy.test.ts": 17,
121
- "src/build-state-output-policy.test.ts": 16,
122
- "src/executors/bounded-exec/progress.test.ts": 16,
123
- "src/executors/bounded-exec/runner-lifecycle.test.ts": 16,
124
- "src/task-graph-policy.test.ts": 16,
125
- "src/test-program.test.ts": 16,
126
- "src/executors/bounded-exec/mbx-queue.test.ts": 15,
127
- "src/executors/bounded-exec/lock-wait.test.ts": 14,
128
- "src/executors/bounded-exec/ram-detach.test.ts": 14,
129
- "src/executors/bounded-exec/ram-fixture.test.ts": 14,
130
- "src/executors/bounded-exec/ram-temp-held.test.ts": 14,
131
- "src/nx-daemon-idle-cpu.test.ts": 14,
132
- "src/nx-project-resolution-cache.test.ts": 14,
133
- "src/host-controller-wiring.test.ts": 13,
118
+ "src/generators/bun-test-tracing/generator.test.ts": 25,
119
+ "src/generators/create-package/generator.test.ts": 24,
120
+ "src/managed-files/tree.test.ts": 22,
121
+ "src/executors/bounded-exec/disk-lease.test.ts": 21,
122
+ "src/generators/bounded-test-targets/generator.test.ts": 21,
123
+ "src/managed-files/json-edit.test.ts": 21,
124
+ "src/build-state-output-policy.test.ts": 20,
125
+ "src/executors/bounded-exec/mbx-queue.test.ts": 19,
126
+ "src/executors/bounded-exec/lock-wait.test.ts": 18,
127
+ "src/executors/bounded-exec/test-results.test.ts": 18,
128
+ "src/cargo-closure-input.property.test.ts": 17,
129
+ "src/nx-daemon-idle-cpu.test.ts": 17,
130
+ "src/executors/bounded-exec/executor-key.test.ts": 15,
131
+ "src/executors/bounded-exec/progress.test.ts": 15,
132
+ "src/executors/bounded-exec/runner-lifecycle.test.ts": 15,
133
+ "src/host-controller-wiring.test.ts": 14,
134
+ "src/nx-task-graph-cycles.test.ts": 14,
135
+ "src/task-graph-policy.test.ts": 14,
136
+ "src/cargo-retention-hook.test.ts": 12,
134
137
  "src/disk-command-policy.test.ts": 12,
135
- "src/cargo-retention-hook.test.ts": 11,
136
- "src/executors/bounded-exec/executor-key.test.ts": 11,
138
+ "src/nx-project-resolution-cache.test.ts": 12,
139
+ "src/executors/bounded-exec/ram-fixture.test.ts": 11,
137
140
  "src/nx-run-information.test.ts": 11,
141
+ "src/test-program.test.ts": 11,
142
+ "src/bun-file-packages.test.ts": 10,
143
+ "src/executors/bounded-exec/child-exit-diagnostics.test.ts": 10,
144
+ "src/managed-files/managed-content.test.ts": 10,
138
145
  "src/nx-depends-on-configuration.test.ts": 10,
139
- "src/managed-files/json-edit.test.ts": 9,
140
- "src/nx-task-graph-cycles.test.ts": 9,
141
- "src/bun-file-packages.test.ts": 8,
142
- "src/executors/bounded-exec/host-memory.linux.test.ts": 8,
143
- "src/executors/bounded-exec/pool-admission.test.ts": 8,
144
- "src/managed-files/tree-permissions.test.ts": 8,
145
- "src/managed-files/tree.test.ts": 8,
146
+ "src/executors/bounded-exec/ram-temp-held.test.ts": 8,
146
147
  "src/executors/bounded-exec/bounds.test.ts": 7,
147
148
  "src/executors/bounded-exec/owned-subtree.test.ts": 7,
148
- "src/managed-files/managed-content.test.ts": 6
149
+ "src/executors/bounded-exec/host-memory.linux.test.ts": 6
149
150
  }
150
151
  }