@descryy/runtime-controller 0.2.1 → 0.3.1

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 (66) hide show
  1. package/LICENSE +6 -0
  2. package/dist/attach-fencing.d.ts +109 -0
  3. package/dist/attach-fencing.d.ts.map +1 -0
  4. package/dist/attach-fencing.js +215 -0
  5. package/dist/attach-fencing.js.map +1 -0
  6. package/dist/capability-registry.d.ts +0 -15
  7. package/dist/capability-registry.d.ts.map +1 -1
  8. package/dist/capability-registry.js +9 -19
  9. package/dist/capability-registry.js.map +1 -1
  10. package/dist/collector-version.d.ts +1 -8
  11. package/dist/collector-version.d.ts.map +1 -1
  12. package/dist/collector-version.js +1 -8
  13. package/dist/collector-version.js.map +1 -1
  14. package/dist/container-sandbox.d.ts +66 -150
  15. package/dist/container-sandbox.d.ts.map +1 -1
  16. package/dist/container-sandbox.js +62 -143
  17. package/dist/container-sandbox.js.map +1 -1
  18. package/dist/controller.d.ts +49 -106
  19. package/dist/controller.d.ts.map +1 -1
  20. package/dist/controller.js +65 -123
  21. package/dist/controller.js.map +1 -1
  22. package/dist/dependency-version-check.d.ts +19 -73
  23. package/dist/dependency-version-check.d.ts.map +1 -1
  24. package/dist/dependency-version-check.js +18 -67
  25. package/dist/dependency-version-check.js.map +1 -1
  26. package/dist/env.d.ts +4 -10
  27. package/dist/env.d.ts.map +1 -1
  28. package/dist/env.js +4 -10
  29. package/dist/env.js.map +1 -1
  30. package/dist/environment-metadata.d.ts +9 -17
  31. package/dist/environment-metadata.d.ts.map +1 -1
  32. package/dist/environment-metadata.js +12 -29
  33. package/dist/environment-metadata.js.map +1 -1
  34. package/dist/environment-version-check.d.ts +22 -65
  35. package/dist/environment-version-check.d.ts.map +1 -1
  36. package/dist/environment-version-check.js +24 -66
  37. package/dist/environment-version-check.js.map +1 -1
  38. package/dist/execution-safety.d.ts +54 -112
  39. package/dist/execution-safety.d.ts.map +1 -1
  40. package/dist/execution-safety.js +48 -102
  41. package/dist/execution-safety.js.map +1 -1
  42. package/dist/index.d.ts +2 -10
  43. package/dist/index.d.ts.map +1 -1
  44. package/dist/index.js +1 -0
  45. package/dist/index.js.map +1 -1
  46. package/dist/orchestration.d.ts +24 -39
  47. package/dist/orchestration.d.ts.map +1 -1
  48. package/dist/orchestration.js +39 -75
  49. package/dist/orchestration.js.map +1 -1
  50. package/dist/process-collector.d.ts +8 -22
  51. package/dist/process-collector.d.ts.map +1 -1
  52. package/dist/process-collector.js +23 -55
  53. package/dist/process-collector.js.map +1 -1
  54. package/dist/process-manager.d.ts +65 -80
  55. package/dist/process-manager.d.ts.map +1 -1
  56. package/dist/process-manager.js +80 -103
  57. package/dist/process-manager.js.map +1 -1
  58. package/dist/readiness.d.ts +28 -70
  59. package/dist/readiness.d.ts.map +1 -1
  60. package/dist/readiness.js +73 -95
  61. package/dist/readiness.js.map +1 -1
  62. package/dist/sandbox.d.ts +60 -105
  63. package/dist/sandbox.d.ts.map +1 -1
  64. package/dist/sandbox.js +78 -121
  65. package/dist/sandbox.js.map +1 -1
  66. package/package.json +8 -3
@@ -1,11 +1,8 @@
1
1
  /**
2
- * Runtime controller (plan §4, §5, §6; plan §45's "Core" bucket: runtime
3
- * controller, execution IDs, process lifecycle, readiness, timeout
4
- * handling, cleanup, configuration). Owns Execution lifecycle, spawns every
5
- * service declared in configuration, waits for each one's real readiness
6
- * (never "process exists"), and guarantees cleanup — including on partial
7
- * or total failure and on timeout. Builds no collectors and knows nothing
8
- * about any specific language or framework (plan principle 8).
2
+ * Runtime controller (§4/§5/§6/§45 "Core"). Owns Execution lifecycle, spawns every
3
+ * configured service, waits for each one's real readiness (never "process exists"),
4
+ * guarantees cleanup on partial/total failure and timeout. Knows nothing about any
5
+ * specific language or framework (principle 8).
9
6
  */
