@jarenjs/flow 0.86.0 → 0.89.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.
- package/docs/WORKFLOW-FORMAT.md +2 -0
- package/package.json +3 -3
- package/src/runs.js +3 -1
package/docs/WORKFLOW-FORMAT.md
CHANGED
|
@@ -339,6 +339,8 @@ workflow once and binds its checkpoint CAS to application run records.
|
|
|
339
339
|
application run ID. `lease` may be a capability or a function returning the
|
|
340
340
|
worker's current renewed lease. Checkpoint provenance includes the canonical
|
|
341
341
|
workflow/schema identity and the engine's input/task-version identity.
|
|
342
|
+
Refused checkpoint provenance leaves the prior run status, revision and event
|
|
343
|
+
history intact; resources still release after the rejected attempt drains.
|
|
342
344
|
|
|
343
345
|
`cancel(id, observedRevision, { actor, reason })` records explicit cancellation
|
|
344
346
|
intent, stops local task admission, signals and drains local workers, and waits
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jarenjs/flow",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.89.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.js",
|
|
7
7
|
"types": "./dist/types/index.d.ts",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"prepack": "npm run build:types"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@jarenjs/core": "^0.
|
|
53
|
-
"@jarenjs/json": "^0.
|
|
52
|
+
"@jarenjs/core": "^0.89.0",
|
|
53
|
+
"@jarenjs/json": "^0.89.0"
|
|
54
54
|
}
|
|
55
55
|
}
|
package/src/runs.js
CHANGED
|
@@ -42,7 +42,9 @@ export function createDomainRun(document, options) {
|
|
|
42
42
|
return await workflow.run(input, { runId: id, signal, resources, event: resources.event });
|
|
43
43
|
}
|
|
44
44
|
catch (error) {
|
|
45
|
-
|
|
45
|
+
// Provenance refusal happens before the workflow claims a generation;
|
|
46
|
+
// it must not overwrite the status or audit history of the prior run.
|
|
47
|
+
if (attached && error?.code !== 'JF2013') {
|
|
46
48
|
const record = await store.get(id);
|
|
47
49
|
await store.finish(id, record.cancelRequested || signal.aborted ? 'cancelled' : 'failed', lease());
|
|
48
50
|
}
|