~/bend-docscommunity

ordinary_app_relation_failure_reader.bend checks

raw source on the hub · import bendvy-ecs-core@0.1.0.6/ordinary_app_relation_failure_reader.bend as Ordinary_app_relation_failure_reader

17 imports
import Base
import ./ordinary_app_composer.bend as Build
import ./ordinary_app_observation_data.bend as DTO
import ./ordinary_app_records.bend as Records
import ./ordinary_app_recipe.bend as Tree
import ./internal/relation_failures/domains.bend as D
import ./world.bend as W
import ./system.bend as Sys
import ./relation_commands.bend as Notice
import ./relation_types.bend as G
import ./relation_failure_runtime.bend as K
import ./relation_failure_reader.bend as Decl
import ./event_notice_runtime.bend as Mixed
import ./event_family_runtime.bend as Family
import ./event_family_routing.bend as Route
import ./ordinary_app_registration_fields.bend as Fields
import ./ordinary_query_declaration.bend as Query

Types

type Owner source · line 20 · raw

@S:Data -> @Reader:Type -> Type

Retains the same operative declaration and the actual descriptor Reader/Registry.

type Registration source · line 30 · raw

@S:Data -> @C:Type -> @R:Type -> @P:Data -> @F:Type -> @H:Type -> @Owner:Type -> Type

Registration returns the mixed runtime on both branches; only Registered supplies a reader owner. Other event-family state is reattached on refusal.

type RunResult source · line 47 · raw

@S:Data -> @C:Type -> @R:Type -> @P:Data -> @F:Type -> @H:Type -> @Owner:Type -> @Error:Data -> @Out:Type -> @A:Type -> Type

Every completion returns the runtime and reader owner. Inspect completion for output, system failure or refusal rather than interpreting Ran as success.

Templates

template OwnerType source · line 22 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-P:Data -> @-A:Type -> @-Error:Data -> @-Out:Type -> @-runner:(@_:0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, 0x14a72e1c180a5ab1f8a056d43822425c/relation_commands.Notice<S, P>> -> @_:0x14a72e1c180a5ab1f8a056d43822425c/relation_failure_runtime.Input<S, 0x14a72e1c180a5ab1f8a056d43822425c/relation_commands.Notice<S, P>, A> -> 0x14a72e1c180a5ab1f8a056d43822425c/system.Outcome<0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, 0x14a72e1c180a5ab1f8a056d43822425c/relation_commands.Notice<S, P>>, Error, Out>) -> Type

Specialize the affine reader owner to its world, argument and runner types.

template fields source · line 25 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-P:Data -> @-A:Type -> @-Error:Data -> @-Out:Type -> @-runner:(@_:0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, 0x14a72e1c180a5ab1f8a056d43822425c/relation_commands.Notice<S, P>> -> @_:0x14a72e1c180a5ab1f8a056d43822425c/relation_failure_runtime.Input<S, 0x14a72e1c180a5ab1f8a056d43822425c/relation_commands.Notice<S, P>, A> -> 0x14a72e1c180a5ab1f8a056d43822425c/system.Outcome<0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, 0x14a72e1c180a5ab1f8a056d43822425c/relation_commands.Notice<S, P>>, Error, Out>) -> @owner:Owner<S, 0x14a72e1c180a5ab1f8a056d43822425c/relation_failure_runtime.Reader<S, C, R, 0x14a72e1c180a5ab1f8a056d43822425c/relation_commands.Notice<S, P>, A, Error, Out, runner>> -> Pair(Owner<S, 0x14a72e1c180a5ab1f8a056d43822425c/relation_failure_runtime.Reader<S, C, R, 0x14a72e1c180a5ab1f8a056d43822425c/relation_commands.Notice<S, P>, A, Error, Out, runner>>, List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_registration_fields.Fields<S>>)

Return the same reader owner with detached registration/debug fields, including its current registry cursor and the declared relation read clause.

