@smoothbricks/nx-plugin 0.7.11 → 0.7.13

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 (108) hide show
  1. package/README.md +87 -25
  2. package/dist/.build-inputs.json +25 -17
  3. package/dist/built-output-packages.d.ts +27 -0
  4. package/dist/built-output-packages.d.ts.map +1 -0
  5. package/dist/built-output-packages.js +97 -0
  6. package/dist/cross-check-policy.d.ts +13 -1
  7. package/dist/cross-check-policy.d.ts.map +1 -1
  8. package/dist/cross-check-policy.js +13 -1
  9. package/dist/executors/bounded-exec/admission-queue.d.ts +68 -0
  10. package/dist/executors/bounded-exec/admission-queue.d.ts.map +1 -0
  11. package/dist/executors/bounded-exec/admission-queue.js +131 -0
  12. package/dist/executors/bounded-exec/cpu-grant.d.ts +14 -0
  13. package/dist/executors/bounded-exec/cpu-grant.d.ts.map +1 -0
  14. package/dist/executors/bounded-exec/cpu-grant.js +18 -0
  15. package/dist/executors/bounded-exec/cpu-pool-thread.d.ts +5 -4
  16. package/dist/executors/bounded-exec/cpu-pool-thread.d.ts.map +1 -1
  17. package/dist/executors/bounded-exec/cpu-pool.d.ts +26 -24
  18. package/dist/executors/bounded-exec/cpu-pool.d.ts.map +1 -1
  19. package/dist/executors/bounded-exec/cpu-pool.js +88 -72
  20. package/dist/executors/bounded-exec/executor.d.ts +5 -7
  21. package/dist/executors/bounded-exec/executor.d.ts.map +1 -1
  22. package/dist/executors/bounded-exec/executor.js +69 -133
  23. package/dist/executors/bounded-exec/host-memory.d.ts +22 -0
  24. package/dist/executors/bounded-exec/host-memory.d.ts.map +1 -1
  25. package/dist/executors/bounded-exec/host-memory.darwin.d.ts.map +1 -1
  26. package/dist/executors/bounded-exec/host-memory.darwin.js +7 -1
  27. package/dist/executors/bounded-exec/host-memory.js +6 -0
  28. package/dist/executors/bounded-exec/host-memory.linux.d.ts +3 -1
  29. package/dist/executors/bounded-exec/host-memory.linux.d.ts.map +1 -1
  30. package/dist/executors/bounded-exec/host-memory.linux.js +43 -1
  31. package/dist/executors/bounded-exec/memory-retry.d.ts +39 -0
  32. package/dist/executors/bounded-exec/memory-retry.d.ts.map +1 -0
  33. package/dist/executors/bounded-exec/memory-retry.js +33 -0
  34. package/dist/executors/bounded-exec/parent-grant.d.ts +43 -0
  35. package/dist/executors/bounded-exec/parent-grant.d.ts.map +1 -0
  36. package/dist/executors/bounded-exec/parent-grant.js +37 -0
  37. package/dist/executors/bounded-exec/peak-charge.d.ts +17 -0
  38. package/dist/executors/bounded-exec/peak-charge.d.ts.map +1 -0
  39. package/dist/executors/bounded-exec/peak-charge.js +20 -0
  40. package/dist/executors/bounded-exec/pool-admission.d.ts +31 -7
  41. package/dist/executors/bounded-exec/pool-admission.d.ts.map +1 -1
  42. package/dist/executors/bounded-exec/pool-admission.js +44 -8
  43. package/dist/executors/bounded-exec/pool-environment.d.ts +25 -0
  44. package/dist/executors/bounded-exec/pool-environment.d.ts.map +1 -0
  45. package/dist/executors/bounded-exec/pool-environment.js +34 -0
  46. package/dist/executors/bounded-exec/run-cpu-pool.d.ts.map +1 -1
  47. package/dist/executors/bounded-exec/run-cpu-pool.js +2 -2
  48. package/dist/executors/bounded-exec/verdict.d.ts +5 -18
  49. package/dist/executors/bounded-exec/verdict.d.ts.map +1 -1
  50. package/dist/executors/bounded-exec/verdict.js +12 -16
  51. package/dist/index.d.ts +4 -1
  52. package/dist/index.d.ts.map +1 -1
  53. package/dist/index.js +62 -21
  54. package/dist/managed-files/ci-workflow.d.ts +29 -5
  55. package/dist/managed-files/ci-workflow.d.ts.map +1 -1
  56. package/dist/managed-files/ci-workflow.js +111 -16
  57. package/dist/managed-files/context.d.ts.map +1 -1
  58. package/dist/managed-files/context.js +1 -0
  59. package/dist/managed-files/files.d.ts +3 -1
  60. package/dist/managed-files/files.d.ts.map +1 -1
  61. package/dist/managed-files/files.js +2 -0
  62. package/dist/managed-files/publish-workflow.d.ts +6 -1
  63. package/dist/managed-files/publish-workflow.d.ts.map +1 -1
  64. package/dist/managed-files/publish-workflow.js +16 -11
  65. package/dist/owned-installation.d.ts.map +1 -1
  66. package/dist/owned-installation.js +48 -14
  67. package/dist/typecheck-route.d.ts +28 -0
  68. package/dist/typecheck-route.d.ts.map +1 -0
  69. package/dist/typecheck-route.js +109 -0
  70. package/dist/workspace-manifest.d.ts +50 -5
  71. package/dist/workspace-manifest.d.ts.map +1 -1
  72. package/executors.json +10 -0
  73. package/managed/raw/patches/nx@24.0.3.patch +16 -0
  74. package/managed/raw/patches/ttsc@0.34.1.patch +93 -8
  75. package/managed/raw/tooling/direnv/apple-developer.sh +8 -1
  76. package/managed/raw/tooling/direnv/compiler-variables.sh +1 -1
  77. package/managed/raw/tooling/direnv/github-actions-bootstrap.sh +4 -2
  78. package/managed/raw/tooling/direnv/secret-references.ts +19 -5
  79. package/managed/raw/tooling/git-hooks/pre-push.sh +20 -10
  80. package/managed/templates/github/actions/forgejo-artifact.cjs +9 -9
  81. package/managed/templates/github/actions/setup-devenv/action.yml +53 -0
  82. package/package.json +2 -2
  83. package/src/built-output-packages.ts +125 -0
  84. package/src/cross-check-policy.ts +14 -1
  85. package/src/executors/bounded-exec/admission-queue.ts +163 -0
  86. package/src/executors/bounded-exec/cpu-grant.ts +32 -0
  87. package/src/executors/bounded-exec/cpu-pool-thread.ts +5 -4
  88. package/src/executors/bounded-exec/cpu-pool.ts +123 -58
  89. package/src/executors/bounded-exec/executor.ts +93 -168
  90. package/src/executors/bounded-exec/host-memory.darwin.ts +7 -1
  91. package/src/executors/bounded-exec/host-memory.linux.ts +42 -2
  92. package/src/executors/bounded-exec/host-memory.ts +25 -0
  93. package/src/executors/bounded-exec/memory-retry.ts +63 -0
  94. package/src/executors/bounded-exec/parent-grant.ts +75 -0
  95. package/src/executors/bounded-exec/peak-charge.ts +25 -0
  96. package/src/executors/bounded-exec/pool-admission.ts +66 -11
  97. package/src/executors/bounded-exec/pool-environment.ts +45 -0
  98. package/src/executors/bounded-exec/run-cpu-pool.ts +5 -4
  99. package/src/executors/bounded-exec/verdict.ts +17 -25
  100. package/src/index.ts +70 -21
  101. package/src/managed-files/ci-workflow.ts +143 -16
  102. package/src/managed-files/context.ts +1 -0
  103. package/src/managed-files/files.ts +5 -0
  104. package/src/managed-files/publish-workflow.ts +26 -10
  105. package/src/owned-installation.ts +63 -14
  106. package/src/typecheck-route.ts +64 -0
  107. package/src/workspace-manifest.ts +56 -5
  108. package/test-timings.json +141 -137
