# `AgentXM.Examples.TinyFlags.Context`
[🔗](https://github.com/agentxm/polyglot-examples/blob/main/lib/agentxm_example_tinyflags/context.ex#L1)

Evaluation context for deterministic rollout bucketing.

A context is a plain map. The bucketing key is taken from the first present
of `:id`, `"id"`, `:user_id`, or `"user_id"`. An empty or missing identifier
buckets every caller to the same `"anonymous"` slot — supply a stable id to
get per-caller bucketing.

# `t`

```elixir
@type t() :: %{optional(atom() | String.t()) =&gt; String.t()}
```

A context map carrying the caller identity.

# `bucket_for`

```elixir
@spec bucket_for(String.t(), t() | map()) :: 0..99
```

Compute the rollout bucket (0..99) for the given flag name and context.

Implements the same FNV-1a 32-bit hash used by the other TinyFlags ports so
bucketing is identical across language ecosystems.

---

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