commitTurn
@forge/monorepo / backend/src / commitTurn
Function: commitTurn()
commitTurn(
uow,steps):Promise<void>
Defined in: backend/src/runtime/serialization.ts:145
Commit a turn's writes together. Every step runs inside the unit of work; if any step throws, the
already-applied steps are compensated in reverse — so session state and messages commit
all-or-nothing. The Postgres UnitOfWork makes this a real transaction; the memory one compensates
explicitly. Pass a UnitOfWork exposing runTx (the memory/Postgres adapters do) to get rollback.
Parameters
uow
UnitOfWork & object
steps
readonly CommitStep<unknown>[]
Returns
Promise<void>