Skip to main content

Module resume

Module resume 

Source
Expand description

What a card remembers, so an answer continues the work it interrupted (spec §13.3, §15.3).

A card raised because an act could not finish carries that act as a DeferredAct in its payload metadata, under DEFERRED_ACT_KEY, covered by the payload hash. When the card is answered, resume turns the stored option into the act to run, and the runtime feeds it through the normal reducer, policy and execution path. Nothing here executes, and nothing skips a confirmation.

Stored actionWhat resuming does
SelectTargetrebinds the act to the case the user picked, and runs it
ResolveClarification, Customruns the act against the case it was aimed at
Dismiss, DeclineCommands, DeclineAndRecordResumption::Declined
ConfirmCommands, ApplyOperationnothing: both have their own paths

A confirmation card may also carry DependentActs: acts of the same message that needed what the confirmed commands make. dependents returns them for the turn that answers the card, after those commands have committed.

Structs§

DeferredAct
The act a card is guarding, persisted with the card.
DependentAct
An act that waits for a confirmation card: once the card’s commands commit, it runs under its own origin and policy (spec §6.7).
MadeCase
A case an act of an earlier turn opened, which a dependent act refers to.

Enums§

Resumption
What answering a card means for the act it was guarding.

Constants§

CARD_UNIT
The unit an act that came from a card belongs to: u0.
DEFERRED_ACT_KEY
Key the deferred act is stored under in a card’s payload metadata.
DEPENDENT_ACTS_KEY
Key the acts waiting on a confirmation are stored under in its card’s metadata.

Functions§

card_act
An act a card answer applies to the card’s own case, with the card’s words.
card_act_id
The identifier of the act a card answer puts in the plan: u0.a1.
dependents
The acts a confirmed card lets run, numbered after the card’s own act.
resume
Decides what an accepted card answer does to the act the card was guarding.