deepline 0.1.221 → 0.1.223

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.
@@ -21,6 +21,9 @@ import {
21
21
  DB_SESSION_MAX_TTL_SECONDS,
22
22
  type PreloadedRuntimeDbSession,
23
23
  } from '../../../shared_libs/play-runtime/db-session';
24
+ import { createSecretRedactionContext } from '../../../shared_libs/play-runtime/secret-redaction';
25
+
26
+ const durableStorageRedactor = createSecretRedactionContext();
24
27
 
25
28
  type DurableObjectStorage = {
26
29
  get<T>(key: string): Promise<T | undefined>;
@@ -1016,7 +1019,7 @@ export class PlayDedup implements DurableObject {
1016
1019
  ) {
1017
1020
  return new Response('invalid trace entry', { status: 400 });
1018
1021
  }
1019
- const entry: CoordinatorTraceEntry = {
1022
+ const entry = durableStorageRedactor.redact({
1020
1023
  ...body,
1021
1024
  source: body.source,
1022
1025
  runId: body.runId,
@@ -1027,7 +1030,7 @@ export class PlayDedup implements DurableObject {
1027
1030
  typeof body.graphHash === 'string' || body.graphHash === null
1028
1031
  ? body.graphHash
1029
1032
  : undefined,
1030
- };
1033
+ }) as CoordinatorTraceEntry;
1031
1034
  await this.state.blockConcurrencyWhile(async () => {
1032
1035
  await this.state.storage.put(this.traceKey(entry), entry);
1033
1036
  const entries = await this.state.storage.list<CoordinatorTraceEntry>({
@@ -1132,7 +1135,7 @@ export class PlayDedup implements DurableObject {
1132
1135
  }
1133
1136
  const state: CoordinatorChildTerminalState = {
1134
1137
  eventKey,
1135
- data: body?.data ?? null,
1138
+ data: durableStorageRedactor.redact(body?.data ?? null),
1136
1139
  storedAt:
1137
1140
  typeof body?.storedAt === 'number' && Number.isFinite(body.storedAt)
1138
1141
  ? body.storedAt
@@ -33,6 +33,7 @@ import {
33
33
  type WorkflowStep,
34
34
  } from 'cloudflare:workers';
35
35
  import { AsyncLocalStorage } from 'node:async_hooks';
36
+ import { createWorkerTelemetry } from '../../../shared_libs/observability/worker-telemetry';
36
37
  import {
37
38
  deterministicMapChunkStepName,
38
39
  type ExecutionPlan,
@@ -276,7 +277,10 @@ import {
276
277
  type ReceiptSalvage,
277
278
  type ReceiptSalvageBuffer,
278
279
  } from '../../../shared_libs/play-runtime/receipt-salvage';
279
- import { createSecretRedactionContext } from '../../../shared_libs/play-runtime/secret-redaction';
280
+ import {
281
+ createSecretRedactionContext,
282
+ redactSecretLikeString,
283
+ } from '../../../shared_libs/play-runtime/secret-redaction';
280
284
  import {
281
285
  assertNoSecretTaint,
282
286
  assertSecretAuthUsesTls,
@@ -776,20 +780,20 @@ function requireHarnessBinding(env: WorkerEnv): PlayHarnessRpc {
776
780
  let harnessProbeFiredForIsolate = false;
777
781
  async function probeHarnessOnce(
778
782
  env: WorkerEnv,
779
- runPrefix: string,
783
+ req: RunRequest,
780
784
  ): Promise<void> {
781
785
  if (harnessProbeFiredForIsolate) return;
782
786
  const harness = requireHarnessBinding(env);
783
787
  try {
784
788
  const result = await harness.ping();
785
789
  harnessProbeFiredForIsolate = true;
786
- console.log(
787
- `${runPrefix} [harness-probe] env.HARNESS connected ts=${result.ts}`,
788
- );
790
+ console.info(`[deepline-run:${req.runId}] [harness-probe]`, {
791
+ probeTimestamp: result.ts,
792
+ });
789
793
  } catch (error) {
790
794
  const message = error instanceof Error ? error.message : String(error);
791
795
  throw new Error(
792
- `${runPrefix} [harness-probe] env.HARNESS resolved but ping failed: ${message}`,
796
+ `[deepline-run:${req.runId}] [harness-probe] env.HARNESS resolved but ping failed: ${message}`,
793
797
  );
794
798
  }
795
799
  }
@@ -1146,6 +1150,17 @@ function collectReservedResultDatasetNamespaces(
1146
1150
  return [...namespaces];
1147
1151
  }
1148
1152
 
1153
+ const runnerTelemetry = createWorkerTelemetry({
1154
+ service: 'play-runtime',
1155
+ component: 'runner',
1156
+ });
1157
+ function recordRunnerOperationalSpan(
1158
+ req: RunRequest,
1159
+ input: Record<string, unknown>,
1160
+ ): void {
1161
+ console.info('[play.runtime.span]', input);
1162
+ }
1163
+
1149
1164
  function recordRunnerPerfTrace(input: {
1150
1165
  req: RunRequest;
1151
1166
  phase: string;
@@ -1274,13 +1289,7 @@ function makeRuntimeSheetAttempt(input: {
1274
1289
  * when the executor is internal-only.
1275
1290
  */
1276
1291
  function redactSecretsFromLogString(value: string): string {
1277
- if (!value) return value;
1278
- return value
1279
- .replace(/Bearer\s+\S+/gi, 'Bearer [REDACTED]')
1280
- .replace(
1281
- /[A-Za-z0-9_-]{20,}\.[A-Za-z0-9_-]{20,}\.[A-Za-z0-9_-]{20,}/g,
1282
- '[REDACTED_JWT]',
1283
- );
1292
+ return redactSecretLikeString(value);
1284
1293
  }
1285
1294
 
1286
1295
  function safeRuntimeApiOrigin(value: string): string {
@@ -2084,7 +2093,7 @@ async function callToolDirect(
2084
2093
  transportAttempt += 1;
2085
2094
  const message = error instanceof Error ? error.message : String(error);
2086
2095
  lastError = new ToolHttpError(
2087
- `Tool ${toolId} transport failed calling ${path} for run ${req.runId} on attempt ${transportAttempt}/${TOOL_EXECUTE_TRANSPORT_MAX_ATTEMPTS}: ${message}`,
2096
+ `Tool ${toolId} transport failed path=${path} for run ${req.runId} on attempt ${transportAttempt}/${TOOL_EXECUTE_TRANSPORT_MAX_ATTEMPTS}: ${message}`,
2088
2097
  null,
2089
2098
  0,
2090
2099
  'repairable',
@@ -2097,9 +2106,14 @@ async function callToolDirect(
2097
2106
  }
2098
2107
  await onRetryAttempt?.();
2099
2108
  const delayMs = TOOL_EXECUTE_TRANSPORT_RETRY_DELAY_MS * transportAttempt;
2100
- console.warn(
2101
- `[deepline-run:${req.runId}] tool transport retry tool=${toolId} path=${path} attempt=${transportAttempt}/${TOOL_EXECUTE_TRANSPORT_MAX_ATTEMPTS} retryAfterMs=${delayMs} error=${redactSecretsFromLogString(message)}`,
2102
- );
2109
+ console.warn(`[deepline-run:${req.runId}] tool transport retry`, {
2110
+ toolId,
2111
+ path,
2112
+ attempt: transportAttempt,
2113
+ maxAttempts: TOOL_EXECUTE_TRANSPORT_MAX_ATTEMPTS,
2114
+ retryAfterMs: delayMs,
2115
+ error: redactSecretsFromLogString(message),
2116
+ });
2103
2117
  await sleepWorkerMs(delayMs);
2104
2118
  continue;
2105
2119
  }
@@ -3592,15 +3606,25 @@ async function persistCompletedMapRows(input: {
3592
3606
  rows,
3593
3607
  outputFields,
3594
3608
  });
3595
- console.warn('[play-runner.persist_completed_map_rows.start]', {
3596
- runId: req.runId,
3597
- playName: req.playName,
3598
- tableNamespace,
3599
- rows: rows.length,
3600
- outputFields,
3601
- extraOutputFields: input.extraOutputFields ?? [],
3602
- contractColumnCount: sheetContract.columns.length,
3603
- });
3609
+ await runnerTelemetry
3610
+ .child({
3611
+ context: {
3612
+ runId: req.runId,
3613
+ orgId: req.orgId,
3614
+ playName: req.playName,
3615
+ },
3616
+ })
3617
+ .info(
3618
+ 'play_runner.persist_completed_map_rows.started',
3619
+ {
3620
+ tableNamespace,
3621
+ rows: rows.length,
3622
+ outputFields: outputFields.join(','),
3623
+ extraOutputFields: (input.extraOutputFields ?? []).join(','),
3624
+ contractColumnCount: sheetContract.columns.length,
3625
+ },
3626
+ { tag: '[play-runner.persist_completed_map_rows.start]' },
3627
+ );
3604
3628
  const persistRequest = {
3605
3629
  ...sessionScope,
3606
3630
  tableNamespace,
@@ -3647,15 +3671,25 @@ async function persistCompletedMapRows(input: {
3647
3671
  const result = await harnessPersistCompletedSheetRows(persistRequest);
3648
3672
  const staleDropped = result.staleDropped ?? 0;
3649
3673
  const staleDroppedKeys = result.staleDroppedKeys ?? result.fencedKeys ?? [];
3650
- console.warn('[play-runner.persist_completed_map_rows.result]', {
3651
- runId: req.runId,
3652
- playName: req.playName,
3653
- tableNamespace,
3654
- rows: rows.length,
3655
- rowsWritten: result.rowsWritten,
3656
- expectedVisibleRows,
3657
- expectedKeyCount: expectedKeys.length,
3658
- });
3674
+ await runnerTelemetry
3675
+ .child({
3676
+ context: {
3677
+ runId: req.runId,
3678
+ orgId: req.orgId,
3679
+ playName: req.playName,
3680
+ },
3681
+ })
3682
+ .info(
3683
+ 'play_runner.persist_completed_map_rows.completed',
3684
+ {
3685
+ tableNamespace,
3686
+ rows: rows.length,
3687
+ rowsWritten: result.rowsWritten,
3688
+ expectedVisibleRows,
3689
+ expectedKeyCount: expectedKeys.length,
3690
+ },
3691
+ { tag: '[play-runner.persist_completed_map_rows.result]' },
3692
+ );
3659
3693
  let visibleRows = -1;
3660
3694
  let retryWritten: number | null = null;
3661
3695
  let retryVisible: number | null = null;
@@ -7025,7 +7059,7 @@ function createMinimalWorkerCtx(
7025
7059
  `ctx.runPlay("${resolvedName}") cannot start a child workflow per dataset row.`,
7026
7060
  );
7027
7061
  }
7028
- console.info('[play.runtime.span]', {
7062
+ recordRunnerOperationalSpan(req, {
7029
7063
  event: 'play.runtime.span',
7030
7064
  phase: 'child_route',
7031
7065
  runId: req.runId,
@@ -7115,7 +7149,7 @@ function createMinimalWorkerCtx(
7115
7149
  },
7116
7150
  });
7117
7151
  } catch (error) {
7118
- console.info('[play.runtime.span]', {
7152
+ recordRunnerOperationalSpan(req, {
7119
7153
  event: 'play.runtime.span',
7120
7154
  phase: 'child_submit',
7121
7155
  runId: req.runId,
@@ -7160,7 +7194,7 @@ function createMinimalWorkerCtx(
7160
7194
  `ctx.runPlay(${normalizedKey}) did not receive a child workflow id.`,
7161
7195
  );
7162
7196
  }
7163
- console.info('[play.runtime.span]', {
7197
+ recordRunnerOperationalSpan(req, {
7164
7198
  event: 'play.runtime.span',
7165
7199
  phase: 'child_submit',
7166
7200
  runId: req.runId,
@@ -7272,7 +7306,7 @@ function createMinimalWorkerCtx(
7272
7306
  hashJson,
7273
7307
  });
7274
7308
  } catch (error) {
7275
- console.info('[play.runtime.span]', {
7309
+ recordRunnerOperationalSpan(req, {
7276
7310
  event: 'play.runtime.span',
7277
7311
  phase: 'child_wait',
7278
7312
  runId: req.runId,
@@ -7304,7 +7338,7 @@ function createMinimalWorkerCtx(
7304
7338
  });
7305
7339
  throw error;
7306
7340
  }
7307
- console.info('[play.runtime.span]', {
7341
+ recordRunnerOperationalSpan(req, {
7308
7342
  event: 'play.runtime.span',
7309
7343
  phase: 'child_wait',
7310
7344
  runId: req.runId,
@@ -7557,11 +7591,10 @@ async function handleRun(request: Request, env: WorkerEnv): Promise<Response> {
7557
7591
  (async () => {
7558
7592
  try {
7559
7593
  installProcessExitTrap();
7560
- const runPrefix = `[deepline-run:${req.runId}]`;
7561
7594
  captureCoordinatorBinding(env);
7562
7595
  captureRuntimeApiBinding(env);
7563
7596
  captureHarnessBinding(env);
7564
- await probeHarnessOnce(env, runPrefix);
7597
+ await probeHarnessOnce(env, req);
7565
7598
  const ctx = createMinimalWorkerCtx(req, emit, env);
7566
7599
  const result = await runCustomerPlay(ctx, req.runtimeInput);
7567
7600
  emit({
@@ -7625,12 +7658,11 @@ async function handleRunInline(
7625
7658
  };
7626
7659
  const inlineStartedAt = nowMs();
7627
7660
  try {
7628
- const runPrefix = `[deepline-run:${req.runId}]`;
7629
7661
  captureCoordinatorBinding(env);
7630
7662
  captureRuntimeApiBinding(env);
7631
7663
  captureHarnessBinding(env);
7632
7664
  const probeStartedAt = nowMs();
7633
- await probeHarnessOnce(env, runPrefix);
7665
+ await probeHarnessOnce(env, req);
7634
7666
  traceInline('inline.probe_harness', probeStartedAt);
7635
7667
  const executeStartedAt = nowMs();
7636
7668
  const output = await executeRunRequest(
@@ -8142,11 +8174,22 @@ async function executeRunRequest(
8142
8174
  result: req.playCallGovernance ? serializedResult : terminalResult,
8143
8175
  })
8144
8176
  .catch((error) => {
8145
- console.error(
8146
- `[play-harness] non-fatal parent completion signal failed runId=${req.runId}: ${
8147
- error instanceof Error ? error.message : String(error)
8148
- }`,
8149
- );
8177
+ void runnerTelemetry
8178
+ .child({
8179
+ context: {
8180
+ runId: req.runId,
8181
+ orgId: req.orgId,
8182
+ playName: req.playName,
8183
+ },
8184
+ })
8185
+ .error(
8186
+ 'runner.parent_completion_signal.failed',
8187
+ error,
8188
+ undefined,
8189
+ {
8190
+ tag: '[play-harness] non-fatal parent completion signal failed',
8191
+ },
8192
+ );
8150
8193
  })
8151
8194
  .finally(() => {
8152
8195
  recordRunnerPerfTrace({
@@ -8218,11 +8261,17 @@ async function executeRunRequest(
8218
8261
  });
8219
8262
  });
8220
8263
  const nonBlockingBillingPromise = billingPromise.catch((error) => {
8221
- console.error(
8222
- `[play-harness] non-fatal compute billing finalize failed runId=${req.runId}: ${
8223
- error instanceof Error ? error.message : String(error)
8224
- }`,
8225
- );
8264
+ return runnerTelemetry
8265
+ .child({
8266
+ context: {
8267
+ runId: req.runId,
8268
+ orgId: req.orgId,
8269
+ playName: req.playName,
8270
+ },
8271
+ })
8272
+ .error('runner.compute_billing_finalize.failed', error, undefined, {
8273
+ tag: '[play-harness] non-fatal compute billing finalize failed',
8274
+ });
8226
8275
  });
8227
8276
  if (options?.waitUntil) {
8228
8277
  options.waitUntil(nonBlockingBillingPromise);
@@ -8301,35 +8350,35 @@ async function executeRunRequest(
8301
8350
  salvage && salvage.totalEntries > 0
8302
8351
  ? `${message} ${receiptSalvageFailureSuffix(salvage)}`
8303
8352
  : message;
8353
+ const terminalLedgerMessage = redactSecretsFromLogString(terminalMessage);
8304
8354
  if (options?.persistResultDatasets || req.playCallGovernance) {
8305
8355
  appendRunLogLine(
8306
- `${aborted ? '[cancelled]' : '[error]'} ${redactSecretsFromLogString(terminalMessage)}`,
8356
+ `${aborted ? '[cancelled]' : '[error]'} ${terminalLedgerMessage}`,
8307
8357
  );
8308
8358
  const terminalUpdateStartedAt = nowMs();
8359
+ const terminalLedgerResult = createSecretRedactionContext().redact({
8360
+ success: false,
8361
+ status: 'failed',
8362
+ error: terminalLedgerMessage,
8363
+ ...(salvage && salvage.totalEntries > 0 ? { salvage } : {}),
8364
+ errors: [
8365
+ {
8366
+ code: failure.code,
8367
+ phase: failure.phase,
8368
+ message: terminalLedgerMessage,
8369
+ retryable: failure.retryable,
8370
+ ...(errorBilling ? { billing: errorBilling } : {}),
8371
+ ...(failure.cause ? { cause: failure.cause } : {}),
8372
+ },
8373
+ ],
8374
+ });
8309
8375
  await flushTerminalLedgerEvents({
8310
8376
  type: aborted ? 'run.cancelled' : 'run.failed',
8311
8377
  runId: req.runId,
8312
8378
  source: 'worker',
8313
8379
  occurredAt: nowMs(),
8314
- error: terminalMessage,
8315
- result: aborted
8316
- ? undefined
8317
- : {
8318
- success: false,
8319
- status: 'failed',
8320
- error: terminalMessage,
8321
- ...(salvage && salvage.totalEntries > 0 ? { salvage } : {}),
8322
- errors: [
8323
- {
8324
- code: failure.code,
8325
- phase: failure.phase,
8326
- message: terminalMessage,
8327
- retryable: failure.retryable,
8328
- ...(errorBilling ? { billing: errorBilling } : {}),
8329
- ...(failure.cause ? { cause: failure.cause } : {}),
8330
- },
8331
- ],
8332
- },
8380
+ error: terminalLedgerMessage,
8381
+ result: aborted ? undefined : terminalLedgerResult,
8333
8382
  });
8334
8383
  recordRunnerPerfTrace({
8335
8384
  req,
@@ -8354,13 +8403,22 @@ async function executeRunRequest(
8354
8403
  actionEstimate: 4,
8355
8404
  })
8356
8405
  .catch((finalizeError) => {
8357
- console.error(
8358
- `[play-harness] non-fatal compute billing finalize failed runId=${req.runId}: ${
8359
- finalizeError instanceof Error
8360
- ? finalizeError.message
8361
- : String(finalizeError)
8362
- }`,
8363
- );
8406
+ return runnerTelemetry
8407
+ .child({
8408
+ context: {
8409
+ runId: req.runId,
8410
+ orgId: req.orgId,
8411
+ playName: req.playName,
8412
+ },
8413
+ })
8414
+ .error(
8415
+ 'runner.compute_billing_finalize.failed',
8416
+ finalizeError,
8417
+ undefined,
8418
+ {
8419
+ tag: '[play-harness] non-fatal compute billing finalize failed',
8420
+ },
8421
+ );
8364
8422
  })
8365
8423
  .finally(() => {
8366
8424
  recordRunnerPerfTrace({
@@ -8833,9 +8891,22 @@ export class TenantWorkflow extends WorkflowEntrypoint<
8833
8891
  // the deepline-run prefix in flushTailRunLogs), the throw is
8834
8892
  // somewhere inside executeRunRequest. If it doesn't appear, the
8835
8893
  // throw is in the framework wrapper between the loader and run().
8836
- console.log(
8837
- `${runPrefix} TenantWorkflow.run entered baseUrl=${req.baseUrl} integrationMode=${req.integrationMode ?? 'default'}`,
8838
- );
8894
+ await runnerTelemetry
8895
+ .child({
8896
+ context: {
8897
+ runId: req.runId,
8898
+ orgId: req.orgId,
8899
+ playName: req.playName,
8900
+ },
8901
+ })
8902
+ .info(
8903
+ 'runner.tenant_workflow.entered',
8904
+ {
8905
+ baseOrigin: safeRuntimeApiOrigin(req.baseUrl),
8906
+ integrationMode: req.integrationMode ?? 'default',
8907
+ },
8908
+ { tag: `${runPrefix} TenantWorkflow.run entered` },
8909
+ );
8839
8910
  captureCoordinatorBinding(this.env);
8840
8911
  captureRuntimeApiBinding(this.env);
8841
8912
  // Hand the required harness service binding to the SDK-side stub.
@@ -8856,7 +8927,7 @@ export class TenantWorkflow extends WorkflowEntrypoint<
8856
8927
  // begins. A missing or unhealthy HARNESS fails the run before user code
8857
8928
  // can accidentally take a slower fallback path.
8858
8929
  const probeStartedAt = nowMs();
8859
- await probeHarnessOnce(this.env, runPrefix);
8930
+ await probeHarnessOnce(this.env, req);
8860
8931
  recordRunnerPerfTrace({
8861
8932
  req,
8862
8933
  phase: 'tenant_workflow_probe_harness',
@@ -8870,21 +8941,26 @@ export class TenantWorkflow extends WorkflowEntrypoint<
8870
8941
  this.env,
8871
8942
  (runnerEvent) => {
8872
8943
  if (runnerEvent.type === 'log') {
8873
- console.log(`${runPrefix} ${runnerEvent.message}`);
8944
+ const message = redactSecretsFromLogString(runnerEvent.message);
8945
+ console.log(`${runPrefix} ${message}`);
8874
8946
  void this.env.COORDINATOR?.recordRunEvent(req.runId, {
8875
8947
  runId: req.runId,
8876
8948
  type: 'log',
8877
- line: runnerEvent.message,
8949
+ line: message,
8878
8950
  ts: runnerEvent.ts,
8879
8951
  }).catch(() => undefined);
8880
8952
  } else if (runnerEvent.type === 'error') {
8953
+ const message = redactSecretsFromLogString(runnerEvent.message);
8954
+ const stack = runnerEvent.stack
8955
+ ? redactSecretsFromLogString(runnerEvent.stack)
8956
+ : null;
8881
8957
  console.error(
8882
- `${runPrefix} ${runnerEvent.message}${runnerEvent.stack ? `\n${runnerEvent.stack}` : ''}`,
8958
+ `${runPrefix} ${message}${stack ? `\n${stack}` : ''}`,
8883
8959
  );
8884
8960
  void this.env.COORDINATOR?.recordRunEvent(req.runId, {
8885
8961
  runId: req.runId,
8886
8962
  type: 'log',
8887
- line: `[error] ${runnerEvent.message}`,
8963
+ line: `[error] ${message}`,
8888
8964
  ts: runnerEvent.ts,
8889
8965
  }).catch(() => undefined);
8890
8966
  }
@@ -8912,14 +8988,33 @@ export class TenantWorkflow extends WorkflowEntrypoint<
8912
8988
  const detail = {
8913
8989
  runId: req.runId,
8914
8990
  playName: req.playName,
8915
- message: error instanceof Error ? error.message : String(error),
8991
+ message: redactSecretsFromLogString(
8992
+ error instanceof Error ? error.message : String(error),
8993
+ ),
8916
8994
  name: error instanceof Error ? error.name : null,
8917
8995
  stack:
8918
8996
  error instanceof Error && typeof error.stack === 'string'
8919
- ? error.stack.split('\n').slice(0, 12).join('\n')
8997
+ ? redactSecretsFromLogString(
8998
+ error.stack.split('\n').slice(0, 12).join('\n'),
8999
+ )
8920
9000
  : null,
8921
9001
  };
8922
- console.error(`${runPrefix} TenantWorkflow.run threw`, detail);
9002
+ await runnerTelemetry
9003
+ .child({
9004
+ context: {
9005
+ runId: req.runId,
9006
+ orgId: req.orgId,
9007
+ playName: req.playName,
9008
+ },
9009
+ })
9010
+ .error(
9011
+ 'runner.tenant_workflow.failed',
9012
+ error,
9013
+ {
9014
+ errorStack: detail.stack,
9015
+ },
9016
+ { tag: `${runPrefix} TenantWorkflow.run threw` },
9017
+ );
8923
9018
  // CF only surfaces "internal error; reference=<id>" via instance.status(),
8924
9019
  // so this callback is the ONLY way the real error message reaches the
8925
9020
  // user via tail/SSE. Retry with backoff before giving up; if we drop
@@ -8984,9 +9079,22 @@ export class TenantWorkflow extends WorkflowEntrypoint<
8984
9079
  lastCallbackError instanceof Error
8985
9080
  ? lastCallbackError.message
8986
9081
  : String(lastCallbackError);
8987
- console.error(
8988
- `${runPrefix} failed to forward TenantWorkflow.run error to runtime API after retries: ${callbackMessage}`,
8989
- );
9082
+ await runnerTelemetry
9083
+ .child({
9084
+ context: {
9085
+ runId: req.runId,
9086
+ orgId: req.orgId,
9087
+ playName: req.playName,
9088
+ },
9089
+ })
9090
+ .error(
9091
+ 'runner.tenant_workflow.failure_forward_failed',
9092
+ lastCallbackError,
9093
+ { callbackMessage },
9094
+ {
9095
+ tag: `${runPrefix} failed to forward TenantWorkflow.run error to runtime API after retries`,
9096
+ },
9097
+ );
8990
9098
  }
8991
9099
  throw error;
8992
9100
  }
@@ -9019,16 +9127,13 @@ const workerEntrypoint = {
9019
9127
  typeof body.payload.graphHash === 'string'
9020
9128
  ? body.payload.graphHash
9021
9129
  : null;
9022
- console.log(
9023
- `[perf-trace] ${JSON.stringify({
9024
- ts: Date.now(),
9025
- source: 'dynamic_worker',
9026
- runId,
9027
- phase: 'dynamic_worker.workflow_create',
9028
- ms: workflowCreateMs,
9029
- ...(graphHash ? { graphHash } : {}),
9030
- })}`,
9031
- );
9130
+ console.log(`[deepline-run:${runId}] [perf-trace]`, {
9131
+ ts: Date.now(),
9132
+ source: 'dynamic_worker',
9133
+ phase: 'dynamic_worker.workflow_create',
9134
+ ms: workflowCreateMs,
9135
+ graphHash,
9136
+ });
9032
9137
  return Response.json({
9033
9138
  id: instance.id,
9034
9139
  status: 'submitted',
@@ -108,10 +108,10 @@ export const SDK_RELEASE = {
108
108
  // 0.1.175 ships loud `deepline enrich` empty-waterfall reporting.
109
109
  // 0.1.220 deprecates SDK CLI versions below 0.1.219 and updates them
110
110
  // automatically without blocking their current command.
111
- version: '0.1.221',
111
+ version: '0.1.223',
112
112
  apiContract: '2026-06-dataset-handle-results-hard-cutover',
113
113
  supportPolicy: {
114
- latest: '0.1.221',
114
+ latest: '0.1.223',
115
115
  minimumSupported: '0.1.53',
116
116
  deprecatedBelow: '0.1.219',
117
117
  commandMinimumSupported: [