@workglow/task-graph 0.3.11 → 0.3.13
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/browser.js +3368 -3321
- package/dist/browser.js.map +36 -34
- package/dist/bun.js +3368 -3321
- package/dist/bun.js.map +36 -34
- package/dist/cache/CacheJanitor.d.ts +2 -2
- package/dist/cache/RunPrivateCacheRepo.d.ts +6 -5
- package/dist/cache/RunPrivateCacheRepo.d.ts.map +1 -1
- package/dist/common.d.ts +9 -6
- package/dist/common.d.ts.map +1 -1
- package/dist/node.js +3368 -3321
- package/dist/node.js.map +36 -34
- package/dist/storage/ITaskOutputStorage.d.ts +35 -0
- package/dist/storage/ITaskOutputStorage.d.ts.map +1 -0
- package/dist/storage/TabularTaskOutputStorage.d.ts +29 -0
- package/dist/storage/TabularTaskOutputStorage.d.ts.map +1 -0
- package/dist/storage/TaskOutputRepository.d.ts +0 -48
- package/dist/storage/TaskOutputRepository.d.ts.map +1 -1
- package/dist/storage/TaskOutputStorageSchema.d.ts +31 -0
- package/dist/storage/TaskOutputStorageSchema.d.ts.map +1 -0
- package/dist/storage/TaskOutputTabularRepository.d.ts +10 -90
- package/dist/storage/TaskOutputTabularRepository.d.ts.map +1 -1
- package/dist/task/CacheCoordinator.d.ts +8 -2
- package/dist/task/CacheCoordinator.d.ts.map +1 -1
- package/dist/task/ConditionalTask.d.ts +10 -202
- package/dist/task/ConditionalTask.d.ts.map +1 -1
- package/dist/task/FallbackTask.d.ts +7 -59
- package/dist/task/FallbackTask.d.ts.map +1 -1
- package/dist/task/GraphAsTask.d.ts +8 -28
- package/dist/task/GraphAsTask.d.ts.map +1 -1
- package/dist/task/ITask.d.ts +2 -27
- package/dist/task/ITask.d.ts.map +1 -1
- package/dist/task/InputResolver.d.ts +0 -3
- package/dist/task/InputResolver.d.ts.map +1 -1
- package/dist/task/IteratorTask.d.ts +5 -43
- package/dist/task/IteratorTask.d.ts.map +1 -1
- package/dist/task/MapTask.d.ts +1 -25
- package/dist/task/MapTask.d.ts.map +1 -1
- package/dist/task/ReduceTask.d.ts +0 -18
- package/dist/task/ReduceTask.d.ts.map +1 -1
- package/dist/task/Task.d.ts +2 -106
- package/dist/task/Task.d.ts.map +1 -1
- package/dist/task/TaskError.d.ts +2 -29
- package/dist/task/TaskError.d.ts.map +1 -1
- package/dist/task/TaskJSON.d.ts +0 -10
- package/dist/task/TaskJSON.d.ts.map +1 -1
- package/dist/task/TaskRegistry.d.ts +0 -14
- package/dist/task/TaskRegistry.d.ts.map +1 -1
- package/dist/task/TaskRunner.d.ts +0 -41
- package/dist/task/TaskRunner.d.ts.map +1 -1
- package/dist/task/WhileTask.d.ts +3 -89
- package/dist/task/WhileTask.d.ts.map +1 -1
- package/dist/task/index.d.ts +6 -6
- package/dist/task/index.d.ts.map +1 -1
- package/dist/task-graph/Conversions.d.ts +10 -0
- package/dist/task-graph/Conversions.d.ts.map +1 -1
- package/dist/task-graph/Dataflow.d.ts +1 -29
- package/dist/task-graph/Dataflow.d.ts.map +1 -1
- package/dist/task-graph/TaskGraph.d.ts +0 -29
- package/dist/task-graph/TaskGraph.d.ts.map +1 -1
- package/dist/task-graph/TaskGraphRunner.d.ts +3 -65
- package/dist/task-graph/TaskGraphRunner.d.ts.map +1 -1
- package/dist/task-graph/Workflow.d.ts +1 -60
- package/dist/task-graph/Workflow.d.ts.map +1 -1
- package/package.json +7 -7
- package/src/EXECUTION_MODEL.md +4 -4
package/src/EXECUTION_MODEL.md
CHANGED
|
@@ -245,7 +245,7 @@ interface CacheRegistry {
|
|
|
245
245
|
|
|
246
246
|
`TaskGraphRunner` resolves the registry from the per-run `ServiceRegistry` and dispatches each task's read/write to the slot named by its policy. Both slots are independently optional. A missing slot is a silent no-op: the task runs uncached, no error.
|
|
247
247
|
|
|
248
|
-
For the `private` slot, the runner constructs a per-run `RunPrivateCacheRepo` wrapper that prefixes every key with `__run:${runId}
|
|
248
|
+
For the `private` slot, the runner constructs a per-run `RunPrivateCacheRepo` wrapper that prefixes every key with `__run:${runId}::${taskId}`. Two runs with different `runId`s never see each other's rows; the same `runId` (a restart) does. Two task nodes of the same class in one graph never share private entries because each keys by its instance id, not its type.
|
|
249
249
|
|
|
250
250
|
### Run identity (`runId`)
|
|
251
251
|
|
|
@@ -275,9 +275,9 @@ key = sha256(taskType + getCacheVersion() + fingerprint(inputs))
|
|
|
275
275
|
|
|
276
276
|
### Lifecycle of cache rows
|
|
277
277
|
|
|
278
|
-
| Tier | Written
|
|
279
|
-
| --------------- |
|
|
280
|
-
| `deterministic` | On task success | On task start
|
|
278
|
+
| Tier | Written | Read | Deleted |
|
|
279
|
+
| --------------- | --------------- | ------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
280
|
+
| `deterministic` | On task success | On task start | Never automatically. App owns invalidation (typically via `version` bumps). |
|
|
281
281
|
| `private` | On task success | On task start, filtered to current `runId` | **(a)** `privateRepo.clearRun()` on `succeeded` (the wrapper already knows its `runId`). **(b)** TTL sweep via `CacheJanitor.sweepStaleRunPrivate(olderThanMs)` for abandoned runs. |
|
|
282
282
|
|
|
283
283
|
Failed tasks are never cached — only `Ok` results reach `saveOutput`. `saveOutput` is upsert by primary key (last writer wins) — the underlying `TaskOutputTabularRepository` calls `put()` on its tabular storage, so a same-key write replaces the existing row.
|