Folds a batch declaration into the escalation's storage shape:
queryable facets in metadata (batch_pending, batch_count,
batch_keys) and the payload accumulator in envelope
(batch_items: {}). partialOnTimeout is stored beside the items so
the expiry statement delivers the filled items instead of false;
wakeOnFlag is stored the same way so a flag ends the wait, and
wakeOnFill (true or its list of keys) so a fill ends it.
filled entries start satisfied: they are left out of batch_pending
and written into batch_items, batch_filled_at, and (when an entry
names an actor) batch_filled_by. Pure
and deterministic — safe on the replayed condition() path. Throws
synchronously on an invalid declaration so a bad batch never reaches a
durable write.
Folds a
batchdeclaration into the escalation's storage shape: queryable facets inmetadata(batch_pending,batch_count,batch_keys) and the payload accumulator inenvelope(batch_items: {}).partialOnTimeoutis stored beside the items so the expiry statement delivers the filled items instead offalse;wakeOnFlagis stored the same way so a flag ends the wait, andwakeOnFill(trueor its list of keys) so a fill ends it.filledentries start satisfied: they are left out ofbatch_pendingand written intobatch_items,batch_filled_at, and (when an entry names an actor)batch_filled_by. Pure and deterministic — safe on the replayedcondition()path. Throws synchronously on an invalid declaration so a bad batch never reaches a durable write.