| Name | Type | Description |
|---|---|---|
state_dir | Path | None | Default: NoneOptional state directory override for tests. |
Return this install's anonymous ID, creating and persisting it if needed.
The value is read once per process and cached. If the state directory cannot be read or written, a random ID is used for the rest of the process instead, so callers always get a usable value.
Performs blocking file I/O on first call; async callers should offload.