# `Minga.Extension.ArtifactGenerationState`
[🔗](https://github.com/jsmestad/minga/blob/main/lib/minga/extension/artifact_generation_state.ex#L1)

VM-generation storage for extension artifact provenance.

Admission snapshots live in `persistent_term`, so restarting this process or
its containing supervisor does not reopen an empty generation while extension
modules remain loaded. Snapshots contain only durable provenance and lifecycle
status; process identifiers, monitors, callers, and attempt tokens are never
retained as authority across a restart.

# `admission_state`

```elixir
@type admission_state() :: map() | nil
```

# `persistence_key`

```elixir
@type persistence_key() :: term()
```

# `state`

```elixir
@type state() :: %{admission: admission_state(), persistence_key: persistence_key()}
```

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `fetch`

```elixir
@spec fetch(GenServer.server()) :: {:ok, admission_state()} | {:error, term()}
```

Reads the sanitized admission snapshot for this VM generation.

# `start_link`

```elixir
@spec start_link(keyword()) :: GenServer.on_start()
```

Starts a VM-generation state owner.

# `store`

```elixir
@spec store(GenServer.server(), map()) :: :ok | {:error, term()}
```

Persists a sanitized admission snapshot after one serialized transition.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
