One per-script failure observation from a batch run_scripts invocation.
code is a kebab-case symbol mirroring the wire envelope of catch-each
result cells (so emacs / cli / web clients render script failures the
same shape regardless of whether the script raised inside catch-each
or surfaced at the outer batch boundary). message is the engine’s
diagnostic.
Aggregate output of a batch run_scripts call. state is the final
TransactionState after every script that succeeded was applied;
failures lists every script that errored (in execution order).
Failures don’t abort the run — successive scripts still see the
state mutations from previous successful ones.
Builds a TransactionState for a single transaction id: the
transaction, its splits, and every stored transaction and split tag, so
script guards see what is already there, with the revision of exactly
what was loaded for the write-back to verify.