Actions, execution and effects
Authorities: the corresponding contract is carried verbatim in Authorities — this chapter is pedagogical and does not replace it.
FormaSL represents actions and their outcomes through contracts binding intentions, decisions, requests, external mechanisms and domain events. An operation can request the performance of a service, equipment or system, track its execution and use later information to evaluate what happened. The relations between those stages keep the applicable identities, authorities and evidence guarantees.
The architecture distinguishes the request to act, the dispatch authorization, the attempt actually started, the outcome attested by the operational boundary and the effect attributed to a cause. Observation adds epistemic access to what may have happened in the world. Those parts integrate a common semantic path, with specific contracts for their transitions.
Actions, states and occurrences
The world model recognizes states and occurrences independently of their representation by the language. An action can be declared and discussed before happening; its identity as a possibility does not establish that it was executed. An actual occurrence, when represented under an appropriate basis, belongs to the domain’s history and can be related to other occurrences and states.
The std::world::dynamics library offers the types Occurrence, Event, ActionOccurrence, ProcessOccurrence and State. Events, action occurrences and process occurrences specialize Occurrence, with explicit subtyping relations. StateOf<T> relates a state to its subject. EffectOf provides roles for an occurrence taken as effect and another taken as cause.
Those declarations provide vocabulary for representing a domain’s dynamics. The conditions of currency, authority and causality are established by the contracts using that vocabulary. A state change represented by an application can be interpreted from events, observations and causal bases without the presence of a node or relation in the metagraph, alone, proving its actual occurrence.
From decision to execution request
A decision is an attributable occurrence in which a decider selects or assumes a result under a determined basis. It can ground a later action, but the deciding contract keeps its own identity and authority. To request external performance, an application introduces an ExecutionRequest, identifying the required action, its target, the pertinent arguments and the semantic basis of that request.
The execution_request family of the .fsl surface uses an application signature and the reference to an appropriate contract. The issuance of a request is an act of solicitation: it registers what is intended to be performed and lets it be related to the decision or judgment that motivated it. The system can keep requests not yet dispatched, rejected before execution or depending on additional conditions of authority and realization.
A domain authorization and the authority needed to perform the dispatch have their own functions. An authorization judgment can establish that an agent satisfies a policy; the operational dispatch authorization must also cover the concrete request, the target, the payload and the selected capability, according to the execution boundary’s contract. A request can legitimately exist without that operational linkage being ready.
Binding to realization and dispatch authority
An execution request reaches the realization plane through an admitted binding between the semantic requirement and a concrete capability. The selected capability has identity, revision and guarantees bounded by the realization contract. The mechanism responsible for its invocation can be an external service, a device adapter or another infrastructure appropriate to the action.
Dispatch is the authorized transition starting the forwarding of a request to a provider. The external boundary’s contract requires an identifiable chain: recorded request, exact realization binding, operational authority produced by the owner, dispatch eligibility, exclusion of stale or concurrent workers and exposure authorization for the prepared invocation.
The exposure authorization is bound to the specific operation and invocation; its use consumes the possibility of performing that dispatch. The mechanism can employ concurrency control, generations, fences or single-use permissions. Those resources realize the contract’s guarantees, and their operational identifiers stay distinct from the semantic identities of request and attempt.
The exposure boundary
The effective start of the invocation to the provider constitutes the exposure boundary. Before it, the operation can be accepted and prepared, but no external execution attempt has happened yet. A preparation failure, an impossible selection, an authority rejection or a cancellation provenly before exposure stays in that prior condition.
An ExecutionAttempt arises as an occurrence when the invocation actually begins. That attempt’s identity is introduced at the first admissible representation of that occurrence. In runtime-controlled executions, the two moments can coincide. If an earlier invocation only becomes known later, the late record identifies the old occurrence, keeping its original instant when known.
The existence of the attempt depends on the invocation having started, even when there was no valid authorization. An unauthorized external execution remains a historically representable occurrence, accompanied by its authorization status. Rejection before the invocation, in contrast, introduces no fictitious attempt into the history.
Once exposure may have happened, the system tracks the outcome under the evidence actually available. The loss of the response can leave the target’s state uncertain; the disappearance of a connection does not establish that the provider stopped processing the invocation.
Durable operation and correlated identities
The external execution contract uses a durable operation as the stable reference for a request’s control cycle. The operation exists since its acceptance and crosses waiting, preparation, attempt, reconciliation and eventual authorized repetition. The same operation can relate to no attempt or to several sequential attempts, each introduced by the invocation itself.
The request’s identity, the operation’s reference, the attempt’s identity and the receipt’s identity have distinct functions. They are related by typed, reconstructible bindings. Through those bindings, an application can recover which request motivated an attempt, which capability was bound, which target was selected and which attempt a determined receipt refers to.
External attempts whose correlation with a request has not yet been established can also be represented. Later evidence can add the correlation relation without retroactively changing the occurrence’s identity or moment. The absence of proven correlation stays explicit until an admissible basis allows establishing it.
The durable operation belongs to execution control. The semantic result of a query or analysis executed by the runtime is another category of result; the occasional homonymy between execution structures of distinct components does not transfer identities or authority between planes.
Authorization and operational outcome
An attempt has at least two interpretation axes. The authorization status informs whether its invocation was authorized, provenly unauthorized or still without sufficient determination. The operational outcome informs what the evidence allows concluding about the processing within the bound boundary.
Those axes can vary independently. An unauthorized invocation can have been processed by the provider; an authorized invocation can have produced no response; an attempt whose authorization status is undetermined can have a known operational outcome within the boundary. Operational conclusion does not modify the occurrence’s normative status.
The distinction also holds when there are contradictory authorization evidence. The conflict stays related to the authorization basis and is not resolved by the provider’s response. The absence of sufficient evidence is represented as undetermined status; the finding of non-authorization requires its own basis.
Receipts and the limits of guarantees
The ExecutionReceipt records evidence about an attempt within the guarantee declared by the selected capability and adapter. Its meaning includes the admitted operational outcome, the correlation basis and the exact scope of what the mechanism can attest.
The contract distinguishes descriptions provided by the provider itself from guarantees associated with an actually verified route. An unverified description can sustain transport or protocol facts within its scope, but does not automatically acquire attestation force about acceptance by the target system. Responses claiming stronger guarantees are kept as provider declarations and interpreted under the admitted ceiling.
A transport confirmation can indicate the message reached the contracted boundary; an application confirmation can indicate the target accepted an operation within its guarantee. The later physical or business situation stays subject to the corresponding contracts. An operational receipt also does not, by itself, constitute admitted observation, Claim or authoritative source update.
Malformed responses or responses associated with the wrong attempt, target or provider receive typed diagnostics. They do not arbitrarily end the attempt as success or failure. If the invocation may have happened, the tracking keeps that possibility until adequate evidence is obtained.
Failures before and after exposure
The failure’s position relative to the exposure boundary determines what can be asserted. When there is evidence the invocation did not start, the operation records the failure before exposure by that route. No attempt is introduced; the system can select another mechanism or prepare a new dispatch according to the applicable conditions.
After possible exposure, a timeout, the loss of the acknowledgment or a communication failure can produce OUTCOME_UNCERTAIN. That outcome informs that the external processing could not be determined by the admitted evidence. An invalid response can also keep the attempt in that state.
Results such as SUCCEEDED_WITHIN_BOUNDARY and FAILED_NOT_APPLIED are interpreted within the declared operational boundary. The expression not applied has, in that case, the reach the contract effectively guarantees for the route and target. It does not work as an assertion about all possible events in the external world.
Execution, therefore, keeps negative results, mechanism failures and undetermined states sufficiently to guide the next steps. The classification of a failure tells whether a new attempt can be considered or whether the operation must first discover the earlier invocation’s fate.
Reconciliation and attempt repetition
Reconciliation examines admissible evidence about an attempt whose outcome remains uncertain. It can use receipts, queries to the provider, durable records and other sources admitted by the control contract. The reconciliation result keeps the reference to the original attempt and the basis grounding the classification.
While an attempt of the same request remains with an uncertain outcome, the contract prevents a new blind dispatch. The new attempt requires resolving the earlier state and obtaining specific authorization for the resend. An independent idempotency guarantee can provide evidence to recognize a repeated delivery under its contract, but does not waive the reconciliation of an uncertain attempt. If reconciliation establishes the operation was applied within the boundary, the repeated delivery can be treated as evidence repetition, according to the contract. If it establishes it was not applied, a new authorized invocation introduces another attempt, under the same request and durable operation.
An idempotency key identifies the intention to treat deliveries as repetitions of an operation. The external idempotency guarantee additionally depends on a contract or application mechanism capable of sustaining it in the declared domain and window. Message deduplication within the control system and business-effect idempotency have their own scopes.
Actually re-executing an action produces a new attempt. Reopening a durable record, replaying a trace or re-presenting the receipt of an earlier execution preserves the identity of the already recorded occurrence. Repetition control uses its own authorization, and its history stays reconstructible across process restarts.
Cancellation and concurrency
Cancellation can happen while the request is still being prepared or after its invocation may have been exposed. Before exposure, when there is sufficient evidence of non-invocation, the operation can end as CANCELLED_NOT_EXPOSED, precisely describing the interrupted execution path.
After possible exposure, requesting cancellation does not eliminate the existing attempt nor determine that the provider ceased the work. An acknowledgment of the cancellation proves only what the cancellation channel’s contract guarantees. The attempt can remain in reconciliation when a cancellation acknowledgment and a processing confirmation arrive in temporal competition.
The evidence of those events stays available for evaluation. Concurrency control prevents improper duplicated dispatches by stale workers and keeps the association between exposure authorization and prepared invocation. The internal organization of that control can vary across mechanisms, as long as it keeps the properties required by the contract.
Effects and causal relations
An effect is an occurrence considered under an admitted causal relation. The std::world::dynamics library provides EffectOf, whose roles relate an occurrence taken as effect and another taken as cause. The introduction of a causal relation requires the basis foreseen by the contract responsible for that judgment.
The attempt to execute an action, the confirmation of its processing within an operational boundary and the finding of an external effect are related events, with their own grounds. An API’s response can confirm the acceptance of a command; a later observation can inform an equipment’s new state; the causal attribution of that state to the command depends on a rule or evidence sustaining that binding.
The execution contract keeps that boundary. The recording of effects in the action plane requires a reference to an independent causal basis, as required by ActionJournal::record_effect. Receipts and provider declarations can be used as evidence within their guarantees; they do not automatically introduce the EffectOf relation.
Chronological succession also has a distinct meaning. That an equipment changed state after the sending of a command does not suffice, alone, to establish that the change was caused by that attempt. The complete causal computation belongs to the specific contract interpreting the available evidence.
Observations after the action
The domain can receive new observations after an attempt. The acquisition of that information obeys the observation boundary: external source, acquisition session, receipt, admission bridge and observation record. The record keeps the observer, source, time, scope and guarantee conditions needed for its interpretation.
An observation can be compatible with the intended effect without ending all doubts about its cause. An operational confirmation and a discordant observation can also coexist. When that information constitutes material conflict, the later evaluation keeps or explicitly treats the positions under its interpretation basis.
That path makes it possible to record both an action whose execution is known and whose external effect remains undetermined, and an action associated with an established effect without available observation. The later observation can ground a new evaluation or an attributable Claim, through their own transitions, without retroactively redefining the earlier events.
Time, history and accountability
The execution path uses distinct temporal roles: request issuance, authority record, dispatch, exposure, effective attempt start, first record of the occurrence, evidence acquisition, receipt issuance, reconciliation and eventual cancellation. Each time stays bound to its function when material to the interpretation.
An attempt discovered late keeps the known occurrence time; if that instant cannot be determined, the information stays unknown. The record moment does not replace the invocation’s start. Likewise, a later observation does not change an earlier decision’s date or the basis grounding its authorization.
The history relates requester, decider, owner of the operational authority, executor, provider and, when applicable, observers and Claim issuers. A person or service can play several roles, but the responsibilities remain identifiable through the pertinent contracts.
Control records can be persisted and reopened by another process, keeping the references and evidence needed to reconstruct the operation’s state. When the basis is incomplete or corrupted, the durable boundary applies the typed refusal outcome, preserving the integrity of the available conclusions.
Actions in hypothetical scenarios
A composition can evaluate a scenario contemplating an action not yet executed. The hypothesis identifies premises, context and modeled consequences; the outputs stay dependent on that hypothetical basis. The decision to perform a real action is another semantic passage, with its own authority and realization.
A production-line interruption scenario can estimate impacts on stocks and deliveries. The shutdown simulation does not create an external attempt. When a real decision uses the scenario’s result, its execution request keeps the relevant informational dependency, but needs the operational authority corresponding to the non-hypothetical world.
A real attempt motivated by simulation remains a real occurrence when the invocation starts. The hypothetical origin of the motivation can stay in its provenance without turning its execution into a merely simulated event.
An operational path
Consider the retention of a batch of medicine in a distribution center. A quality evaluation uses temperature observations and produces a judgment. A responsible party decides to block the batch’s release and introduces a request for the stock system to apply the restriction.
The request identifies the batch, the requested operation and the decision grounding it. Realization selects the blocking capability offered by the stock system, with its guarantees and revision. The operational owner establishes the dispatch authorization for the concrete payload and target. The durable operation receives its identity and tracks the invocation’s preparation.
When the call to the provider starts, an attempt arises. Suppose the service receives the request, but the connection ends before returning a usable confirmation. The attempt stays with OUTCOME_UNCERTAIN. The application does not turn it into failure nor blindly sends a second request. The durable operation keeps the stable reference and starts the reconciliation foreseen by the contract.
A state query to the provider can provide evidence that the block was applied within the guaranteed boundary. That outcome ends the operational doubt according to the admitted basis, without automatically establishing all later effects in the warehouse. An independent observation from the picking system can later indicate the batch is no longer available for dispatch. The application evaluates that information under the observation contract; a causal relation between the order and the observed state requires its own basis.
If reconciliation, instead, establishes the block was not applied, a new authorized dispatch can start another attempt of the same request. The attempts and their receipts are kept separately. A subsequent decision can consider the stock’s effective state and the new observations, keeping the whole chain of historical dependencies.
The sequence makes reconstructible what was decided, requested, authorized, actually invoked, confirmed by the execution boundary and observed later. Each stage adds information to the semantic world under its contract.
Language surface
The declarative form and the operational paths are gathered in the surface reference.
Related documentation
Semantic operations and transitions presents the general relation between computation, judgments and occurrences. From the semantic program to realization explains the binding to executable capabilities. Semantic applications and composition deals with dependencies and stage ordering. Contexts, time and spatiality develops the temporal roles and interpretation bases. Situated results, completeness and provenance specifies the results’ guarantees; Claims, communication and epistemic governance and Observation, evidence and acquisition present the paths by which operational information can ground later positions and observations.