# `PtcRunner.Kernel.ProviderActivity`
[🔗](https://github.com/andreasronge/ptc_runner/blob/main/lib/ptc_runner/kernel/provider_activity.ex#L1)

Owner-backed monotonic active-lifecycle marker.

A fresh marker belongs to its creating process, remains linked to it, may be
claimed by exactly one prepared run, is consumed once, and admits at most one
owned build. The marker also monitors its creator so even a normal owner exit
closes it. Lifecycle state then changes monotonically from false to true.
Crossing that boundary makes active-only operations admissible; it does not
by itself prove that provider-facing work ran. Producers accumulate that
evidence at their dispatch sites. Every transition runs as one operation
inside the owner process. Calls carry a server-checked monotonic deadline and
allow a short reply grace, so they remain bounded without a timed-out queued
transition later mutating the marker.

# `t`

```elixir
@type t() :: %PtcRunner.Kernel.ProviderActivity{
  attestation: binary(),
  creator: pid(),
  owner: pid()
}
```

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `mark`

```elixir
@spec mark(t()) :: :ok | {:error, :provider_activity_unavailable}
```

# `start_link`

```elixir
@spec start_link() :: {:ok, t()} | {:error, term()}
```

# `stop`

```elixir
@spec stop(t()) :: :ok | {:error, :not_owner | :provider_activity_unavailable}
```

# `value`

```elixir
@spec value(t()) :: boolean() | :unknown
```

---

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