deepline 0.3.570 → 0.3.572

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 (152) hide show
  1. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  2. package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +25 -0
  3. package/dist/bundling-sources/shared_libs/play-runtime/context.ts +1 -0
  4. package/dist/bundling-sources/shared_libs/play-runtime/experiment-switches.ts +11 -0
  5. package/dist/bundling-sources/shared_libs/play-runtime/resource-governor.ts +17 -0
  6. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +2 -0
  7. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-payload-transport.ts +28 -17
  8. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/modal.ts +360 -3
  9. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/early-sandbox.ts +274 -3
  10. package/dist/bundling-sources/shared_libs/play-runtime/runtime-api-connection-probe.ts +199 -0
  11. package/dist/bundling-sources/shared_libs/play-runtime/runtime-scheduler-topology.ts +35 -0
  12. package/dist/bundling-sources/shared_libs/play-runtime/runtime-speed-profile.ts +28 -0
  13. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-pool.ts +2 -2
  14. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +11 -1
  15. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/early-sandbox-claim-affinity.ts +67 -43
  16. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/early-sandbox-lane.ts +23 -6
  17. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/early-sandbox-listener-hint.ts +62 -0
  18. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +54 -2
  19. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-worker-wake.ts +54 -5
  20. package/dist/cli/auth-PXIVGUVZ.js +44 -0
  21. package/dist/cli/{auth-KHJKNEYN.mjs → auth-YUDM3YOC.mjs} +5 -5
  22. package/dist/cli/{billing-Q4BRUODF.js → billing-F3ZGOWKL.js} +99 -99
  23. package/dist/cli/{billing-R5AO4M3S.mjs → billing-O7WUC4TU.mjs} +8 -8
  24. package/dist/cli/{chunk-FDSQSUZF.js → chunk-3SFLY3T3.js} +5 -5
  25. package/dist/cli/{chunk-GPXLMRCB.js → chunk-43GCEVHO.js} +3 -3
  26. package/dist/cli/{chunk-YQP4ZUOJ.js → chunk-4W5EFHHY.js} +7 -7
  27. package/dist/cli/{chunk-2GTLZNSK.js → chunk-5EMYPLTW.js} +53 -53
  28. package/dist/cli/{chunk-NR7QW2E7.js → chunk-5VUD7HGD.js} +2 -2
  29. package/dist/cli/{chunk-ZZ4D74UL.mjs → chunk-6R57HEPF.mjs} +1 -1
  30. package/dist/cli/{chunk-GFGXDDJH.mjs → chunk-72WI67H4.mjs} +2 -2
  31. package/dist/cli/{chunk-J6PTH725.js → chunk-AHNJGA6Z.js} +6 -6
  32. package/dist/cli/{chunk-77HEH4RY.mjs → chunk-AJO3I3LL.mjs} +1 -1
  33. package/dist/cli/{chunk-NVYQ6WCW.mjs → chunk-BWWDU6FN.mjs} +5 -5
  34. package/dist/cli/{chunk-UWQLRBXY.mjs → chunk-CYW6PE3G.mjs} +5 -5
  35. package/dist/cli/{chunk-5OOGWYSR.mjs → chunk-EDAG7ZU4.mjs} +1 -1
  36. package/dist/cli/{chunk-WINZRS3A.mjs → chunk-EKIWY5DD.mjs} +1 -1
  37. package/dist/cli/{chunk-3YHMHV6U.mjs → chunk-EKWDSE6H.mjs} +4 -4
  38. package/dist/cli/{chunk-OWEUQCBZ.js → chunk-EL4LME5Y.js} +48 -48
  39. package/dist/cli/{chunk-UDN6EYBJ.js → chunk-FGBX2WVJ.js} +4 -4
  40. package/dist/cli/{chunk-XHFSNMEU.mjs → chunk-GX4VZL4Z.mjs} +3 -3
  41. package/dist/cli/{chunk-NWAFCOUF.js → chunk-HYCJNHZ4.js} +15 -15
  42. package/dist/cli/{chunk-I4N62RWB.mjs → chunk-I4WKB3HO.mjs} +2 -2
  43. package/dist/cli/{chunk-FABLUH75.js → chunk-ITQPBWDS.js} +3 -3
  44. package/dist/cli/{chunk-HPWP2B3D.mjs → chunk-JEI7PHET.mjs} +1 -1
  45. package/dist/cli/{chunk-2GBOHROU.mjs → chunk-JJEN7TRR.mjs} +1 -1
  46. package/dist/cli/{chunk-W26YT37U.js → chunk-K4LAEKHS.js} +41 -41
  47. package/dist/cli/{chunk-ZZ7ZH27W.js → chunk-LBNP52C4.js} +5 -5
  48. package/dist/cli/{chunk-73RTZMDV.mjs → chunk-MVQ5XGRO.mjs} +3 -3
  49. package/dist/cli/{chunk-PERYT4ZA.js → chunk-NOKSEYMS.js} +1 -1
  50. package/dist/cli/{chunk-EEUBKKJE.mjs → chunk-OUVQKSVC.mjs} +1 -1
  51. package/dist/cli/{chunk-OV6EKORX.js → chunk-PI4TKE2B.js} +26 -26
  52. package/dist/cli/{chunk-OOTXBEHG.mjs → chunk-PQ6PM4V6.mjs} +1 -1
  53. package/dist/cli/{chunk-2MXS53XJ.js → chunk-PRDCU7BY.js} +20 -20
  54. package/dist/cli/{chunk-CHHXUEVC.js → chunk-PZGK6EEB.js} +100 -100
  55. package/dist/cli/{chunk-O3ET4XR3.mjs → chunk-Q6H5RRTG.mjs} +4 -4
  56. package/dist/cli/{chunk-MVHKTZCX.mjs → chunk-QA733N7N.mjs} +1 -1
  57. package/dist/cli/{chunk-SOZ2SB43.js → chunk-QMIMGKR2.js} +9 -9
  58. package/dist/cli/{chunk-TMT3S2JR.mjs → chunk-RIA73OAZ.mjs} +2 -2
  59. package/dist/cli/{chunk-BEE5VGCL.mjs → chunk-SJI56XPM.mjs} +11 -11
  60. package/dist/cli/{chunk-TWHTVGGW.mjs → chunk-UFUXGMHL.mjs} +2 -2
  61. package/dist/cli/{chunk-JSHE4W6W.js → chunk-UKD5ZBQD.js} +5 -5
  62. package/dist/cli/{chunk-I5EZZFQL.mjs → chunk-UMP76GYQ.mjs} +3 -3
  63. package/dist/cli/{chunk-RS6KPFQX.mjs → chunk-UQWYDNGB.mjs} +5 -5
  64. package/dist/cli/{chunk-PSMYOQFI.js → chunk-UUYB6IXC.js} +13 -13
  65. package/dist/cli/{chunk-EYEPXZNS.mjs → chunk-UY6Z3XWW.mjs} +2 -2
  66. package/dist/cli/{chunk-MH3WE5O6.mjs → chunk-V2W7GX2I.mjs} +2 -2
  67. package/dist/cli/{chunk-WNUFRUNS.js → chunk-VGPHXXPI.js} +15 -15
  68. package/dist/cli/{chunk-Q4P6STRD.js → chunk-VZ4S5JRC.js} +23 -23
  69. package/dist/cli/{chunk-OPZHUL6T.js → chunk-W3HLZ24Q.js} +10 -10
  70. package/dist/cli/{chunk-J6M2AX3P.js → chunk-W3RHISD6.js} +8 -8
  71. package/dist/cli/{chunk-EJB4V77N.mjs → chunk-W742U53L.mjs} +5 -5
  72. package/dist/cli/{chunk-YXJVYY5V.mjs → chunk-X6F4XOT2.mjs} +2 -2
  73. package/dist/cli/{chunk-ZGOCDLJQ.js → chunk-XNJXRS3B.js} +2 -2
  74. package/dist/cli/{chunk-NIO2T6OC.js → chunk-XVQE6IBS.js} +2 -2
  75. package/dist/cli/{chunk-DPZAEVPO.js → chunk-YOST7EJF.js} +20 -20
  76. package/dist/cli/{concurrent-runs-help-Q26CEJ7I.mjs → concurrent-runs-help-5BKCGFGL.mjs} +6 -6
  77. package/dist/cli/concurrent-runs-help-KGELXJIQ.js +22 -0
  78. package/dist/cli/{csv-Z34I5QIU.js → csv-7ZAWND7L.js} +13 -13
  79. package/dist/cli/{csv-6LI6HLKG.mjs → csv-MO5WZZDN.mjs} +4 -4
  80. package/dist/cli/{db-NUDEYQCF.js → db-36LX7JBQ.js} +27 -27
  81. package/dist/cli/{db-K5GKIKQU.mjs → db-OYMULINA.mjs} +6 -6
  82. package/dist/cli/describe-AVGE4MH6.js +50 -0
  83. package/dist/cli/{describe-EB4KTEPT.mjs → describe-JLAERB6X.mjs} +18 -18
  84. package/dist/cli/{executions-KHOUABZ3.js → executions-AQ32J4BZ.js} +8 -8
  85. package/dist/cli/{executions-DAGHJZEI.mjs → executions-IZAB2XNC.mjs} +6 -6
  86. package/dist/cli/{feedback-XLAWTPK2.js → feedback-3IV54HOH.js} +14 -14
  87. package/dist/cli/{feedback-A57YETEA.mjs → feedback-WA6EBE5H.mjs} +6 -6
  88. package/dist/cli/{git-U3FNR34D.mjs → git-OSLU6HIK.mjs} +5 -5
  89. package/dist/cli/git-VOFO6V5W.js +26 -0
  90. package/dist/cli/index.js +143 -143
  91. package/dist/cli/index.mjs +45 -45
  92. package/dist/cli/{integrations-YVOJ5D6W.js → integrations-65SYNL53.js} +29 -29
  93. package/dist/cli/{integrations-LXUMB4RY.mjs → integrations-WOXFOC4M.mjs} +7 -7
  94. package/dist/cli/{legacy-noops-IZVLGQZJ.js → legacy-noops-3SGXDAV6.js} +9 -9
  95. package/dist/cli/{legacy-noops-4Z2RBTHW.mjs → legacy-noops-4FNG2JY3.mjs} +6 -6
  96. package/dist/cli/{mcp-GRGI3KYH.js → mcp-PX27RHCY.js} +24 -24
  97. package/dist/cli/{mcp-ZHXRVV7D.mjs → mcp-RZLWMZHH.mjs} +4 -4
  98. package/dist/cli/{monitors-XFN5D6EW.js → monitors-F5BLGS4R.js} +100 -100
  99. package/dist/cli/{monitors-7ZVYJ3CX.mjs → monitors-VK2LW7VU.mjs} +7 -7
  100. package/dist/cli/{org-YY5JTKNV.mjs → org-7AEBTN6Y.mjs} +6 -6
  101. package/dist/cli/{org-RWWXN5TK.js → org-UU3V7U4K.js} +121 -121
  102. package/dist/cli/{outcomes-MGWUZNQ6.mjs → outcomes-BWERSUJL.mjs} +6 -6
  103. package/dist/cli/{outcomes-AOZVYNJT.js → outcomes-GCTBGPMK.js} +14 -14
  104. package/dist/cli/{play-S34KIOWS.js → play-7NBCCL26.js} +324 -324
  105. package/dist/cli/{play-AJR7BT3R.mjs → play-TX3RAAYS.mjs} +19 -19
  106. package/dist/cli/{providers-S4WMWHBW.js → providers-IL2IVKHB.js} +9 -9
  107. package/dist/cli/{providers-QRWQGVIC.mjs → providers-KFWZXDCV.mjs} +6 -6
  108. package/dist/cli/{quickstart-GET2M3BQ.js → quickstart-MPA6TUK5.js} +6 -6
  109. package/dist/cli/{quickstart-NLAIOXVY.mjs → quickstart-RAMDGRRI.mjs} +4 -4
  110. package/dist/cli/{run-R2RYHNVS.mjs → run-QNJSKPBN.mjs} +23 -23
  111. package/dist/cli/{run-BOHHBZSI.js → run-WBUSXBUS.js} +44 -44
  112. package/dist/cli/{search-VBIVRRRO.mjs → search-2X4P2FXR.mjs} +7 -7
  113. package/dist/cli/search-CJHG3VA4.js +32 -0
  114. package/dist/cli/{search-output-OCYIQFV6.mjs → search-output-MNJ4AQLV.mjs} +4 -4
  115. package/dist/cli/{search-output-EVNRKEGZ.js → search-output-P2WNCHA3.js} +6 -6
  116. package/dist/cli/{secrets-52T2SCZ5.js → secrets-K5CNDUVR.js} +15 -15
  117. package/dist/cli/{secrets-TNCO45WJ.mjs → secrets-XX54OU22.mjs} +6 -6
  118. package/dist/cli/sessions-3RMRBBJZ.js +23 -0
  119. package/dist/cli/{sessions-4XE7AR3A.mjs → sessions-C4GQ6ZVO.mjs} +6 -6
  120. package/dist/cli/{settings-ZFCHR7MW.mjs → settings-7HBTADGW.mjs} +12 -12
  121. package/dist/cli/{settings-TKRF2B3K.js → settings-QP3DVFPS.js} +85 -85
  122. package/dist/cli/{setup-QY3ZML4C.mjs → setup-VPDAKY2G.mjs} +9 -9
  123. package/dist/cli/{setup-AWNE4VNL.js → setup-X6J7U6B4.js} +49 -49
  124. package/dist/cli/skills-JUGXGSX2.js +37 -0
  125. package/dist/cli/{skills-GUGJDCFY.mjs → skills-UGY6W4AC.mjs} +7 -7
  126. package/dist/cli/{tools-NBKPWOWD.mjs → tools-SVBUAHDD.mjs} +17 -17
  127. package/dist/cli/tools-ZEI42NSP.js +57 -0
  128. package/dist/cli/{update-KLGVIBRY.mjs → update-SDNKNDNW.mjs} +9 -9
  129. package/dist/cli/update-VC4UEGMR.js +37 -0
  130. package/dist/cli/{views-MDXEIVQ7.js → views-JBFSHQBU.js} +21 -21
  131. package/dist/cli/{views-OEOW2EZO.mjs → views-M6RBPC65.mjs} +6 -6
  132. package/dist/cli/{workflow-LK4SIUOM.mjs → workflow-RYVRAIHV.mjs} +7 -7
  133. package/dist/cli/{workflow-PUSTWPW4.js → workflow-UAMTGHQC.js} +17 -17
  134. package/dist/index.js +9 -9
  135. package/dist/index.mjs +6 -6
  136. package/dist/install-integrity.json +113 -112
  137. package/dist/release.d.mts +1 -1
  138. package/dist/release.d.ts +1 -1
  139. package/dist/release.js +2 -2
  140. package/dist/release.mjs +1 -1
  141. package/dist/server.js +5 -5
  142. package/dist/server.mjs +3 -3
  143. package/package.json +1 -1
  144. package/dist/cli/auth-X2LWGPF4.js +0 -44
  145. package/dist/cli/concurrent-runs-help-QDURIV4N.js +0 -22
  146. package/dist/cli/describe-BY7LKP53.js +0 -50
  147. package/dist/cli/git-CR6PBWBH.js +0 -26
  148. package/dist/cli/search-CZVM2OX5.js +0 -32
  149. package/dist/cli/sessions-GOHYDYMH.js +0 -23
  150. package/dist/cli/skills-54CGCMPF.js +0 -37
  151. package/dist/cli/tools-A7FEGDPX.js +0 -57
  152. package/dist/cli/update-3J52CJHB.js +0 -37