@@ -0,0 +1,43 @@
1
+ import { type TokenGrant } from './cpu-pool.js';
2
+ import type { CpuWaitRow } from './lease-wait.js';
3
+ import type { InheritedCpuPool } from './pool-environment.js';
4
+ /**
5
+ * What a run asks its parent's CPU pool and says of the answer. How many tokens the pool lends, how long the run waits
6
+ * and what it is charged are values that differ between runs of one task key; what a token count does to the command is
7
+ * `runner-sizing.ts`'s, keyed (README, "Bounded exec key").
8
+ */
9
+ /** Tokens a parent pool lent, held until released. */
10
+ export type GrantedTokens = Extract<TokenGrant, {
11
+ granted: true;
12
+ }>;
13
+ /** The parent pool's answer to a run: a grant, a refusal that fails the run, or neither, and what to say of it. */
14
+ export interface ParentGrant {
15
+ readonly grant: GrantedTokens | null;
16
+ /** A pool that answered and refused is a live budget, and the run fails rather than run beside it. */
17
+ readonly refusal: string | null;
18
+ readonly wait: CpuWaitRow | undefined;
19
+ /** What the run says, in order. */
20
+ readonly said: readonly string[];
21
+ }
22
+ /** What a run asks for: its count, what its task's last recorded peak charges it, and whether it runs alone. */
23
+ export interface Ask {
24
+ readonly want: number;
25
+ readonly charge: number | null;
26
+ /** The tokens the task was lent when its recorded peak was measured. */
27
+ readonly parallelism: number | null;
28
+ readonly alone: boolean;
29
+ readonly task: string | undefined;
30
+ }
31
+ /**
32
+ * Ask the parent pool for the run's tokens. A run that inherits no pool runs as asked and says nothing; a pool whose
33
+ * endpoint is gone (its holder exited) lends nothing, and the run goes on as asked.
34
+ */
35
+ export declare function askParentPool(inherited: InheritedCpuPool | null, ask: Ask): Promise<ParentGrant>;
36
+ /** What a run says once its grant is in hand. */
37
+ export declare function describeGrant(grant: GrantedTokens, run: {
38
+ waitedMs: number;
39
+ want: number;
40
+ runner: string;
41
+ charge: number | null;
42
+ }): string[];
43
+ //# sourceMappingURL=parent-grant.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parent-grant.d.ts","sourceRoot":"","sources":["../../../src/executors/bounded-exec/parent-grant.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAuB,MAAM,eAAe,CAAC;AACrE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE9D;;;;GAIG;AAEH,sDAAsD;AACtD,MAAM,MAAM,aAAa,GAAG,OAAO,CAAC,UAAU,EAAE;IAAE,OAAO,EAAE,IAAI,CAAA;CAAE,CAAC,CAAC;AAEnE,mHAAmH;AACnH,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI,CAAC;IACrC,sGAAsG;IACtG,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,QAAQ,CAAC,IAAI,EAAE,UAAU,GAAG,SAAS,CAAC;IACtC,mCAAmC;IACnC,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;CAClC;AAED,gHAAgH;AAChH,MAAM,WAAW,GAAG;IAClB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,wEAAwE;IACxE,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;CACnC;AAED;;;GAGG;AACH,wBAAsB,aAAa,CAAC,SAAS,EAAE,gBAAgB,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,WAAW,CAAC,CAqBtG;AAED,iDAAiD;AACjD,wBAAgB,aAAa,CAC3B,KAAK,EAAE,aAAa,EACpB,GAAG,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,GAC7E,MAAM,EAAE,CAUV"}
@@ -0,0 +1,37 @@
1
+ import { takeParentCpuTokens } from './cpu-pool.js';
2
+ /**
3
+ * Ask the parent pool for the run's tokens. A run that inherits no pool runs as asked and says nothing; a pool whose
4
+ * endpoint is gone (its holder exited) lends nothing, and the run goes on as asked.
5
+ */
6
+ export async function askParentPool(inherited, ask) {
7
+ if (inherited === null) {
8
+ return { grant: null, refusal: null, wait: undefined, said: [] };
9
+ }
10
+ const answer = await takeParentCpuTokens(inherited, ask.want, ask.charge, {
11
+ parallelism: ask.parallelism ?? undefined,
12
+ alone: ask.alone ? true : undefined,
13
+ task: ask.task,
14
+ });
15
+ if (answer.granted) {
16
+ return { grant: answer, refusal: null, wait: undefined, said: [] };
17
+ }
18
+ if (answer.cause === 'absent') {
19
+ return {
20
+ grant: null,
21
+ refusal: null,
22
+ wait: undefined,
23
+ said: [`cowshed: cpu-pool parent pool absent: ${answer.reason}; running the command as asked\n`],
24
+ };
25
+ }
26
+ return { grant: null, refusal: answer.reason, wait: answer.wait, said: [] };
27
+ }
28
+ /** What a run says once its grant is in hand. */
29
+ export function describeGrant(grant, run) {
30
+ const said = [
31
+ `cowshed: cpu-pool wait done elapsed=${run.waitedMs}ms status=ok tokens=${grant.tokens}/${run.want} runner=${run.runner} memory=${run.charge ?? 'none'}${grant.charged !== null && grant.charged !== run.charge ? ` charged=${grant.charged}` : ''}\n`,
32
+ ];
33
+ if (grant.oversized !== null) {
34
+ said.push(`cowshed: cpu-pool granted while nothing else holds memory: this task's last peak of ${run.charge} bytes alone exceeds the run's ${grant.oversized.memory} bytes\n`);
35
+ }
36
+ return said;
37
+ }
@@ -0,0 +1,17 @@
1
+ /** What the task's last record charges its next run: the peak and the parallelism it was measured under. */
2
+ export type LastPeak = {
3
+ ok: true;
4
+ peakBytes: number | null;
5
+ parallelism: number | null;
6
+ } | {
7
+ ok: false;
8
+ error: string;
9
+ };
10
+ /**
11
+ * The peak the task's last record in `directory` names: its charge in its run's pool. Null when the task has no record
12
+ * or its record no peak; a record that cannot be read is an error naming it, never a charge of nothing. It decides what a
13
+ * pool charges a run, a value that differs between runs of one task key, so the key leaves it out (README, "Bounded
14
+ * exec key").
15
+ */
16
+ export declare function readLastPeak(directory: string): Promise<LastPeak>;
17
+ //# sourceMappingURL=peak-charge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"peak-charge.d.ts","sourceRoot":"","sources":["../../../src/executors/bounded-exec/peak-charge.ts"],"names":[],"mappings":"AAGA,4GAA4G;AAC5G,MAAM,MAAM,QAAQ,GAChB;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,GAClE;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAEjC;;;;;GAKG;AACH,wBAAsB,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAUvE"}
@@ -0,0 +1,20 @@
1
+ import { join } from 'node:path';
2
+ import { readRecord, VERDICT_FILE } from './verdict.js';
3
+ /**
4
+ * The peak the task's last record in `directory` names: its charge in its run's pool. Null when the task has no record
5
+ * or its record no peak; a record that cannot be read is an error naming it, never a charge of nothing. It decides what a
6
+ * pool charges a run, a value that differs between runs of one task key, so the key leaves it out (README, "Bounded
7
+ * exec key").
8
+ */
9
+ export async function readLastPeak(directory) {
10
+ try {
11
+ const record = await readRecord(directory);
12
+ return { ok: true, peakBytes: record?.peakBytes ?? null, parallelism: record?.cpu?.tokens ?? null };
13
+ }
14
+ catch (error) {
15
+ return {
16
+ ok: false,
17
+ error: `the task's last record ${join(directory, VERDICT_FILE)} cannot be read: ${error instanceof Error ? error.message : String(error)}`,
18
+ };
19
+ }
20
+ }
@@ -7,32 +7,56 @@
7
7
  * Every grant needs both. The head takes `min(want, free)` tokens once one is free, and only while the charges of the
