ordinary_lifetime_scope.bend checks
raw source on the hub · import bendvy-ecs-core@0.1.0.2/ordinary_lifetime_scope.bend as Ordinary_lifetime_scope
18 imports
import Base import ./lifetime_scope.bend as Sc import ./lifetime_scope_world_spawn.bend as Spawn import ./world.bend as W import ./ordinary_schema.bend as Schema import ./ordinary_schema_provision.bend as Provision import ./relation_commands.bend as A import ./relation_types.bend as G import ./relation_failure_reader.bend as Rel import ./ordinary_app_linked_cleanup.bend as LC import ./ordinary_app_linked_cleanup_system.bend as LCS import ./ordinary_component_clear_declaration.bend as Clear import ./column.bend as Col import ./ordinary_component_binding.bend as Binding import ./capabilities.bend as Cap import ./transaction.bend as T import ./commands.bend as Cmd import ./system.bend as Sys
Types
type Ops source · line 55 · raw
@-H:Type -> @-S:Data -> @-P:Type -> Type
Reuse the canonical Type-result request; rejected payloads are not forced to Data. Capabilities a lifetime-scope system body receives for payload type P. spawn consumes a scope/payload request and returns an owning SpawnResult; cleanup queues scope cleanup and returns QueueStatus. The opaque owner H must be threaded through both. P may be affine Type; a scope is metadata, not an entity owner or evidence that any member is currently live.
Ops@-H:Type -> @-S:Data -> @-P:Type -> @spawn:0xb2b0f04555daca474f0f77d0966945c9/capabilities.OwnedRequest<H, Pair(0xb2b0f04555daca474f0f77d0966945c9/lifetime_scope.Scope<S>, P), 0xb2b0f04555daca474f0f77d0966945c9/lifetime_scope.SpawnResult<S, P>> -> @cleanup:0xb2b0f04555daca474f0f77d0966945c9/capabilities.Request<H, 0xb2b0f04555daca474f0f77d0966945c9/lifetime_scope.Scope<S>, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.QueueStatus> -> Ops<H, S, P>
type ComponentRest source · line 141 · raw
@S:Data -> @Rest:Type -> Type
Project ordinary families through the metadata wrapper without changing owners. Trusted storage-adapter remainder for a projected component column. Retains the original component rest, scope membership and relation graph while the selected column is out. Gameplay should use the derived binding instead of constructing or unpacking this storage wrapper.
ComponentRest@S:Data -> @Rest:Type -> @rest:Rest -> @members:List<&2, 0xb2b0f04555daca474f0f77d0966945c9/lifetime_scope.Member> -> @graph:0xb2b0f04555daca474f0f77d0966945c9/relation_types.Graph<S> -> ComponentRest<S, Rest>
Templates
template empty_store source · line 24 · raw
@-S:Data -> @-C:Type -> @-empty:(@_:Unit -> C) -> @unit:Unit -> 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Store<S, 0xb2b0f04555daca474f0f77d0966945c9/lifetime_scope.Store<S, C>>
Scope metadata does not add a component/schema entry. Original owners survive. Trusted schema adapter: build an empty component store with scope membership and relation-graph wrappers. Component payload C may contain affine owners; empty constructs C once. Scope membership adds no component schema entry.
template counted source · line 26 · raw
@-S:Data -> @-C:Type -> @members:List<&2, 0xb2b0f04555daca474f0f77d0966945c9/lifetime_scope.Member> -> @graph:0xb2b0f04555daca474f0f77d0966945c9/relation_types.Graph<S> -> @seen:Pair(C, List<&2, Maybe<&2, U32>>) -> Pair(0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Store<S, 0xb2b0f04555daca474f0f77d0966945c9/lifetime_scope.Store<S, C>>, List<&2, Maybe<&2, U32>>)
template count_store source · line 32 · raw
@-S:Data -> @-C:Type -> @-count:(@_:C -> @_:List<&2, 0xb2b0f04555daca474f0f77d0966945c9/world.Handle<S>> -> Pair(C, List<&2, Maybe<&2, U32>>)) -> @store:0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Store<S, 0xb2b0f04555daca474f0f77d0966945c9/lifetime_scope.Store<S, C>> -> @handles:List<&2, 0xb2b0f04555daca474f0f77d0966945c9/world.Handle<S>> -> Pair(0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Store<S, 0xb2b0f04555daca474f0f77d0966945c9/lifetime_scope.Store<S, C>>, List<&2, Maybe<&2, U32>>)
Trusted provisioning adapter: run the original component counter through the scope/relation wrappers. Returns the wrapped store with its membership and graph owners threaded back; counting does not assign scopes or delete entities.
template schema source · line 38 · raw
@-S:Data -> @-C:Type -> @-R:Type -> @value:0xb2b0f04555daca474f0f77d0966945c9/ordinary_schema.Schema<S, C, R> -> 0xb2b0f04555daca474f0f77d0966945c9/ordinary_schema.Schema<S, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Store<S, 0xb2b0f04555daca474f0f77d0966945c9/lifetime_scope.Store<S, C>>, R>
Lift an ordinary schema to the scope/relation-wrapped Store type. Preserves the existing entries and resource schema; no synthetic scope component is registered. Use this during setup, not to change a live World's schema.
template provision source · line 46 · raw
@-S:Data -> @-C:Type -> @-R:Type -> @-empty:(@_:Unit -> C) -> @-count:(@_:C -> @_:List<&2, 0xb2b0f04555daca474f0f77d0966945c9/world.Handle<S>> -> Pair(C, List<&2, Maybe<&2, U32>>)) -> @value:0xb2b0f04555daca474f0f77d0966945c9/ordinary_schema_provision.Provision<S, C, R, empty, count> -> 0xb2b0f04555daca474f0f77d0966945c9/ordinary_schema_provision.Provision<S, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Store<S, 0xb2b0f04555daca474f0f77d0966945c9/lifetime_scope.Store<S, C>>, R, empty_store(S, C, empty), count_store(S, C, count)>
Lift the matching schema provision with its empty/count adapters. The component/resource entries remain unchanged while the Store gains scope membership and relation state. Pass the result to ordinary-lifetime-scope-io.create. Concrete setup: test-fixtures/public-scopes/feature-timing-v1/fixture.bend: provision, create and scoped_binding; main.bend exercises deferred cleanup.
template spawn_cap source · line 59 · raw
@-H:Type -> @-S:Data -> @-P:Type -> @ops:Ops<H, S, P> -> 0xb2b0f04555daca474f0f77d0966945c9/capabilities.OwnedRequest<H, Pair(0xb2b0f04555daca474f0f77d0966945c9/lifetime_scope.Scope<S>, P), 0xb2b0f04555daca474f0f77d0966945c9/lifetime_scope.SpawnResult<S, P>>
Advanced capability projection: consume Ops and obtain its owned spawn request operation. Normal system bodies use spawn to thread their opaque owner.
template cleanup_cap source · line 64 · raw
@-H:Type -> @-S:Data -> @-P:Type -> @ops:Ops<H, S, P> -> 0xb2b0f04555daca474f0f77d0966945c9/capabilities.Request<H, 0xb2b0f04555daca474f0f77d0966945c9/lifetime_scope.Scope<S>, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.QueueStatus>
Advanced capability projection: consume Ops and obtain its cleanup request. Normal system bodies use cleanup; projection alone queues no work.
template spawn source · line 76 · raw
@-H:Type -> @-S:Data -> @-P:Type -> @-ops:Ops<H, S, P> -> @owner:H -> @scope:0xb2b0f04555daca474f0f77d0966945c9/lifetime_scope.Scope<S> -> @payload:P -> Pair(H, 0xb2b0f04555daca474f0f77d0966945c9/lifetime_scope.SpawnResult<S, P>)
Request a deferred spawn in a scope from this World's namespace. Returns the updated opaque owner and either Spawned{handle}, a reserved handle not yet live, or SpawnRejected{payload,error}, returning the incoming affine P. A foreign-world scope is refused; reservation exhaustion also returns payload. Accepted requests retain P in deferred work. At an explicit command barrier, activation/populate precede membership assignment; the body does not see a live entity merely because this request succeeded. Only immediate refusal promises that payload result: a later failed system discards its Out and staged work, so placing rejected P inside Out does not make it a failed-system recovery API.
template cleanup source · line 88 · raw
@-H:Type -> @-S:Data -> @-P:Type -> @-ops:Ops<H, S, P> -> @owner:H -> @scope:0xb2b0f04555daca474f0f77d0966945c9/lifetime_scope.Scope<S> -> Pair(H, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.QueueStatus)
Queue cleanup of the given scope, threading the opaque owner back. Queued means accepted deferred work, not completed deletion; a foreign scope returns MissingEntity without queuing cleanup. Membership is observed when the command is applied at an explicit barrier, so same-world/name scopes refer to the same group rather than distinct owners. Cleanup uses the supplied linked-relation descriptors and component clear route. An unscoped persistent entity survives only outside the linked deletion closure; an unscoped linked descendant can still be deleted, while ordinary links from survivors to removed targets are cleared. Queuing cleanup does not flush commands. See docs/parity/scopes.md for the qualified survivor and relation boundary.
template spawn_request source · line 90 · raw
@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-P:Type -> @-populate:(@_:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Store<S, 0xb2b0f04555daca474f0f77d0966945c9/lifetime_scope.Store<S, C>>, R, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Notice<S, E>> -> @_:0xb2b0f04555daca474f0f77d0966945c9/world.Handle<S> -> @_:P -> 0xb2b0f04555daca474f0f77d0966945c9/world.World<S, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Store<S, 0xb2b0f04555daca474f0f77d0966945c9/lifetime_scope.Store<S, C>>, R, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Notice<S, E>>) -> @owner:0xb2b0f04555daca474f0f77d0966945c9/transaction.Tx<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Store<S, 0xb2b0f04555daca474f0f77d0966945c9/lifetime_scope.Store<S, C>>, R, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Notice<S, E>>, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Notice<S, E>> -> @input:Pair(0xb2b0f04555daca474f0f77d0966945c9/lifetime_scope.Scope<S>, P) -> Pair(0xb2b0f04555daca474f0f77d0966945c9/transaction.Tx<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Store<S, 0xb2b0f04555daca474f0f77d0966945c9/lifetime_scope.Store<S, C>>, R, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Notice<S, E>>, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Notice<S, E>>, 0xb2b0f04555daca474f0f77d0966945c9/lifetime_scope.SpawnResult<S, P>)
template cleanup_request source · line 93 · raw
@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-clear:(@_:C -> @_:0xb2b0f04555daca474f0f77d0966945c9/world.Handle<S> -> Pair(C, List<&2, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Notice<S, E>>)) -> @-record:(@_:0xb2b0f04555daca474f0f77d0966945c9/world.Handle<S> -> 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Notice<S, E>) -> @-declarations:List<&2, 0xb2b0f04555daca474f0f77d0966945c9/relation_failure_reader.Declaration<S>> -> @owner:0xb2b0f04555daca474f0f77d0966945c9/transaction.Tx<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Store<S, 0xb2b0f04555daca474f0f77d0966945c9/lifetime_scope.Store<S, C>>, R, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Notice<S, E>>, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Notice<S, E>> -> @scope:0xb2b0f04555daca474f0f77d0966945c9/lifetime_scope.Scope<S> -> Pair(0xb2b0f04555daca474f0f77d0966945c9/transaction.Tx<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Store<S, 0xb2b0f04555daca474f0f77d0966945c9/lifetime_scope.Store<S, C>>, R, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Notice<S, E>>, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Notice<S, E>>, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.QueueStatus)
template provide source · line 101 · raw
@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-P:Type -> @-populate:(@_:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Store<S, 0xb2b0f04555daca474f0f77d0966945c9/lifetime_scope.Store<S, C>>, R, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Notice<S, E>> -> @_:0xb2b0f04555daca474f0f77d0966945c9/world.Handle<S> -> @_:P -> 0xb2b0f04555daca474f0f77d0966945c9/world.World<S, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Store<S, 0xb2b0f04555daca474f0f77d0966945c9/lifetime_scope.Store<S, C>>, R, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Notice<S, E>>) -> @-clear:(@_:C -> @_:0xb2b0f04555daca474f0f77d0966945c9/world.Handle<S> -> Pair(C, List<&2, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Notice<S, E>>)) -> @-record:(@_:0xb2b0f04555daca474f0f77d0966945c9/world.Handle<S> -> 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Notice<S, E>) -> @-declarations:List<&2, 0xb2b0f04555daca474f0f77d0966945c9/relation_failure_reader.Declaration<S>> -> Ops<0xb2b0f04555daca474f0f77d0966945c9/transaction.Tx<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Store<S, 0xb2b0f04555daca474f0f77d0966945c9/lifetime_scope.Store<S, C>>, R, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Notice<S, E>>, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Notice<S, E>>, S, P>
Trusted system-construction adapter for the canonical transaction owner. Supplies spawn/cleanup operations using the closed populate, clear, record and relation declarations. populate receives the full World at deferred application; clear must match its Clear declaration, and relation declarations must cover the links cleanup is expected to maintain. These callbacks are schema/engine setup, not extra runtime authority exposed to the polymorphic gameplay body.
template returned source · line 105 · raw
@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-Error:Data -> @-Out:Type -> @output:Out -> @result:0xb2b0f04555daca474f0f77d0966945c9/transaction.Returned<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Store<S, 0xb2b0f04555daca474f0f77d0966945c9/lifetime_scope.Store<S, C>>, R, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Notice<S, E>>, Error> -> 0xb2b0f04555daca474f0f77d0966945c9/system.Outcome<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Store<S, 0xb2b0f04555daca474f0f77d0966945c9/lifetime_scope.Store<S, C>>, R, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Notice<S, E>>, Error, Out>
Sys failure retains World/error only; body output is discarded by that existing contract. Request-level rejected payload recovery does not imply failed-Out recovery.
template invoked source · line 109 · raw
@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-Error:Data -> @-Out:Type -> @seen:Pair(0xb2b0f04555daca474f0f77d0966945c9/transaction.Tx<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Store<S, 0xb2b0f04555daca474f0f77d0966945c9/lifetime_scope.Store<S, C>>, R, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Notice<S, E>>, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Notice<S, E>>, Pair(0xb2b0f04555daca474f0f77d0966945c9/transaction.Outcome<Error>, Out)) -> 0xb2b0f04555daca474f0f77d0966945c9/system.Outcome<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Store<S, 0xb2b0f04555daca474f0f77d0966945c9/lifetime_scope.Store<S, C>>, R, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Notice<S, E>>, Error, Out>
template runner source · line 118 · raw
@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-P:Type -> @-populate:(@_:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Store<S, 0xb2b0f04555daca474f0f77d0966945c9/lifetime_scope.Store<S, C>>, R, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Notice<S, E>> -> @_:0xb2b0f04555daca474f0f77d0966945c9/world.Handle<S> -> @_:P -> 0xb2b0f04555daca474f0f77d0966945c9/world.World<S, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Store<S, 0xb2b0f04555daca474f0f77d0966945c9/lifetime_scope.Store<S, C>>, R, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Notice<S, E>>) -> @-clear:(@_:C -> @_:0xb2b0f04555daca474f0f77d0966945c9/world.Handle<S> -> Pair(C, List<&2, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Notice<S, E>>)) -> @-record:(@_:0xb2b0f04555daca474f0f77d0966945c9/world.Handle<S> -> 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Notice<S, E>) -> @-declarations:List<&2, 0xb2b0f04555daca474f0f77d0966945c9/relation_failure_reader.Declaration<S>> -> @-Args:Type -> @-Error:Data -> @-Out:Type -> @-body:(@-H:Type -> @-ops:Ops<H, S, P> -> @_:Args -> @_:H -> Pair(H, Pair(0xb2b0f04555daca474f0f77d0966945c9/transaction.Outcome<Error>, Out))) -> @world:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Store<S, 0xb2b0f04555daca474f0f77d0966945c9/lifetime_scope.Store<S, C>>, R, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Notice<S, E>> -> @args:Args -> 0xb2b0f04555daca474f0f77d0966945c9/system.Outcome<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Store<S, 0xb2b0f04555daca474f0f77d0966945c9/lifetime_scope.Store<S, C>>, R, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Notice<S, E>>, Error, Out>
Execute one body with lifetime capabilities inside an ordinary transaction. Threads World through transaction finish: success returns Out; failure returns World/error and discards Out, including any affine payload stored only there. Failed staged spawns/cleanup are not published. Successful completion still leaves structural work pending until the caller applies an explicit barrier. Host IO and arbitrary trusted callback effects are not made reversible here.
template register source · line 125 · raw
@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-P:Type -> @-populate:(@_:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Store<S, 0xb2b0f04555daca474f0f77d0966945c9/lifetime_scope.Store<S, C>>, R, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Notice<S, E>> -> @_:0xb2b0f04555daca474f0f77d0966945c9/world.Handle<S> -> @_:P -> 0xb2b0f04555daca474f0f77d0966945c9/world.World<S, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Store<S, 0xb2b0f04555daca474f0f77d0966945c9/lifetime_scope.Store<S, C>>, R, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Notice<S, E>>) -> @-clear:(@_:C -> @_:0xb2b0f04555daca474f0f77d0966945c9/world.Handle<S> -> Pair(C, List<&2, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Notice<S, E>>)) -> @-record:(@_:0xb2b0f04555daca474f0f77d0966945c9/world.Handle<S> -> 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Notice<S, E>) -> @-declarations:List<&2, 0xb2b0f04555daca474f0f77d0966945c9/relation_failure_reader.Declaration<S>> -> @-Args:Type -> @-Error:Data -> @-Out:Type -> @-body:(@-H:Type -> @-ops:Ops<H, S, P> -> @_:Args -> @_:H -> Pair(H, Pair(0xb2b0f04555daca474f0f77d0966945c9/transaction.Outcome<Error>, Out))) -> @-clearDeclaration:0xb2b0f04555daca474f0f77d0966945c9/ordinary_component_clear_declaration.Declaration<S, C, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Notice<S, E>, clear> -> @world:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Store<S, 0xb2b0f04555daca474f0f77d0966945c9/lifetime_scope.Store<S, C>>, R, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Notice<S, E>> -> @name:String -> 0xb2b0f04555daca474f0f77d0966945c9/system.RegistrationResult<S, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Store<S, 0xb2b0f04555daca474f0f77d0966945c9/lifetime_scope.Store<S, C>>, R, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Notice<S, E>, Args, Error, Out, runner(S, C, R, E, P, populate, clear, record, declarations, Args, Error, Out, body)>
Register a scope system with access derived from the component-clear certificate, relation declarations and LifetimeScope:write. Returns the ordinary Registry registration result with the returned World on success or refusal. Registration runs no body and applies no spawn/cleanup. Supply the matching trusted populate/clear routes, then retain the actual returned Registry for run.
template run source · line 133 · raw
@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-P:Type -> @-populate:(@_:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Store<S, 0xb2b0f04555daca474f0f77d0966945c9/lifetime_scope.Store<S, C>>, R, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Notice<S, E>> -> @_:0xb2b0f04555daca474f0f77d0966945c9/world.Handle<S> -> @_:P -> 0xb2b0f04555daca474f0f77d0966945c9/world.World<S, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Store<S, 0xb2b0f04555daca474f0f77d0966945c9/lifetime_scope.Store<S, C>>, R, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Notice<S, E>>) -> @-clear:(@_:C -> @_:0xb2b0f04555daca474f0f77d0966945c9/world.Handle<S> -> Pair(C, List<&2, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Notice<S, E>>)) -> @-record:(@_:0xb2b0f04555daca474f0f77d0966945c9/world.Handle<S> -> 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Notice<S, E>) -> @-declarations:List<&2, 0xb2b0f04555daca474f0f77d0966945c9/relation_failure_reader.Declaration<S>> -> @-Args:Type -> @-Error:Data -> @-Out:Type -> @-body:(@-H:Type -> @-ops:Ops<H, S, P> -> @_:Args -> @_:H -> Pair(H, Pair(0xb2b0f04555daca474f0f77d0966945c9/transaction.Outcome<Error>, Out))) -> @owner:0xb2b0f04555daca474f0f77d0966945c9/system.Registry<S, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Store<S, 0xb2b0f04555daca474f0f77d0966945c9/lifetime_scope.Store<S, C>>, R, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Notice<S, E>, Args, Error, Out, runner(S, C, R, E, P, populate, clear, record, declarations, Args, Error, Out, body)> -> @world:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Store<S, 0xb2b0f04555daca474f0f77d0966945c9/lifetime_scope.Store<S, C>>, R, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Notice<S, E>> -> @args:Args -> 0xb2b0f04555daca474f0f77d0966945c9/system.RunResult<S, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Store<S, 0xb2b0f04555daca474f0f77d0966945c9/lifetime_scope.Store<S, C>>, R, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Notice<S, E>, Args, Error, Out, runner(S, C, R, E, P, populate, clear, record, declarations, Args, Error, Out, body)>
Run the registered scope system, consuming its Registry, World and Args. Returns the updated Registry/World and success output or typed system failure; registration refusal returns the ordinary rejected-run Args. Failure discards body Out rather than returning affine contents separately. Earlier committed systems remain, and successful queued work requires a later explicit barrier. Current consumer: test-fixtures/public-scopes/feature-timing-v1/main.bend.
template taken_column source · line 143 · raw
@-S:Data -> @-C:Type -> @-Rest:Type -> @-P:Type -> @members:List<&2, 0xb2b0f04555daca474f0f77d0966945c9/lifetime_scope.Member> -> @graph:0xb2b0f04555daca474f0f77d0966945c9/relation_types.Graph<S> -> @seen:Pair(Rest, 0xb2b0f04555daca474f0f77d0966945c9/column.Column<S, P>) -> Pair(ComponentRest<S, Rest>, 0xb2b0f04555daca474f0f77d0966945c9/column.Column<S, P>)
template take_column source · line 149 · raw
@-S:Data -> @-C:Type -> @-Rest:Type -> @-P:Type -> @-take:(@_:C -> Pair(Rest, 0xb2b0f04555daca474f0f77d0966945c9/column.Column<S, P>)) -> @store:0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Store<S, 0xb2b0f04555daca474f0f77d0966945c9/lifetime_scope.Store<S, C>> -> Pair(ComponentRest<S, Rest>, 0xb2b0f04555daca474f0f77d0966945c9/column.Column<S, P>)
Trusted schema projection: take one component column through scope/relation wrappers, returning ComponentRest with every sibling and metadata owner. Pair it with put_column from the same original store projection.
template put_column source · line 155 · raw
@-S:Data -> @-C:Type -> @-Rest:Type -> @-P:Type -> @-put:(@_:Rest -> @_:0xb2b0f04555daca474f0f77d0966945c9/column.Column<S, P> -> C) -> @rest:ComponentRest<S, Rest> -> @column:0xb2b0f04555daca474f0f77d0966945c9/column.Column<S, P> -> 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Store<S, 0xb2b0f04555daca474f0f77d0966945c9/lifetime_scope.Store<S, C>>
Trusted schema reconstruction: consume the matching ComponentRest and column to rebuild the wrapped Store, preserving membership and relation graph. It does not itself change scope membership or apply structural commands.
template component_binding source · line 163 · raw
@-S:Data -> @-C:Type -> @-Rest:Type -> @-P:Type -> @-V:Data -> @-Token:Data -> @-take:(@_:C -> Pair(Rest, 0xb2b0f04555daca474f0f77d0966945c9/column.Column<S, P>)) -> @-put:(@_:Rest -> @_:0xb2b0f04555daca474f0f77d0966945c9/column.Column<S, P> -> C) -> @-view:(@_:P -> Pair(P, V)) -> @binding:0xb2b0f04555daca474f0f77d0966945c9/ordinary_component_binding.Binding<S, C, Rest, P, V, Token, take, put, view> -> 0xb2b0f04555daca474f0f77d0966945c9/ordinary_component_binding.Binding<S, 0xb2b0f04555daca474f0f77d0966945c9/relation_commands.Store<S, 0xb2b0f04555daca474f0f77d0966945c9/lifetime_scope.Store<S, C>>, ComponentRest<S, Rest>, P, V, Token, take_column(S, C, Rest, P, take), put_column(S, C, Rest, P, put), view>
Derive a component binding for the wrapped Store from its original binding. Retains the schema identity, view and typed column path while adding scope and relation owners to the remainder. This adapts schema setup; it grants no new access merely from a component name. See fixture.bend:scoped_binding in the public-scopes/feature-timing-v1 consumer.