@@ -205,7 +205,7 @@ export const SDK_RELEASE = {
205
205
  // getters keep their established compatibility behavior.
206
206
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
207
207
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
208
- version: '0.3.570',
208
+ version: '0.3.572',
209
209
  updateSummary: {
210
210
  introducedIn: '0.3.90',
211
211
  summary:
@@ -5,6 +5,11 @@ import {
5
5
  import { prepareRetainedPlayPipelinesForTransport } from '../plays/execution-pipeline';
6
6
  import { createWriteStream } from 'node:fs';
7
7
  import { createHash, randomUUID } from 'node:crypto';
8
+ import {
9
+ runtimeApiConnectionProbe,
10
+ settledRuntimeApiConnectionProbe,
11
+ type RuntimeApiConnectionProbe,
12
+ } from './runtime-api-connection-probe';
8
13
  import { stat } from 'node:fs/promises';
9
14
  import { Readable } from 'node:stream';
10
15
  import { pipeline } from 'node:stream/promises';
@@ -423,6 +428,12 @@ export type WorkerRuntimeApiContext = {
423
428
  * gateway record that produced it.
424
429
  */
425
430
  onResponseMeta?: (meta: RuntimeApiResponseMeta) => void;
431
+ /**
432
+ * Measure one fresh connection to this origin once per process (DNS, TCP
433
+ * connect, TLS) off the request path and report it on `onResponseMeta` as
434
+ * `connectionProbe`. Only the runner's receipt gateway context sets it.
435
+ */
436
+ probeConnection?: boolean;
426
437
  /**
427
438
  * Observe each request attempt as it is sent. `onResponseMeta` only fires
428
439
  * for a successful response, so an attempt that is aborted or times out
@@ -517,6 +528,13 @@ export type RuntimeApiResponseMeta = {
517
528
  * network time.
518
529
  */
519
530
  requestBodyPackMs?: number | null;
531
+ /**
532
+ * One fresh connection's setup cost to this origin, measured once per
533
+ * process off the request path (`runtime-api-connection-probe.ts`). Null
534
+ * until it has settled. Compare its `connectMs` with `roundTripMs` to tell
535
+ * path latency from per-request connection setup.
536
+ */
537
+ connectionProbe?: RuntimeApiConnectionProbe | null;
520
538
  };
521
539
 
522
540
  const RUNTIME_API_DIAGNOSTIC_HEADER_MAX_CHARS = 256;
@@ -1737,6 +1755,10 @@ async function postAppRuntimeApiAttempts<TResponse>(
1737
1755
  }
1738
1756
  const runtimeFetch = context.fetch ?? fetch;
1739
1757
  const boundaryLabel = runtimeApiBoundaryLabel(context);
1758
+ // Diagnostic only: one fresh-connection measurement per process and origin,
1759
+ // started on the first observed request and never awaited.
1760
+ if (context.probeConnection && context.onResponseMeta)
1761
+ void runtimeApiConnectionProbe(baseUrl);
1740
1762
  const fastRunLedgerBypass =
1741
1763
  body.action === 'append_run_events' || body.action === 'project_run_events';
1742
1764
  const vercelHeaders = fastRunLedgerBypass
@@ -2015,6 +2037,9 @@ async function postAppRuntimeApiAttempts<TResponse>(
2015
2037
  requestBodyWireBytes: wireBody.wireBytes,
2016
2038
  requestBodySerializeMs,
2017
2039
  requestBodyPackMs,
2040
+ connectionProbe: context.probeConnection
2041
+ ? settledRuntimeApiConnectionProbe(baseUrl)
2042
+ : null,
2018
2043
  });
2019
2044
  } catch {
2020
2045
  // Observation must never affect durable delivery.
@@ -20164,6 +20164,7 @@ export class PlayContextImpl implements ScalarPlayAuthoringRuntimeContext {
20164
20164
  // it serialized and what it actually sent.
20165
20165
  gatewayRequestRawBytes: meta.requestBodyRawBytes ?? null,
20166
20166
  gatewayRequestWireBytes: meta.requestBodyWireBytes ?? null,
20167
+ gatewayConnectionProbe: meta.connectionProbe ?? null,
20167
20168
  });
20168
20169
  }