8
8
  * leaves holding grants plus its own fit the run's memory; a head that cannot be granted holds up every request behind
9
9
  * it, and no request holds part of a grant while it waits for the rest. A leaf is charged its task's last recorded
10
- * memory peak, and nothing while its task has none. A leaf whose own charge alone exceeds the run's memory could never
11
- * fit, so it is granted once nothing else holds memory, and the grant says so.
10
+ * memory peak, and nothing while its task has none. A runner's memory grows with the parallelism it is lent (a Vitest
11
+ * worker is a process of its own), so a peak measured while the leaf was lent `parallelism` tokens is charged in
12
+ * proportion to the tokens it is lent now when that is more, never less: the baseline a leaf holds however few workers
13
+ * it has makes a smaller grant no cheaper. When its whole ask does not fit, the head is lent the most tokens whose
14
+ * charge does. A leaf whose own charge alone exceeds the run's memory could never fit, so it is granted once nothing
15
+ * else holds memory, on one token when its peak names the parallelism it was measured under, and the grant says so.
16
+ *
17
+ * A leaf the kernel killed for memory, run again (`alone`), is granted only while nothing holds a grant, ahead of the
18
+ * leaves behind it, and while it runs nothing else is granted: a leaf that was killed beside others runs by itself.
19
+ */
20
+ /**
21
+ * What a queued request asks: whole tokens, at least one, its charge in bytes (0 for a task with no peak), and the
22
+ * tokens that charge was measured under. Without them the charge is flat: it is the same however many tokens are lent.
12
23
  */
