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
feat(ops): teach the triage monitor the ring duplicate-signature 502 wave
nirholas806ebd8b5744
diff --git a/docs/ops/production-log-triage.md b/docs/ops/production-log-triage.mdindex 82f1916f0..b0131e0e3 100644--- a/docs/ops/production-log-triage.md+++ b/docs/ops/production-log-triage.md@@ -94,6 +94,35 @@ guard env violated:---+## 🔴 502 wave on `/api/x402/*` from `threews-x402-autonomous/1.0` (ring-duplicate-signature)++```+HTTP 502 POST /api/x402/<any endpoint> ua: threews-x402-autonomous/1.0 (~334/day since 2026-07-09)+```++- **Source:** the x402 autonomous ring paying its own endpoints; the settle+ step fails, so the paid handler returns 502 with a settle_failed body. No+ app-level ERROR accompanies it (the handler responds, nothing crashes).+- **Root cause (diagnosed 2026-07-17):** same-priced ring payments created in+ the same tick share a blockhash and compile to byte-identical Solana+ transactions, hence the same signature. Only the first lands; the rest die+ at preflight as already-processed, surfaced by the RPC as a bare+ "Transaction simulation failed" with empty logs.+- **Triage tip:** settle_failed with empty simulation logs plus interleaved+ on-chain successes means duplicate signature, not RPC or blockhash trouble.+- **Fixed in code:** commit `93430b4fb` adds an auto-nonce to `payX402` so+ every payment is byte-unique, and reports a precise+ `broadcast_failed:already_processed` reason via a `getSignatureStatuses`+ probe. The monitor (`npm run triage:gcp`) classifies this wave as `owner`+ while the fix awaits deploy (signature `ring-duplicate-signature-502` in+ [scripts/gcp-triage.mjs](../../scripts/gcp-triage.mjs)).+- **Resolve (owner, deploy):** ship the committed fix:+ `npm run build:gcp && npm run deploy:gcp`. If the wave persists on the+ revision carrying `93430b4fb`, remove the monitor signature and+ re-investigate; do not let the classification mask a new failure.++---+## 🟡 `[x402-audit] insert failed … db query exceeded 3000ms deadline`- **Source:** [api/_lib/x402/audit-log.js](../../api/_lib/x402/audit-log.js) `logPaymentEvent`.diff --git a/scripts/gcp-triage.mjs b/scripts/gcp-triage.mjsindex 79f3023c8..90b928f1e 100644--- a/scripts/gcp-triage.mjs+++ b/scripts/gcp-triage.mjs@@ -99,6 +99,19 @@ const KNOWN_SIGNATURES = [},];+// Known signatures for request-log (5xx) groups. `test` sees the http group:+// { service, status, path, userAgent }. First match wins; unmatched 5xx stays+// `investigate`.+const KNOWN_HTTP_SIGNATURES = [+ {+ id: 'ring-duplicate-signature-502',+ test: (g) => g.status >= 500 && g.path.startsWith('/api/x402')+ && g.userAgent.includes('threews-x402-autonomous'),+ class: 'owner',+ action: `The x402 ring's settle_failed wave (since 2026-07-09): same-priced ring payments sharing a tick blockhash compile to byte-identical Solana txs, so only the first lands. Fixed in commit 93430b4fb (auto-nonce in payX402); awaiting deploy: npm run build:gcp && npm run deploy:gcp. If the wave persists on the revision that carries 93430b4fb, REMOVE this signature and re-investigate. ${RUNBOOK} §ring-duplicate-signature.`,+ },+];+function parseArgs(argv) {const opts = { since: '1h', json: false, limit: 1000, project: PROJECT };for (let i = 0; i < argv.length; i++) {@@ -218,10 +231,12 @@ export function buildFindings(entries) {if (entry.httpRequest) {const status = entry.httpRequest.status || 0;if (status < 500 && status !== 429) continue; // 4xx is client behavior; 402 is the product- const key = `${service} ${status} ${entry.httpRequest.requestMethod} ${normalizePath(entry.httpRequest.requestUrl)}`;+ const path = normalizePath(entry.httpRequest.requestUrl);+ const key = `${service} ${status} ${entry.httpRequest.requestMethod} ${path}`;const g = httpGroups.get(key) || {- kind: 'http', service, status,- title: `HTTP ${status} ${entry.httpRequest.requestMethod} ${normalizePath(entry.httpRequest.requestUrl)}`,+ kind: 'http', service, status, path,+ userAgent: entry.httpRequest.userAgent || '-',+ title: `HTTP ${status} ${entry.httpRequest.requestMethod} ${path}`,count: 0, firstSeen: ts, lastSeen: ts,sample: `${entry.httpRequest.requestUrl} (ua: ${entry.httpRequest.userAgent || '-'})`,};@@ -266,10 +281,11 @@ export function buildFindings(entries) {});}for (const g of httpGroups.values()) {+ const sig = KNOWN_HTTP_SIGNATURES.find((s) => s.test(g));findings.push({kind: 'http',- class: g.status === 429 ? 'self-healing' : 'investigate',- signature: null,+ class: sig ? sig.class : (g.status === 429 ? 'self-healing' : 'investigate'),+ signature: sig ? sig.id : null,title: g.title,severity: g.status >= 500 ? 'ERROR' : 'WARNING',count: g.count,@@ -277,9 +293,11 @@ export function buildFindings(entries) {firstSeen: g.firstSeen,lastSeen: g.lastSeen,sample: g.sample,- action: g.status === 429- ? 'Rate limiter doing its job; only act on a legitimate-traffic spike.'- : `5xx on a served route. Correlate with app logs: npm run logs -- -s ${g.service} --errors --app --since 6h, and check forge_creations if it is a generation route.`,+ action: sig+ ? sig.action+ : (g.status === 429+ ? 'Rate limiter doing its job; only act on a legitimate-traffic spike.'+ : `5xx on a served route. Correlate with app logs: npm run logs -- -s ${g.service} --errors --app --since 6h, and check forge_creations if it is a generation route.`),});}