deepline 0.1.89 → 0.1.90
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.
- package/dist/cli/index.js +2 -2
- package/dist/cli/index.mjs +2 -2
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/dist/repo/apps/play-runner-workers/src/entry.ts +38 -35
- package/dist/repo/apps/play-runner-workers/src/runtime/map-chunk-plan.ts +44 -0
- package/dist/repo/sdk/src/release.ts +2 -2
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -229,10 +229,10 @@ var import_node_path2 = require("path");
|
|
|
229
229
|
|
|
230
230
|
// src/release.ts
|
|
231
231
|
var SDK_RELEASE = {
|
|
232
|
-
version: "0.1.
|
|
232
|
+
version: "0.1.90",
|
|
233
233
|
apiContract: "2026-06-dataset-column-cell-stale-hard-cutover",
|
|
234
234
|
supportPolicy: {
|
|
235
|
-
latest: "0.1.
|
|
235
|
+
latest: "0.1.90",
|
|
236
236
|
minimumSupported: "0.1.53",
|
|
237
237
|
deprecatedBelow: "0.1.53"
|
|
238
238
|
}
|
package/dist/cli/index.mjs
CHANGED
|
@@ -206,10 +206,10 @@ import { join as join2 } from "path";
|
|
|
206
206
|
|
|
207
207
|
// src/release.ts
|
|
208
208
|
var SDK_RELEASE = {
|
|
209
|
-
version: "0.1.
|
|
209
|
+
version: "0.1.90",
|
|
210
210
|
apiContract: "2026-06-dataset-column-cell-stale-hard-cutover",
|
|
211
211
|
supportPolicy: {
|
|
212
|
-
latest: "0.1.
|
|
212
|
+
latest: "0.1.90",
|
|
213
213
|
minimumSupported: "0.1.53",
|
|
214
214
|
deprecatedBelow: "0.1.53"
|
|
215
215
|
}
|
package/dist/index.js
CHANGED
|
@@ -246,10 +246,10 @@ var import_node_path2 = require("path");
|
|
|
246
246
|
|
|
247
247
|
// src/release.ts
|
|
248
248
|
var SDK_RELEASE = {
|
|
249
|
-
version: "0.1.
|
|
249
|
+
version: "0.1.90",
|
|
250
250
|
apiContract: "2026-06-dataset-column-cell-stale-hard-cutover",
|
|
251
251
|
supportPolicy: {
|
|
252
|
-
latest: "0.1.
|
|
252
|
+
latest: "0.1.90",
|
|
253
253
|
minimumSupported: "0.1.53",
|
|
254
254
|
deprecatedBelow: "0.1.53"
|
|
255
255
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -179,10 +179,10 @@ import { join as join2 } from "path";
|
|
|
179
179
|
|
|
180
180
|
// src/release.ts
|
|
181
181
|
var SDK_RELEASE = {
|
|
182
|
-
version: "0.1.
|
|
182
|
+
version: "0.1.90",
|
|
183
183
|
apiContract: "2026-06-dataset-column-cell-stale-hard-cutover",
|
|
184
184
|
supportPolicy: {
|
|
185
|
-
latest: "0.1.
|
|
185
|
+
latest: "0.1.90",
|
|
186
186
|
minimumSupported: "0.1.53",
|
|
187
187
|
deprecatedBelow: "0.1.53"
|
|
188
188
|
}
|
|
@@ -34,7 +34,6 @@ import {
|
|
|
34
34
|
type WorkflowStep,
|
|
35
35
|
} from 'cloudflare:workers';
|
|
36
36
|
import {
|
|
37
|
-
chooseMapChunkSize,
|
|
38
37
|
deterministicMapChunkStepName,
|
|
39
38
|
type ExecutionPlan,
|
|
40
39
|
} from '../../../shared_libs/play-runtime/execution-plan';
|
|
@@ -131,6 +130,7 @@ import {
|
|
|
131
130
|
setHarnessBinding,
|
|
132
131
|
} from '../../../sdk/src/plays/harness-stub';
|
|
133
132
|
import { createHarnessWorkerReceiptStore } from './runtime/harness-receipt-store';
|
|
133
|
+
import { chooseWorkerMapRowsPerChunk } from './runtime/map-chunk-plan';
|
|
134
134
|
import {
|
|
135
135
|
applyCsvRenameProjection,
|
|
136
136
|
stripCsvProjectionMetadata,
|
|
@@ -2939,6 +2939,7 @@ async function prepareMapRows(input: {
|
|
|
2939
2939
|
req: RunRequest;
|
|
2940
2940
|
tableNamespace: string;
|
|
2941
2941
|
rows: Record<string, unknown>[];
|
|
2942
|
+
inputOffset: number;
|
|
2942
2943
|
outputFields: string[];
|
|
2943
2944
|
cellPolicies?: CellStalenessPolicyByField;
|
|
2944
2945
|
}): Promise<{
|
|
@@ -2964,6 +2965,7 @@ async function prepareMapRows(input: {
|
|
|
2964
2965
|
}),
|
|
2965
2966
|
rows: input.rows.map((row) => publicCsvStorageRow(row)),
|
|
2966
2967
|
runId: input.req.runId,
|
|
2968
|
+
inputOffset: input.inputOffset,
|
|
2967
2969
|
userEmail: input.req.userEmail,
|
|
2968
2970
|
cellPolicies: input.cellPolicies,
|
|
2969
2971
|
});
|
|
@@ -3443,16 +3445,10 @@ function createMinimalWorkerCtx(
|
|
|
3443
3445
|
const baseOffset = 0;
|
|
3444
3446
|
const fieldEntries = Object.entries(fieldsDef);
|
|
3445
3447
|
const plan = req.executionPlan;
|
|
3446
|
-
const
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
const rowsPerChunk = chooseMapChunkSize({
|
|
3451
|
-
totalRows: rowCountHint,
|
|
3452
|
-
mapCount: Math.max(1, plan?.maps.length ?? 1),
|
|
3453
|
-
stepsPerChunk: planMap?.stepsPerChunk ?? 1,
|
|
3454
|
-
preferredChunkSize: planMap?.defaultChunkSize,
|
|
3455
|
-
softWorkflowStepBudget: plan?.chunkPlan.softWorkflowStepBudget,
|
|
3448
|
+
const rowsPerChunk = chooseWorkerMapRowsPerChunk({
|
|
3449
|
+
mapName: name,
|
|
3450
|
+
rowCountHint,
|
|
3451
|
+
executionPlan: plan,
|
|
3456
3452
|
});
|
|
3457
3453
|
const outputFields = fieldEntries.map(([field]) => field);
|
|
3458
3454
|
const updateMapProgress = (
|
|
@@ -3627,6 +3623,7 @@ function createMinimalWorkerCtx(
|
|
|
3627
3623
|
...row,
|
|
3628
3624
|
__deeplineRowKey: rowKey,
|
|
3629
3625
|
})),
|
|
3626
|
+
inputOffset: baseOffset + chunkStart,
|
|
3630
3627
|
});
|
|
3631
3628
|
recordRunnerPerfTrace({
|
|
3632
3629
|
req,
|
|
@@ -4366,22 +4363,25 @@ function createMinimalWorkerCtx(
|
|
|
4366
4363
|
program.steps.map((step) => [step.name, step.resolver]),
|
|
4367
4364
|
);
|
|
4368
4365
|
const cellPolicies = Object.fromEntries(
|
|
4369
|
-
program.steps.
|
|
4370
|
-
step.name,
|
|
4366
|
+
program.steps.flatMap((step) =>
|
|
4371
4367
|
step.staleAfterSeconds === undefined
|
|
4372
|
-
?
|
|
4373
|
-
:
|
|
4374
|
-
|
|
4375
|
-
|
|
4376
|
-
|
|
4368
|
+
? []
|
|
4369
|
+
: [
|
|
4370
|
+
[
|
|
4371
|
+
step.name,
|
|
4372
|
+
normalizeCellStalenessPolicy({
|
|
4373
|
+
staleAfterSeconds: step.staleAfterSeconds,
|
|
4374
|
+
}),
|
|
4375
|
+
],
|
|
4376
|
+
],
|
|
4377
|
+
),
|
|
4377
4378
|
) as CellStalenessPolicyByField;
|
|
4378
4379
|
const authoredCellPolicies = Object.fromEntries(
|
|
4379
|
-
program.steps.
|
|
4380
|
-
step.name,
|
|
4380
|
+
program.steps.flatMap((step) =>
|
|
4381
4381
|
step.staleAfterSeconds === undefined
|
|
4382
|
-
?
|
|
4383
|
-
: { staleAfterSeconds: step.staleAfterSeconds },
|
|
4384
|
-
|
|
4382
|
+
? []
|
|
4383
|
+
: [[step.name, { staleAfterSeconds: step.staleAfterSeconds }]],
|
|
4384
|
+
),
|
|
4385
4385
|
) as AuthoredCellStalenessPolicyByField;
|
|
4386
4386
|
return runMap(
|
|
4387
4387
|
this.name,
|
|
@@ -4611,22 +4611,25 @@ function createMinimalWorkerCtx(
|
|
|
4611
4611
|
fieldsDef.steps.map((step) => [step.name, step.resolver]),
|
|
4612
4612
|
);
|
|
4613
4613
|
const cellPolicies = Object.fromEntries(
|
|
4614
|
-
fieldsDef.steps.
|
|
4615
|
-
step.name,
|
|
4614
|
+
fieldsDef.steps.flatMap((step) =>
|
|
4616
4615
|
step.staleAfterSeconds === undefined
|
|
4617
|
-
?
|
|
4618
|
-
:
|
|
4619
|
-
|
|
4620
|
-
|
|
4621
|
-
|
|
4616
|
+
? []
|
|
4617
|
+
: [
|
|
4618
|
+
[
|
|
4619
|
+
step.name,
|
|
4620
|
+
normalizeCellStalenessPolicy({
|
|
4621
|
+
staleAfterSeconds: step.staleAfterSeconds,
|
|
4622
|
+
}),
|
|
4623
|
+
],
|
|
4624
|
+
],
|
|
4625
|
+
),
|
|
4622
4626
|
) as CellStalenessPolicyByField;
|
|
4623
4627
|
const authoredCellPolicies = Object.fromEntries(
|
|
4624
|
-
fieldsDef.steps.
|
|
4625
|
-
step.name,
|
|
4628
|
+
fieldsDef.steps.flatMap((step) =>
|
|
4626
4629
|
step.staleAfterSeconds === undefined
|
|
4627
|
-
?
|
|
4628
|
-
: { staleAfterSeconds: step.staleAfterSeconds },
|
|
4629
|
-
|
|
4630
|
+
? []
|
|
4631
|
+
: [[step.name, { staleAfterSeconds: step.staleAfterSeconds }]],
|
|
4632
|
+
),
|
|
4630
4633
|
) as AuthoredCellStalenessPolicyByField;
|
|
4631
4634
|
return runMap(
|
|
4632
4635
|
name,
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import {
|
|
2
|
+
chooseMapChunkSize,
|
|
3
|
+
type ExecutionPlan,
|
|
4
|
+
} from '../../../../shared_libs/play-runtime/execution-plan';
|
|
5
|
+
|
|
6
|
+
export const CACHE_ENABLED_SIMPLE_MAP_CHUNK_SIZE = 10_000;
|
|
7
|
+
|
|
8
|
+
export type WorkerMapChunkPlanInput = {
|
|
9
|
+
mapName: string;
|
|
10
|
+
rowCountHint: number | null;
|
|
11
|
+
executionPlan?: ExecutionPlan | null;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export function chooseWorkerMapRowsPerChunk(
|
|
15
|
+
input: WorkerMapChunkPlanInput,
|
|
16
|
+
): number {
|
|
17
|
+
const plan = input.executionPlan ?? null;
|
|
18
|
+
const planMap = plan?.maps.find(
|
|
19
|
+
(candidate) =>
|
|
20
|
+
candidate.mapName === input.mapName ||
|
|
21
|
+
candidate.tableNamespace === input.mapName,
|
|
22
|
+
);
|
|
23
|
+
const rowsPerChunk = chooseMapChunkSize({
|
|
24
|
+
totalRows: input.rowCountHint,
|
|
25
|
+
mapCount: Math.max(1, plan?.maps.length ?? 1),
|
|
26
|
+
stepsPerChunk: planMap?.stepsPerChunk ?? 1,
|
|
27
|
+
preferredChunkSize: planMap?.defaultChunkSize,
|
|
28
|
+
softWorkflowStepBudget: plan?.chunkPlan.softWorkflowStepBudget,
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
const toolFreeSimpleMap =
|
|
32
|
+
!!planMap &&
|
|
33
|
+
planMap.stepsPerChunk === 1 &&
|
|
34
|
+
(plan?.toolDeclarations.length ?? 0) === 0;
|
|
35
|
+
if (
|
|
36
|
+
toolFreeSimpleMap &&
|
|
37
|
+
(input.rowCountHint === null ||
|
|
38
|
+
input.rowCountHint >= CACHE_ENABLED_SIMPLE_MAP_CHUNK_SIZE)
|
|
39
|
+
) {
|
|
40
|
+
return Math.max(rowsPerChunk, CACHE_ENABLED_SIMPLE_MAP_CHUNK_SIZE);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
return rowsPerChunk;
|
|
44
|
+
}
|
|
@@ -50,10 +50,10 @@ export type SdkRelease = {
|
|
|
50
50
|
};
|
|
51
51
|
|
|
52
52
|
export const SDK_RELEASE = {
|
|
53
|
-
version: '0.1.
|
|
53
|
+
version: '0.1.90',
|
|
54
54
|
apiContract: '2026-06-dataset-column-cell-stale-hard-cutover',
|
|
55
55
|
supportPolicy: {
|
|
56
|
-
latest: '0.1.
|
|
56
|
+
latest: '0.1.90',
|
|
57
57
|
minimumSupported: '0.1.53',
|
|
58
58
|
deprecatedBelow: '0.1.53',
|
|
59
59
|
},
|