13
- /** What a queued request asks: whole tokens, at least one, and its charge in bytes (0 for a task with no peak). */
14
24
  export interface PoolAsk {
15
25
  readonly want: number;
16
26
  readonly memory: number;
27
+ readonly parallelism?: number | undefined;
28
+ /** A leaf the kernel killed for memory, run again: granted while nothing else holds a grant, and alone. */
29
+ readonly alone?: boolean | undefined;
30
+ }
31
+ /** Who holds a grant when the pool decides: how many leaves, and whether one of them runs alone. */
32
+ export interface Holding {
33
+ readonly holders: number;
34
+ readonly alone: boolean;
17
35
  }
18
36
  /** The run's memory a pool charges against, and the bytes its holders are charged; null for a pool that charges none. */
19
37
  export interface MemoryLedger {
20
38
  readonly capacity: number;
21
39
  readonly held: number;
22
40
  }
23
- /** One request's grant: the request, its tokens, and whether its charge alone exceeds the run's memory. */
41
+ /**
42
+ * One request's grant: the request, its tokens, the bytes it is charged at those tokens, and whether its charge alone
43
+ * exceeds the run's memory.
44
+ */
24
45
  export interface PoolGrant<Ask extends PoolAsk> {
25
46
  readonly request: Ask;
26
47
  readonly tokens: number;
48
+ readonly charge: number;
27
49
  readonly oversized: boolean;
28
50
  }
29
51
  /**
30
52
  * The grants of the queue's first requests, in its order, and what the first request left waiting waits for: free
31
- * tokens (`cpu`) or the run's memory (`memory`). `waiting` is null when every request was granted.
53
+ * tokens (`cpu`), the run's memory (`memory`) or the grants others hold (`alone`). `waiting` is null when every request was granted.
32
54
  */
33
55
  export interface Admission<Ask extends PoolAsk> {
34
56
  readonly grants: readonly PoolGrant<Ask>[];
35
- readonly waiting: 'cpu' | 'memory' | null;
57
+ readonly waiting: 'cpu' | 'memory' | 'alone' | null;
36
58
  }
