Serialized VM-generation authority for extension module provenance.
Claims remain pending through code loading and are identified by an
unforgeable attempt token. Equivalent callers wait for commit or receive the
next ownership token after abort; no caller can release another attempt's
claim. Committed provenance is persisted by ArtifactGenerationState, so an
admission-service restart never reopens an empty generation under loaded code.
Summary
Functions
Aborts only the exact pending attempt and transfers ownership to a waiting caller.
Returns a specification to start this module under a supervisor.
Atomically begins admission for every module in one validated inventory.
Atomically begins a deterministic generated or application module-set attempt.
Commits the exact pending attempt after all modules load successfully.
Marks the exact pending attempt as able to have loaded code.
Seals this VM generation against first-time source admission.
Returns the immutable source snapshot fingerprint admitted for a source.
Returns the exact committed module set admitted for a source.
Starts the VM-generation artifact admission authority.
Types
@type claim() :: %{ source: Minga.Extension.ContributionCleanup.contribution_source(), fingerprint: fingerprint(), source_fingerprint: fingerprint(), modules: [module()], load_modules: [module()], adopted_modules: [module()], acquired?: boolean(), attempt_token: reference() | nil }
@type collision() :: {:source_artifact_changed, Minga.Extension.ContributionCleanup.contribution_source()} | {:generation_failed, term()} | {:generation_sealed, Minga.Extension.ContributionCleanup.contribution_source()} | {:module_owned_by_source, module(), Minga.Extension.ContributionCleanup.contribution_source(), Minga.Extension.ContributionCleanup.contribution_source()} | {:module_conflicts_with_host, module()} | {:invalid_module_set, term()} | {:invalid_trusted_application, term()} | {:module_not_in_trusted_application, module(), atom()}
@type fingerprint() :: binary()
Functions
Aborts only the exact pending attempt and transfers ownership to a waiting caller.
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec claim_inventory( Minga.Extension.ContributionCleanup.contribution_source(), Minga.Extension.ArtifactInventory.t(), keyword() ) :: {:ok, claim()} | {:error, collision() | term()}
Atomically begins admission for every module in one validated inventory.
@spec claim_source_modules( Minga.Extension.ContributionCleanup.contribution_source(), [module()], fingerprint(), keyword() ) :: {:ok, claim()} | {:error, collision() | term()}
Atomically begins a deterministic generated or application module-set attempt.
Commits the exact pending attempt after all modules load successfully.
Marks the exact pending attempt as able to have loaded code.
Seals this VM generation against first-time source admission.
@spec source_fingerprint( Minga.Extension.ContributionCleanup.contribution_source(), keyword() ) :: {:ok, fingerprint()} | :error
Returns the immutable source snapshot fingerprint admitted for a source.
@spec source_modules( Minga.Extension.ContributionCleanup.contribution_source(), keyword() ) :: {:ok, [module()]} | :error
Returns the exact committed module set admitted for a source.
@spec start_link(keyword()) :: GenServer.on_start()
Starts the VM-generation artifact admission authority.