@smoothbricks/nx-plugin 0.7.17 → 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.
- package/README.md +204 -64
- package/dist/.build-inputs.json +24 -21
- package/dist/bun-lock-scope.d.ts +128 -20
- package/dist/bun-lock-scope.d.ts.map +1 -1
- package/dist/bun-lock-scope.js +267 -44
- package/dist/cargo-closure-input.d.ts +8 -6
- package/dist/cargo-closure-input.d.ts.map +1 -1
- package/dist/cargo-closure-input.js +14 -11
- package/dist/cargo-source-hash.d.ts +23 -4
- package/dist/cargo-source-hash.d.ts.map +1 -1
- package/dist/cargo-source-hash.js +80 -14
- package/dist/cargo-workspace.d.ts +20 -2
- package/dist/cargo-workspace.d.ts.map +1 -1
- package/dist/cargo-workspace.js +42 -22
- package/dist/ensure-built-receipt.d.ts +3 -2
- package/dist/ensure-built-receipt.d.ts.map +1 -1
- package/dist/ensure-built-receipt.js +3 -2
- package/dist/eslint-config-closure.d.ts +8 -3
- package/dist/eslint-config-closure.d.ts.map +1 -1
- package/dist/eslint-config-closure.js +24 -5
- package/dist/executors/bounded-exec/bounds.d.ts +12 -1
- package/dist/executors/bounded-exec/bounds.d.ts.map +1 -1
- package/dist/executors/bounded-exec/bounds.js +8 -4
- package/dist/executors/bounded-exec/cpu-rise.d.ts +73 -0
- package/dist/executors/bounded-exec/cpu-rise.d.ts.map +1 -0
- package/dist/executors/bounded-exec/cpu-rise.js +111 -0
- package/dist/executors/bounded-exec/executor.d.ts +1 -1
- package/dist/executors/bounded-exec/executor.d.ts.map +1 -1
- package/dist/executors/bounded-exec/executor.js +54 -22
- package/dist/executors/bounded-exec/hang-diagnostics.d.ts +8 -0
- package/dist/executors/bounded-exec/hang-diagnostics.d.ts.map +1 -1
- package/dist/executors/bounded-exec/hang-diagnostics.js +66 -6
- package/dist/executors/bounded-exec/mbx-pool.d.ts +16 -2
- package/dist/executors/bounded-exec/mbx-pool.d.ts.map +1 -1
- package/dist/executors/bounded-exec/mbx-pool.js +18 -2
- package/dist/executors/bounded-exec/mbx-reservations.d.ts +5 -2
- package/dist/executors/bounded-exec/mbx-reservations.d.ts.map +1 -1
- package/dist/executors/bounded-exec/mbx-reservations.js +5 -3
- package/dist/executors/bounded-exec/progress-channel.d.ts +38 -0
- package/dist/executors/bounded-exec/progress-channel.d.ts.map +1 -0
- package/dist/executors/bounded-exec/progress-channel.js +113 -0
- package/dist/executors/bounded-exec/progress.d.ts +2 -1
- package/dist/executors/bounded-exec/progress.d.ts.map +1 -1
- package/dist/executors/bounded-exec/ram-temp.d.ts +24 -1
- package/dist/executors/bounded-exec/ram-temp.d.ts.map +1 -1
- package/dist/executors/bounded-exec/ram-temp.js +123 -16
- package/dist/executors/bounded-exec/schema.d.ts +5 -0
- package/dist/executors/bounded-exec/schema.d.ts.map +1 -1
- package/dist/executors/bounded-exec/schema.js +17 -1
- package/dist/executors/bounded-exec/verdict.d.ts +13 -6
- package/dist/executors/bounded-exec/verdict.d.ts.map +1 -1
- package/dist/executors/bounded-exec/verdict.js +34 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +199 -89
- package/dist/managed-files/generator.d.ts +5 -1
- package/dist/managed-files/generator.d.ts.map +1 -1
- package/dist/managed-files/generator.js +22 -7
- package/dist/managed-files/render-memo.d.ts +13 -0
- package/dist/managed-files/render-memo.d.ts.map +1 -0
- package/dist/managed-files/render-memo.js +94 -0
- package/dist/test-program.d.ts +11 -6
- package/dist/test-program.d.ts.map +1 -1
- package/dist/test-program.js +39 -35
- package/dist/tool-bins.d.ts +12 -0
- package/dist/tool-bins.d.ts.map +1 -1
- package/dist/tool-bins.js +31 -6
- package/dist/typecheck-test-policy.d.ts +10 -1
- package/dist/typecheck-test-policy.d.ts.map +1 -1
- package/dist/typecheck-test-policy.js +40 -24
- package/dist/workspace-index.d.ts +14 -1
- package/dist/workspace-index.d.ts.map +1 -1
- package/dist/workspace-index.js +36 -4
- package/managed/raw/patches/nx@24.0.3.patch +703 -119
- package/managed/raw/tooling/direnv/developer-links.ts +17 -3
- package/managed/templates/github/actions/save-nix-devenv/action.yml +19 -1
- package/managed/templates/github/actions/setup-devenv/action.yml +2 -0
- package/package.json +3 -2
- package/src/bun-lock-scope.ts +293 -40
- package/src/cargo-closure-input.ts +19 -11
- package/src/cargo-source-hash.ts +103 -13
- package/src/cargo-workspace.ts +59 -20
- package/src/ensure-built-receipt.ts +3 -2
- package/src/eslint-config-closure.ts +27 -6
- package/src/executors/bounded-exec/bounds.ts +13 -4
- package/src/executors/bounded-exec/cpu-rise.ts +156 -0
- package/src/executors/bounded-exec/executor.ts +65 -21
- package/src/executors/bounded-exec/hang-diagnostics.ts +88 -6
- package/src/executors/bounded-exec/mbx-pool.ts +24 -3
- package/src/executors/bounded-exec/mbx-reservations.ts +7 -5
- package/src/executors/bounded-exec/progress-channel.ts +129 -0
- package/src/executors/bounded-exec/progress.ts +2 -1
- package/src/executors/bounded-exec/ram-temp.ts +137 -17
- package/src/executors/bounded-exec/schema.ts +19 -0
- package/src/executors/bounded-exec/verdict.ts +44 -16
- package/src/index.ts +255 -98
- package/src/managed-files/generator.ts +21 -6
- package/src/managed-files/render-memo.ts +135 -0
- package/src/test-program.ts +36 -41
- package/src/tool-bins.ts +35 -6
- package/src/typecheck-test-policy.ts +49 -24
- package/src/workspace-index.ts +40 -5
- package/test-timings.json +6 -0
|
@@ -1 +1,17 @@
|
|
|
1
|
-
|
|
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
|
|
16
|
-
* the suite's completion bound was exceeded, not that every process stopped:
|
|
17
|
-
* exceed it too. The verdict names tests reported running but never finished and
|
|
18
|
-
* aborted; diagnostics distinguish a stalled wait from a progressing but oversized
|
|
19
|
-
* When the snapshot named a lock wait, `lockWaits` names the file the run holds on a numbered descriptor
|
|
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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E,IAAI,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,kBAAkB,EAAE;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC,CAAA;CAAE,GACpH;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAE9E;;;;GAIG;AACH,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC,CA6BrG;AAED,kFAAkF;AAClF,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,kBAAkB,GAAG,MAAM,CAQvE;AACD,wBAAgB,eAAe,CAAC,OAAO,EAAE,kBAAkB,GAAG,MAAM,CA8BnE;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,eAAe,GAAG,MAAM,CAgBjE"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import * as _isTypeUint32_1 from "typia/lib/internal/_isTypeUint32";
|
|
1
2
|
import { mkdir, readFile, rename, rm, writeFile } from 'node:fs/promises';
|
|
2
3
|
import { join } from 'node:path';
|
|
3
4
|
import typia from 'typia';
|
|
4
5
|
import { parseCpuGrant } from './cpu-grant.js';
|
|
6
|
+
import { CPU_RISING_CLASS, describeCpuRises } from './cpu-rise.js';
|
|
5
7
|
import { describeHolders } from './lock-wait.js';
|
|
6
8
|
import { TEST_FAILURES_FILE, TEST_RESULTS_FILE } from './test-results.js';
|
|
7
9
|
const isQueuedVerdict = (() => {
|
|
@@ -10,6 +12,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 {
|
|
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
|
-
|
|
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
|
-
|
|
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'
|
|
531
|
-
|
|
532
|
-
|
|
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':
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"A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