10
7
  import { type Execution, type ProcessHandle } from "@descryy/runtime-contracts";
11
8
  import { type ReadinessCheck, type ReadinessResult } from "./readiness.ts";
@@ -23,17 +20,13 @@ export interface ServiceReadinessSpec {
23
20
  readonly timeoutMs: number;
24
21
  }
25
22
  export interface RunOptions {
26
- /** One entry required per key in `configuration.services` — RT-032 refuses rather than default a missing one to "spawn success is enough" (RT-024's own rule, applied per service). */
23
+ /** One entry required per key in `configuration.services` -- refuses rather than defaulting a missing one to "spawn success is enough" (RT-024/RT-032). */
27
24
  readonly readiness: Readonly<Record<string, ServiceReadinessSpec>>;
28
25
  /**
29
- * Optional live observer for `ProcessLifecycleEvent`. Called synchronously
30
- * at each transition, in order, for the lifetime of this execution
31
- * (including after `run()` itself has returned, for a service that exits
32
- * later). A throwing observer is not caught here — the same "must not
33
- * hang, may not silently swallow its own failure" discipline `Collector`
34
- * already imposes on every callback shape in this repo; a caller wiring a
35
- * `ProcessCollector`'s emit path in here that itself throws deserves to
36
- * see that, not have it disappear into a promise this module owns.
26
+ * Optional live observer for `ProcessLifecycleEvent`, called synchronously at each
27
+ * transition for the lifetime of this execution (including after `run()` returns).
28
+ * A throwing observer is not caught here -- same "must not hang, may not silently
29
+ * swallow its own failure" discipline `Collector` imposes on every callback here.
37
30
  */
38
31
  readonly onProcessLifecycleEvent?: (event: ProcessLifecycleEvent) => void;
39
32
  }
@@ -41,31 +34,20 @@ export interface ServiceStartResult {
41
34
  readonly serviceName: string;
42
35
  readonly stage: "spawn" | "readiness" | "not-attempted";
43
36
  readonly succeeded: boolean;
44
- /** Set when `stage === "readiness"`. RT-024/RT-031 apply to each entry independently — N of these is N liveness claims about N addresses, never a joint identity proof. */
37
+ /** Set when `stage === "readiness"`. RT-024/RT-031 apply per entry -- N of these is N liveness claims, never a joint identity proof. */
45
38
  readonly readiness: ReadinessResult | null;
46
39
  /** Set when `stage === "spawn"` and spawning itself threw. */
47
40
  readonly error: string | null;
48
41
  }
49
42
  /**
50
- * Fires at the exact moments `run()` itself observes a service's process
51
- * lifecycle — spawned, readiness settled (either way), reaped. This is a
52
- * pure notification channel: `ExecutionController` stays exactly as
53
- * ignorant of Evidence/Collector as its own module doc already claims
54
- * ("knows nothing about any specific language or framework") — nothing
55
- * here decides whether a lifecycle transition becomes Evidence, only that
56
- * a caller who wants to know *when* one happened, live, has a way to ask
57
- * that isn't "reconstruct it later from `Execution.processes`."
43
+ * Fires at the exact moments `run()` observes a service's lifecycle -- spawned,
44
+ * readiness settled either way, reaped. A pure notification channel; nothing here
45
+ * decides whether a transition becomes Evidence.
58
46
  *
59
- * That reconstruction is precisely what doesn't work for the case this
60
- * exists to make observable: `Execution.processes` and
61
- * `ServiceStartResults` are only complete once `run()` has already
62
- * returned, but a service that is spawned, then *running* (READY reached),
63
- * has not exited yet at that point — its own eventual `process-exited`
64
- * event lies in the future relative to `run()` resolving. A consumer that
65
- * only reads the final `Execution` after `run()` settles can see "started"
66
- * and "ready" (or "ready-failed") for every service, but can never see
67
- * "exited" for one still healthy when `run()` returned — only this live
68
- * channel can.
47
+ * Needed because `Execution.processes`/`ServiceStartResults` are only complete once
48
+ * `run()` returns, but a service still running when `run()` resolves hasn't exited
49
+ * yet -- its eventual `process-exited` lies in the future. Only this live channel
50
+ * can observe that exit; reading the final `Execution` later cannot.
69
51
  */
