OptionalwritesThe records flush writes: a read of one from the store (IStore.getState) flushes first, so a reader never sees them without the held writes.
Only the records the held writes change - a reader of anything else, including the writer itself deciding what to hold, reads as it would. A read made through a transaction (ITransaction.getState) sees that transaction and does not flush.
OptionalflushMake the writes the caller holds for this transaction, into it.
The caller holds writes to make them together; the store calls this whenever something needs them made: before another transaction begins inside this one, before this one commits, and before a read of a record the writes change (writes). A flush writes by beginning transactions inside this one; those do not flush it again.
OptionalonCalled once the operation this transaction belongs to has landed.
The root's commit. An operation that wrote nothing is elided but still counts as landed.
OptionalonCalled when this transaction, or any transaction it is nested in, rolls back.
Callbacks a transaction is begun with, called by the store as the transaction and the operation it belongs to settle.
Remarks
A nested transaction is a savepoint: committing it merges its writes into its parent, where they can still be rolled back with an outer transaction. So the outcome hooks report the OPERATION's outcome - onCommit once the root lands, onRollback when this transaction or any one it is nested in rolls back - and only one of them is ever called.