@cat-factory/worker 0.175.0 → 0.176.0

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 (39) hide show
  1. package/dist/infrastructure/config/execution.d.ts +1 -1
  2. package/dist/infrastructure/config/execution.d.ts.map +1 -1
  3. package/dist/infrastructure/config/execution.js +12 -3
  4. package/dist/infrastructure/config/execution.js.map +1 -1
  5. package/dist/infrastructure/containers/CloudflareContainerTransport.d.ts +15 -1
  6. package/dist/infrastructure/containers/CloudflareContainerTransport.d.ts.map +1 -1
  7. package/dist/infrastructure/containers/CloudflareContainerTransport.js +55 -16
  8. package/dist/infrastructure/containers/CloudflareContainerTransport.js.map +1 -1
  9. package/dist/infrastructure/containers/DeployContainer.d.ts +2 -20
  10. package/dist/infrastructure/containers/DeployContainer.d.ts.map +1 -1
  11. package/dist/infrastructure/containers/DeployContainer.js +7 -56
  12. package/dist/infrastructure/containers/DeployContainer.js.map +1 -1
  13. package/dist/infrastructure/containers/ExecutionContainer.d.ts +2 -51
  14. package/dist/infrastructure/containers/ExecutionContainer.d.ts.map +1 -1
  15. package/dist/infrastructure/containers/ExecutionContainer.js +9 -93
  16. package/dist/infrastructure/containers/ExecutionContainer.js.map +1 -1
  17. package/dist/infrastructure/containers/RunContainer.d.ts +98 -0
  18. package/dist/infrastructure/containers/RunContainer.d.ts.map +1 -0
  19. package/dist/infrastructure/containers/RunContainer.js +164 -0
  20. package/dist/infrastructure/containers/RunContainer.js.map +1 -0
  21. package/dist/infrastructure/containers/stopCause.d.ts +105 -0
  22. package/dist/infrastructure/containers/stopCause.d.ts.map +1 -0
  23. package/dist/infrastructure/containers/stopCause.js +108 -0
  24. package/dist/infrastructure/containers/stopCause.js.map +1 -0
  25. package/dist/infrastructure/env.d.ts +10 -0
  26. package/dist/infrastructure/env.d.ts.map +1 -1
  27. package/dist/infrastructure/env.js.map +1 -1
  28. package/dist/infrastructure/repositories/D1BinaryArtifactMetadataStore.d.ts +3 -1
  29. package/dist/infrastructure/repositories/D1BinaryArtifactMetadataStore.d.ts.map +1 -1
  30. package/dist/infrastructure/repositories/D1BinaryArtifactMetadataStore.js +38 -5
  31. package/dist/infrastructure/repositories/D1BinaryArtifactMetadataStore.js.map +1 -1
  32. package/dist/infrastructure/repositories/D1DocumentRepository.d.ts.map +1 -1
  33. package/dist/infrastructure/repositories/D1DocumentRepository.js +5 -3
  34. package/dist/infrastructure/repositories/D1DocumentRepository.js.map +1 -1
  35. package/dist/infrastructure/workflows/ExecutionWorkflow.d.ts.map +1 -1
  36. package/dist/infrastructure/workflows/ExecutionWorkflow.js +17 -8
  37. package/dist/infrastructure/workflows/ExecutionWorkflow.js.map +1 -1
  38. package/migrations/0087_document_renders.sql +28 -0
  39. package/package.json +18 -18
