Admit, observe and settle
run() admits the workflow first — a file that fails admission throws
NikaOperationError and no handle is created. The returned NikaRun
carries id plus the observation methods; the run itself is not an async
iterator. Subscribe through run.events(); the result for this observation
leg lives in run.result(). The result’s settlement carries the engine’s
cause, task tally, spend, elapsed time and error when available. A paused
result closes observation at a human gate without claiming the workflow can
never resume.
Stop observation without cancelling
Cancel explicitly
NikaRunOwnershipError.
cancellation_requested acknowledges the action, not its outcome. Keep
awaiting run.result(): the actual runtime result may be cancelled,
succeeded, failed or paused. A missing runtime settlement after the
resident’s grace period is reported as interrupted rather than fabricated
cancellation.
Which published source this page describes
Which published source this page describes
Events
Design an additive event reducer.
Receipts
Preserve and verify engine-issued proof.