Portable, generation-fenced state owned by one stable Skill and Definition.
A binding identifies one branch. Its schema, generation, parent branch and
owning Definition are immutable; state updates use revision CAS. Activation
may move a retained branch between :active and :dormant, while retention
transitions are monotonic and a purged binding keeps only its tombstone.
Summary
Functions
Returns the immutable pointer stored in an Activation snapshot.
Returns true for an Activation Skill-state pointer.
Decodes and verifies portable binding bytes.
Encodes a binding into portable canonical bytes.
Restores portable binding data without creating atoms.
Builds and verifies one Skill-state branch binding.
Builds a binding or raises with its stable validation reason.
Returns the Skill-state binding schema version.
Returns portable canonical data.
Applies a monotonic retention transition and preserves a purged tombstone.
Moves a retained branch between active and dormant with revision CAS.
Updates the active branch state through generation and revision CAS.
Types
@type retention() :: :retained | :gc_eligible | :abandoned | :purged
@type status() :: :active | :dormant
@type t() :: %Spectre.Skill.StateBinding{ binding_receipt: String.t(), branch_id: String.t(), created_at: non_neg_integer(), fencing_token: pos_integer(), owning_definition_ref: Spectre.Definition.Ref.t(), parent_branch_id: String.t() | nil, provenance: map(), retention: retention(), revision: non_neg_integer(), schema_version: pos_integer(), skill_id: String.t(), state: term(), state_generation: pos_integer(), state_schema_ref: String.t(), status: status(), updated_at: non_neg_integer() }
Functions
Returns the immutable pointer stored in an Activation snapshot.
Returns true for an Activation Skill-state pointer.
Decodes and verifies portable binding bytes.
Encodes a binding into portable canonical bytes.
Restores portable binding data without creating atoms.
Builds and verifies one Skill-state branch binding.
Builds a binding or raises with its stable validation reason.
@spec schema_version() :: pos_integer()
Returns the Skill-state binding schema version.
Returns portable canonical data.
Applies a monotonic retention transition and preserves a purged tombstone.
Moves a retained branch between active and dormant with revision CAS.
Updates the active branch state through generation and revision CAS.