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.
JavaScript 3d-generationai-agentsanimationavatardigital-humangenerative-aiglbgltfimage-to-3dllmmcpmcp-servermodel-context-protocolsolanatext-to-3dthreejsweb-componentswebglwebxrx402
triage: classify x402 5xx storms as wallet-dry owner action
nirholas0bd01e8f0a4c
diff --git a/docs/ops/production-log-triage.md b/docs/ops/production-log-triage.mdindex eec25575e..fdf18c141 100644--- a/docs/ops/production-log-triage.md+++ b/docs/ops/production-log-triage.md@@ -139,6 +139,37 @@ HTTP 502 POST /api/x402/<any endpoint> ua: threews-x402-autonomous/1.0 (~334---+## 🔴 5xx storm on paid x402 routes from platform agent traffic (x402-wallets-dry)++```+HTTP 502/503 GET|POST /api/x402/*, /api/mcp ua: threews-x402-autonomous/1.0 or threews-x402-seed/1.0+```++- **Source:** the platform's own agent economy (ring, seeders, autonomous+ buyers) paying its own endpoints while the economy wallets are out of SOL+ for transaction fees.+- **Symptom map:** `502` = fee wallet below its SOL floor; `503` = the payer's+ self-pay refused; `402` from a ring agent = its buyer wallet is out of USDC.+- **Not a code bug.** The economy-rebalance keypair crash (assigned+ `loadSignerKeypair`'s wrapper to `keypair`, read `.publicKey` of undefined)+ is fixed and live in commit `bb02839f9`. When+ `POST /api/cron/economy-rebalance` (Bearer `CRON_SECRET`) answers+ `skipped: insufficient_sol_surplus`, the wallets genuinely hold nothing to+ swap; at the 94-calls/min ring shape the burn is ~1-1.4 SOL/day.+- **Resolve (owner, money):** send SOL (or USDC) to the economy master+ `WwwuGbqHrwF5RG89KhUbmRWEvjnRH9k5kVM5p7T3WwW`. The treasury-topup cron+ distributes to the engines within minutes and economy-rebalance restores the+ payer's USDC float. Recovery is visible as: rebalance returns+ `results[].status: "swapped"`, healthz `x402_settle` back to `ok`, the 5xx+ storm stops.+- **Alternative to daily funding:** throttle the ring to funded runway+ (`X402_RING_TICK_CONCURRENCY`, cadence and cap knobs on the Cloud Run+ service) so burn matches what the owner wants to spend.+- **Monitor signature:** `x402-wallets-dry-5xx` in+ [scripts/gcp-triage.mjs](../../scripts/gcp-triage.mjs), classified `owner`.++---+## 🟡 `[x402-audit] insert failed … db query exceeded 3000ms deadline`- **Source:** [api/_lib/x402/audit-log.js](../../api/_lib/x402/audit-log.js) `logPaymentEvent`.@@ -325,3 +356,17 @@ gcloud run services update three-ws-api --region us-central1 \--project aerial-vehicle-466722-p5 --update-env-vars CACHE_REDIS_CMD_TIMEOUT_MS=5000# Helius 429s: raise the plan/quota in the Helius dashboard (public-RPC fallback covers the gap).```++### sns-floating-rejection: `Error: Invalid name account provided` (self-healing)++A bare ERROR-severity stack from `@bonfida/spl-name-service` lands roughly+every 12 minutes, raised by the autonomous ring agents resolving names through+`/api/x402/pay-by-name`. Every first-party call site (`src/solana/sns.js`,+`api/x402/pay-by-name.js`) wraps `resolve()` in try/catch and answers a correct+200/404; the escaping copy is a floating rejection out of the library's+internals for unregistered names. Verified 2026-07-26: no 5xx correlates with+these entries and a local repro of the caught path leaks nothing.++Log noise only; no action. Escalate to `investigate` only if a 5xx group+appears on `/api/sns`, `/api/v1/resolve`, or `/api/x402/pay-by-name` in the+same window.diff --git a/scripts/gcp-triage.mjs b/scripts/gcp-triage.mjsindex 67bd22831..0bf2eeec0 100644--- a/scripts/gcp-triage.mjs+++ b/scripts/gcp-triage.mjs@@ -31,6 +31,12 @@ const RUNBOOK = 'docs/ops/production-log-triage.md';const CLASS_ORDER = { owner: 0, 'env-action': 1, investigate: 2, 'self-healing': 3 };const KNOWN_SIGNATURES = [+ {+ id: 'sns-resolve-floating-rejection',+ match: /^Error: Invalid name account provided/i,+ class: 'self-healing',+ action: `Bonfida resolve() of an unregistered .sol name leaks a floating rejection from library internals (~every 12 min from ring agents hitting pay-by-name). Every first-party call site catches; the served response is a correct 200/404 and no 5xx correlates. Log noise only. Re-investigate ONLY if a matching 5xx group appears on an sns/pay-by-name route. ${RUNBOOK} §sns-floating-rejection.`,+ },{id: 'ring-guard-violated',match: /\[ring-invariants\] SPEND PATH DISABLED/i,@@ -110,11 +116,11 @@ const KNOWN_SIGNATURES = [// `investigate`.const KNOWN_HTTP_SIGNATURES = [{- id: 'ring-payer-refill-crash-503',- test: (g) => g.status >= 500 && g.path.startsWith('/api/x402')- && g.userAgent.includes('threews-x402-autonomous'),- class: 'investigate',- action: `The x402 ring payer runs to 0 USDC and its 6-min self-pay returns 503. The payer is NOT truly unfunded — it holds SOL, and economy-rebalance (ECONOMY_REBALANCE_ENABLED=1) is meant to self-swap that SOL->USDC to the 10-USDC floor every tick. Root cause fixed in commit 8a767ae87: economy-rebalance.js assigned loadSignerKeypair's wrapper to \`keypair\` and read \`keypair.publicKey\` (undefined) -> executeSwap crashed "Cannot read properties of undefined (reading 'toBase58')" on every leg, so no refill happened. VERIFY after deploy: POST /api/cron/economy-rebalance (Bearer CRON_SECRET) returns results[].status "swapped" (not "failed"), then payer USDC climbs back above floor and the 503s stop. If it still returns "failed" post-deploy, re-investigate executeSwap/buildSwapTx. ${RUNBOOK} §ring-duplicate-signature.`,+ id: 'x402-wallets-dry-5xx',+ test: (g) => g.status >= 500 && (g.path.startsWith('/api/x402') || g.path === '/api/mcp')+ && /threews-x402-(autonomous|seed)/.test(g.userAgent),+ class: 'owner',+ action: `5xx on paid x402 routes from the platform's own agent traffic means the economy wallets are out of SOL for tx fees (symptom map: 502 = fee wallet below SOL floor, 503 = payer self-pay refused). The economy-rebalance keypair crash is FIXED and LIVE (commit bb02839f9); when it reports skipped: "insufficient_sol_surplus" there is genuinely nothing left to swap. At the 94-calls/min ring shape the burn is ~1-1.4 SOL/day. Owner action: send SOL (or USDC) to the economy master WwwuGbqHrwF5RG89KhUbmRWEvjnRH9k5kVM5p7T3WwW; treasury-topup distributes to engines within minutes and economy-rebalance restores the payer's USDC float. Verify recovery: POST /api/cron/economy-rebalance (Bearer CRON_SECRET) returns results[].status "swapped", healthz x402_settle returns to ok, 5xx storm stops. Alternative to daily funding: throttle the ring to funded runway (X402_RING_TICK_CONCURRENCY and cadence knobs). ${RUNBOOK} §x402-wallets-dry.`,},];