Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

fix(triage): classify an exhausted price-history candle chain and document what a 502 there still means

nirholas9f670d7d3209
diff --git a/docs/ops/production-log-triage.md b/docs/ops/production-log-triage.md
index c95de7467..6b101a0ad 100644
--- a/docs/ops/production-log-triage.md
+++ b/docs/ops/production-log-triage.md
@@ -543,6 +543,34 @@ body: {"error":"upstream_error","error_description":"coin data is unavailable ri
---
+## 🟡 HTTP 502 on `/api/pump/price-history`: `pump-price-history-upstreams-502`
+
+```
+HTTP 502 GET /api/pump/price-history?mint=<mint>&interval=15m&from=<unix>&to=<unix>
+body: {"error":"upstream_error","error_description":"Price history is unavailable for this coin right now"}
+```
+
+- **Source:** [api/pump/price-history.js](../../api/pump/price-history.js)
+ walked every rung (Birdeye via [api/_lib/birdeye.js](../../api/_lib/birdeye.js),
+ GeckoTerminal, pump.fun candles) and held no last-good candles for the mint
+ and interval.
+- **Not this:** a coin with no market anywhere. Until 2026-10-08 such a coin
+ could 502 here: the Birdeye rung's GeckoTerminal fallback had already been
+ told "no pools", then the handler re-asked the identical URL, drew a 429 on
+ the shared egress and read the throttle as an outage. The pool lookup now
+ shares [api/_lib/market/ohlcv.js](../../api/_lib/market/ohlcv.js)
+ `topPoolForToken()`, so that coin answers `404 no_market`.
+- **What a 502 now usually means:** Birdeye is out of compute units and
+ GeckoTerminal is throttled at the same moment. Confirm Birdeye:
+ `curl -s -H "X-API-KEY: $BIRDEYE_API_KEY" -H "x-chain: solana" "https://public-api.birdeye.so/defi/ohlcv?address=<mint>&type=15m&time_from=<from>&time_to=<to>"`.
+ `{"success":false,"message":"Compute units usage limit exceeded"}` (seen
+ 2026-10-08) is the plan's quota, and only the owner can reset or upgrade it.
+ The chart keeps working on GeckoTerminal meanwhile.
+- **Monitor signature:** `pump-price-history-upstreams-502` in
+ [scripts/gcp-triage.mjs](../../scripts/gcp-triage.mjs), classified `env-action`.
+
+---
+
## 🟡 `429 Client Error … huggingface.co` → `LocalEntryNotFoundError` on a model worker — `hf-hub-rate-limited`
```
diff --git a/scripts/gcp-triage.mjs b/scripts/gcp-triage.mjs
index cecd9f8ee..497bffdc5 100644
--- a/scripts/gcp-triage.mjs
+++ b/scripts/gcp-triage.mjs
@@ -228,6 +228,12 @@ const KNOWN_HTTP_SIGNATURES = [
class: 'env-action',
action: `502 on a /api/coin/* route means every CoinGecko rung failed and no cached last-good existed. The usual cause is the DEMO KEY, not the upstream: the demo tier caps at 10,000 calls per MONTH, and once exhausted every request carrying COINGECKO_API_KEY gets 429 while the identical keyless request is still served (2026-07-28: /coin/detail, /tickers and /exchange all 502'd for hours on an exhausted key). Confirm in one call: curl -s -H "x-cg-demo-api-key: $KEY" https://api.coingecko.com/api/v3/key — error_code 10006 is the cap. geckoFetch now benches a rejected key for 15 min and retries keyless on its own, so a lingering 502 means the keyless tier is ALSO throttled (the Cloud Run egress IP is shared). Fix: gcloud run services update three-ws-api --region us-central1 --remove-env-vars COINGECKO_API_KEY (config-only, pre-approved) to stop paying the round trip, and tell the owner the key needs a paid tier or a monthly reset. ${RUNBOOK} §coingecko-quota-exhausted.`,
},
+ {
+ id: 'pump-price-history-upstreams-502',
+ test: (g) => g.service === 'three-ws-api' && g.status === 502 && g.path === '/api/pump/price-history',
+ class: 'env-action',
+ action: `Every candle rung failed for this mint and no last-good copy existed: Birdeye (keyed), GeckoTerminal (keyless, throttled on the shared Cloud Run egress) and pump.fun candles (pump.fun launches only). A coin with no market anywhere answers 404 no_market, not 502 (since 2026-10-08), so a 502 is a real upstream gap. Check Birdeye first: "Compute units usage limit exceeded" on /defi/ohlcv means the BIRDEYE_API_KEY plan has spent its compute units (observed 2026-10-08) and the chart is riding GeckoTerminal alone; the owner resets or upgrades the Birdeye plan. Investigate in code only if Birdeye is healthy and the route still 502s across sweeps. ${RUNBOOK} §pump-price-history-upstreams.`,
+ },
{
id: 'r2-upload-unavailable',
test: (g) => g.service === 'three-ws-api' && g.status === 503 && g.path === '/api/forge-upload',
diff --git a/tests/gcp-triage.test.js b/tests/gcp-triage.test.js
index d7f6951ad..2b8babc1a 100644
--- a/tests/gcp-triage.test.js
+++ b/tests/gcp-triage.test.js
@@ -81,6 +81,12 @@ describe('gcp-triage HTTP classification', () => {
expect(finding.signature).toBe('pump-curve-rpc-unavailable');
expect(finding.class).toBe('self-healing');
});
+
+ it('classifies an exhausted price-history candle chain as env-action', () => {
+ const [finding] = buildFindings([request({ status: 502, path: '/api/pump/price-history' })]);
+ expect(finding.signature).toBe('pump-price-history-upstreams-502');
+ expect(finding.class).toBe('env-action');
+ });
});
describe('gcp-triage page failure summary', () => {