API reference
Configuration
Every environment variable of ollin-study-api, with defaults and derivations.
Configuration is env-driven (src/config.ts), with sensible defaults for
local fixture serving. Nothing is required to boot the fixtures mode.
Environment table
| Env | Default | Meaning |
|---|---|---|
PORT | 8080 | Listen port (Cloud Run injects this). |
STUDY_DATA_MODE | local | local reads fixture packs from disk; gcs reads the serving bucket. |
CAMPAIGN | berserk_v1 | Campaign id. |
SERVING_STAMP | 20260721T131354Z | Immutable dataset stamp, pinned per deployment. |
SERVING_TIER | v0-roots | Postflop tier directory under the stamp. |
PREFLOP_TIER | preflop-v0 | Preflop tier directory under the stamp. |
FIXTURES_ROOT | fixtures | local mode: root dir (same layout as the GCS prefix). Point it at fixtures-real for the trimmed real packs. |
GCS_BUCKET | ollin-solver-data | gcs mode: bucket. |
GCS_PREFIX | serving/<campaign>/<stamp>/<tier> | gcs mode: postflop object prefix. |
PREFLOP_GCS_PREFIX | serving/<campaign>/<stamp>/<preflopTier> | gcs mode: preflop object prefix. |
PACK_CACHE_MB | 256 | In-process pack LRU budget (MB). |
MANIFEST_TTL_MS | 300000 | Catalog trust window + background refresh interval — how quickly newly uploaded families appear. |
GCS_ACCESS_TOKEN | unset | Local-dev only: a short-lived token (gcloud auth print-access-token) used instead of ADC when the ADC refresh token needs an interactive re-login. Cloud Run never sets it. |
Derived paths (not env): local mode reads
<FIXTURES_ROOT>/serving/<campaign>/<stamp>/<tier> — mirroring the GCS
layout exactly, so fixtures and the bucket are interchangeable.
Modes
Reads manifest.json + packs/ from the fixtures directory. This is what
tests run against (pnpm test — AGPL deny-gate, then 35 vitest tests, no
network) and the default for pnpm dev.
Docker / Cloud Run
docker build -t ollin-study-api .
docker run -p 8080:8080 ollin-study-api # fixtures mode
# Cloud Run: set STUDY_DATA_MODE=gcs; reads run as the service account.