@@ -0,0 +1,98 @@
1
+ import { Container } from '@cloudflare/containers';
2
+ import type { StopParams } from '@cloudflare/containers';
3
+ import type { Env } from '../env';
4
+ import { type ContainerStopCause } from './stopCause';
5
+ /**
6
+ * The behaviour every per-run Cloudflare Container shares: one Durable Object instance per run
7
+ * id hosts that run's sequence of jobs, the harness listens on 8080, and the base
8
+ * `Container.fetch` proxies inbound requests there once it has booted.
9
+ *
10
+ * The two concrete classes ({@link import('./ExecutionContainer').ExecutionContainer} and
11
+ * {@link import('./DeployContainer').DeployContainer}) exist only because a Cloudflare
12
+ * Container's IMAGE is pinned per container class by the wrangler `[[containers]]` block. They
13
+ * are two bindings onto one behaviour, which is why that behaviour lives here rather than being
14
+ * kept in step by hand across both.
15
+ *
16
+ * No long-lived secrets are configured: the image carries none, and every per-job credential
17
+ * (the VCS token, the LLM session token, an apiserver token) arrives in the `/jobs` request
18
+ * body at dispatch time. The one exception is `HARNESS_SHARED_SECRET` below, an inbound-auth
19
+ * shared secret rather than a tenant credential.
20
+ */
21
+ export declare abstract class RunContainer extends Container<Env> {
22
+ /** The harness HTTP server port (matches each image's Dockerfile ENTRYPOINT/EXPOSE). */
23
+ defaultPort: number;
24
+ envVars: Record<string, string>;
25
+ sleepAfter: string;
26
+ /**
27
+ * Record that THIS run's container was drained by a new-version rollout (a deploy, exit 143)
28
+ * rather than crashing. The transport's next job poll (which 404s once the container restarts
29
+ * empty) reads this back through {@link recentEvictionCause}, so the engine
30
+ * recovers it on the larger transient budget instead of failing the run as a crash.
31
+ * Persisted to DO storage (not in-memory) so it survives the isolate reset a combined
32
+ * worker+container deploy causes.
33
+ */
34
+ onError(error: unknown): Promise<unknown>;
35
+ /**
36
+ * Belt-and-braces: depending on the runtime version, a rollout drain can surface as a
37
+ * `runtime_signal` stop with SIGTERM (143) through `onStop` instead of (or as well as)
38
+ * `onError`. Record it the same way.
39
+ */
40
+ onStop(params: StopParams): void;
41
+ /**
42
+ * The idle window elapsed. Record it as the reclaim cause it is, then reclaim as the base
43
+ * class would.
44
+ *
45
+ * This container is kept warm ONLY by the driver's job polls, so an idle expiry with a job
46
+ * still outstanding means the backend stopped polling for longer than `sleepAfter`: a
47
+ * poll-scheduling hiccup, not the workload dying. Unrecorded, the resulting 404 poll is
48
+ * indistinguishable from an OOM: it spends the single crash-eviction budget, and a second
49
+ * hiccup in the same step then fails a healthy run (stuck-run audit F12).
50
+ *
51
+ * This hook cannot tell that case from the ROUTINE one (the run parked on a human decision and
52
+ * nothing is running), because only the harness knows whether a job is still live and asking
53
+ * it would itself be activity. So the marker is minted for both, and what keeps that honest is
54
+ * the boundary in {@link fetch}: the routine marker is dropped by the next dispatch, so it
55
+ * cannot still be lying around to excuse the following step's crash.
56
+ *
57
+ * Nothing is recorded when the container is already gone: the base class stops nothing in
58
+ * that case, so a marker would be attributing a reclaim that never happened.
59
+ */
60
+ onActivityExpired(): Promise<void>;
61
+ /**
62
+ * Proxy an inbound harness call, and take a JOB ACCEPTANCE as the end of whatever this
63
+ * container previously observed about itself.
64
+ *
65
+ * A stop cause explains the death of a container that was serving the jobs outstanding when it
66
+ * was recorded. `POST /jobs` answering 2xx says a new job starts here, so nothing recorded
67
+ * before it can account for that job's death. Without the boundary the routine case poisons
68
+ * the rare one: a run parks on a human decision, its container idles out with nothing running,
69
+ * and the `idle` marker that leaves behind is still inside its (deliberately wide) window to
70
+ * excuse a genuine OOM in the NEXT step as transient churn.
71
+ *
72
+ * It has to be the acceptance rather than the container starting: a 404 poll BOOTS the
73
+ * container on its way to discovering the job is gone, so clearing on start would drop the
74
+ * record moments before the read that exists to consume it.
75
+ */
76
+ fetch(request: Request): Promise<Response>;
77
+ /**
78
+ * Why this run's container went away, for the transport to read over RPC after `jobId`'s poll
79
+ * 404s: the one thing that tells a reclaim apart from a crash. `undefined` means no reclaim
80
+ * this container observed explains that 404, so the caller reports a crash.
81
+ *
82
+ * Claimed by the polling job rather than deleted, so a retried durable poll step re-reads the
83
+ * same answer while a different job still finds it spent. See {@link takeStopCause}.
84
+ */
85
+ recentEvictionCause(jobId: string): Promise<ContainerStopCause | undefined>;
86
+ /**
87
+ * Reclaim this container now (SIGKILL via the base class), rather than waiting for the
88
+ * `sleepAfter` idle timer. Called over RPC when a run settles or faults, so a leaked instance
89
+ * isn't billed while idle. Best-effort and idempotent: destroying an already-stopped
90
+ * container is a no-op, and we swallow any error so the caller's failure handling is never
91
+ * derailed by cleanup.
92
+ */
93
+ shutdown(): Promise<void>;
94
+ private record;
95
+ /** The DO storage, narrowed to what the stop-cause bookkeeping uses. */
96
+ private get storage();
97
+ }
98
+ //# sourceMappingURL=RunContainer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RunContainer.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/containers/RunContainer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAExD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAA;AAEjC,OAAO,EAEL,KAAK,kBAAkB,EAKxB,MAAM,aAAa,CAAA;AAEpB;;;;;;;;;;;;;;;GAeG;AACH,8BAAsB,YAAa,SAAQ,SAAS,CAAC,GAAG,CAAC;IACvD,wFAAwF;IAC/E,WAAW,SAAO;IAKlB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAElC;IAMG,UAAU,SAAQ;IAE3B;;;;;;;OAOG;IACY,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAIvD;IAED;;;;OAIG;IACM,MAAM,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,CAIxC;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACY,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC,CAGhD;IAED;;;;;;;;;;;;;;OAcG;IACY,KAAK,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,CAWxD;IAED;;;;;;;OAOG;IACG,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,GAAG,SAAS,CAAC,CAEhF;IAED;;;;;;OAMG;IACG,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,CAO9B;IAED,OAAO,CAAC,MAAM;IAId,wEAAwE;IACxE,OAAO,KAAK,OAAO,GAElB;CACF"}
@@ -0,0 +1,164 @@
1
+ import { Container } from '@cloudflare/containers';
2
+ import { runBestEffort } from '@cat-factory/kernel';
3
+ import { logger } from '../observability/logger';
4
+ import { clearStopCause, isRolloutSignal, recordStopCause, takeStopCause, } from './stopCause';
5
+ /**
6
+ * The behaviour every per-run Cloudflare Container shares: one Durable Object instance per run
7
+ * id hosts that run's sequence of jobs, the harness listens on 8080, and the base
8
+ * `Container.fetch` proxies inbound requests there once it has booted.
9
+ *
10
+ * The two concrete classes ({@link import('./ExecutionContainer').ExecutionContainer} and
11
+ * {@link import('./DeployContainer').DeployContainer}) exist only because a Cloudflare
12
+ * Container's IMAGE is pinned per container class by the wrangler `[[containers]]` block. They
13
+ * are two bindings onto one behaviour, which is why that behaviour lives here rather than being
14
+ * kept in step by hand across both.
15
+ *
16
+ * No long-lived secrets are configured: the image carries none, and every per-job credential
17
+ * (the VCS token, the LLM session token, an apiserver token) arrives in the `/jobs` request
18
+ * body at dispatch time. The one exception is `HARNESS_SHARED_SECRET` below, an inbound-auth
19
+ * shared secret rather than a tenant credential.
20
+ */
21
+ export class RunContainer extends Container {
22
+ /** The harness HTTP server port (matches each image's Dockerfile ENTRYPOINT/EXPOSE). */
23
+ defaultPort = 8080;
24
+ // When configured, hand the inbound-auth shared secret to the harness so it rejects any /jobs
25
+ // call that doesn't present the matching `x-harness-secret` header (which the transport
26
+ // sends). Omitted when unset, leaving the harness open as before.
27
+ envVars = this.env.HARNESS_SHARED_SECRET
28
+ ? { HARNESS_SHARED_SECRET: this.env.HARNESS_SHARED_SECRET }
29
+ : {};
30
+ // A job is dispatched, then polled every ~15s while it runs, so the instance stays warm for
31
+ // the job's duration without holding a single request open. Polling is the ONLY thing that
32
+ // keeps it warm, which is why an elapsed window is recorded as a reclaim cause rather than
33
+ // left to read as a crash. See `onActivityExpired`.
34
+ sleepAfter = '10m';
35
+ /**
36
+ * Record that THIS run's container was drained by a new-version rollout (a deploy, exit 143)
37
+ * rather than crashing. The transport's next job poll (which 404s once the container restarts
38
+ * empty) reads this back through {@link recentEvictionCause}, so the engine
39
+ * recovers it on the larger transient budget instead of failing the run as a crash.
40
+ * Persisted to DO storage (not in-memory) so it survives the isolate reset a combined
41
+ * worker+container deploy causes.
42
+ */
43
+ async onError(error) {
44
+ if (isRolloutSignal(error))
45
+ await this.record('rollout');
46
+ // Preserve the base behaviour (log + rethrow) so nothing else changes.
47
+ return super.onError(error);
48
+ }
49
+ /**
50
+ * Belt-and-braces: depending on the runtime version, a rollout drain can surface as a
51
+ * `runtime_signal` stop with SIGTERM (143) through `onStop` instead of (or as well as)
52
+ * `onError`. Record it the same way.
53
+ */
54
+ onStop(params) {
55
+ if (params.reason === 'runtime_signal' && params.exitCode === 143) {
56
+ void this.record('rollout');
57
+ }
58
+ }
59
+ /**
60
+ * The idle window elapsed. Record it as the reclaim cause it is, then reclaim as the base
61
+ * class would.
62
+ *
63
+ * This container is kept warm ONLY by the driver's job polls, so an idle expiry with a job
64
+ * still outstanding means the backend stopped polling for longer than `sleepAfter`: a
65
+ * poll-scheduling hiccup, not the workload dying. Unrecorded, the resulting 404 poll is
66
+ * indistinguishable from an OOM: it spends the single crash-eviction budget, and a second
67
+ * hiccup in the same step then fails a healthy run (stuck-run audit F12).
68
+ *
69
+ * This hook cannot tell that case from the ROUTINE one (the run parked on a human decision and
70
+ * nothing is running), because only the harness knows whether a job is still live and asking
71
+ * it would itself be activity. So the marker is minted for both, and what keeps that honest is
72
+ * the boundary in {@link fetch}: the routine marker is dropped by the next dispatch, so it
73
+ * cannot still be lying around to excuse the following step's crash.
74
+ *
75
+ * Nothing is recorded when the container is already gone: the base class stops nothing in
76
+ * that case, so a marker would be attributing a reclaim that never happened.
77
+ */
78
+ async onActivityExpired() {
79
+ if (this.ctx.container?.running)
80
+ await this.record('idle');
81
+ await super.onActivityExpired();
82
+ }
83
+ /**
84
+ * Proxy an inbound harness call, and take a JOB ACCEPTANCE as the end of whatever this
85
+ * container previously observed about itself.
86
+ *
87
+ * A stop cause explains the death of a container that was serving the jobs outstanding when it
88
+ * was recorded. `POST /jobs` answering 2xx says a new job starts here, so nothing recorded
89
+ * before it can account for that job's death. Without the boundary the routine case poisons
90
+ * the rare one: a run parks on a human decision, its container idles out with nothing running,
91
+ * and the `idle` marker that leaves behind is still inside its (deliberately wide) window to
92
+ * excuse a genuine OOM in the NEXT step as transient churn.
93
+ *
94
+ * It has to be the acceptance rather than the container starting: a 404 poll BOOTS the
95
+ * container on its way to discovering the job is gone, so clearing on start would drop the
96
+ * record moments before the read that exists to consume it.
97
+ */
98
+ async fetch(request) {
99
+ const res = await super.fetch(request);
100
+ if (isJobDispatch(request) && res.ok) {
101
+ // Best-effort: the job is accepted and running by now, so bookkeeping must never turn a
102
+ // live dispatch into a failure. A drop is reported rather than swallowed, because the only
103
+ // symptom otherwise is a crash quietly misread as churn some minutes later.
104
+ await runBestEffort(logger, 'clear container stop cause on dispatch', () => clearStopCause(this.storage));
105
+ }
106
+ return res;
107
+ }
108
+ /**
109
+ * Why this run's container went away, for the transport to read over RPC after `jobId`'s poll
110
+ * 404s: the one thing that tells a reclaim apart from a crash. `undefined` means no reclaim
111
+ * this container observed explains that 404, so the caller reports a crash.
112
+ *
113
+ * Claimed by the polling job rather than deleted, so a retried durable poll step re-reads the
114
+ * same answer while a different job still finds it spent. See {@link takeStopCause}.
115
+ */
116
+ async recentEvictionCause(jobId) {
117
+ return takeStopCause(this.storage, Date.now(), jobId);
118
+ }
119
+ /**
120
+ * Reclaim this container now (SIGKILL via the base class), rather than waiting for the
121
+ * `sleepAfter` idle timer. Called over RPC when a run settles or faults, so a leaked instance
122
+ * isn't billed while idle. Best-effort and idempotent: destroying an already-stopped
123
+ * container is a no-op, and we swallow any error so the caller's failure handling is never
124
+ * derailed by cleanup.
125
+ */
126
+ async shutdown() {
127
+ try {
128
+ await this.destroy();
129
+ }
130
+ catch {
131
+ // silent-catch-ok: already gone / not running, so there is nothing to reclaim and nothing
132
+ // for an operator to do about it.
133
+ }
134
+ }
135
+ record(cause) {
136
+ return recordStopCause(this.storage, cause, Date.now());
137
+ }
138
+ /** The DO storage, narrowed to what the stop-cause bookkeeping uses. */
139
+ get storage() {
140
+ return this.ctx.storage;
141
+ }
142
+ }
143
+ /**
144
+ * Whether an inbound request is the transport starting a job (`POST /jobs`), as opposed to
145
+ * polling or stopping one (`GET`/`DELETE /jobs/{id}`).
146
+ *
147
+ * The harness route is matched here rather than announced over a separate RPC because the
148
+ * dispatch already passes through this object, and an extra round trip would be one more thing
149
+ * that can fail between "job accepted" and "record cleared". The URL is parsed rather than
150
+ * string-compared so a query string or a trailing slash cannot make a dispatch look like
151
+ * something else.
152
+ */
153
+ function isJobDispatch(request) {
154
+ if (request.method !== 'POST')
155
+ return false;
156
+ try {
157
+ return new URL(request.url).pathname.replace(/\/+$/, '') === '/jobs';
158
+ }
159
+ catch {
160
+ // silent-catch-ok: an unparseable URL is not a dispatch, which is the whole question here.
161
+ return false;
162
+ }
163
+ }
164
+ //# sourceMappingURL=RunContainer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RunContainer.js","sourceRoot":"","sources":["../../../src/infrastructure/containers/RunContainer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAElD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAEnD,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;AAChD,OAAO,EACL,cAAc,EAEd,eAAe,EACf,eAAe,EAEf,aAAa,GACd,MAAM,aAAa,CAAA;AAEpB;;;;;;;;;;;;;;;GAeG;AACH,MAAM,OAAgB,YAAa,SAAQ,SAAc;IACvD,wFAAwF;IAC/E,WAAW,GAAG,IAAI,CAAA;IAE3B,8FAA8F;IAC9F,wFAAwF;IACxF,kEAAkE;IACzD,OAAO,GAA2B,IAAI,CAAC,GAAG,CAAC,qBAAqB;QACvE,CAAC,CAAC,EAAE,qBAAqB,EAAE,IAAI,CAAC,GAAG,CAAC,qBAAqB,EAAE;QAC3D,CAAC,CAAC,EAAE,CAAA;IAEN,4FAA4F;IAC5F,2FAA2F;IAC3F,2FAA2F;IAC3F,oDAAoD;IAC3C,UAAU,GAAG,KAAK,CAAA;IAE3B;;;;;;;OAOG;IACM,KAAK,CAAC,OAAO,CAAC,KAAc;QACnC,IAAI,eAAe,CAAC,KAAK,CAAC;YAAE,MAAM,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAA;QACxD,uEAAuE;QACvE,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;IAC7B,CAAC;IAED;;;;OAIG;IACM,MAAM,CAAC,MAAkB;QAChC,IAAI,MAAM,CAAC,MAAM,KAAK,gBAAgB,IAAI,MAAM,CAAC,QAAQ,KAAK,GAAG,EAA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OAAO;QACjB,OAAO,IAAI,CAAC,GAAG,CAAC,OAAsC,CAAA;IACxD,CAAC;CACF;AAED;;;;;;;;;GASG;AACH,SAAS,aAAa,CAAC,OAAgB;IACrC,IAAI,OAAO,CAAC,MAAM,KAAK,MAAM;QAAE,OAAO,KAAK,CAAA;IAC3C,IAAI,CAAC;QACH,OAAO,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,KAAK,OAAO,CAAA;IACtE,CAAC;IAAC,MAAM,CAAC;QACP,2FAA2F;QAC3F,OAAO,KAAK,CAAA;IACd,CAAC;AACH,CAAC"}
@@ -0,0 +1,105 @@
1
+ /**
2
+ * The reclaim causes a container can observe about itself.
3
+ *
4
+ * - `rollout`: a deploy drained it (exit 143). Expected churn during a release.
5
+ * - `idle`: its own `sleepAfter` window elapsed with nothing talking to it. The container is
6
+ * kept warm ONLY by the driver's job polls, so this means the backend stopped polling for
7
+ * longer than that window: a poll-scheduling hiccup (a Workflows instance evicted and
8
+ * re-driven by the cron sweeper), not the workload failing. Left unrecorded it reads as a
9
+ * crash, and two hiccups in one step then exhaust the single crash-eviction budget and fail
10
+ * a healthy run (stuck-run audit F12).
11
+ */
12
+ export type ContainerStopCause = 'rollout' | 'idle';
13
+ /** DO-storage key holding the {@link StopCauseRecord} of the most recent self-observed stop. */
14
+ export declare const STOP_CAUSE_KEY = "containerStopCause";
15
+ /** What the container persists when it observes its own reclaim. */
16
+ export interface StopCauseRecord {
17
+ cause: ContainerStopCause;
18
+ /** Epoch ms the stop was observed. */
19
+ at: number;
20
+ /**
21
+ * The job id this record has already been spent explaining, once one has claimed it.
22
+ *
23
+ * A claim rather than a delete, because the caller runs inside a RETRYING durable step. A
24
+ * destructive read is not replay-safe: a `step.do` that reads the record and then throws (a
25
+ * contended persist, a failed emit) re-runs with the attribution already gone and reports the
26
+ * `crash` this whole mechanism exists to spare. Keyed by the claimant so a REPLAY of the same
27
+ * poll re-reads the same answer, while a different job's poll finds it spent — which is the
28
+ * "one reclaim explains exactly one eviction" rule, now stated in a way a retry cannot break.
29
+ */
30
+ claimedBy?: string;
31
+ }
32
+ /**
33
+ * How long after each cause a 404 poll may still be attributed to it.
34
+ *
35
+ * They differ because the two causes are observed at different distances from the poll that
36
+ * finds the container gone. A rollout drain interrupts an IN-FLIGHT poll, so the very next one
37
+ * lands seconds later. An idle reclaim happens precisely because polling stopped, so the poll
38
+ * that discovers it arrives however long the gap outran the idle window: minutes, not seconds.
39
+ * A window sized for the rollout case would therefore read every real idle reclaim as a crash,
40
+ * which is the finding itself.
41
+ *
42
+ * The window is a BACKSTOP, not the primary bound on what a record may excuse. What actually
43
+ * scopes it is the pair of rules around it: {@link clearStopCause} drops the record the moment a
44
+ * new job is accepted, and {@link takeStopCause} lets exactly one job spend it. So the wide
45
+ * `idle` window buys the poll gap it exists for without also handing the next step's crash an
46
+ * alibi.
47
+ */
48
+ export declare const ATTRIBUTION_WINDOW_MS: {
49
+ rollout: number;
50
+ idle: number;
51
+ };
52
+ /**
53
+ * The message the base container class surfaces when the RUNTIME (not the workload) stopped a
54
+ * container: a deploy draining the old version. Its own exit-code parser is keyed on the plain
55
+ * "runtime signalled the container to exit:" form and does not recognise the rollout wording,
56
+ * which is why that case reaches `onError` at all.
57
+ */
58
+ export declare function isRolloutSignal(error: unknown): boolean;
59
+ /**
60
+ * The cause a stored record still justifies at `now`, or `undefined` when there is nothing to
61
+ * attribute.
62
+ *
63
+ * `undefined` covers three things that all mean the same to the caller: nothing was recorded,
64
+ * the record outlived its cause's window (the container recovered and ran on, so a later death
65
+ * is its own), or the record names a cause this build no longer has. The last is possible
66
+ * because the record is PERSISTED and the vocabulary is closed: a deploy that retires a member
67
+ * leaves rows behind. All three land on the caller's existing default, reporting the eviction
68
+ * as a `crash`, which is the honest reading of "no attribution" and the conservative one:
69
+ * it costs a run one restart of its recovery budget, never a wrongly-extended one.
70
+ */
71
+ export declare function attributeStopCause(record: unknown, now: number, claimant: string): ContainerStopCause | undefined;
72
+ /**
73
+ * The slice of DO storage the bookkeeping below needs. Narrowed to three methods so the rules
74
+ * can be exercised against a plain fake. The alternative is asserting them through a real
75
+ * Durable Object, which means reaching into the container base class's private fields.
76
+ */
77
+ export interface StopCauseStorage {
78
+ get: (key: string) => Promise<unknown>;
79
+ put: (key: string, value: StopCauseRecord) => Promise<void>;
80
+ delete: (key: string) => Promise<unknown>;
81
+ }
82
+ /** Persist what this container just observed about its own reclaim. */
83
+ export declare function recordStopCause(storage: StopCauseStorage, cause: ContainerStopCause, now: number): Promise<void>;
84
+ /**
85
+ * Forget whatever this container observed before now.
86
+ *
87
+ * Called when a NEW job is accepted, which is the moment the record stops being able to explain
88
+ * anything: a stop cause accounts for the death of a container that was serving the jobs
89
+ * outstanding when it was observed, and a job dispatched afterwards is not one of them. Without
90
+ * this the common benign case poisons the rare dangerous one — a run parks on a human decision,
91
+ * its container idles out with nothing running, and the `idle` marker that leaves behind is
92
+ * still there half an hour later to excuse a genuine OOM in the NEXT step as transient churn.
93
+ */
94
+ export declare function clearStopCause(storage: StopCauseStorage): Promise<void>;
95
+ /**
96
+ * Read the cause explaining `claimant`'s 404 poll, CLAIMING it for that job.
97
+ *
98
+ * One reclaim explains exactly one job's eviction: the engine answers one by re-dispatching onto
99
+ * a fresh container under the same DO id, so an unclaimed record would still be sitting there to
100
+ * excuse the next death, whenever and for whatever reason it came. The claim is written rather
101
+ * than the record deleted so a REPLAYED poll for the same job reads back the same answer (see
102
+ * {@link StopCauseRecord.claimedBy}).
103
+ */
104
+ export declare function takeStopCause(storage: StopCauseStorage, now: number, claimant: string): Promise<ContainerStopCause | undefined>;
105
+ //# sourceMappingURL=stopCause.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stopCause.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/containers/stopCause.ts"],"names":[],"mappings":"AAOA;;;;;;;;;;GAUG;AACH,MAAM,MAAM,kBAAkB,GAAG,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CAAC,kBAAkB,GAAG,SAAS,CAAC,CASzC"}
@@ -0,0 +1,108 @@
1
+ // Why a per-run container went away, recorded by the container itself and read back by the
2
+ // transport when a job poll 404s. A 404 alone cannot tell an OOM apart from the platform
3
+ // reclaiming a sandbox, and the two need different recoveries: a crash that repeats is
4
+ // deterministic and should end the run, while infrastructure churn should be ridden out.
5
+ // Shared by both per-run container classes (agent + deploy) so the key, the windows and the
6
+ // attribution rule cannot drift between them.
7
+ /** DO-storage key holding the {@link StopCauseRecord} of the most recent self-observed stop. */
8
+ export const STOP_CAUSE_KEY = 'containerStopCause';
9
+ /**
10
+ * How long after each cause a 404 poll may still be attributed to it.
11
+ *
12
+ * They differ because the two causes are observed at different distances from the poll that
13
+ * finds the container gone. A rollout drain interrupts an IN-FLIGHT poll, so the very next one
14
+ * lands seconds later. An idle reclaim happens precisely because polling stopped, so the poll
15
+ * that discovers it arrives however long the gap outran the idle window: minutes, not seconds.
16
+ * A window sized for the rollout case would therefore read every real idle reclaim as a crash,
17
+ * which is the finding itself.
18
+ *
19
+ * The window is a BACKSTOP, not the primary bound on what a record may excuse. What actually
20
+ * scopes it is the pair of rules around it: {@link clearStopCause} drops the record the moment a
21
+ * new job is accepted, and {@link takeStopCause} lets exactly one job spend it. So the wide
22
+ * `idle` window buys the poll gap it exists for without also handing the next step's crash an
23
+ * alibi.
24
+ */
25
+ export const ATTRIBUTION_WINDOW_MS = {
26
+ rollout: 120_000,
27
+ idle: 30 * 60_000,
28
+ };
29
+ /**
30
+ * The message the base container class surfaces when the RUNTIME (not the workload) stopped a
31
+ * container: a deploy draining the old version. Its own exit-code parser is keyed on the plain
32
+ * "runtime signalled the container to exit:" form and does not recognise the rollout wording,
33
+ * which is why that case reaches `onError` at all.
34
+ */
35
+ export function isRolloutSignal(error) {
36
+ const message = error instanceof Error ? error.message : typeof error === 'string' ? error : String(error);
37
+ return /new version rollout|runtime signalled the container to exit/i.test(message);
38
+ }
39
+ /**
40
+ * Whether a value read back out of DO storage is still a cause this build knows. Derived from
41
+ * the window table's own keys rather than restated, so retiring a cause fails the build here
42
+ * instead of leaving a member the predicate silently keeps admitting.
43
+ */
44
+ function isContainerStopCause(value) {
45
+ return typeof value === 'string' && Object.hasOwn(ATTRIBUTION_WINDOW_MS, value);
46
+ }
47
+ /**
48
+ * The cause a stored record still justifies at `now`, or `undefined` when there is nothing to
49
+ * attribute.
50
+ *
51
+ * `undefined` covers three things that all mean the same to the caller: nothing was recorded,
52
+ * the record outlived its cause's window (the container recovered and ran on, so a later death
53
+ * is its own), or the record names a cause this build no longer has. The last is possible
54
+ * because the record is PERSISTED and the vocabulary is closed: a deploy that retires a member
55
+ * leaves rows behind. All three land on the caller's existing default, reporting the eviction
56
+ * as a `crash`, which is the honest reading of "no attribution" and the conservative one:
57
+ * it costs a run one restart of its recovery budget, never a wrongly-extended one.
58
+ */
59
+ export function attributeStopCause(record, now, claimant) {
60
+ if (!record || typeof record !== 'object')
61
+ return undefined;
62
+ const { cause, at, claimedBy } = record;
63
+ if (!isContainerStopCause(cause) || typeof at !== 'number')
64
+ return undefined;
65
+ // Spent on somebody else's eviction. Only the job that claimed it may read it back, which is
66
+ // what lets a replay be idempotent without letting one reclaim excuse two deaths.
67
+ if (claimedBy !== undefined && claimedBy !== claimant)
68
+ return undefined;
69
+ return now - at <= ATTRIBUTION_WINDOW_MS[cause] ? cause : undefined;
70
+ }
71
+ /** Persist what this container just observed about its own reclaim. */
72
+ export async function recordStopCause(storage, cause, now) {
73
+ await storage.put(STOP_CAUSE_KEY, { cause, at: now });
74
+ }
75
+ /**
76
+ * Forget whatever this container observed before now.
77
+ *
78
+ * Called when a NEW job is accepted, which is the moment the record stops being able to explain
79
+ * anything: a stop cause accounts for the death of a container that was serving the jobs
80
+ * outstanding when it was observed, and a job dispatched afterwards is not one of them. Without
81
+ * this the common benign case poisons the rare dangerous one — a run parks on a human decision,
82
+ * its container idles out with nothing running, and the `idle` marker that leaves behind is
83
+ * still there half an hour later to excuse a genuine OOM in the NEXT step as transient churn.
84
+ */
85
+ export async function clearStopCause(storage) {
86
+ await storage.delete(STOP_CAUSE_KEY);
87
+ }
88
+ /**
89
+ * Read the cause explaining `claimant`'s 404 poll, CLAIMING it for that job.
90
+ *
91
+ * One reclaim explains exactly one job's eviction: the engine answers one by re-dispatching onto
92
+ * a fresh container under the same DO id, so an unclaimed record would still be sitting there to
93
+ * excuse the next death, whenever and for whatever reason it came. The claim is written rather
94
+ * than the record deleted so a REPLAYED poll for the same job reads back the same answer (see
95
+ * {@link StopCauseRecord.claimedBy}).
96
+ */
97
+ export async function takeStopCause(storage, now, claimant) {
98
+ const record = await storage.get(STOP_CAUSE_KEY);
99
+ const cause = attributeStopCause(record, now, claimant);
100
+ // Nothing to claim: either there was no record, it was spent, or it is too old to explain
101
+ // anything. Leaving an expired record in place costs one key until the next reclaim
102
+ // overwrites it, and rewriting it here would only re-date somebody else's observation.
103
+ if (!cause)
104
+ return undefined;
105
+ await storage.put(STOP_CAUSE_KEY, { ...record, claimedBy: claimant });
106
+ return cause;
107
+ }
108
+ //# sourceMappingURL=stopCause.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stopCause.js","sourceRoot":"","sources":["../../../src/infrastructure/containers/stopCause.ts"],"names":[],"mappings":"AAAA,2FAA2F;AAC3F,yFAAyF;AACzF,uFAAuF;AACvF,yFAAyF;AACzF,4FAA4F;AAC5F,8CAA8C;AAe9C,gGAAgG;AAChG,MAAM,CAAC,MAAM,cAAc,GAAG,oBAAoB,CAAA;AAoBlD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,OAAO,EAAE,OAAO;IAChB,IAAI,EAAE,EAAE,GAAG,MAAM;CAC2B,CAAA;AAE9C;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAC,KAAc;IAC5C,MAAM,OAAO,GACX,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,KAAK,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ED;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CACjC,OAAyB,EACzB,GAAW,EACX,QAAgB;IAEhB,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAA;IAChD,MAAM,KAAK,GAAG,kBAAkB,CAAC,MAAM,EAAE,GAAG,EAAE,QAAQ,CAAC,CAAA;IACvD,0FAA0F;IAC1F,oFAAoF;IACpF,uFAAuF;IACvF,IAAI,CAAC,KAAK;QAAE,OAAO,SAAS,CAAA;IAC5B,MAAM,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,EAAE,GAAI,MAA0B,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC,CAAA;IAC1F,OAAO,KAAK,CAAA;AACd,CAAC"}
@@ -158,6 +158,16 @@ export interface Env {
158
158
  * CI-fixer attempt budget is separate (per-task, on the merge preset).
159
159
  */
160
160
  CI_MAX_POLLS?: string;
161
+ /**
162
+ * Ceiling on ONE pipeline-step advance or status read, applied as the durable driver's
163
+ * `step.do` timeout here and raced in `driveExecution` on Node: the engine's hang bound, kept
164
+ * as one knob so a wedged call is waited out for the same length of time on both facades.
165
+ *
166
+ * A duration string ("30 minutes", the default), written as a whole number and one of
167
+ * seconds/minutes/hours/days/weeks. Both facades parse it with the same parser, so a value one
168
+ * accepts the other honours identically; an unusable one warns and falls back on both.
169
+ */
170
+ ADVANCE_TIMEOUT?: string;
161
171
  /**
162
172
  * Per-workspace WebSocket fan-out hub (Durable Object). Pushes execution/board
163
173
  * changes to subscribed browsers in real time. When absent, the engine pushes
@@ -1 +1 @@
1
- {"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../src/infrastructure/env.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,EAAE,EACF,UAAU,EACV,sBAAsB,EACtB,KAAK,EACL,QAAQ,EACR,QAAQ,EACT,MAAM,2BAA2B,CAAA;AAElC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBA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G,EAAE,GAAG,GAAG,UAAU,CAKvD;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,GAAG,GAAG,UAAU,CAKnD;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,GAAG,GAAG,UAAU,CAK9C"}
@@ -1 +1 @@
1
- {"version":3,"file":"env.js","sourceRoot":"","sources":["../../src/infrastructure/env.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AA0vB7D;;;;;;GAMG;AACH,MAAM,UAAU,kBAAkB,CAAC,GAAQ;IACzC,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC;QACtB,MAAM,aAAa,CAAC,EAAE,GAAG,EAAE,cAAc,EAAE,GAAG,QAAQ,CAAC,YAAY,EAAE,CAAC,CAAA;IACxE,CAAC;IACD,OAAO,GAAG,CAAC,YAAY,CAAA;AACzB,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,GAAQ;IACrC,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;QAClB,MAAM,aAAa,CAAC,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAA;IAChE,CAAC;IACD,OAAO,GAAG,CAAC,QAAQ,CAAA;AACrB,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,SAAS,CAAC,GAAQ;IAChC,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC;QACZ,MAAM,aAAa,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,QAAQ,CAAC,EAAE,EAAE,CAAC,CAAA;IACpD,CAAC;IACD,OAAO,GAAG,CAAC,EAAE,CAAA;AACf,CAAC"}
1
+ {"version":3,"file":"env.js","sourceRoot":"","sources":["../../src/infrastructure/env.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAowB7D;;;;;;GAMG;AACH,MAAM,UAAU,kBAAkB,CAAC,GAAQ;IACzC,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC;QACtB,MAAM,aAAa,CAAC,EAAE,GAAG,EAAE,cAAc,EAAE,GAAG,QAAQ,CAAC,YAAY,EAAE,CAAC,CAAA;IACxE,CAAC;IACD,OAAO,GAAG,CAAC,YAAY,CAAA;AACzB,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,GAAQ;IACrC,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;QAClB,MAAM,aAAa,CAAC,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAA;IAChE,CAAC;IACD,OAAO,GAAG,CAAC,QAAQ,CAAA;AACrB,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,SAAS,CAAC,GAAQ;IAChC,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC;QACZ,MAAM,aAAa,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,QAAQ,CAAC,EAAE,EAAE,CAAC,CAAA;IACpD,CAAC;IACD,OAAO,GAAG,CAAC,EAAE,CAAA;AACf,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { BinaryArtifactMetadataStore, BinaryArtifactRecord } from '@cat-factory/kernel';
1
+ import type { BinaryArtifactMetadataStore, BinaryArtifactRecord, DocumentArtifactRef } from '@cat-factory/kernel';
2
2
  import type { D1Database } from '@cloudflare/workers-types';
3
3
  /** D1-backed metadata store for binary artifacts (see migration 0017). Bytes live in R2/S3. */
4
4
  export declare class D1BinaryArtifactMetadataStore implements BinaryArtifactMetadataStore {
@@ -11,6 +11,8 @@ export declare class D1BinaryArtifactMetadataStore implements BinaryArtifactMeta
11
11
  listByExecution(workspaceId: string, executionId: string): Promise<BinaryArtifactRecord[]>;
12
12
  countByExecution(workspaceId: string, executionId: string): Promise<number>;
13
13
  listByBlock(workspaceId: string, blockId: string): Promise<BinaryArtifactRecord[]>;
14
+ listByDocument(workspaceId: string, document: DocumentArtifactRef): Promise<BinaryArtifactRecord[]>;
15
+ deleteByIds(workspaceId: string, ids: readonly string[]): Promise<number>;
14
16
  delete(workspaceId: string, id: string): Promise<void>;
15
17
  listOlderThan(workspaceId: string, olderThan: number): Promise<BinaryArtifactRecord[]>;
16
18
  deleteOlderThan(workspaceId: string, olderThan: number): Promise<number>;
@@ -1 +1 @@
1
- {"version":3,"file":"D1BinaryArtifactMetadataStore.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/repositories/D1BinaryArtifactMetadataStore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAA;AAC5F,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AAkC3D,+FAA+F;AAC/F,qBAAa,6BAA8B,YAAW,2BAA2B;IAC/E,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAY;IAE/B,YAAY,EAAE,EAAE,EAAE,EAAE;QAAE,EAAE,EAAE,UAAU,CAAA;KAAE,EAErC;IAEK,MAAM,CAAC,MAAM,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC,CAuBxD;IAEK,GAAG,CAAC,WAAW,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC,CAM/E;IAEK,eAAe,CAAC,WAAW,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,EAAE,CAAC,CAU/F;IAEK,gBAAgB,CAAC,WAAW,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAQhF;IAEK,WAAW,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,EAAE,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