20169
20170
 
@@ -137,6 +137,17 @@ export const EXPERIMENT_SWITCHES = {
137
137
  { file: EARLY_SANDBOX, name: 'PREBOOT_RUNNER_IN_EARLY_SANDBOX' },
138
138
  ],
139
139
  },
140
+ PX: {
141
+ perRun: true,
142
+ summary:
143
+ 'With PB, the worker that pre-boots an early sandbox publishes its runner plan as MAC-signed tags, so a launch on any worker can deliver to it instead of refusing it as early_preboot_foreign (worker).',
144
+ constants: [
145
+ {
146
+ file: EARLY_SANDBOX,
147
+ name: 'ADOPT_PREBOOTED_EARLY_SANDBOX_ACROSS_PROCESSES',
148
+ },
149
+ ],
150
+ },
140
151
  PWM: {
141
152
  perRun: true,
142
153
  summary:
@@ -1,3 +1,4 @@
1
+ import type { RuntimeApiConnectionProbe } from './runtime-api-connection-probe';
1
2
  import type { RuntimeMapHeapAdmissionSnapshot } from './map-memory-limits';
2
3
  import type {
3
4
  RuntimeMemoryLedger,
@@ -193,6 +194,8 @@ export type RuntimeResourceObservation = {
193
194
  */
194
195
  gatewayRequestRawBytes?: number | null;
195
196
  gatewayRequestWireBytes?: number | null;
197
+ /** One fresh connection's setup cost to the gateway origin (once per process). */
198
+ gatewayConnectionProbe?: RuntimeApiConnectionProbe | null;
196
199
  /** Completion enqueue to the launch of the batch that carries it. */
197
200
  receiptCompletionQueueMs?: number | null;
198
201
  /**
@@ -455,6 +458,13 @@ export type RuntimeResourceSnapshot = {
455
458
  rawBytes: number;
456
459
  wireBytes: number;
457
460
  };
461
+ /**
462
+ * One fresh connection to the gateway origin, measured once per runner
463
+ * process off the request path: DNS, TCP connect (about one round trip)
464
+ * and TLS. Set against `phases.gatewayRoundTrip` it says whether requests
465
+ * reuse connections. Absent until measured, and on older runners.
466
+ */
467
+ connectionProbe?: RuntimeApiConnectionProbe;
458
468
  };
459
469
  providers: Record<
460
470
  string,
@@ -1348,6 +1358,7 @@ export function createRuntimeResourceGovernor(input: {
1348
1358
  upstreamHeadersMs: 0,
1349
1359
  upstreamBodyMs: 0,
1350
1360
  };
1361
+ let gatewayConnectionProbe: RuntimeApiConnectionProbe | null = null;
1351
1362
  const gatewayAuthSessionCounters = {
1352
1363
  hit: 0,
1353
1364
  miss: 0,
@@ -1754,6 +1765,9 @@ export function createRuntimeResourceGovernor(input: {
1754
1765
  if (observation.gatewayAuthSession != null) {
1755
1766
  gatewayAuthSessionCounters[observation.gatewayAuthSession] += 1;
1756
1767
  }
1768
+ if (observation.gatewayConnectionProbe != null) {
1769
+ gatewayConnectionProbe = observation.gatewayConnectionProbe;
1770
+ }
1757
1771
  // Raw is the authority for the count: every request has serialized bytes,
1758
1772
  // so a missing wire size (an older transport) adds nothing rather than
1759
1773
  // silently reporting a request that moved zero bytes.
@@ -2225,6 +2239,9 @@ export function createRuntimeResourceGovernor(input: {
2225
2239
  },
2226
2240
  authSession: { ...gatewayAuthSessionCounters },
2227
2241
  requestBody: { ...gatewayRequestBodyCounters },
2242
+ ...(gatewayConnectionProbe
2243
+ ? { connectionProbe: { ...gatewayConnectionProbe } }
2244
+ : {}),
2228
2245
  },
2229
2246
  rows: {
2230
2247
  acquired: rowCounters.acquired,
@@ -2692,6 +2692,8 @@ async function run(
2692
2692
  boundary: 'receipt_gateway' as const,
2693
2693
  requestTimeoutMs: RUNTIME_RECEIPT_GATEWAY_REQUEST_TIMEOUT_MS,
2694
2694
  onResponseMeta: receiptGatewayResponseObserver.onResponseMeta,
2695
+ // One fresh-connection measurement per runner process (diagnostic).
2696
+ probeConnection: true,
2695
2697
  }
2696
2698
  : null;
2697
2699
  const canUseRuntimeStepReceipts = playRunnerRuntimeReceiptsEnabled(
@@ -764,31 +764,38 @@ function buildDetachedRunnerCommand(input: {
764
764
  * `materialize`.
765
765
  */
766
766
  oneNodeBakedGuard?: { path: string; hash: string };
767
+ /**
768
+ * PX: one nonce for every path of a pre-booted runner, so a worker other
769
+ * than the one that started it can rebuild the same paths from the nonce
770
+ * the pre-boot published. Absent: a fresh UUID per path, as before.
771
+ */
772
+ pathNonce?: string;
767
773
  }): DetachedRunnerPaths & {
768
774
  command: string;
769
775
  /** N1 only: the marker the guard writes once the baked runner verified. */
770
776
  bakedPassMarkerPath?: string;
771
777
  } {
772
778
  const { workDir, configPath, crashPusherPath, materialize } = input;
779
+ const pathId = () => input.pathNonce ?? randomUUID();
773
780
  const oneNodeBakedGuard =
774
781
  materialize !== null ? (input.oneNodeBakedGuard ?? null) : null;
775
782
  const bakedPassMarkerPath = oneNodeBakedGuard
776
- ? `${workDir}/deepline-play-baked-verified-${randomUUID()}.txt`
783
+ ? `${workDir}/deepline-play-baked-verified-${pathId()}.txt`
777
784
  : null;
778
785
  const runtimeLimitSeconds = input.sandboxRuntimeLimits.timeoutSeconds;
779
- const outputPath = `${workDir}/deepline-play-output-${randomUUID()}.log`;
780
- const crashPusherLogPath = `${workDir}/deepline-play-crash-terminal-${randomUUID()}.log`;
781
- const exitCodePath = `${workDir}/deepline-play-exit-${randomUUID()}.txt`;
782
- const oomKillBaselinePath = `${workDir}/deepline-play-oom-kill-${randomUUID()}.txt`;
783
- const runnerPidPath = `${workDir}/deepline-play-runner-pid-${randomUUID()}.txt`;
784
- const runtimeStartedPath = `${workDir}/deepline-play-runtime-started-${randomUUID()}.json`;
785
- const runtimeCompletedPath = `${workDir}/deepline-play-runtime-completed-${randomUUID()}.json`;
786
- const runtimeLimitMarkerPath = `${workDir}/deepline-play-runtime-limit-${randomUUID()}.txt`;
787
- const terminationDiagnosticPath = `${workDir}/deepline-play-termination-${randomUUID()}.json`;
788
- const memoryLedgerPath = `${workDir}/deepline-play-memory-ledger-${randomUUID()}.json`;
789
- const memoryPressurePath = `${workDir}/deepline-play-memory-pressure-${randomUUID()}.json`;
790
- const progressEventPath = `${workDir}/deepline-play-progress-${randomUUID()}.jsonl`;
791
- const startupDiagnosticPath = `${workDir}/deepline-play-startup-${randomUUID()}.json`;
786
+ const outputPath = `${workDir}/deepline-play-output-${pathId()}.log`;
787
+ const crashPusherLogPath = `${workDir}/deepline-play-crash-terminal-${pathId()}.log`;
788
+ const exitCodePath = `${workDir}/deepline-play-exit-${pathId()}.txt`;
789
+ const oomKillBaselinePath = `${workDir}/deepline-play-oom-kill-${pathId()}.txt`;
790
+ const runnerPidPath = `${workDir}/deepline-play-runner-pid-${pathId()}.txt`;
791
+ const runtimeStartedPath = `${workDir}/deepline-play-runtime-started-${pathId()}.json`;
792
+ const runtimeCompletedPath = `${workDir}/deepline-play-runtime-completed-${pathId()}.json`;
793
+ const runtimeLimitMarkerPath = `${workDir}/deepline-play-runtime-limit-${pathId()}.txt`;
794
+ const terminationDiagnosticPath = `${workDir}/deepline-play-termination-${pathId()}.json`;
795
+ const memoryLedgerPath = `${workDir}/deepline-play-memory-ledger-${pathId()}.json`;
796
+ const memoryPressurePath = `${workDir}/deepline-play-memory-pressure-${pathId()}.json`;
797
+ const progressEventPath = `${workDir}/deepline-play-progress-${pathId()}.jsonl`;
798
+ const startupDiagnosticPath = `${workDir}/deepline-play-startup-${pathId()}.json`;
792
799
  const runnerTraceEnv =
793
800
  process.env.DEEPLINE_RUNTIME_RECEIPT_TRACE === '1'
794
801
  ? 'DEEPLINE_RUNTIME_RECEIPT_TRACE=1 '
@@ -933,14 +940,17 @@ export function buildPrebootedRunnerLaunch(input: {
933
940
  sandboxRuntimeLimits: PlaySandboxRuntimeLimits;
934
941
  memoryLimitMiB?: number;
935
942
  nodeBinaryPath?: string;
943
+ /** PX: rebuild a published pre-boot's exact paths (see buildDetachedRunnerCommand). */
944
+ pathNonce?: string;
936
945
  }): PrebootedRunnerLaunch {
937
946
  const workDir = input.workDir.replace(/\/$/, '');
938
947
  const sandboxRuntimeLimits = validatePlaySandboxRuntimeLimits(
939
948
  input.sandboxRuntimeLimits,
940
949
  );
941
- const configPath = `${workDir}/deepline-play-config-${randomUUID()}.json`;
942
- const artifactCodePath = `${workDir}/deepline-play-artifact-${randomUUID()}.cjs`;
943
- const crashPusherPath = `${workDir}/deepline-play-crash-terminal-${randomUUID()}.cjs`;
950
+ const pathId = () => input.pathNonce ?? randomUUID();
951
+ const configPath = `${workDir}/deepline-play-config-${pathId()}.json`;
952
+ const artifactCodePath = `${workDir}/deepline-play-artifact-${pathId()}.cjs`;
953
+ const crashPusherPath = `${workDir}/deepline-play-crash-terminal-${pathId()}.cjs`;
944
954
  const nodeCommand = input.nodeBinaryPath
945
955
  ? shellQuote(input.nodeBinaryPath)
946
956
  : 'node';
@@ -953,6 +963,7 @@ export function buildPrebootedRunnerLaunch(input: {
953
963
  configPath,
954
964
  crashPusherPath,
955
965
  materialize: null,
966
+ ...(input.pathNonce === undefined ? {} : { pathNonce: input.pathNonce }),
956
967
  });
957
968
  return {
958
969
  ...paths,