You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| Completion |`WorkflowExecutor::completeRun` records `WorkflowCompleted` and calls `ParentClosePolicyEnforcer::enforce`| yes | Open children with `request_cancel` or `terminate` get the corresponding command; `abandon` children are left running. |
303
+
| Failure |`WorkflowExecutor::failRun` records `WorkflowFailed` and calls `ParentClosePolicyEnforcer::enforce`| yes | Includes deterministic terminal failures and structural-limit failures. |
304
+
| Timeout |`WorkflowExecutor::timeoutRun` records `WorkflowTimedOut` and calls `ParentClosePolicyEnforcer::enforce`| yes | Both run-deadline and execution-deadline timeouts share the same enforcement path. |
305
+
| Cancellation |`WorkflowStub::attemptTerminalCommand` (cancel branch) records `WorkflowCancelled` and calls `ParentClosePolicyEnforcer::enforce`| yes | Cooperative cancel of the parent still applies the snapshotted child policy; children with `abandon` keep running. |
306
+
| Termination |`WorkflowStub::attemptTerminalCommand` (terminate branch) records `WorkflowTerminated` and calls `ParentClosePolicyEnforcer::enforce`| yes | Terminate is immediate; children with `abandon` continue independently. |
307
+
| Continue-as-new |`WorkflowExecutor::continueAsNew` rewrites every open `child_workflow` link onto the continued run with the same `parent_close_policy` and re-emits `ChildRunStarted` on the parent line, but does **not** call the enforcer | no | The new run owns the open children and keeps the policy snapshot; only a terminal disposition of the new run triggers enforcement. |
308
+
| Reset | Reserved as a later-phase command (see V2.0 Defaults and Gap Analysis) | reserved | Reset is intentionally not part of the v2.0 correctness core. When reset lands it must either transfer child-link ownership to the reset destination run or call `ParentClosePolicyEnforcer::enforce` against the discarded run before the old run stops owning children, mirroring the continue-as-new and terminal paths respectively. |
309
+
310
+
The enforcer records `ParentClosePolicyApplied` for each successfully
311
+
delivered command and `ParentClosePolicyFailed` (with the throwable
312
+
message) when the child rejects the command — for example because the
313
+
child reached a terminal state between the parent's terminal commit and
314
+
the enforcer's read. Both events name the `child_instance_id`,
315
+
`child_run_id`, `policy`, and `reason`, and the failed event also names
316
+
`error`. Operator surfaces must distinguish "policy applied" from
317
+
"policy failed silently" using these typed events; the link row's
318
+
metadata flags are diagnostic only.
319
+
320
+
### Waterline observability
321
+
322
+
Waterline reads the `RunLineageView` fields above and renders a child
323
+
lineage badge that reflects the disposition:
324
+
325
+
- "Closed by parent (cancelled)" or "Closed by parent (terminated)"
326
+
when `parent_close_policy_outcome` is `applied` and the snapshot is
327
+
`request_cancel` or `terminate`.
328
+
- "Parent-close policy failed" when `parent_close_policy_outcome` is
329
+
`failed`, surfacing the recorded error reason for operator triage.
330
+
- "Abandoned by parent on close" when the parent has closed and the
331
+
snapshot is `abandon`.
332
+
- The standing snapshot ("Parent-close policy: abandon|request_cancel
333
+
|terminate") while the parent is still running.
334
+
335
+
Continue-as-new lineage entries are deliberately unaffected; the
336
+
continued run owns the open children and re-emits the relevant child
0 commit comments