37
- export declare function admit<Ask extends PoolAsk>(queue: readonly Ask[], available: number, memory: MemoryLedger | null): Admission<Ask>;
59
+ /** The bytes `ask` is charged when it is lent `tokens`: its peak, scaled up when that is more than it was measured under. */
60
+ export declare function chargeAt(ask: PoolAsk, tokens: number): number;
61
+ export declare function admit<Ask extends PoolAsk>(queue: readonly Ask[], available: number, memory: MemoryLedger | null, holding?: Holding): Admission<Ask>;
38
62
  //# sourceMappingURL=pool-admission.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pool-admission.d.ts","sourceRoot":"","sources":["../../../src/executors/bounded-exec/pool-admission.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,mHAAmH;AACnH,M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ED,oGAAoG;AACpG,MAAM,WAAW,OAAO;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;CACzB;AAGD,yHAAyH;AACzH,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED;;;GAGG;AACH,MAAM,WAAW,SAAS,CAAC,GAAG,SAAS,OAAO;IAC5C,QAAQ,CAAC,OAAO,EAAE,GAAG,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;CAC7B;AAED;;;GAGG;AACH,MAAM,WAAW,SAAS,CAAC,GAAG,SAAS,OAAO;IAC5C,QAAQ,CAAC,MAAM,EAAE,SAAS,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC;IAC3C,QAAQ,CAAC,OAAO,EAAE,KAAK,GAAG,QAAQ,GAAG,OAAO,GAAG,IAAI,CAAC;CACrD;AAED,6HAA6H;AAC7H,wBAAgB,QAAQ,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAG7D;AAcD,wBAAgB,KAAK,CAAC,GAAG,SAAS,OAAO,EACvC,KAAK,EAAE,SAAS,GAAG,EAAE,EACrB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,YAAY,GAAG,IAAI,EAC3B,OAAO,GAAE,OAAsB,GAC9B,SAAS,CAAC,GAAG,CAAC,CA8BhB"}
@@ -7,25 +7,61 @@
7
7
  * Every grant needs both. The head takes `min(want, free)` tokens once one is free, and only while the charges of the
8
8
  * leaves holding grants plus its own fit the run's memory; a head that cannot be granted holds up every request behind
9
9
  * it, and no request holds part of a grant while it waits for the rest. A leaf is charged its task's last recorded
10
- * memory peak, and nothing while its task has none. A leaf whose own charge alone exceeds the run's memory could never
11
- * fit, so it is granted once nothing else holds memory, and the grant says so.
10
+ * memory peak, and nothing while its task has none. A runner's memory grows with the parallelism it is lent (a Vitest
11
+ * worker is a process of its own), so a peak measured while the leaf was lent `parallelism` tokens is charged in
12
+ * proportion to the tokens it is lent now when that is more, never less: the baseline a leaf holds however few workers
13
+ * it has makes a smaller grant no cheaper. When its whole ask does not fit, the head is lent the most tokens whose
14
+ * charge does. A leaf whose own charge alone exceeds the run's memory could never fit, so it is granted once nothing
15
+ * else holds memory, on one token when its peak names the parallelism it was measured under, and the grant says so.
16
+ *
17
+ * A leaf the kernel killed for memory, run again (`alone`), is granted only while nothing holds a grant, ahead of the
18
+ * leaves behind it, and while it runs nothing else is granted: a leaf that was killed beside others runs by itself.
12
19
  */
