~/bend-docscommunity

owned_event_family_reader_runtime.bend checks

raw source on the hub · import bendvy-ecs-core@0.1.0.2/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.

type Reply source · line 20 · raw

@Error:Data -> @Args:Type -> Type

Templates

template stopped source · line 22 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-P:Type -> @-Rest:Type -> @-E:Data -> @-path:0xb2b0f04555daca474f0f77d0966945c9/owner_product.Lens<R, 0xb2b0f04555daca474f0f77d0966945c9/owned_event_log.Log<P>, Rest> -> @-Args:Type -> @-Error:Data -> @world:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E> -> @args:Args -> @outcome:0xb2b0f04555daca474f0f77d0966945c9/transaction.Outcome<Failure<Error>> -> @lagged:Bool -> Pair(0xb2b0f04555daca474f0f77d0966945c9/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:0xb2b0f04555daca474f0f77d0966945c9/owner_product.Lens<R, 0xb2b0f04555daca474f0f77d0966945c9/owned_event_log.Log<P>, Rest> -> @-Args:Type -> @-Error:Data -> @lagged:Bool -> @next:(@_:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E> -> @_:Args -> Pair(0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>, Reply<Error, Args>)) -> @result:Pair(0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>, 0xb2b0f04555daca474f0f77d0966945c9/owned_event_log.ReadResult<Args, Pair(0xb2b0f04555daca474f0f77d0966945c9/transaction.Outcome<Error>, Args)>) -> Pair(0xb2b0f04555daca474f0f77d0966945c9/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:0xb2b0f04555daca474f0f77d0966945c9/owner_product.Lens<R, 0xb2b0f04555daca474f0f77d0966945c9/owned_event_log.Log<P>, Rest> -> @-Request:Type -> @-Projection:Data -> @-Args:Type -> @-Error:Data -> @-at:(@_:P -> @_:Request -> Pair(P, Projection)) -> @-body:(@-H:Type -> @-read:0xb2b0f04555daca474f0f77d0966945c9/capabilities.Request<H, Request, Projection> -> @_:H -> @_:Args -> Pair(H, Pair(0xb2b0f04555daca474f0f77d0966945c9/transaction.Outcome<Error>, Args))) -> @keys:List<&2, Nat> -> @world:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E> -> @args:Args -> @+lagged:Bool -> Pair(0xb2b0f04555daca474f0f77d0966945c9/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:0xb2b0f04555daca474f0f77d0966945c9/owner_product.Lens<R, 0xb2b0f04555daca474f0f77d0966945c9/owned_event_log.Log<P>, Rest> -> @-Args:Type -> @-Error:Data -> @result:Pair(0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>, Reply<Error, Args>) -> 0xb2b0f04555daca474f0f77d0966945c9/system.Outcome<0xb2b0f04555daca474f0f77d0966945c9/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:0xb2b0f04555daca474f0f77d0966945c9/owner_product.Lens<R, 0xb2b0f04555daca474f0f77d0966945c9/owned_event_log.Log<P>, Rest> -> @-Request:Type -> @-Projection:Data -> @-Args:Type -> @-Error:Data -> @-at:(@_:P -> @_:Request -> Pair(P, Projection)) -> @-body:(@-H:Type -> @-read:0xb2b0f04555daca474f0f77d0966945c9/capabilities.Request<H, Request, Projection> -> @_:H -> @_:Args -> Pair(H, Pair(0xb2b0f04555daca474f0f77d0966945c9/transaction.Outcome<Error>, Args))) -> @world:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E> -> @input:0xb2b0f04555daca474f0f77d0966945c9/event_runtime.Input<Nat, Args> -> 0xb2b0f04555daca474f0f77d0966945c9/system.Outcome<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>, Unit, Reply<Error, Args>>

template restored_stream source · line 43 · raw

@-S:Data -> @old:List<&2, 0xb2b0f04555daca474f0f77d0966945c9/event_runtime.Position> -> @id:U32 -> @tick:Nat -> @stream:0xb2b0f04555daca474f0f77d0966945c9/event_stream.Stream<S, Nat> -> 0xb2b0f04555daca474f0f77d0966945c9/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 -> @_:0xb2b0f04555daca474f0f77d0966945c9/event_stream.Stream<S, Nat> -> F) -> @world:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E> -> @+tick:Nat -> @old:List<&2, 0xb2b0f04555daca474f0f77d0966945c9/event_runtime.Position> -> @id:U32 -> @returned:Pair(F, 0xb2b0f04555daca474f0f77d0966945c9/event_stream.Stream<S, Nat>) -> 0xb2b0f04555daca474f0f77d0966945c9/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, 0xb2b0f04555daca474f0f77d0966945c9/event_stream.Stream<S, Nat>)) -> @-put:(@_:F -> @_:0xb2b0f04555daca474f0f77d0966945c9/event_stream.Stream<S, Nat> -> F) -> @old:List<&2, 0xb2b0f04555daca474f0f77d0966945c9/event_runtime.Position> -> @id:U32 -> @runtime:0xb2b0f04555daca474f0f77d0966945c9/event_family_routing.Runtime<S, C, R, E, F> -> 0xb2b0f04555daca474f0f77d0966945c9/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:0xb2b0f04555daca474f0f77d0966945c9/owner_product.Lens<R, 0xb2b0f04555daca474f0f77d0966945c9/owned_event_log.Log<P>, Rest> -> @-Request:Type -> @-Projection:Data -> @-Args:Type -> @-Error:Data -> @-at:(@_:P -> @_:Request -> Pair(P, Projection)) -> @-body:(@-H:Type -> @-read:0xb2b0f04555daca474f0f77d0966945c9/capabilities.Request<H, Request, Projection> -> @_:H -> @_:Args -> Pair(H, Pair(0xb2b0f04555daca474f0f77d0966945c9/transaction.Outcome<Error>, Args))) -> @-F:Type -> @-take:(@_:F -> Pair(F, 0xb2b0f04555daca474f0f77d0966945c9/event_stream.Stream<S, Nat>)) -> @-put:(@_:F -> @_:0xb2b0f04555daca474f0f77d0966945c9/event_stream.Stream<S, Nat> -> F) -> @old:List<&2, 0xb2b0f04555daca474f0f77d0966945c9/event_runtime.Position> -> @id:U32 -> @result:0xb2b0f04555daca474f0f77d0966945c9/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)> -> 0xb2b0f04555daca474f0f77d0966945c9/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:0xb2b0f04555daca474f0f77d0966945c9/owner_product.Lens<R, 0xb2b0f04555daca474f0f77d0966945c9/owned_event_log.Log<P>, Rest> -> @-Request:Type -> @-Projection:Data -> @-Args:Type -> @-Error:Data -> @-at:(@_:P -> @_:Request -> Pair(P, Projection)) -> @-body:(@-H:Type -> @-read:0xb2b0f04555daca474f0f77d0966945c9/capabilities.Request<H, Request, Projection> -> @_:H -> @_:Args -> Pair(H, Pair(0xb2b0f04555daca474f0f77d0966945c9/transaction.Outcome<Error>, Args))) -> @-F:Type -> @-take:(@_:F -> Pair(F, 0xb2b0f04555daca474f0f77d0966945c9/event_stream.Stream<S, Nat>)) -> @-put:(@_:F -> @_:0xb2b0f04555daca474f0f77d0966945c9/event_stream.Stream<S, Nat> -> F) -> @-synchronize:(@_:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E> -> @_:F -> @_:Nat -> Pair(0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>, F)) -> @world:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E> -> @tick:Nat -> @reader:0xb2b0f04555daca474f0f77d0966945c9/event_family_routing.Reader<S, Nat, F, take, put> -> @registry:0xb2b0f04555daca474f0f77d0966945c9/system.Registry<S, C, R, E, 0xb2b0f04555daca474f0f77d0966945c9/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, 0xb2b0f04555daca474f0f77d0966945c9/event_stream.Stream<S, Nat>) -> 0xb2b0f04555daca474f0f77d0966945c9/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:0xb2b0f04555daca474f0f77d0966945c9/owner_product.Lens<R, 0xb2b0f04555daca474f0f77d0966945c9/owned_event_log.Log<P>, Rest> -> @-Request:Type -> @-Projection:Data -> @-Args:Type -> @-Error:Data -> @-at:(@_:P -> @_:Request -> Pair(P, Projection)) -> @-body:(@-H:Type -> @-read:0xb2b0f04555daca474f0f77d0966945c9/capabilities.Request<H, Request, Projection> -> @_:H -> @_:Args -> Pair(H, Pair(0xb2b0f04555daca474f0f77d0966945c9/transaction.Outcome<Error>, Args))) -> @-F:Type -> @-take:(@_:F -> Pair(F, 0xb2b0f04555daca474f0f77d0966945c9/event_stream.Stream<S, Nat>)) -> @-put:(@_:F -> @_:0xb2b0f04555daca474f0f77d0966945c9/event_stream.Stream<S, Nat> -> F) -> @-synchronize:(@_:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E> -> @_:F -> @_:Nat -> Pair(0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>, F)) -> @runtime:0xb2b0f04555daca474f0f77d0966945c9/event_family_routing.Runtime<S, C, R, E, F> -> @reader:0xb2b0f04555daca474f0f77d0966945c9/event_family_routing.Reader<S, Nat, F, take, put> -> @registry:0xb2b0f04555daca474f0f77d0966945c9/system.Registry<S, C, R, E, 0xb2b0f04555daca474f0f77d0966945c9/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 -> 0xb2b0f04555daca474f0f77d0966945c9/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:0xb2b0f04555daca474f0f77d0966945c9/owner_product.Lens<R, 0xb2b0f04555daca474f0f77d0966945c9/owned_event_log.Log<P>, Rest> -> @-Request:Type -> @-Projection:Data -> @-Args:Type -> @-Error:Data -> @-at:(@_:P -> @_:Request -> Pair(P, Projection)) -> @-body:(@-H:Type -> @-read:0xb2b0f04555daca474f0f77d0966945c9/capabilities.Request<H, Request, Projection> -> @_:H -> @_:Args -> Pair(H, Pair(0xb2b0f04555daca474f0f77d0966945c9/transaction.Outcome<Error>, Args))) -> @trace:0xb2b0f04555daca474f0f77d0966945c9/trace_facts.State -> @world:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E> -> @input:0xb2b0f04555daca474f0f77d0966945c9/event_runtime.Input<Nat, Args> -> Pair(0xb2b0f04555daca474f0f77d0966945c9/system.Outcome<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>, Unit, Reply<Error, Args>>, 0xb2b0f04555daca474f0f77d0966945c9/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:0xb2b0f04555daca474f0f77d0966945c9/owner_product.Lens<R, 0xb2b0f04555daca474f0f77d0966945c9/owned_event_log.Log<P>, Rest> -> @-Request:Type -> @-Projection:Data -> @-Args:Type -> @-Error:Data -> @-at:(@_:P -> @_:Request -> Pair(P, Projection)) -> @-body:(@-H:Type -> @-read:0xb2b0f04555daca474f0f77d0966945c9/capabilities.Request<H, Request, Projection> -> @_:H -> @_:Args -> Pair(H, Pair(0xb2b0f04555daca474f0f77d0966945c9/transaction.Outcome<Error>, Args))) -> @-F:Type -> @-take:(@_:F -> Pair(F, 0xb2b0f04555daca474f0f77d0966945c9/event_stream.Stream<S, Nat>)) -> @-put:(@_:F -> @_:0xb2b0f04555daca474f0f77d0966945c9/event_stream.Stream<S, Nat> -> F) -> @-synchronize:(@_:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E> -> @_:F -> @_:Nat -> Pair(0xb2b0f04555daca474f0f77d0966945c9/world.World<S, C, R, E>, F)) -> @runtime:0xb2b0f04555daca474f0f77d0966945c9/event_family_routing.Runtime<S, C, R, E, F> -> @reader:0xb2b0f04555daca474f0f77d0966945c9/event_family_routing.Reader<S, Nat, F, take, put> -> @registry:0xb2b0f04555daca474f0f77d0966945c9/system.Registry<S, C, R, E, 0xb2b0f04555daca474f0f77d0966945c9/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:0xb2b0f04555daca474f0f77d0966945c9/trace_facts.State -> Pair(0xb2b0f04555daca474f0f77d0966945c9/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)>, 0xb2b0f04555daca474f0f77d0966945c9/trace_facts.State)

