Spectre.GAM.Kernel.Observation (Spectre v0.4.0)

Copy Markdown View Source

Purely plans the durable world-side half of an Attempt.

It never calls an executor and never appends. Given a current projection and a validated Outcome, it produces one atomic payload set containing the observation, the conservative Meter transition and any Duty whose cause is already known. A late definitive Outcome may resolve a suspended quantity, but it never silently disposes the historical Duty.

Summary

Functions

Validates a bound Outcome and plans its observation, Meter and Duty records.

Types

result()

@type result() :: {:ok, [map()]} | {:error, term()}

Functions

payloads(projection, outcome, time)

Validates a bound Outcome and plans its observation, Meter and Duty records.

There is intentionally no requirement for a currently active Mandate: revocation cannot erase a true receipt about an already-started Attempt. Evidence must still satisfy the Act's original bindings and the Outcome's causal history. Ambiguity suspends rather than releases quantity; a later definite result may settle accounting without disposing of the open Duty. The returned payloads must be committed together by the Domain.