Documentation
¶
Overview ¶
live-smoke runs thirteen minimum-budget calls against real BRAIN to prove the Go SDK's TLS impersonation + protocol decoding still match what BRAIN actually returns today. The CI scheduled workflow runs this weekly so silent BRAIN-side schema upgrades (the v0.1.1/v0.1.2 class of bugs) get caught at fixture-refresh time instead of in production.
Steps:
- POST /authentication (Login) — Cloudflare/edge accept our JA3?
- GET /authentication (Probe) — session cookie working?
- GET /operators (Operators) — bare array decode
- GET /users/self (Self) — User struct still matches
- GET /users/self/competitions (Competitions) — Competition / Leaderboard / Team
- GET /users/self/activities/... (Activities) — ActivityStream + RecordSetBlock
- GET /users/self/alphas (ListAlphas) — Page[Alpha] including team/origin
- GET /alphas/{first} (GetAlpha) — single Alpha detail (skipped if empty)
- GET /alphas/{first}/check (CheckAlpha) — IsBlock decode (skipped if empty)
- GET /alphas/{first}/recordsets/pnl (AlphaPnL) — PnLSeries decode (skipped if empty)
- GET /alphas/{first}/correlations/self (AlphaSelfCorrelation) — SelfCorrelationBlock — pre-submit gate (skipped if empty)
- GET /data-fields (DataFields) — DataFieldsPage / NamedRef
- POST /authentication/logout (Logout) — session teardown
It does NOT submit alphas or run simulations (those consume daily budget and have visible side effects against the main account).
Recommended account: a secondary account, NOT the main one. Live-smoke is a canary -- it runs weekly on CI and on ad-hoc demand, so quota/rate-limit pressure adds up. secondary accounts also exercise a different permission envelope (fewer perms, fewer data-fields), making the test slightly more representative of what production secondary account workers see. A dedicated test account is ideal; pulling one from an existing pool (e.g. the secondary account store status='active' rows) works too. NEVER point this at the main account -- one bad week of CI and you burn through the precious daily budgets.
Usage:
$env:BRAINAPI_USER = "secondary account@example.com" $env:BRAINAPI_PASS = "..." go run ./scripts/live-smoke
Exit codes:
0 all thirteen calls succeeded (steps 8-11 may legitimately skip on empty accounts) 1 any call failed (details in stderr) 2 missing credentials
The script picks the deterministic browser profile for the supplied email, so a fingerprint mismatch from the production bridge will surface here.