70
52
  export type ProcessLifecycleEvent = {
71
53
  readonly kind: "process-started";
@@ -83,19 +65,11 @@ export type ProcessLifecycleEvent = {
83
65
  readonly readiness: ReadinessResult;
84
66
  }
85
67
  /**
86
- * `phase` distinguishes "this service's own readiness had not yet
87
- * succeeded when it exited" (`"starting"`) from "it had already reached
88
- * READY at least once" (`"running"`) — the process-level echo of
89
- * `FAILED_START` vs `FAILED` on `ExecutionState` itself (§30). Without
90
- * it, `PROCESS_EXITED` alone cannot tell "crashed on boot" from
91
- * "finished/was stopped after running successfully," which collapses
92
- * exactly the distinction the execution lifecycle already exists to
93
- * carry. Computed from THIS service's own readiness history, not from
94
- * `Execution.state` at the moment of exit — a crash mid-readiness-poll
95
- * fires before `run()` has itself observed the failure and moved the
96
- * execution to `FAILED_START`, so reading execution state at exit time
97
- * would misreport `"starting"` as whatever the execution's not-yet-
98
- * updated state still says.
68
+ * `phase` distinguishes "readiness hadn't yet succeeded when it exited"
69
+ * (`"starting"`) from "had already reached READY" (`"running"`) -- the
70
+ * process-level echo of `FAILED_START` vs `FAILED` (§30). Computed from this
71
+ * service's own readiness history, not `Execution.state` at exit time -- a crash
72
+ * mid-readiness-poll fires before the execution's own state has caught up.
99
73
  */
100
74
  | {
101
75
  readonly kind: "process-exited";
@@ -103,82 +77,51 @@ export type ProcessLifecycleEvent = {
103
77
  readonly handle: ProcessHandle;
104
78
  readonly phase: "starting" | "running";
105
79
  };
106
- /**
107
- * `run()`'s timeout timer and a caller's `stop()`/`cancel()` can both
108
- * attempt to move a finishing execution to a terminal state at nearly the
109
- * same instant. Every transition attempted after an `await` goes through
110
- * `#tryTransition` (returns false instead of throwing) rather than the
111
- * throwing `#transition`, so whichever path loses the race degrades to a
112
- * no-op instead of an unhandled rejection from a fire-and-forget timer
113
- * callback.
114
- */
115
80
  export declare class ExecutionController {
116
81
  #private;
117
82
  private constructor();
118
83
  static create(input: CreateExecutionInput): ExecutionController;
119
84
  get execution(): Execution;
120
- /** One entry per service configured, in spawn order — including services never attempted because an earlier one failed (`stage: "not-attempted"`). Empty before `run()` returns its first result. */
85
+ /** One entry per configured service, in spawn order, including never-attempted ones (`stage: "not-attempted"`). Empty until `run()` returns its first result. */
121
86
  get serviceStartResults(): readonly ServiceStartResult[];
122
- /** Non-null only when `run()` refused before spawning anything — a bad `dependsOn` reference, a cycle, an undeclared placeholder dependency, or a service with no matching `RunOptions.readiness` entry. */
87
+ /** Non-null only when `run()` refused before spawning anything. */
123
88
  get validationError(): string | null;
124
89
  /** Combined stdout+stderr of the named service's process so far, or "" if it was never spawned. */
125
90
  readProcessOutput(serviceName: string): string;
126
91
  /**
127
- * Starts every service in `configuration.services`, in the dependency
128
- * order `validateServicesConfiguration` computes — spawned, each on its
129
- * own ephemeral port unless it opts into a fixed one, or attached to
130
- * (`service.attach`, `attachManagedProcess`) when it names an already-
131
- * running pid/log file instead of a `command`. Reaches RUNNING only if
132
- * every service starts and reaches its own readiness. On the first
133
- * failure (spawn/attach throw, or readiness never succeeding), every
134
- * already-started service is killed in reverse order (a no-op for an
135
- * attached one — see `attachManagedProcess`'s own doc) and every
136
- * not-yet-attempted service is recorded as such — a caller can always
137
- * tell "never tried" from "tried and failed" via `serviceStartResults`.
92
+ * Starts every service in dependency order, spawned (each on its own ephemeral
93
+ * port unless fixed) or attached (`service.attach`, for an already-running
94
+ * pid/log file). Reaches RUNNING only if every service starts and reaches
95
+ * readiness. On first failure, every started service is killed in reverse order
96
+ * (no-op for attached ones) and remaining services are recorded "not-attempted" --
97
+ * `serviceStartResults` always distinguishes "never tried" from "tried and failed".
138
98
  *
139
- * Configuration itself is validated first, atomically: a bad `dependsOn`
140
- * reference, a cycle, an undeclared placeholder dependency, a service
141
- * declaring neither or both of `command`/`attach`, or a missing
142
- * `RunOptions.readiness` entry refuses before anything is spawned, never
143
- * discovered mid-sequence with other services already running.
99
+ * Configuration is validated atomically first -- a bad `dependsOn`, a cycle, an
100
+ * undeclared placeholder, ambiguous `command`/`attach`, or a missing readiness
101
+ * entry refuses before anything spawns.
144
102
  *
145
- * Every **spawned** service receives `PORT` (its own resolved port,
146
- * ephemeral or fixed) in its environment unconditionally, on top of
147
- * `service.env` — a service has no other way to learn the port RT-024
148
- * chose for it. This is a real, load-bearing convention (matches
149
- * `broken-invoices`'s fixture apps), not an implementation detail: a
150
- * `ServiceConfiguration` whose command reads its listen port from
151
- * anywhere other than `PORT` will not be reachable through readiness
152
- * checks built from the same `port` this function resolves. An
153
- * **attached** service receives no env and no port allocation — it is
154
- * already running on whatever port it bound at its own launch, and
155
- * `service.port` (when the caller supplies it) is a declaration of that
156
- * fact, not a request this function can act on.
103
+ * Every **spawned** service gets `PORT` (its resolved port) unconditionally --
104
+ * load-bearing (matches the fixture apps), not incidental: a command reading its
105
+ * port from anywhere else won't be reachable via readiness checks built from the
106
+ * same `port`. An **attached** service gets no env/port allocation -- it's already
107
+ * running on whatever it bound at launch.
157
108
  */
158
109
  run(options: RunOptions): Promise<Execution>;
159
110
  stop(): Promise<Execution>;
160
111
  /**
161
- * Stop everything and record the run as `TIMED_OUT` — the same transition
162
- * `#onTimeout` makes, available to a caller that knows the budget expired
163
- * before this controller's own timer got round to saying so.
164
- *
165
- * **Why a caller needs this, and why `stop()` is wrong for the case.**
166
- * `ExecutionConfiguration.timeoutMs` is a whole-execution budget, and the
167
- * orchestrator clamps its observation window to whatever the budget has left.
168
- * That clamp made `TIMED_OUT` a race: the window ends at the deadline, the
169
- * timer fires a hair later, and whichever of `#onTimeout` and `stop()` gets
170
- * there first decides what the run *says* happened. Measured: the same case
171
- * reported `TIMED_OUT` at 1534ms and `COMPLETED` at 1515ms.
112
+ * Stop everything and record `TIMED_OUT` -- same transition `#onTimeout` makes,
113
+ * for a caller that knows the budget expired before the internal timer noticed.
172
114
  *
173
- * `execution.state` is what `descry-core`'s `observe_runtime` reads to choose
174
- * between `ok` and `timed_out`, so losing that race turns a disclosed
175
- * degradation into a silent one — a run that returns on time and says nothing
176
- * was cut short, which is worse than the overrun it replaced. A caller that
177
- * has already decided it truncated the run should not have to win a race to
178
- * report it.
115
+ * **Why not `stop()`:** the orchestrator clamps its observation window to
116
+ * whatever's left of `timeoutMs`, making `TIMED_OUT` a race between `#onTimeout`
117
+ * and `stop()` at the deadline -- measured: the same case reported `TIMED_OUT` at
118
+ * 1534ms and `COMPLETED` at 1515ms. `execution.state` is what `observe_runtime`
119
+ * reads to choose `ok` vs `timed_out`, so losing that race silently hides a real
120
+ * cutoff. A caller that already decided it truncated the run shouldn't have to
121
+ * win a race to report it.
179
122
  *
180
- * Idempotent and terminal-safe, exactly like `cancel()`: if the timer did fire
181
- * first, this returns the execution the timer already finished.
123
+ * Idempotent and terminal-safe like `cancel()`: if the timer fired first, returns
124
+ * the execution it already finished.
182
125
  */
183
126
  timeout(): Promise<Execution>;
184
127
  cancel(): Promise<Execution>;
@@ -1 +1 @@
1
- {"version":3,"file":"controller.d.ts","source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AS,CAEzB;IAED,iKAAiK;IACjK,IAAI,mBAAmB,IAAI,SAAS,kBAAkB,EAAE,CAEvD;IAED,mEAAmE;IACnE,IAAI,eAAe,IAAI,MAAM,GAAG,IAAI,CAEnC;IAED,mGAAmG;IACnG,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM;IA2B9C;;;;;;;;;;;;;;;;;OAiBG;IACG,GAAG,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,SAAS,CAAC;IA+O5C,IAAI,IAAI,OAAO,CAAC,SAAS,CAAC;IAWhC;;;;;;;;;;;;;;OAcG;IACG,OAAO,IAAI,OAAO,CAAC,SAAS,CAAC;IAS7B,MAAM,IAAI,OAAO,CAAC,SAAS,CAAC;CA6CnC"}
@@ -1,11 +1,8 @@
1
1
  /**
2
- * Runtime controller (plan §4, §5, §6; plan §45's "Core" bucket: runtime
3
- * controller, execution IDs, process lifecycle, readiness, timeout
4
- * handling, cleanup, configuration). Owns Execution lifecycle, spawns every
5
- * service declared in configuration, waits for each one's real readiness
6
- * (never "process exists"), and guarantees cleanup — including on partial
7
- * or total failure and on timeout. Builds no collectors and knows nothing
8
- * about any specific language or framework (plan principle 8).
2
+ * Runtime controller (§4/§5/§6/§45 "Core"). Owns Execution lifecycle, spawns every
3
+ * configured service, waits for each one's real readiness (never "process exists"),
4
+ * guarantees cleanup on partial/total failure and timeout. Knows nothing about any
5
+ * specific language or framework (principle 8).
9
6
  */
10
7
  import { randomUUID } from "node:crypto";
11
8
  import { isTerminalExecutionState, isValidExecutionTransition, } from "@descryy/runtime-contracts";
@@ -17,15 +14,10 @@ import { resourceLimitCapability, networkPolicyCapability } from "./execution-sa
17
14
  import { filesystemIsolationCapability, unsupportedNetworkPolicyReason } from "./sandbox.js";
18
15
  import { containerFilesystemIsolationCapability, containerNetworkIsolationCapability, unsupportedContainerNetworkPolicyReason, } from "./container-sandbox.js";
19
16
  import { captureEnvironmentMetadata } from "./environment-metadata.js";
20
- /**
21
- * `run()`'s timeout timer and a caller's `stop()`/`cancel()` can both
22
- * attempt to move a finishing execution to a terminal state at nearly the
23
- * same instant. Every transition attempted after an `await` goes through
24
- * `#tryTransition` (returns false instead of throwing) rather than the
25
- * throwing `#transition`, so whichever path loses the race degrades to a
26
- * no-op instead of an unhandled rejection from a fire-and-forget timer
27
- * callback.
28
- */
17
+ // `run()`'s timeout timer and a caller's stop()/cancel() can race to move a
18
+ // finishing execution to a terminal state. Every transition after an `await` uses
19
+ // `#tryTransition` (returns false) rather than the throwing `#transition`, so the
20
+ // losing path degrades to a no-op instead of an unhandled rejection.
29
21
  export class ExecutionController {
30
22
  #execution;
31
23
  #processes = new Map();
@@ -59,11 +51,11 @@ export class ExecutionController {
59
51
  get execution() {
60
52
  return this.#execution;
61
53
  }
62
- /** One entry per service configured, in spawn order — including services never attempted because an earlier one failed (`stage: "not-attempted"`). Empty before `run()` returns its first result. */
54
+ /** One entry per configured service, in spawn order, including never-attempted ones (`stage: "not-attempted"`). Empty until `run()` returns its first result. */
63
55
  get serviceStartResults() {
64
56
  return this.#serviceStartResults;
65
57
  }
66
- /** Non-null only when `run()` refused before spawning anything — a bad `dependsOn` reference, a cycle, an undeclared placeholder dependency, or a service with no matching `RunOptions.readiness` entry. */
58
+ /** Non-null only when `run()` refused before spawning anything. */
67
59
  get validationError() {
68
60
  return this.#validationError;
69
61
  }
@@ -92,36 +84,22 @@ export class ExecutionController {
92
84
  this.#execution = { ...this.#execution, processes: handles };
93
85
  }
94
86
  /**
95
- * Starts every service in `configuration.services`, in the dependency
96
- * order `validateServicesConfiguration` computes — spawned, each on its
97
- * own ephemeral port unless it opts into a fixed one, or attached to
98
- * (`service.attach`, `attachManagedProcess`) when it names an already-
99
- * running pid/log file instead of a `command`. Reaches RUNNING only if
100
- * every service starts and reaches its own readiness. On the first
101
- * failure (spawn/attach throw, or readiness never succeeding), every
102
- * already-started service is killed in reverse order (a no-op for an
103
- * attached one — see `attachManagedProcess`'s own doc) and every
104
- * not-yet-attempted service is recorded as such — a caller can always
105
- * tell "never tried" from "tried and failed" via `serviceStartResults`.
87
+ * Starts every service in dependency order, spawned (each on its own ephemeral
88
+ * port unless fixed) or attached (`service.attach`, for an already-running
89
+ * pid/log file). Reaches RUNNING only if every service starts and reaches
90
+ * readiness. On first failure, every started service is killed in reverse order
91
+ * (no-op for attached ones) and remaining services are recorded "not-attempted" --
92
+ * `serviceStartResults` always distinguishes "never tried" from "tried and failed".
106
93
  *
107
- * Configuration itself is validated first, atomically: a bad `dependsOn`
108
- * reference, a cycle, an undeclared placeholder dependency, a service
109
- * declaring neither or both of `command`/`attach`, or a missing
110
- * `RunOptions.readiness` entry refuses before anything is spawned, never
111
- * discovered mid-sequence with other services already running.
94
+ * Configuration is validated atomically first -- a bad `dependsOn`, a cycle, an
95
+ * undeclared placeholder, ambiguous `command`/`attach`, or a missing readiness
96
+ * entry refuses before anything spawns.
112
97
  *
113
- * Every **spawned** service receives `PORT` (its own resolved port,
114
- * ephemeral or fixed) in its environment unconditionally, on top of
115
- * `service.env` — a service has no other way to learn the port RT-024
116
- * chose for it. This is a real, load-bearing convention (matches
117
- * `broken-invoices`'s fixture apps), not an implementation detail: a
118
- * `ServiceConfiguration` whose command reads its listen port from
119
- * anywhere other than `PORT` will not be reachable through readiness
120
- * checks built from the same `port` this function resolves. An
121
- * **attached** service receives no env and no port allocation — it is
122
- * already running on whatever port it bound at its own launch, and
123
- * `service.port` (when the caller supplies it) is a declaration of that
124
- * fact, not a request this function can act on.
98
+ * Every **spawned** service gets `PORT` (its resolved port) unconditionally --
99
+ * load-bearing (matches the fixture apps), not incidental: a command reading its
100
+ * port from anywhere else won't be reachable via readiness checks built from the
101
+ * same `port`. An **attached** service gets no env/port allocation -- it's already
102
+ * running on whatever it bound at launch.
125
103
  */
126
104
  async run(options) {
127
105
  this.#transition("STARTING");
@@ -131,13 +109,9 @@ export class ExecutionController {
131
109
  if (!validation.valid) {
132
110
  return this.#refuseToStart(validation.reason, Object.keys(services));
133
111
  }
134
- // §21's execution boundary (RT-070): the same "refuse atomically before
135
- // anything is spawned" discipline `tokenizeCommand` already gets, one
136
- // check up. Requesting a limit this platform cannot enforce and finding
137
- // out only when the first `spawnProcess()` throws would mean earlier
138
- // services in `validation.order` are already running by the time the
139
- // refusal happens -- recoverable via the existing cleanup path, but
140
- // needlessly, since nothing about this check needs a process to exist.
112
+ // §21/RT-070: refuse atomically before spawning, same discipline as
113
+ // tokenizeCommand -- finding out only when spawnProcess() throws would mean
114
+ // earlier services are already running by the time of refusal.
141
115
  const resourceLimits = this.#execution.configuration.resourceLimits;
142
116
  if (resourceLimits !== undefined) {
143
117
  const capability = resourceLimitCapability();
@@ -145,19 +119,12 @@ export class ExecutionController {
145
119
  return this.#refuseToStart(`resourceLimits was configured but cannot be enforced on this platform: ${capability.reason}`, Object.keys(services));
146
120
  }
147
121
  }
148
- // Which real mechanism backs filesystemPolicy/networkPolicy for this
149
- // execution -- absent means "bwrap", exactly today's behavior. See
150
- // ExecutionConfiguration.sandboxBackend's own comment.
122
+ // Which real mechanism backs filesystemPolicy/networkPolicy -- absent means "bwrap".
151
123
  const sandboxBackend = this.#execution.configuration.sandboxBackend ?? "bwrap";
152
- // RT-193, same atomic-refusal placement as resourceLimits above.
153
- // `networkPolicyCapability()` is real on Linux now (sandbox-isolation
154
- // lane: a bwrap network namespace) but still `unavailable` on
155
- // macOS/Windows, and even where the mechanism exists it only
156
- // implements one shape (full denial) -- both refusals happen here,
157
- // atomically, before anything is spawned, never silently accepted and
158
- // left unenforced. `sandboxBackend: "container"` checks the container
159
- // mechanism's own capability/shape functions instead -- same refusal
160
- // discipline, different real mechanism underneath.
124
+ // RT-193, same atomic-refusal placement. networkPolicyCapability() is real on
125
+ // Linux (bwrap network namespace), unavailable on macOS/Windows, and only
126
+ // implements full denial even where it exists -- both refused here before
127
+ // spawning. "container" checks the container mechanism's own functions instead.
161
128
  const networkPolicy = this.#execution.configuration.networkPolicy;
162
129
  if (networkPolicy !== undefined) {
163
130
  const shapeReason = sandboxBackend === "container" ? unsupportedContainerNetworkPolicyReason(networkPolicy) : unsupportedNetworkPolicyReason(networkPolicy);
@@ -169,11 +136,9 @@ export class ExecutionController {
169
136
  return this.#refuseToStart(`networkPolicy was configured but cannot be enforced on this platform: ${capability.reason}`, Object.keys(services));
170
137
  }
171
138
  }
172
- // Sandbox-isolation lane, filesystem half: same atomic-refusal
173
- // placement and precedent -- real on Linux via `applySandbox`'s bwrap
174
- // mount namespace, refused rather than silently unconstrained where
175
- // that mechanism doesn't exist. `sandboxBackend: "container"` checks
176
- // Docker's own capability instead.
139
+ // Filesystem half, same atomic-refusal placement -- real on Linux via bwrap's
140
+ // mount namespace, refused where it doesn't exist. "container" checks Docker's
141
+ // own capability instead.
177
142
  const filesystemPolicy = this.#execution.configuration.filesystemPolicy;
178
143
  if (filesystemPolicy !== undefined) {
179
144
  const capability = sandboxBackend === "container" ? containerFilesystemIsolationCapability() : filesystemIsolationCapability();
@@ -186,9 +151,7 @@ export class ExecutionController {
186
151
  return this.#refuseToStart(`service "${name}" has no matching RunOptions.readiness entry`, validation.order);
187
152
  }
188
153
  }
189
- // RT-193: captured once real spawning is committed to happen, from the
190
- // real host -- see `EnvironmentMetadata`'s own comment for why `commit`
191
- // alone does not make a run reproducible.
154
+ // RT-193: captured once spawning is committed, from the real host.
192
155
  const environmentMetadata = await captureEnvironmentMetadata(services);
193
156
  this.#execution = { ...this.#execution, startedAt: new Date().toISOString(), environmentMetadata };
194
157
  const resolvedPorts = new Map();
@@ -197,8 +160,7 @@ export class ExecutionController {
197
160
  if (name === undefined)
198
161
  continue;
199
162
  if (isTerminalExecutionState(this.#execution.state)) {
200
- // A concurrent timeout/stop/cancel already finished this execution
201
- // while we were mid-sequence.
163
+ // A concurrent timeout/stop/cancel already finished this execution.
202
164
  return this.#execution;
203
165
  }
204
166
  const service = services[name];
@@ -210,18 +172,13 @@ export class ExecutionController {
210
172
  let managed;
211
173
  let port;
212
174
  if (service.attach !== undefined) {
213
- // Attach mode (RT-attach-mode-service-configuration): the target is
214
- // already running and already bound to whatever it bound at its own
215
- // launch -- nothing here can allocate a port on its behalf, only
216
- // record the one the caller already knows about. `0` (never a real
217
- // listening port) when they did not supply one, so a readiness
218
- // check that actually needs a port fails legibly against it
219
- // ("nothing answered") instead of this function inventing an
220
- // ephemeral port that has nothing to do with the real target.
221
- // `resourceLimits`/`filesystemPolicy`/`networkPolicy`/`sandboxBackend`
222
- // are deliberately never passed through — see `ServiceConfiguration.attach`'s
223
- // own comment on why they cannot apply to a process this runtime
224
- // did not spawn.
175
+ // Attach mode: the target is already running and bound to whatever it
176
+ // bound at launch -- nothing here can allocate a port for it, only record
177
+ // the one the caller already knows. `0` when unsupplied, so a readiness
178
+ // check needing a port fails legibly ("nothing answered") rather than
179
+ // this function inventing an ephemeral port unrelated to the real target.
180
+ // resourceLimits/filesystemPolicy/networkPolicy/sandboxBackend never pass
181
+ // through -- they can't apply to a process this runtime didn't spawn.
225
182
  port = service.port ?? 0;
226
183
  try {
227
184
  managed = attachManagedProcess({
@@ -252,12 +209,9 @@ export class ExecutionController {
252
209
  PORT: String(port),
253
210
  ...substitutePortPlaceholders(service.env, resolvedPorts),
254
211
  });
255
- // `validateServicesConfiguration` already proved every service
256
- // declares exactly one of `command`/`attach` and, when it's
257
- // `command`, that it tokenizes -- both branches below are
258
- // unreachable in practice, kept because the alternative is a
259
- // non-null assertion that would become a real crash if the two
260
- // ever drift apart.
212
+ // validateServicesConfiguration already proved this, so both branches
213
+ // below are unreachable in practice -- kept over a non-null assertion
214
+ // that would crash for real if the two ever drift apart.
261
215
  if (service.command === undefined) {
262
216
  return this.#refuseToStart(`service "${name}": neither "command" nor "attach" is set`, validation.order);
263
217
  }
@@ -266,8 +220,8 @@ export class ExecutionController {
266
220
  return this.#refuseToStart(`service "${name}": ${tokenized.reason}`, validation.order);
267
221
  }
268
222
  const { command, args } = tokenized;
269
- // Instrumentation that must be installed before any application code
270
- // runs goes between the interpreter and the script, never after it.
223
+ // Instrumentation that must run before application code goes between the
224
+ // interpreter and the script, never after it.
271
225
  const spawnArgs = service.interpreterArgs === undefined ? args : [...service.interpreterArgs, ...args];
272
226
  try {
273
227
  managed = spawnProcess({
@@ -303,16 +257,12 @@ export class ExecutionController {
303
257
  resolvedPorts.set(name, port);
304
258
  this.#recordProcesses();
305
259
  options.onProcessLifecycleEvent?.({ kind: "process-started", serviceName: name, handle: managed.handle() });
306
- // Read by the exit watcher below, whenever it actually fires — true
307
- // only once THIS service's own readiness has succeeded, which is
308
- // what lets `phase` distinguish "died before ever confirmed up" from
309
- // "died after running" regardless of how much later exit occurs.
260
+ // Read by the exit watcher below -- true only once readiness succeeded, which
261
+ // lets `phase` distinguish "died before confirmed up" from "died after running".
310
262
  let reachedReady = false;
311
- // Fire-and-forget: exit can happen at any point in this process's
312
- // life, including long after `run()` itself has returned (a healthy
313
- // service that later crashes, or the eventual `#cleanup()` reap) —
314
- // it must not be awaited inline here, which would block every
315
- // service after it in `validation.order` on this one's exit.
263
+ // Fire-and-forget: exit can happen long after run() returns (a later crash, or
264
+ // #cleanup()'s reap) -- must not be awaited inline, which would block every
265
+ // later service in validation.order on this one's exit.
316
266
  void managed.waitForExit().then(() => {
317
267
  options.onProcessLifecycleEvent?.({
318
268
  kind: "process-exited",
@@ -392,27 +342,19 @@ export class ExecutionController {
392
342
  return this.#finish();
393
343
  }
394
344
  /**
395
- * Stop everything and record the run as `TIMED_OUT` — the same transition
396
- * `#onTimeout` makes, available to a caller that knows the budget expired
397
- * before this controller's own timer got round to saying so.
398
- *
399
- * **Why a caller needs this, and why `stop()` is wrong for the case.**
400
- * `ExecutionConfiguration.timeoutMs` is a whole-execution budget, and the
401
- * orchestrator clamps its observation window to whatever the budget has left.
402
- * That clamp made `TIMED_OUT` a race: the window ends at the deadline, the
403
- * timer fires a hair later, and whichever of `#onTimeout` and `stop()` gets
404
- * there first decides what the run *says* happened. Measured: the same case
405
- * reported `TIMED_OUT` at 1534ms and `COMPLETED` at 1515ms.
345
+ * Stop everything and record `TIMED_OUT` -- same transition `#onTimeout` makes,
346
+ * for a caller that knows the budget expired before the internal timer noticed.
406
347
  *
407
- * `execution.state` is what `descry-core`'s `observe_runtime` reads to choose
408
- * between `ok` and `timed_out`, so losing that race turns a disclosed
409
- * degradation into a silent one — a run that returns on time and says nothing
410
- * was cut short, which is worse than the overrun it replaced. A caller that
411
- * has already decided it truncated the run should not have to win a race to
412
- * report it.
348
+ * **Why not `stop()`:** the orchestrator clamps its observation window to
349
+ * whatever's left of `timeoutMs`, making `TIMED_OUT` a race between `#onTimeout`
350
+ * and `stop()` at the deadline -- measured: the same case reported `TIMED_OUT` at
351
+ * 1534ms and `COMPLETED` at 1515ms. `execution.state` is what `observe_runtime`
352
+ * reads to choose `ok` vs `timed_out`, so losing that race silently hides a real
353
+ * cutoff. A caller that already decided it truncated the run shouldn't have to
354
+ * win a race to report it.
413
355
  *
414
- * Idempotent and terminal-safe, exactly like `cancel()`: if the timer did fire
415
- * first, this returns the execution the timer already finished.
356
+ * Idempotent and terminal-safe like `cancel()`: if the timer fired first, returns
357
+ * the execution it already finished.
416
358
  */
417
359
  async timeout() {
418
360
  if (isTerminalExecutionState(this.#execution.state) || this.#execution.state === "STOPPING") {
@@ -1 +1 @@
1
- {"version":3,"file":"controller.js","sourceRoot":"","sources":["../src/controller.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EACL,wBAAwB,EACxB,0BAA0B,GAI3B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,qBAAqB,EAAuB,MAAM,sBAAsB,CAAC;AACtH,OAAO,EAAE,cAAc,EAA6C,MAAM,gBAAgB,CAAC;AAC3F,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,6BAA6B,EAAE,0BAA0B,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;A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