template registered source · line 33 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-P:Data -> @-A:Type -> @-Error:Data -> @-Out:Type -> @-runner:(@_:0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, 0x14a72e1c180a5ab1f8a056d43822425c/relation_commands.Notice<S, P>> -> @_:0x14a72e1c180a5ab1f8a056d43822425c/relation_failure_runtime.Input<S, 0x14a72e1c180a5ab1f8a056d43822425c/relation_commands.Notice<S, P>, A> -> 0x14a72e1c180a5ab1f8a056d43822425c/system.Outcome<0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, 0x14a72e1c180a5ab1f8a056d43822425c/relation_commands.Notice<S, P>>, Error, Out>) -> @-F:Type -> @-H:Type -> @held:Pair(0x14a72e1c180a5ab1f8a056d43822425c/event_family_runtime.State<P, F, H>, Nat) -> @declaration:0x14a72e1c180a5ab1f8a056d43822425c/relation_failure_reader.Declaration<S> -> @result:0x14a72e1c180a5ab1f8a056d43822425c/relation_failure_runtime.Registered<S, C, R, 0x14a72e1c180a5ab1f8a056d43822425c/relation_commands.Notice<S, P>, A, Error, Out, runner> -> Registration<S, C, R, P, F, H, Owner<S, 0x14a72e1c180a5ab1f8a056d43822425c/relation_failure_runtime.Reader<S, C, R, 0x14a72e1c180a5ab1f8a056d43822425c/relation_commands.Notice<S, P>, A, Error, Out, runner>>>

template register_detached source · line 39 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-P:Data -> @-A:Type -> @-Error:Data -> @-Out:Type -> @-runner:(@_:0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, 0x14a72e1c180a5ab1f8a056d43822425c/relation_commands.Notice<S, P>> -> @_:0x14a72e1c180a5ab1f8a056d43822425c/relation_failure_runtime.Input<S, 0x14a72e1c180a5ab1f8a056d43822425c/relation_commands.Notice<S, P>, A> -> 0x14a72e1c180a5ab1f8a056d43822425c/system.Outcome<0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, 0x14a72e1c180a5ab1f8a056d43822425c/relation_commands.Notice<S, P>>, Error, Out>) -> @-F:Type -> @-H:Type -> @+declaration:0x14a72e1c180a5ab1f8a056d43822425c/relation_failure_reader.Declaration<S> -> @name:String -> @detached:Pair(0x14a72e1c180a5ab1f8a056d43822425c/relation_failure_runtime.Runtime<S, C, R, 0x14a72e1c180a5ab1f8a056d43822425c/relation_commands.Notice<S, P>>, Pair(0x14a72e1c180a5ab1f8a056d43822425c/event_family_runtime.State<P, F, H>, Nat)) -> Registration<S, C, R, P, F, H, Owner<S, 0x14a72e1c180a5ab1f8a056d43822425c/relation_failure_runtime.Reader<S, C, R, 0x14a72e1c180a5ab1f8a056d43822425c/relation_commands.Notice<S, P>, A, Error, Out, runner>>>

Advanced registration from a detached failure runtime and held family state. Reattach that state on success or refusal; select the single declared relation.

template register source · line 44 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-P:Data -> @-A:Type -> @-Error:Data -> @-Out:Type -> @-runner:(@_:0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, 0x14a72e1c180a5ab1f8a056d43822425c/relation_commands.Notice<S, P>> -> @_:0x14a72e1c180a5ab1f8a056d43822425c/relation_failure_runtime.Input<S, 0x14a72e1c180a5ab1f8a056d43822425c/relation_commands.Notice<S, P>, A> -> 0x14a72e1c180a5ab1f8a056d43822425c/system.Outcome<0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, 0x14a72e1c180a5ab1f8a056d43822425c/relation_commands.Notice<S, P>>, Error, Out>) -> @-F:Type -> @-H:Type -> @runtime:0x14a72e1c180a5ab1f8a056d43822425c/event_family_routing.Runtime<S, C, R, 0x14a72e1c180a5ab1f8a056d43822425c/relation_commands.Notice<S, P>, 0x14a72e1c180a5ab1f8a056d43822425c/event_notice_runtime.State<S, P, F, H>> -> @declaration:0x14a72e1c180a5ab1f8a056d43822425c/relation_failure_reader.Declaration<S> -> @name:String -> Registration<S, C, R, P, F, H, Owner<S, 0x14a72e1c180a5ab1f8a056d43822425c/relation_failure_runtime.Reader<S, C, R, 0x14a72e1c180a5ab1f8a056d43822425c/relation_commands.Notice<S, P>, A, Error, Out, runner>>>

