bundle_batch.bend checks
raw source on the hub · import bendvy-ecs-core@0.1.0.2/bundle_batch.bend as Bundle_batch
8 imports
import Base import ./deferred_command.bend as Deferred import ./trace_facts.bend as TraceFacts import entity_key.bend as K import bundle_delivery.bend as B import world.bend as W import transaction.bend as T import commands.bend as Cmd
Types
type Prepared source · line 12 · raw
@S:Data -> @P:Type -> Type
Prepared payload owners remain typed until successful body completion. This insert-only journal introduces no reservation/cancellation policy.
Prepared@S:Data -> @P:Type -> @target:0xb2b0f04555daca474f0f77d0966945c9/world.Handle<S> -> @payload:P -> @position:Nat -> Prepared<S, P>
ReservationReceipt@S:Data -> @P:Type -> @target:0xb2b0f04555daca474f0f77d0966945c9/world.Handle<S> -> Prepared<S, P>
type Batch source · line 15 · raw
@S:Data -> @Store:Type -> @R:Type -> @E:Data -> @P:Type -> Type
Batch@S:Data -> @Store:Type -> @R:Type -> @E:Data -> @P:Type -> @tx:0xb2b0f04555daca474f0f77d0966945c9/transaction.Tx<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E>, E> -> @prepared:List<&1, Prepared<S, P>> -> Batch<S, Store, R, E, P>
type Inserted source · line 17 · raw
@S:Data -> @Store:Type -> @R:Type -> @E:Data -> @P:Type -> Type
Inserted@S:Data -> @Store:Type -> @R:Type -> @E:Data -> @P:Type -> @batch:Batch<S, Store, R, E, P> -> Inserted<S, Store, R, E, P>
Refused@S:Data -> @Store:Type -> @R:Type -> @E:Data -> @P:Type -> @batch:Batch<S, Store, R, E, P> -> @payload:P -> @error:0xb2b0f04555daca474f0f77d0966945c9/world.WorldError -> Inserted<S, Store, R, E, P>
type Spawned source · line 20 · raw
@S:Data -> @Store:Type -> @R:Type -> @E:Data -> @P:Type -> Type
Spawned@S:Data -> @Store:Type -> @R:Type -> @E:Data -> @P:Type -> @batch:Batch<S, Store, R, E, P> -> @target:0xb2b0f04555daca474f0f77d0966945c9/world.Handle<S> -> Spawned<S, Store, R, E, P>
SpawnRefused@S:Data -> @Store:Type -> @R:Type -> @E:Data -> @P:Type -> @batch:Batch<S, Store, R, E, P> -> @payload:P -> @error:0xb2b0f04555daca474f0f77d0966945c9/world.WorldError -> Spawned<S, Store, R, E, P>
type Finished source · line 23 · raw
@S:Data -> @Store:Type -> @R:Type -> @E:Data -> @P:Type -> @Error:Data -> Type
Committed@S:Data -> @Store:Type -> @R:Type -> @E:Data -> @P:Type -> @Error:Data -> @world:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E> -> Finished<S, Store, R, E, P, Error>
Failed@S:Data -> @Store:Type -> @R:Type -> @E:Data -> @P:Type -> @Error:Data -> @world:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E> -> @payloads:List<&1, P> -> @error:Error -> Finished<S, Store, R, E, P, Error>
Templates
template begin source · line 26 · raw
@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-P:Type -> @tx:0xb2b0f04555daca474f0f77d0966945c9/transaction.Tx<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E>, E> -> Batch<S, Store, R, E, P>
template counted source · line 29 · raw
@-World:Type -> @command:0xb2b0f04555daca474f0f77d0966945c9/deferred_command.Command<World> -> @result:Pair(List<&1, 0xb2b0f04555daca474f0f77d0966945c9/deferred_command.Command<World>>, Nat) -> Pair(List<&1, 0xb2b0f04555daca474f0f77d0966945c9/deferred_command.Command<World>>, Nat)
Count returns the very same affine closures in the same reverse queue order.
template count_commands source · line 32 · raw
@-World:Type -> @commands:List<&1, 0xb2b0f04555daca474f0f77d0966945c9/deferred_command.Command<World>> -> Pair(List<&1, 0xb2b0f04555daca474f0f77d0966945c9/deferred_command.Command<World>>, Nat)
template positioned source · line 36 · raw
@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-P:Type -> @prepared:List<&1, Prepared<S, P>> -> @world:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E> -> @undo:List<&1, @_:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E> -> 0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E>> -> @events:List<&2, E> -> @trace:0xb2b0f04555daca474f0f77d0966945c9/trace_facts.State -> @target:0xb2b0f04555daca474f0f77d0966945c9/world.Handle<S> -> @payload:P -> @result:Pair(List<&1, 0xb2b0f04555daca474f0f77d0966945c9/deferred_command.Command<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E>>>, Nat) -> Inserted<S, Store, R, E, P>
template receipt_join source · line 42 · raw
@-S:Data -> @-P:Type -> @entry:Prepared<S, P> -> @seen:Bool -> @result:Pair(List<&1, Prepared<S, P>>, Bool) -> Pair(List<&1, Prepared<S, P>>, Bool)
Receipt rows are created only from this Batch's actual Cmd.tx_spawn result. Public gameplay cannot construct the opaque Batch; raw engine constructors and provider callbacks remain explicitly trusted setup boundaries.
template receipt_find source · line 45 · raw
@-S:Data -> @-P:Type -> @prepared:List<&1, Prepared<S, P>> -> @+target:0xb2b0f04555daca474f0f77d0966945c9/world.Handle<S> -> Pair(List<&1, Prepared<S, P>>, Bool)
template receipt_checked source · line 52 · raw
@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-P:Type -> @world:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E> -> @undo:List<&1, @_:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E> -> 0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E>> -> @commands:List<&1, 0xb2b0f04555daca474f0f77d0966945c9/deferred_command.Command<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E>>> -> @events:List<&2, E> -> @trace:0xb2b0f04555daca474f0f77d0966945c9/trace_facts.State -> @target:0xb2b0f04555daca474f0f77d0966945c9/world.Handle<S> -> @payload:P -> @result:Pair(List<&1, Prepared<S, P>>, Bool) -> Inserted<S, Store, R, E, P>
template checked source · line 56 · raw
@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-P:Type -> @prepared:List<&1, Prepared<S, P>> -> @undo:List<&1, @_:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E> -> 0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E>> -> @commands:List<&1, 0xb2b0f04555daca474f0f77d0966945c9/deferred_command.Command<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E>>> -> @events:List<&2, E> -> @trace:0xb2b0f04555daca474f0f77d0966945c9/trace_facts.State -> @+target:0xb2b0f04555daca474f0f77d0966945c9/world.Handle<S> -> @payload:P -> @observed:Pair(0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E>, Bool) -> Inserted<S, Store, R, E, P>
template insert source · line 60 · raw
@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-P:Type -> @batch:Batch<S, Store, R, E, P> -> @+target:0xb2b0f04555daca474f0f77d0966945c9/world.Handle<S> -> @payload:P -> Inserted<S, Store, R, E, P>
template preceding source · line 65 · raw
@-World:Type -> @-E:Data -> @count:Nat -> @commands:List<&1, 0xb2b0f04555daca474f0f77d0966945c9/deferred_command.Command<World>> -> @tx:0xb2b0f04555daca474f0f77d0966945c9/transaction.Tx<World, E> -> Pair(List<&1, 0xb2b0f04555daca474f0f77d0966945c9/deferred_command.Command<World>>, 0xb2b0f04555daca474f0f77d0966945c9/transaction.Tx<World, E>)
Replay only closures preceding this authored insertion. Position is generated by count_commands, not supplied by gameplay; raw constructors remain trusted.
template remaining source · line 70 · raw
@-World:Type -> @-E:Data -> @commands:List<&1, 0xb2b0f04555daca474f0f77d0966945c9/deferred_command.Command<World>> -> @tx:0xb2b0f04555daca474f0f77d0966945c9/transaction.Tx<World, E> -> 0xb2b0f04555daca474f0f77d0966945c9/transaction.Tx<World, E>
template staged_after source · line 74 · raw
@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-P:Type -> @-attempt:(@_:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E> -> @_:0xb2b0f04555daca474f0f77d0966945c9/world.Handle<S> -> @_:P -> 0xb2b0f04555daca474f0f77d0966945c9/bundle_delivery.Delivery<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E>, P>) -> @-recover:(@_:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E> -> @_:P -> @_:0xb2b0f04555daca474f0f77d0966945c9/world.WorldError -> 0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E>) -> @target:0xb2b0f04555daca474f0f77d0966945c9/world.Handle<S> -> @payload:P -> @next:(@_:List<&1, 0xb2b0f04555daca474f0f77d0966945c9/deferred_command.Command<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E>>> -> @_:0xb2b0f04555daca474f0f77d0966945c9/transaction.Tx<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E>, E> -> 0xb2b0f04555daca474f0f77d0966945c9/transaction.Tx<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E>, E>) -> @result:Pair(List<&1, 0xb2b0f04555daca474f0f77d0966945c9/deferred_command.Command<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E>>>, 0xb2b0f04555daca474f0f77d0966945c9/transaction.Tx<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E>, E>) -> 0xb2b0f04555daca474f0f77d0966945c9/transaction.Tx<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E>, E>
template staged source · line 77 · raw
@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-P:Type -> @-attempt:(@_:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E> -> @_:0xb2b0f04555daca474f0f77d0966945c9/world.Handle<S> -> @_:P -> 0xb2b0f04555daca474f0f77d0966945c9/bundle_delivery.Delivery<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E>, P>) -> @-recover:(@_:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E> -> @_:P -> @_:0xb2b0f04555daca474f0f77d0966945c9/world.WorldError -> 0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E>) -> @prepared:List<&1, Prepared<S, P>> -> @commands:List<&1, 0xb2b0f04555daca474f0f77d0966945c9/deferred_command.Command<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E>>> -> @+current:Nat -> @tx:0xb2b0f04555daca474f0f77d0966945c9/transaction.Tx<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E>, E> -> 0xb2b0f04555daca474f0f77d0966945c9/transaction.Tx<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E>, E>
template stage source · line 83 · raw
@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-P:Type -> @-attempt:(@_:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E> -> @_:0xb2b0f04555daca474f0f77d0966945c9/world.Handle<S> -> @_:P -> 0xb2b0f04555daca474f0f77d0966945c9/bundle_delivery.Delivery<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E>, P>) -> @-recover:(@_:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E> -> @_:P -> @_:0xb2b0f04555daca474f0f77d0966945c9/world.WorldError -> 0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E>) -> @prepared:List<&1, Prepared<S, P>> -> @tx:0xb2b0f04555daca474f0f77d0966945c9/transaction.Tx<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E>, E> -> 0xb2b0f04555daca474f0f77d0966945c9/transaction.Tx<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E>, E>
template originals source · line 86 · raw
@-S:Data -> @-P:Type -> @prepared:List<&1, Prepared<S, P>> -> List<&1, P>
template committed source · line 91 · raw
@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-P:Type -> @-Error:Data -> @observed:0xb2b0f04555daca474f0f77d0966945c9/transaction.Returned<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E>, Error> -> Finished<S, Store, R, E, P, Error>
template failed source · line 94 · raw
@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-P:Type -> @-Error:Data -> @payloads:List<&1, P> -> @error:Error -> @observed:0xb2b0f04555daca474f0f77d0966945c9/transaction.Returned<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E>, Error> -> Finished<S, Store, R, E, P, Error>
template finish source · line 97 · raw
@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-P:Type -> @-Error:Data -> @-attempt:(@_:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E> -> @_:0xb2b0f04555daca474f0f77d0966945c9/world.Handle<S> -> @_:P -> 0xb2b0f04555daca474f0f77d0966945c9/bundle_delivery.Delivery<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E>, P>) -> @-recover:(@_:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E> -> @_:P -> @_:0xb2b0f04555daca474f0f77d0966945c9/world.WorldError -> 0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E>) -> @batch:Batch<S, Store, R, E, P> -> @outcome:0xb2b0f04555daca474f0f77d0966945c9/transaction.Outcome<Error> -> Finished<S, Store, R, E, P, Error>
template empty_population source · line 102 · raw
@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @world:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E> -> @handle:0xb2b0f04555daca474f0f77d0966945c9/world.Handle<S> -> @unit:Unit -> 0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E>
template spawn_positioned source · line 104 · raw
@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-P:Type -> @target:0xb2b0f04555daca474f0f77d0966945c9/world.Handle<S> -> @result:Inserted<S, Store, R, E, P> -> Spawned<S, Store, R, E, P>
template spawn_reserved source · line 108 · raw
@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-P:Type -> @prepared:List<&1, Prepared<S, P>> -> @payload:P -> @result:Pair(0xb2b0f04555daca474f0f77d0966945c9/transaction.Tx<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E>, E>, 0xb2b0f04555daca474f0f77d0966945c9/world.Reservation<S>) -> Spawned<S, Store, R, E, P>
template spawn source · line 112 · raw
@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-P:Type -> @batch:Batch<S, Store, R, E, P> -> @payload:P -> Spawned<S, Store, R, E, P>