def receipt_join
import bendvy-ecs-core@0.1.0.4/bundle_batch.bend as BundleBatchimport Base
import commands.bend as Cmd
39# Receipt rows are created only from this Batch's actual Cmd.tx_spawn result.
40# Public gameplay cannot construct the opaque Batch; raw engine constructors
41# and provider callbacks remain explicitly trusted setup boundaries.
42def receipt_join(~S:Data,~P:Type,entry:Prepared<S,P>,seen:Bool,result:List<Prepared<S,P>> & Bool) -> List<Prepared<S,P>> & Bool:
43 match result:
44 case (tail,found): (entry <> tail,Bool.or(seen,found))