Register an independent reader for this relation declaration in the mixed runtime. Return its owner on success, or RegistrationFailed with the runtime.

template ran source · line 49 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-P:Data -> @-A:Type -> @-Error:Data -> @-Out:Type -> @-runner:(@_:0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, 0x14a72e1c180a5ab1f8a056d43822425c/relation_commands.Notice<S, P>> -> @_:0x14a72e1c180a5ab1f8a056d43822425c/relation_failure_runtime.Input<S, 0x14a72e1c180a5ab1f8a056d43822425c/relation_commands.Notice<S, P>, A> -> 0x14a72e1c180a5ab1f8a056d43822425c/system.Outcome<0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, 0x14a72e1c180a5ab1f8a056d43822425c/relation_commands.Notice<S, P>>, Error, Out>) -> @-F:Type -> @-H:Type -> @declaration:0x14a72e1c180a5ab1f8a056d43822425c/relation_failure_reader.Declaration<S> -> @held:Pair(0x14a72e1c180a5ab1f8a056d43822425c/event_family_runtime.State<P, F, H>, Nat) -> @result:0x14a72e1c180a5ab1f8a056d43822425c/relation_failure_runtime.RunResult<S, C, R, 0x14a72e1c180a5ab1f8a056d43822425c/relation_commands.Notice<S, P>, A, Error, Out, runner> -> RunResult<S, C, R, P, F, H, Owner<S, 0x14a72e1c180a5ab1f8a056d43822425c/relation_failure_runtime.Reader<S, C, R, 0x14a72e1c180a5ab1f8a056d43822425c/relation_commands.Notice<S, P>, A, Error, Out, runner>>, Error, Out, A>

template completed_owner source · line 52 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-P:Data -> @-A:Type -> @-Error:Data -> @-Out:Type -> @-runner:(@_:0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, 0x14a72e1c180a5ab1f8a056d43822425c/relation_commands.Notice<S, P>> -> @_:0x14a72e1c180a5ab1f8a056d43822425c/relation_failure_runtime.Input<S, 0x14a72e1c180a5ab1f8a056d43822425c/relation_commands.Notice<S, P>, A> -> 0x14a72e1c180a5ab1f8a056d43822425c/system.Outcome<0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, 0x14a72e1c180a5ab1f8a056d43822425c/relation_commands.Notice<S, P>>, Error, Out>) -> @-F:Type -> @-H:Type -> @-classify:(@_:0x14a72e1c180a5ab1f8a056d43822425c/relation_commands.Notice<S, P> -> Maybe<&1, 0x14a72e1c180a5ab1f8a056d43822425c/internal/relation_failures/domains.DescriptorKey<S>>) -> @held:Pair(0x14a72e1c180a5ab1f8a056d43822425c/event_family_runtime.State<P, F, H>, Nat) -> @runtime:0x14a72e1c180a5ab1f8a056d43822425c/relation_failure_runtime.Runtime<S, C, R, 0x14a72e1c180a5ab1f8a056d43822425c/relation_commands.Notice<S, P>> -> @args:A -> @owner:Owner<S, 0x14a72e1c180a5ab1f8a056d43822425c/relation_failure_runtime.Reader<S, C, R, 0x14a72e1c180a5ab1f8a056d43822425c/relation_commands.Notice<S, P>, A, Error, Out, runner>> -> RunResult<S, C, R, P, F, H, Owner<S, 0x14a72e1c180a5ab1f8a056d43822425c/relation_failure_runtime.Reader<S, C, R, 0x14a72e1c180a5ab1f8a056d43822425c/relation_commands.Notice<S, P>, A, Error, Out, runner>>, Error, Out, A>