template register source · line 71 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-P:Type -> @-Rest:Type -> @-E:Data -> @-path:0xb2b0f04555daca474f0f77d0966945c9/owner_product.Lens<R, 0xb2b0f04555daca474f0f77d0966945c9/owned_event_log.Log<P>, Rest> -> @-Request:Type -> @-Projection:Data -> @-Args:Type -> @-Error:Data -> @-at:(@_:P -> @_:Request -> Pair(P, Projection)) -> @-body:(@-H:Type -> @-read:0xb2b0f04555daca474f0f77d0966945c9/capabilities.Request<H, Request, Projection> -> @_:H -> @_:Args -> Pair(H, Pair(0xb2b0f04555daca474f0f77d0966945c9/transaction.Outcome<Error>, Args))) -> @-F:Type -> @-take:(@_:F -> Pair(F, 0xb2b0f04555daca474f0f77d0966945c9/event_stream.Stream<S, Nat>)) -> @-put:(@_:F -> @_:0xb2b0f04555daca474f0f77d0966945c9/event_stream.Stream<S, Nat> -> F) -> @runtime:0xb2b0f04555daca474f0f77d0966945c9/event_family_routing.Runtime<S, C, R, E, F> -> @name:String -> 0xb2b0f04555daca474f0f77d0966945c9/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)>