owned_event_family_reader_runtime.bend checks
raw source on the hub · import bendvy-ecs-core@0.1.0.6/owned_event_family_reader_runtime.bend as Owned_event_family_reader_runtime
13 imports
import Base import ./trace_facts.bend as Facts import ./world.bend as W import ./system.bend as Sys import ./event_runtime.bend as Ev import ./transaction.bend as T import ./capabilities.bend as Cap import ./owned_event_log.bend as Log import ./owned_event_family_storage.bend as Storage import ./owner_product.bend as Product import ./event_stream.bend as Stream import ./event_family_routing.bend as Route import ./ordinary_owned_event.bend as Ord
Types
type Failure source · line 17 · raw
@Error:Data -> Data
One declared reader folds its unread payloads through a confined request cap. Providers are trusted schema provisioning; payload ownership stays in the log.
BodyFailed@Error:Data -> @error:Error -> Failure<Error>
MissingPayload@Error:Data -> Failure<Error>
type Reply source · line 20 · raw
@Error:Data -> @Args:Type -> Type
Reply@Error:Data -> @Args:Type -> @outcome:0x14a72e1c180a5ab1f8a056d43822425c/transaction.Outcome<Failure<Error>> -> @args:Args -> @lagged:Bool -> Reply<Error, Args>
Templates
template stopped source · line 22 · raw
@-S:Data -> @-C:Type -> @-R:Type -> @-P:Type -> @-Rest:Type -> @-E:Data -> @-path:0x14a72e1c180a5ab1f8a056d43822425c/owner_product.Lens<R, 0x14a72e1c180a5ab1f8a056d43822425c/owned_event_log.Log<P>, Rest> -> @-Args:Type -> @-Error:Data -> @world:0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E> -> @args:Args -> @outcome:0x14a72e1c180a5ab1f8a056d43822425c/transaction.Outcome<Failure<Error>> -> @lagged:Bool -> Pair(0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>, Reply<Error, Args>)
template visited source · line 24 · raw
@-S:Data -> @-C:Type -> @-R:Type -> @-P:Type -> @-Rest:Type -> @-E:Data -> @-path:0x14a72e1c180a5ab1f8a056d43822425c/owner_product.Lens<R, 0x14a72e1c180a5ab1f8a056d43822425c/owned_event_log.Log<P>, Rest> -> @-Args:Type -> @-Error:Data -> @lagged:Bool -> @next:(@_:0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E> -> @_:Args -> Pair(0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>, Reply<Error, Args>)) -> @result:Pair(0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>, 0x14a72e1c180a5ab1f8a056d43822425c/owned_event_log.ReadResult<Args, Pair(0x14a72e1c180a5ab1f8a056d43822425c/transaction.Outcome<Error>, Args)>) -> Pair(0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>, Reply<Error, Args>)
template fold_rows source · line 29 · raw
@-S:Data -> @-C:Type -> @-R:Type -> @-P:Type -> @-Rest:Type -> @-E:Data -> @-path:0x14a72e1c180a5ab1f8a056d43822425c/owner_product.Lens<R, 0x14a72e1c180a5ab1f8a056d43822425c/owned_event_log.Log<P>, Rest> -> @-Request:Type -> @-Projection:Data -> @-Args:Type -> @-Error:Data -> @-at:(@_:P -> @_:Request -> Pair(P, Projection)) -> @-body:(@-H:Type -> @-read:0x14a72e1c180a5ab1f8a056d43822425c/capabilities.Request<H, Request, Projection> -> @_:H -> @_:Args -> Pair(H, Pair(0x14a72e1c180a5ab1f8a056d43822425c/transaction.Outcome<Error>, Args))) -> @keys:List<&2, Nat> -> @world:0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E> -> @args:Args -> @+lagged:Bool -> Pair(0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>, Reply<Error, Args>)
template transported source · line 33 · raw
@-S:Data -> @-C:Type -> @-R:Type -> @-P:Type -> @-Rest:Type -> @-E:Data -> @-path:0x14a72e1c180a5ab1f8a056d43822425c/owner_product.Lens<R, 0x14a72e1c180a5ab1f8a056d43822425c/owned_event_log.Log<P>, Rest> -> @-Args:Type -> @-Error:Data -> @result:Pair(0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>, Reply<Error, Args>) -> 0x14a72e1c180a5ab1f8a056d43822425c/system.Outcome<0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>, Unit, Reply<Error, Args>>
template runner source · line 36 · raw
@-S:Data -> @-C:Type -> @-R:Type -> @-P:Type -> @-Rest:Type -> @-E:Data -> @-path:0x14a72e1c180a5ab1f8a056d43822425c/owner_product.Lens<R, 0x14a72e1c180a5ab1f8a056d43822425c/owned_event_log.Log<P>, Rest> -> @-Request:Type -> @-Projection:Data -> @-Args:Type -> @-Error:Data -> @-at:(@_:P -> @_:Request -> Pair(P, Projection)) -> @-body:(@-H:Type -> @-read:0x14a72e1c180a5ab1f8a056d43822425c/capabilities.Request<H, Request, Projection> -> @_:H -> @_:Args -> Pair(H, Pair(0x14a72e1c180a5ab1f8a056d43822425c/transaction.Outcome<Error>, Args))) -> @world:0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E> -> @input:0x14a72e1c180a5ab1f8a056d43822425c/event_runtime.Input<Nat, Args> -> 0x14a72e1c180a5ab1f8a056d43822425c/system.Outcome<0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>, Unit, Reply<Error, Args>>
template restored_stream source · line 43 · raw
@-S:Data -> @old:List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/event_runtime.Position> -> @id:U32 -> @tick:Nat -> @stream:0x14a72e1c180a5ab1f8a056d43822425c/event_stream.Stream<S, Nat> -> 0x14a72e1c180a5ab1f8a056d43822425c/event_stream.Stream<S, Nat>
The closed runner retains affine Args even on semantic failure. Route.run must see transport success; reconcile its selected stream to the exact existing failed-reader activation rule afterward, without changing other streams.
template restore_taken source · line 46 · raw
@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-F:Type -> @-put:(@_:F -> @_:0x14a72e1c180a5ab1f8a056d43822425c/event_stream.Stream<S, Nat> -> F) -> @world:0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E> -> @+tick:Nat -> @old:List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/event_runtime.Position> -> @id:U32 -> @returned:Pair(F, 0x14a72e1c180a5ab1f8a056d43822425c/event_stream.Stream<S, Nat>) -> 0x14a72e1c180a5ab1f8a056d43822425c/event_family_routing.Runtime<S, C, R, E, F>
template restore source · line 49 · raw
@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-F:Type -> @-take:(@_:F -> Pair(F, 0x14a72e1c180a5ab1f8a056d43822425c/event_stream.Stream<S, Nat>)) -> @-put:(@_:F -> @_:0x14a72e1c180a5ab1f8a056d43822425c/event_stream.Stream<S, Nat> -> F) -> @old:List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/event_runtime.Position> -> @id:U32 -> @runtime:0x14a72e1c180a5ab1f8a056d43822425c/event_family_routing.Runtime<S, C, R, E, F> -> 0x14a72e1c180a5ab1f8a056d43822425c/event_family_routing.Runtime<S, C, R, E, F>
template reconciled source · line 52 · raw
@-S:Data -> @-C:Type -> @-R:Type -> @-P:Type -> @-Rest:Type -> @-E:Data -> @-path:0x14a72e1c180a5ab1f8a056d43822425c/owner_product.Lens<R, 0x14a72e1c180a5ab1f8a056d43822425c/owned_event_log.Log<P>, Rest> -> @-Request:Type -> @-Projection:Data -> @-Args:Type -> @-Error:Data -> @-at:(@_:P -> @_:Request -> Pair(P, Projection)) -> @-body:(@-H:Type -> @-read:0x14a72e1c180a5ab1f8a056d43822425c/capabilities.Request<H, Request, Projection> -> @_:H -> @_:Args -> Pair(H, Pair(0x14a72e1c180a5ab1f8a056d43822425c/transaction.Outcome<Error>, Args))) -> @-F:Type -> @-take:(@_:F -> Pair(F, 0x14a72e1c180a5ab1f8a056d43822425c/event_stream.Stream<S, Nat>)) -> @-put:(@_:F -> @_:0x14a72e1c180a5ab1f8a056d43822425c/event_stream.Stream<S, Nat> -> F) -> @old:List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/event_runtime.Position> -> @id:U32 -> @result:0x14a72e1c180a5ab1f8a056d43822425c/event_family_routing.RunResult<S, C, R, E, Nat, F, Args, Unit, Reply<Error, Args>, take, put, runner(S, C, R, P, Rest, E, path, Request, Projection, Args, Error, at, body)> -> 0x14a72e1c180a5ab1f8a056d43822425c/event_family_routing.RunResult<S, C, R, E, Nat, F, Args, Unit, Reply<Error, Args>, take, put, runner(S, C, R, P, Rest, E, path, Request, Projection, Args, Error, at, body)>
template run_taken source · line 56 · raw
@-S:Data -> @-C:Type -> @-R:Type -> @-P:Type -> @-Rest:Type -> @-E:Data -> @-path:0x14a72e1c180a5ab1f8a056d43822425c/owner_product.Lens<R, 0x14a72e1c180a5ab1f8a056d43822425c/owned_event_log.Log<P>, Rest> -> @-Request:Type -> @-Projection:Data -> @-Args:Type -> @-Error:Data -> @-at:(@_:P -> @_:Request -> Pair(P, Projection)) -> @-body:(@-H:Type -> @-read:0x14a72e1c180a5ab1f8a056d43822425c/capabilities.Request<H, Request, Projection> -> @_:H -> @_:Args -> Pair(H, Pair(0x14a72e1c180a5ab1f8a056d43822425c/transaction.Outcome<Error>, Args))) -> @-F:Type -> @-take:(@_:F -> Pair(F, 0x14a72e1c180a5ab1f8a056d43822425c/event_stream.Stream<S, Nat>)) -> @-put:(@_:F -> @_:0x14a72e1c180a5ab1f8a056d43822425c/event_stream.Stream<S, Nat> -> F) -> @-synchronize:(@_:0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E> -> @_:F -> @_:Nat -> Pair(0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>, F)) -> @world:0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E> -> @tick:Nat -> @reader:0x14a72e1c180a5ab1f8a056d43822425c/event_family_routing.Reader<S, Nat, F, take, put> -> @registry:0x14a72e1c180a5ab1f8a056d43822425c/system.Registry<S, C, R, E, 0x14a72e1c180a5ab1f8a056d43822425c/event_runtime.Input<Nat, Args>, Unit, Reply<Error, Args>, runner(S, C, R, P, Rest, E, path, Request, Projection, Args, Error, at, body)> -> @args:Args -> @returned:Pair(F, 0x14a72e1c180a5ab1f8a056d43822425c/event_stream.Stream<S, Nat>) -> 0x14a72e1c180a5ab1f8a056d43822425c/event_family_routing.RunResult<S, C, R, E, Nat, F, Args, Unit, Reply<Error, Args>, take, put, runner(S, C, R, P, Rest, E, path, Request, Projection, Args, Error, at, body)>
template run source · line 59 · raw
@-S:Data -> @-C:Type -> @-R:Type -> @-P:Type -> @-Rest:Type -> @-E:Data -> @-path:0x14a72e1c180a5ab1f8a056d43822425c/owner_product.Lens<R, 0x14a72e1c180a5ab1f8a056d43822425c/owned_event_log.Log<P>, Rest> -> @-Request:Type -> @-Projection:Data -> @-Args:Type -> @-Error:Data -> @-at:(@_:P -> @_:Request -> Pair(P, Projection)) -> @-body:(@-H:Type -> @-read:0x14a72e1c180a5ab1f8a056d43822425c/capabilities.Request<H, Request, Projection> -> @_:H -> @_:Args -> Pair(H, Pair(0x14a72e1c180a5ab1f8a056d43822425c/transaction.Outcome<Error>, Args))) -> @-F:Type -> @-take:(@_:F -> Pair(F, 0x14a72e1c180a5ab1f8a056d43822425c/event_stream.Stream<S, Nat>)) -> @-put:(@_:F -> @_:0x14a72e1c180a5ab1f8a056d43822425c/event_stream.Stream<S, Nat> -> F) -> @-synchronize:(@_:0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E> -> @_:F -> @_:Nat -> Pair(0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>, F)) -> @runtime:0x14a72e1c180a5ab1f8a056d43822425c/event_family_routing.Runtime<S, C, R, E, F> -> @reader:0x14a72e1c180a5ab1f8a056d43822425c/event_family_routing.Reader<S, Nat, F, take, put> -> @registry:0x14a72e1c180a5ab1f8a056d43822425c/system.Registry<S, C, R, E, 0x14a72e1c180a5ab1f8a056d43822425c/event_runtime.Input<Nat, Args>, Unit, Reply<Error, Args>, runner(S, C, R, P, Rest, E, path, Request, Projection, Args, Error, at, body)> -> @args:Args -> 0x14a72e1c180a5ab1f8a056d43822425c/event_family_routing.RunResult<S, C, R, E, Nat, F, Args, Unit, Reply<Error, Args>, take, put, runner(S, C, R, P, Rest, E, path, Request, Projection, Args, Error, at, body)>
template runner_observed source · line 62 · raw
@-S:Data -> @-C:Type -> @-R:Type -> @-P:Type -> @-Rest:Type -> @-E:Data -> @-path:0x14a72e1c180a5ab1f8a056d43822425c/owner_product.Lens<R, 0x14a72e1c180a5ab1f8a056d43822425c/owned_event_log.Log<P>, Rest> -> @-Request:Type -> @-Projection:Data -> @-Args:Type -> @-Error:Data -> @-at:(@_:P -> @_:Request -> Pair(P, Projection)) -> @-body:(@-H:Type -> @-read:0x14a72e1c180a5ab1f8a056d43822425c/capabilities.Request<H, Request, Projection> -> @_:H -> @_:Args -> Pair(H, Pair(0x14a72e1c180a5ab1f8a056d43822425c/transaction.Outcome<Error>, Args))) -> @trace:0x14a72e1c180a5ab1f8a056d43822425c/trace_facts.State -> @world:0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E> -> @input:0x14a72e1c180a5ab1f8a056d43822425c/event_runtime.Input<Nat, Args> -> Pair(0x14a72e1c180a5ab1f8a056d43822425c/system.Outcome<0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>, Unit, Reply<Error, Args>>, 0x14a72e1c180a5ab1f8a056d43822425c/trace_facts.State)
template accepted source · line 64 · raw
@-Error:Data -> @-Args:Type -> @value:Reply<Error, Args> -> Pair(Reply<Error, Args>, Bool)
template run_traced source · line 68 · raw
@-S:Data -> @-C:Type -> @-R:Type -> @-P:Type -> @-Rest:Type -> @-E:Data -> @-path:0x14a72e1c180a5ab1f8a056d43822425c/owner_product.Lens<R, 0x14a72e1c180a5ab1f8a056d43822425c/owned_event_log.Log<P>, Rest> -> @-Request:Type -> @-Projection:Data -> @-Args:Type -> @-Error:Data -> @-at:(@_:P -> @_:Request -> Pair(P, Projection)) -> @-body:(@-H:Type -> @-read:0x14a72e1c180a5ab1f8a056d43822425c/capabilities.Request<H, Request, Projection> -> @_:H -> @_:Args -> Pair(H, Pair(0x14a72e1c180a5ab1f8a056d43822425c/transaction.Outcome<Error>, Args))) -> @-F:Type -> @-take:(@_:F -> Pair(F, 0x14a72e1c180a5ab1f8a056d43822425c/event_stream.Stream<S, Nat>)) -> @-put:(@_:F -> @_:0x14a72e1c180a5ab1f8a056d43822425c/event_stream.Stream<S, Nat> -> F) -> @-synchronize:(@_:0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E> -> @_:F -> @_:Nat -> Pair(0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>, F)) -> @runtime:0x14a72e1c180a5ab1f8a056d43822425c/event_family_routing.Runtime<S, C, R, E, F> -> @reader:0x14a72e1c180a5ab1f8a056d43822425c/event_family_routing.Reader<S, Nat, F, take, put> -> @registry:0x14a72e1c180a5ab1f8a056d43822425c/system.Registry<S, C, R, E, 0x14a72e1c180a5ab1f8a056d43822425c/event_runtime.Input<Nat, Args>, Unit, Reply<Error, Args>, runner(S, C, R, P, Rest, E, path, Request, Projection, Args, Error, at, body)> -> @args:Args -> @trace:0x14a72e1c180a5ab1f8a056d43822425c/trace_facts.State -> Pair(0x14a72e1c180a5ab1f8a056d43822425c/event_family_routing.RunResult<S, C, R, E, Nat, F, Args, Unit, Reply<Error, Args>, take, put, runner(S, C, R, P, Rest, E, path, Request, Projection, Args, Error, at, body)>, 0x14a72e1c180a5ab1f8a056d43822425c/trace_facts.State)
template register source · line 71 · raw
@-S:Data -> @-C:Type -> @-R:Type -> @-P:Type -> @-Rest:Type -> @-E:Data -> @-path:0x14a72e1c180a5ab1f8a056d43822425c/owner_product.Lens<R, 0x14a72e1c180a5ab1f8a056d43822425c/owned_event_log.Log<P>, Rest> -> @-Request:Type -> @-Projection:Data -> @-Args:Type -> @-Error:Data -> @-at:(@_:P -> @_:Request -> Pair(P, Projection)) -> @-body:(@-H:Type -> @-read:0x14a72e1c180a5ab1f8a056d43822425c/capabilities.Request<H, Request, Projection> -> @_:H -> @_:Args -> Pair(H, Pair(0x14a72e1c180a5ab1f8a056d43822425c/transaction.Outcome<Error>, Args))) -> @-F:Type -> @-take:(@_:F -> Pair(F, 0x14a72e1c180a5ab1f8a056d43822425c/event_stream.Stream<S, Nat>)) -> @-put:(@_:F -> @_:0x14a72e1c180a5ab1f8a056d43822425c/event_stream.Stream<S, Nat> -> F) -> @runtime:0x14a72e1c180a5ab1f8a056d43822425c/event_family_routing.Runtime<S, C, R, E, F> -> @name:String -> 0x14a72e1c180a5ab1f8a056d43822425c/event_family_routing.Registration<S, C, R, E, Nat, F, Args, Unit, Reply<Error, Args>, take, put, runner(S, C, R, P, Rest, E, path, Request, Projection, Args, Error, at, body)>