template run_detached source · line 57 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-P:Data -> @-A:Type -> @-Error:Data -> @-Out:Type -> @-runner:(@_:0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, 0x14a72e1c180a5ab1f8a056d43822425c/relation_commands.Notice<S, P>> -> @_:0x14a72e1c180a5ab1f8a056d43822425c/relation_failure_runtime.Input<S, 0x14a72e1c180a5ab1f8a056d43822425c/relation_commands.Notice<S, P>, A> -> 0x14a72e1c180a5ab1f8a056d43822425c/system.Outcome<0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, 0x14a72e1c180a5ab1f8a056d43822425c/relation_commands.Notice<S, P>>, Error, Out>) -> @-F:Type -> @-H:Type -> @-classify:(@_:0x14a72e1c180a5ab1f8a056d43822425c/relation_commands.Notice<S, P> -> Maybe<&1, 0x14a72e1c180a5ab1f8a056d43822425c/internal/relation_failures/domains.DescriptorKey<S>>) -> @owner:Owner<S, 0x14a72e1c180a5ab1f8a056d43822425c/relation_failure_runtime.Reader<S, C, R, 0x14a72e1c180a5ab1f8a056d43822425c/relation_commands.Notice<S, P>, A, Error, Out, runner>> -> @args:A -> @detached:Pair(0x14a72e1c180a5ab1f8a056d43822425c/relation_failure_runtime.Runtime<S, C, R, 0x14a72e1c180a5ab1f8a056d43822425c/relation_commands.Notice<S, P>>, Pair(0x14a72e1c180a5ab1f8a056d43822425c/event_family_runtime.State<P, F, H>, Nat)) -> RunResult<S, C, R, P, F, H, Owner<S, 0x14a72e1c180a5ab1f8a056d43822425c/relation_failure_runtime.Reader<S, C, R, 0x14a72e1c180a5ab1f8a056d43822425c/relation_commands.Notice<S, P>, A, Error, Out, runner>>, Error, Out, A>

Advanced execution with already detached failure/family state. Reattach the family state and return the reader owner for every underlying completion.

template run source · line 68 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-P:Data -> @-A:Type -> @-Error:Data -> @-Out:Type -> @-runner:(@_:0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, 0x14a72e1c180a5ab1f8a056d43822425c/relation_commands.Notice<S, P>> -> @_:0x14a72e1c180a5ab1f8a056d43822425c/relation_failure_runtime.Input<S, 0x14a72e1c180a5ab1f8a056d43822425c/relation_commands.Notice<S, P>, A> -> 0x14a72e1c180a5ab1f8a056d43822425c/system.Outcome<0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, 0x14a72e1c180a5ab1f8a056d43822425c/relation_commands.Notice<S, P>>, Error, Out>) -> @-F:Type -> @-H:Type -> @-classify:(@_:0x14a72e1c180a5ab1f8a056d43822425c/relation_commands.Notice<S, P> -> Maybe<&1, 0x14a72e1c180a5ab1f8a056d43822425c/internal/relation_failures/domains.DescriptorKey<S>>) -> @runtime:0x14a72e1c180a5ab1f8a056d43822425c/event_family_routing.Runtime<S, C, R, 0x14a72e1c180a5ab1f8a056d43822425c/relation_commands.Notice<S, P>, 0x14a72e1c180a5ab1f8a056d43822425c/event_notice_runtime.State<S, P, F, H>> -> @owner:Owner<S, 0x14a72e1c180a5ab1f8a056d43822425c/relation_failure_runtime.Reader<S, C, R, 0x14a72e1c180a5ab1f8a056d43822425c/relation_commands.Notice<S, P>, A, Error, Out, runner>> -> @args:A -> RunResult<S, C, R, P, F, H, Owner<S, 0x14a72e1c180a5ab1f8a056d43822425c/relation_failure_runtime.Reader<S, C, R, 0x14a72e1c180a5ab1f8a056d43822425c/relation_commands.Notice<S, P>, A, Error, Out, runner>>, Error, Out, A>