13
- export function admit(queue, available, memory) {
20
+ const NOTHING_HELD = { holders: 0, alone: false };
21
+ /** The bytes `ask` is charged when it is lent `tokens`: its peak, scaled up when that is more than it was measured under. */
22
+ export function chargeAt(ask, tokens) {
23
+ const measured = ask.parallelism;
24
+ return measured === undefined || tokens <= measured ? ask.memory : Math.ceil((ask.memory * tokens) / measured);
25
+ }
26
+ /** The most tokens, up to `most`, whose charge fits `room` bytes; none when even the peak itself does not. */
27
+ function tokensFitting(ask, most, room) {
28
+ if (ask.memory > room) {
29
+ return 0;
30
+ }
31
+ const measured = ask.parallelism;
32
+ if (measured === undefined || ask.memory === 0 || most <= measured) {
33
+ return most;
34
+ }
35
+ return Math.min(most, Math.floor((room * measured) / ask.memory));
36
+ }
37
+ export function admit(queue, available, memory, holding = NOTHING_HELD) {
14
38
  const grants = [];
39
+ if (holding.alone) {
40
+ return { grants, waiting: queue.length === 0 ? null : 'alone' };
41
+ }
15
42
  let free = available;
16
43
  let held = memory?.held ?? 0;
17
44
  for (const request of queue) {
45
+ if (request.alone === true && holding.holders + grants.length > 0) {
46
+ return { grants, waiting: 'alone' };
47
+ }
18
48
  const oversized = memory !== null && request.memory > memory.capacity;
19
- if (memory !== null && held + request.memory > memory.capacity && !(oversized && held === 0)) {
49
+ const room = memory === null ? Number.POSITIVE_INFINITY : memory.capacity - held;
50
+ if (request.memory > room && !(oversized && held === 0)) {
20
51
  return { grants, waiting: 'memory' };
21
52
  }
22
- const tokens = Math.min(request.want, free);
23
- if (tokens === 0) {
53
+ const most = Math.min(request.want, free);
54
+ if (most === 0) {
24
55
  return { grants, waiting: 'cpu' };
25
56
  }
57
+ const tokens = oversized ? (request.parallelism === undefined ? most : 1) : tokensFitting(request, most, room);
58
+ const charge = chargeAt(request, tokens);
26
59
  free -= tokens;
27
- held += request.memory;
28
- grants.push({ request, tokens, oversized });
60
+ held += charge;
61
+ grants.push({ request, tokens, charge, oversized });
62
+ if (request.alone === true) {
63
+ return { grants, waiting: grants.length < queue.length ? 'alone' : null };
64
+ }
29
65
  }
30
66
  return { grants, waiting: null };
31
67
  }
@@ -0,0 +1,25 @@
1
+ /**
2
+ * What a CPU pool puts in a command's environment (cpu-pool.ts serves the pool; this module decides what the command
3
+ * sees of it, so it is keyed: executors.json lists cpu-pool.js as output-neutral, which it may only be while it writes
4
+ * no variable the command reads).
5
+ */
6
+ /** The environment name a child reads its parent's pool endpoint from; its count is `CPU_TOKENS_ENV`. */
7
+ export declare const CPU_POOL_ENV = "BOUNDED_EXEC_CPU_POOL";
8
+ /** An inherited pool descriptor; only a grant from its endpoint proves a live allocation. */
9
+ export interface InheritedCpuPool {
10
+ readonly socket: string;
11
+ /** The count the parent names beside its endpoint. */
12
+ readonly tokens: number;
13
+ }
14
+ /**
15
+ * The inherited descriptor, or null when malformed or absent. A missing or bare count, or an empty
16
+ * or NUL-bearing endpoint, proves no allocation; the count is a positive whole number. A valid
17
+ * descriptor still needs a live endpoint grant.
18
+ */
19
+ export declare function readInheritedCpuPool(environment: Readonly<NodeJS.ProcessEnv>): InheritedCpuPool | null;
20
+ /**
21
+ * The environment a child of a pool inherits to reach it: its endpoint, the count the pool holds, and its make
22
+ * jobserver, which Cargo and make read from the fifo; `-j` with a jobserver names no count of its own.
23
+ */
24
+ export declare function poolEnvironment(socketPath: string, tokens: number, fifoPath: string): Record<string, string>;
25
+ //# sourceMappingURL=pool-environment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pool-environment.d.ts","sourceRoot":"","sources":["../../../src/executors/bounded-exec/pool-environment.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AAEH,yGAAyG;AACzG,eAAO,MAAM,YAAY,0BAA0B,CAAC;AAEpD,6FAA6F;AAC7F,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,sDAAsD;IACtD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,UAAU,CAAC,GAAG,gBAAgB,GAAG,IAAI,CAOtG;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAQ5G"}
@@ -0,0 +1,34 @@
1
+ import { CPU_TOKENS_ENV, parseInheritedTokens } from './runner-sizing.js';
2
+ /**
3
+ * What a CPU pool puts in a command's environment (cpu-pool.ts serves the pool; this module decides what the command
4
+ * sees of it, so it is keyed: executors.json lists cpu-pool.js as output-neutral, which it may only be while it writes
5
+ * no variable the command reads).
6
+ */
7
+ /** The environment name a child reads its parent's pool endpoint from; its count is `CPU_TOKENS_ENV`. */
8
+ export const CPU_POOL_ENV = 'BOUNDED_EXEC_CPU_POOL';
9
+ /**
10
+ * The inherited descriptor, or null when malformed or absent. A missing or bare count, or an empty
11
+ * or NUL-bearing endpoint, proves no allocation; the count is a positive whole number. A valid
12
+ * descriptor still needs a live endpoint grant.
13
+ */
14
+ export function readInheritedCpuPool(environment) {
15
+ const socket = environment[CPU_POOL_ENV];
16
+ const tokens = parseInheritedTokens(environment[CPU_TOKENS_ENV]);
17
+ if (socket === undefined || socket.length === 0 || socket.includes('\0') || tokens === null) {
18
+ return null;
19
+ }
20
+ return { socket, tokens };
21
+ }
22
+ /**
23
+ * The environment a child of a pool inherits to reach it: its endpoint, the count the pool holds, and its make
24
+ * jobserver, which Cargo and make read from the fifo; `-j` with a jobserver names no count of its own.
25
+ */
26
+ export function poolEnvironment(socketPath, tokens, fifoPath) {
27
+ const jobserverFlags = `-j --jobserver-auth=fifo:${fifoPath}`;
28
+ return {
29
+ [CPU_POOL_ENV]: socketPath,
30
+ [CPU_TOKENS_ENV]: String(tokens),
31
+ CARGO_MAKEFLAGS: jobserverFlags,
32
+ MAKEFLAGS: jobserverFlags,
33
+ };
34
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"run-cpu-pool.d.ts","sourceRoot":"","sources":["../../../src/executors/bounded-exec/run-cpu-pool.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,yBAAyB,EAAE,wBAAwB,EAAE,MAAM,4CAA4C,CAAC;AAGtH,OAAO,EAAE,KAAK,gBAAgB,EAAsC,MAAM,kBAAkB,CAAC;AAqD7F;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,QAAQ,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAM5F;AAED;;;;;GAKG;AACH,wBAAsB,eAAe,CACnC,OAAO,EAAE,IAAI,CAAC,wBAAwB,EAAE,IAAI,CAAC,EAC7C,GAAG,GAAE,MAAM,CAAC,UAAwB,EACpC,KAAK,GAAE,MAA+B,EACtC,UAAU,GAAE,MAAM,OAAO,CAAC,gBAAgB,CAAiB,GAC1D,OAAO,CAAC,IAAI,CAAC,CAoBf;AAoED,uEAAuE;AACvE,wBAAsB,eAAe,CAAC,OAAO,EAAE,IAAI,CAAC,yBAAyB,EAAE,IAAI,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAUnG"}
1
+ {"version":3,"file":"run-cpu-pool.d.ts","sourceRoot":"","sources":["../../../src/executors/bounded-exec/run-cpu-pool.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,yBAAyB,EAAE,wBAAwB,EAAE,MAAM,4CAA4C,CAAC;AAGtH,OAAO,EAAkB,KAAK,gBAAgB,EAAsC,MAAM,kBAAkB,CAAC;AAsD7G;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,QAAQ,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAM5F;AAED;;;;;GAKG;AACH,wBAAsB,eAAe,CACnC,OAAO,EAAE,IAAI,CAAC,wBAAwB,EAAE,IAAI,CAAC,EAC7C,GAAG,GAAE,MAAM,CAAC,UAAwB,EACpC,KAAK,GAAE,MAA+B,EACtC,UAAU,GAAE,MAAM,OAAO,CAAC,gBAAgB,CAAiB,GAC1D,OAAO,CAAC,IAAI,CAAC,CAoBf;AAoED,uEAAuE;AACvE,wBAAsB,eAAe,CAAC,OAAO,EAAE,IAAI,CAAC,yBAAyB,EAAE,IAAI,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAUnG"}
@@ -2,9 +2,9 @@ import { availableParallelism } from 'node:os';
2
2
  import { fileURLToPath } from 'node:url';
3
3
  import { Worker } from 'node:worker_threads';
4
4
  import { logger } from 'nx/src/devkit-exports.js';
5
- import { readInheritedCpuPool } from './cpu-pool.js';
6
5
  import { RunMemoryUnreadable, readRunMemory } from './host-memory.js';
7
6
  import { mbxPool } from './mbx-pool.js';
7
+ import { readInheritedCpuPool } from './pool-environment.js';
8
8
  import { CPU_TOKENS_ENV, parseInheritedTokens } from './runner-sizing.js';
9
9
  /**
10
10
  * The CPU pool of an Nx run (specs/cowshed/05_gateway.md, "Host scheduling", "Parallelism inside a job", "Every Nx run
@@ -70,7 +70,7 @@ export async function serveRunCpuPool(context, env = process.env, cores = availa
70
70
  if (!memory.ok) {
71
71
  throw new RunMemoryUnreadable(memory.error);
72
72
  }
73
- const served = await servePoolThread(tokens, memory.memory.bytes);
73
+ const served = await servePoolThread(tokens, memory.memory);
74
74
  if (!served.ok) {
75
75
  logger.warn(`bounded-exec: this run's CPU pool failed (${served.error}); its tasks are sized only by the ceilings they inherit`);
76
76
  return;
@@ -1,3 +1,4 @@
1
+ import type { CpuGrantRecord } from './cpu-grant.js';
1
2
  import type { CpuWaitRow } from './lease-wait.js';
2
3
  import { type LockWait } from './lock-wait.js';
3
4
  import type { MbxQueuedRequest } from './mbx-queue.js';
@@ -90,14 +91,11 @@ export interface BoundedExecRecord {
90
91
  readonly verdict: BoundedExecVerdict;
91
92
  /**
92
93
  * The parent CPU pool's grant the run started under: tokens granted of those asked for, and
93
- * how long it waited for the pool. Absent when it ran ungranted; written for the reader of a slow
94
- * run, never read back.
94
+ * how long it waited for the pool. Absent when it ran ungranted. Its tokens are the parallelism the run's
95
+ * `peakBytes` was measured under, which the task's next run reads (`readLastPeak`, peak-charge.ts) to charge that peak in proportion
96
+ * to the parallelism it is lent.
95
97
  */
96
- readonly cpu?: {
97
- readonly tokens: number;
98
- readonly want: number;
99
- readonly waitedMs: number;
100
- };
98
+ readonly cpu?: CpuGrantRecord;
101
99
  /**
102
100
  * The parent CPU pool's wait that expired and refused the run: its code, bound and elapsed time, the last heartbeat
103
101
  * sequence it read, and the pool's socket and pid (specs/cowshed/05_gateway.md, "Deadlines"). Absent when no wait
@@ -230,17 +228,6 @@ export declare function clearTaskDirectory(directory: string): Promise<void>;
230
228
  export declare function writeRecord(directory: string, record: BoundedExecRecord): Promise<void>;
231
229
  /** The record in `directory`, or `null` when there is none. A malformed record throws. */
232
230
  export declare function readRecord(directory: string): Promise<BoundedExecRecord | null>;
233
- /**
234
- * The peak the task's last record in `directory` names: its charge in its run's pool. Null when the task has no record
235
- * or its record no peak; a record that cannot be read is an error naming it, never a charge of nothing.
236
- */
237
- export declare function readLastPeak(directory: string): Promise<{
238
- ok: true;
239
- peakBytes: number | null;
240
- } | {
241
- ok: false;
242
- error: string;
243
- }>;
244
231
  /** The JUnit report a command wrote into `directory`, or `null` when it wrote none. */
245
232
  export declare function readJunitReport(directory: string, bunClosed?: (results: readonly NativeTestResult[]) => void): Promise<JunitFailures | null>;
246
233
  /** A failed task of an Nx run, and whether its bounded-exec record shows only a bound. */
@@ -1 +1 @@
1
- {"version":3,"file":"verdict.d.ts","sourceRoot":"","sources":["../../../src/executors/bounded-exec/verdict.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAmB,KAAK,QAAQ,EAAe,MAAM,gBAAgB,CAAC;AAC7E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAGhE;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,MAAM,kBAAkB,GAC1B;IAAE,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAA;CAAE,GAC9B,CAAC;IAAE,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GAAG,kBAAkB,CAAC,GAChF;IACE,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,SAAS,CAAC;IACpC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B,GACD;IAAE,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,GACxF;IACE,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC;IAC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,eAAe,CAAC,QAAQ,EAAE,eAAe,GAAG,MAAM,CAgBjE"}
@@ -1,6 +1,7 @@
1
1
  import { mkdir, readFile, rename, rm, writeFile } from 'node:fs/promises';
2
2
  import { join } from 'node:path';
3
3
  import typia from 'typia';
4
+ import { parseCpuGrant } from './cpu-grant.js';
4
5
  import { describeHolders } from './lock-wait.js';
5
6
  import { TEST_FAILURES_FILE, TEST_RESULTS_FILE } from './test-results.js';
6
7
  const isQueuedVerdict = (() => {
@@ -321,21 +322,6 @@ export async function readRecord(directory) {
321
322
  }
322
323
  return parseRecord(JSON.parse(text));
323
324
  }
324
- /**
325
- * The peak the task's last record in `directory` names: its charge in its run's pool. Null when the task has no record
326
- * or its record no peak; a record that cannot be read is an error naming it, never a charge of nothing.
327
- */
328
- export async function readLastPeak(directory) {
329
- try {
330
- return { ok: true, peakBytes: (await readRecord(directory))?.peakBytes ?? null };
331
- }
332
- catch (error) {
333
- return {
334
- ok: false,
335
- error: `the task's last record ${join(directory, VERDICT_FILE)} cannot be read: ${error instanceof Error ? error.message : String(error)}`,
336
- };
337
- }
338
- }
339
325
  /** The JUnit report a command wrote into `directory`, or `null` when it wrote none. */
340
326
  export async function readJunitReport(directory, bunClosed) {
341
327
  try {
@@ -361,7 +347,17 @@ function parseRecord(value) {
361
347
  if (!(peakBytes === null || (typeof peakBytes === 'number' && Number.isSafeInteger(peakBytes) && peakBytes >= 0))) {
362
348
  throw new Error(`not a bounded-exec record: ${JSON.stringify(value)}`);
363
349
  }
364
- return { task: value.task, hash: value.hash, verdict: parseVerdict(value.verdict), peakBytes };
350
+ const cpu = parseCpuGrant(value.cpu);
351
+ if (cpu === 'malformed') {
352
+ throw new Error(`not a bounded-exec record: ${JSON.stringify(value)}`);
353
+ }
354
+ return {
355
+ task: value.task,
356
+ hash: value.hash,
357
+ verdict: parseVerdict(value.verdict),
358
+ ...(cpu === undefined ? {} : { cpu }),
359
+ peakBytes,
360
+ };
365
361
  }
366
362
  function parseVerdict(value) {
367
363
  if (isObject(value)) {
package/dist/index.d.ts CHANGED
@@ -43,7 +43,10 @@ export declare const createNodesV2: CreateNodesV2;
43
43
  */
44
44
  export declare const preTasksExecution: PreTasksExecution<ProducerReceiptsOptions>;
45
45
  export declare const postTasksExecution: PostTasksExecution<ProducerReceiptsOptions>;
46
- /** The lock-scope nodes' edges: each bun node's to the packages and members its manifest resolves. */
46
+ /**
47
+ * The lock-scope nodes' edges: each bun node's to the packages and members its manifest resolves; and, for a workspace
48
+ * that names built-output packages, the lockfile's package edges (`built-output-packages.ts`).
49
+ */
47
50
  export declare const createDependencies: CreateDependencies;
48
51
  /** Nx invokes this only after merging inferred/declarative targets and every plugin's project dependencies. */
49
52
  export declare const createMetadata: CreateMetadata;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAWA,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,cAAc,EAGnB,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EAGtB,KAAK,mBAAmB,EACzB,MAAM,0BAA0B,CAAC;AAoElC,OAAO,EACL,KAAK,uBAAuB,EAG7B,MAAM,wBAAwB,CAAC;AAoBhC,gEAAgE;AAChE,eAAO,MAAM,aAAa,WAAW,CAAC;AACtC,uEAAuE;AACvE,eAAO,MAAM,mBAAmB,iBAAiB,CAAC;AAiclD;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,CAMtE;AA4aD;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAC/B,aAAa,EAAE,MAAM,EACrB,qBAAqB,UAAkC,GACtD,OAAO,CAoBT;AACD;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,mBAAmB,EAC3B,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,OAAO,GACjB,MAAM,EAAE,CAKV;AA6ID,wBAAgB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