## Why
A Statsig gate can return `false` while bootstrap is in progress or
because the cached evaluation is disabled. Update failures also share
a generic debug message, which makes recurring failures hard to diagnose.
## What changed
Record OpenTelemetry counts and durations for bootstrap and refresh,
tagged by outcome and failure category. Record gate and dynamic config
counts after successful updates. Skip update metrics while waiting for
authentication.
Count gate and dynamic config reads by name, kind, and reason. Use fixed
reason labels to distinguish fallback reads from evaluated reads while
keeping targeting values out of the metrics.
## Testing
Check that a gate read during bootstrap and a read after bootstrap emit
distinct reasons, and that wrapped network policy denials retain the
`policy` category.
GitOrigin-RevId: ca4a248ee8ec7ed1318b2b2d320b9e9df08cbe5e
## Why
Codex callers need to read feature gates and dynamic configs locally and
stop using account-scoped decisions when the authentication owner changes.
## What changed
- Bootstrap ChatGPT evaluations through the Codex backend. Initialize
API-key and installation identities through the Statsig SDK.
- Share one background worker per process to retry initialization and
refresh evaluations through the SDK. Keep the last successful values
on refresh failure while the authentication owner remains current.
- Expose `Gate` and `DynamicConfig` readers that return `false` and an
empty JSON object, respectively, when current evaluations are unavailable.
## Testing
Add a mock-server test for bootstrap retries after credential changes,
local gate and config reads, and value retention after a failed refresh
followed by replacement on a successful refresh.
GitOrigin-RevId: c02cd976a44229518a7159eb2bd35107ef280b56
## Why
Statsig requests need to honor the caller's proxy, TLS, and network policy
settings.
## What changed
Add a `codex-statsig` crate that adapts a caller-supplied
`RouteAwareClientPool` to the Statsig SDK's HTTP interface. The adapter
requests identity encoding, applies the SDK's timeout and optional
response body limit, and leaves HTTP status handling and retries to the SDK.
## Testing
Mock-server tests cover request forwarding, preservation of HTTP error
responses, response size limits, timeout error mapping, and policy denial
before a request reaches the server.
GitOrigin-RevId: 6e78435f1f93ee272977b2f0058afd8f485cf4e0