Run this registered relation reader through the failure runtime, returning its updated owner and completion. The trusted classify callback identifies relation failures; use the same schema and notice classification as registration. Readings use this reader's independent position and report retained-history lag. Success acknowledges through the returned clock; failure does not acknowledge new notices, but may activate a missing position. Rejection returns args without advancing reader positions. World recovery follows the supplied runner contract. See relation-failure-runtime.bend for completion and retention details.

template observe source · line 71 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-P:Data -> @world:0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, 0x14a72e1c180a5ab1f8a056d43822425c/relation_commands.Notice<S, P>> -> Pair(0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, 0x14a72e1c180a5ab1f8a056d43822425c/relation_commands.Notice<S, P>>, 0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_observation_data.Observation<Unit>)

Composer observation for a reader registration: preserve the world and emit Unit with no rows. This does not execute or acknowledge the reader.

template append source · line 75 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-P:Data -> @-A:Type -> @-Error:Data -> @-Out:Type -> @-runner:(@_:0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, 0x14a72e1c180a5ab1f8a056d43822425c/relation_commands.Notice<S, P>> -> @_:0x14a72e1c180a5ab1f8a056d43822425c/relation_failure_runtime.Input<S, 0x14a72e1c180a5ab1f8a056d43822425c/relation_commands.Notice<S, P>, A> -> 0x14a72e1c180a5ab1f8a056d43822425c/system.Outcome<0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, 0x14a72e1c180a5ab1f8a056d43822425c/relation_commands.Notice<S, P>>, Error, Out>) -> @-Owners:Type -> @-Rows:Data -> @-prior:(@_:0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, 0x14a72e1c180a5ab1f8a056d43822425c/relation_commands.Notice<S, P>> -> Pair(0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, 0x14a72e1c180a5ab1f8a056d43822425c/relation_commands.Notice<S, P>>, 0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_observation_data.Observation<Rows>)) -> @-fold:(@_:Owners -> Pair(Owners, List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_registration_fields.Fields<S>>)) -> @owner:Owner<S, 0x14a72e1c180a5ab1f8a056d43822425c/relation_failure_runtime.Reader<S, C, R, 0x14a72e1c180a5ab1f8a056d43822425c/relation_commands.Notice<S, P>, A, Error, Out, runner>> -> @value:0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_composer.Registered<S, 0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, 0x14a72e1c180a5ab1f8a056d43822425c/relation_commands.Notice<S, P>>, Owners, Rows, prior, fold> -> 0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_composer.Registered<S, 0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, 0x14a72e1c180a5ab1f8a056d43822425c/relation_commands.Notice<S, P>>, Pair(Owners, Owner<S, 0x14a72e1c180a5ab1f8a056d43822425c/relation_failure_runtime.Reader<S, C, R, 0x14a72e1c180a5ab1f8a056d43822425c/relation_commands.Notice<S, P>, A, Error, Out, runner>>), 0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_observation_data.Product<Rows, Unit>, 0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_recipe.observe_pair(0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, 0x14a72e1c180a5ab1f8a056d43822425c/relation_commands.Notice<S, P>>, Rows, Unit, prior, observe(S, C, R, P)), 0x14a72e1c180a5ab1f8a056d43822425c/ordinary_app_records.fold_pair(S, Owners, Owner<S, 0x14a72e1c180a5ab1f8a056d43822425c/relation_failure_runtime.Reader<S, C, R, 0x14a72e1c180a5ab1f8a056d43822425c/relation_commands.Notice<S, P>, A, Error, Out, runner>>, fold, fields(S, C, R, P, A, Error, Out, runner))>

Append an existing reader owner to an App registration product. Preserve previous observations, add Unit rows and fold this reader's debug fields; appending alone does not run the reader.