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.

docs(ops): refresh the log-triage, GPU worker, config, and UI migration runbooks

nirholasdd249d54aaa1
diff --git a/docs/btn-pill-migration.md b/docs/btn-pill-migration.md
index c4acfc5f1..085a8b681 100644
--- a/docs/btn-pill-migration.md
+++ b/docs/btn-pill-migration.md
@@ -1,7 +1,7 @@
# Button + Pill Migration Map (B04)
-**Canonical system:** `public/style.css` — `.btn` base + BEM modifiers + `.pill` base + semantic modifiers.
-**Tokens:** B01 primitives in `public/tokens.css`; component tokens (`--btn-*`, `--badge-*`, `--focus-ring-*`, `--disabled-*`) layered in `public/style.css`.
+**Canonical system:** the `.btn` base + BEM modifiers live in `public/buttons.css` (B03, a portable partial that `public/style.css` `@import`s; any surface can also `<link>` it directly). The `.pill` base + semantic modifiers live in `public/style.css` (B04).
+**Tokens:** B01 primitives in `public/tokens.css`; `--btn-*` and `--focus-ring-*` component tokens in `public/buttons.css`, `--badge-*` in `public/style.css`, `--disabled-*` in `public/tokens.css`.
---
@@ -55,7 +55,7 @@ Linked pills: use `<a class="pill pill--onchain">` — gets hover/focus states a
## Remaining long tail — classes → canonical equivalent
-These classes are defined across the codebase. Follow-up agents should replace them with canonical classes (keep old class as needed for scoped CSS overrides).
+These classes are defined across the codebase. Follow-up agents should replace them with canonical classes (keep old class as needed for scoped CSS overrides). Re-verified 2026-08-05: every class in both tables below is still in use in `pages/`, `src/`, or `public/`, so every row remains open work.
### Button class names → canonical
@@ -96,7 +96,7 @@ These classes are defined across the codebase. Follow-up agents should replace t
| `erc8004-brand-badge` | `.pill.pill--onchain` |
| `tws-ocb` (onchain-badge) | `.pill.pill--onchain` (already generalized in B04) |
| `.price-badge` | `.pill` |
-| `nav-pill-sm` | `.pill.pill--new.pill--sm` |
+| `nav-pill-sm` | `.pill.pill--new` (the default pill size is already small; no `--sm` modifier exists) |
---
diff --git a/docs/configuration.md b/docs/configuration.md
index a3247ba96..2b62e9170 100644
--- a/docs/configuration.md
+++ b/docs/configuration.md
@@ -378,7 +378,7 @@ Avatar creation, blockchain features, and IPFS are all optional for local develo
## `vercel.json`
-A **live configuration file** consumed at runtime by the Cloud Run server ([`server/index.mjs`](../server/index.mjs)) — not a Vercel leftover. The server reads its `routes` array (route table, security headers, rewrites) on boot and its `crons` list to know which scheduled jobs exist. The `routes` array maps incoming URL patterns to destination files or API handlers.
+A **live configuration file** consumed at runtime by the Cloud Run server ([`server/index.mjs`](../server/index.mjs)), not a Vercel leftover. The server reads its `routes` array (route table, security headers, rewrites) on boot; the `crons` list is read by [`scripts/create-gcp-scheduler.mjs`](../scripts/create-gcp-scheduler.mjs) to sync the Cloud Scheduler jobs (the server itself never reads it). The `routes` array maps incoming URL patterns to destination files or API handlers.
**Key route patterns:**
@@ -417,7 +417,7 @@ A **live configuration file** consumed at runtime by the Cloud Run server ([`ser
}
```
-**Cron jobs** are declared here as the source of truth for the schedule (currently 89 entries); in production they are driven by **Google Cloud Scheduler**, each job hitting its `/api/cron/*` handler on the Cloud Run service:
+**Cron jobs** are declared here as the source of truth for the schedule (currently 103 entries); in production they are driven by **Google Cloud Scheduler**, each job hitting its `/api/cron/*` handler on the Cloud Run service:
```json
"crons": [
diff --git a/docs/onboarding-tier.md b/docs/onboarding-tier.md
index 91eb6d3ec..461026a11 100644
--- a/docs/onboarding-tier.md
+++ b/docs/onboarding-tier.md
@@ -1,6 +1,6 @@
# The onboarding tier (Simple ⇄ Everything)
-three.ws ships a lot of surface: around 100 nav destinations and a homepage that
+three.ws ships a lot of surface: over 100 nav destinations and a homepage that
runs from text-to-3D through autonomous trading, on-chain identity and pay-per-call
payments. For someone who already knows the platform that breadth is the point.
For someone arriving for the first time it was the problem — the product's core
@@ -8,7 +8,7 @@ promise (make a 3D avatar, give it a brain, put it on your site) was competing f
attention with a trading terminal.
The onboarding tier fixes that without deleting anything. A first-time visitor gets
-the **lite** tier: the ~20 destinations and the handful of homepage sections that
+the **lite** tier: the ~27 destinations and the handful of homepage sections that
carry the core journey. Everything else is one click away behind a labelled control,
and once a visitor asks for it, it stays open on every page and every visit.
@@ -20,9 +20,9 @@ and once a visitor asks for it, it stays open on every page and every visit.
| Surface | Lite tier | Full tier |
| --- | --- | --- |
-| Nav menus | Build, Discover, Learn (~21 links) | + Launch (~101 links) |
+| Nav menus | Build, Discover, Learn (~27 links) | + Launch (~115 links in all) |
| Homepage | Hero, start path, Forge, embed demo, the three doors, community, pose, AR, showcase | + trading, capabilities grid, token economy, live economy, Oracle, pay-per-call, developer platform, the stack |
-| Mobile drawer | 27 rows | 109 rows |
+| Mobile drawer | the same ~27 destinations in one flat list | all ~115 |
Directly under the homepage hero sits the **start path**: three steps, each with an
honest time estimate, in the order the product actually works.
@@ -123,7 +123,7 @@ exist.
## Guardrails
-`tests/onboarding-tier.test.js` (19 tests) pins the parts that would otherwise
+`tests/onboarding-tier.test.js` (20 tests) pins the parts that would otherwise
drift silently, since the four files involved have no import edge between them:
- the lite menu stays scannable (10–30 links) and the advanced tier keeps >50
diff --git a/docs/ops/gcp-logs.md b/docs/ops/gcp-logs.md
index 437713435..9370b0ba9 100644
--- a/docs/ops/gcp-logs.md
+++ b/docs/ops/gcp-logs.md
@@ -47,8 +47,10 @@ npm run triage:gcp -- --json # machine-readable, what agents consume
One run merges three signals:
-1. **`/api/healthz`** subsystem roll-up (database, cache, Helius, x402 ring,
- world, sniper): the platform self-reports most degradations.
+1. **`/api/healthz`** subsystem roll-up (database, cache, rate limiter,
+ Helius, the Solana RPC lane tier, x402 ring, x402 settle rate, forge
+ generation, world, sniper, the OKX chat bot, x402 config): the platform
+ self-reports most degradations.
2. **WARNING+ app logs across every service**, fingerprinted (ids, numbers,
addresses, and URLs collapsed) so repeats group into one finding.
3. **Request logs**: 5xx grouped per route, 429 noted.
diff --git a/docs/ops/gcp-model-workers.md b/docs/ops/gcp-model-workers.md
index 5cfce9d3f..d0e8d467f 100644
--- a/docs/ops/gcp-model-workers.md
+++ b/docs/ops/gcp-model-workers.md
@@ -25,12 +25,20 @@ result_* }` — and authenticate with one shared bearer secret.
| `hunyuan3d` | `workers/model-hunyuan3d`| `model-hunyuan3d`| `image` | High-poly image-conditioned reconstruction (Tencent Hunyuan3D). Poly-budget aware. |
| `triposg` | `workers/model-triposg` | `model-triposg` | `sketch` | Sketch→3D (TripoSG-scribble): a drawing + a prompt naming it → untextured geometry. |
-All three are `provider: 'gcp'`, `free: true`. `model-trellis` and
-`model-hunyuan3d` pin one always-warm instance (`_MIN_INSTANCES: "1"`): a cold
-FUSE-mounted weight load can stall for many minutes, and the GCP credit budget
-covers the standing GPU-hour; `model-triposg` scales to zero. A **cold start**
-on a scale-to-zero worker pays a one-time model-load before the job runs. We
-surface that honestly (see *Cold start*), never as a fake timer.
+All three are `provider: 'gcp'`, `free: true`. `model-trellis` pins one
+always-warm instance and bursts to three under load (`_MIN_INSTANCES: "1"`,
+`_MAX_INSTANCES: "3"`): a cold FUSE-mounted weight load can stall for many
+minutes, and the GCP credit budget covers the standing GPU-hour.
+`model-hunyuan3d`'s cloudbuild default is also min 1, but the live service was
+set to `--min-instances=0` on 2026-07-26 to free the shared us-central1 L4 pool
+(3 granted; see the `gpu-quota-starved` signature in
+`docs/ops/production-log-triage.md`); `model-triposg` scales to zero. A
+**cold start** on a scale-to-zero worker pays a one-time model-load before the
+job runs. We surface that honestly (see *Cold start*), never as a fake timer,
+and the `gpu-keepwarm` cron (`api/cron/gpu-keepwarm.js`, every 10 min during
+peak hours via Cloud Scheduler) holds allowlisted scale-to-zero lanes resident
+where warming them does not contend for that L4 pool (`FORGE_KEEPWARM_LANES`
+overrides the set without a deploy).
Wire shapes: `model-trellis` and `model-hunyuan3d` both speak the standard task
shape (`POST /infer` → `{ task_id }`, `GET /tasks/:id` → `result_gcs_url`);
@@ -160,9 +168,10 @@ Everything below runs on GCP credits; no third-party API is involved.
stop being hallucinated. Single view uses the plain `run()` path.
5. **Per-tier sampler/export budgets.** `SELFHOST_TRELLIS_QUALITY`
(`api/_lib/forge-tiers.js`) scales diffusion steps, kept geometry and baked
- texture size per tier (draft 12 steps/1K, standard 25/2K, high 45/2K); the
- worker clamps every knob server-side (`_clamped_quality`, defaults 25 steps
- / 2K texture / 0.90 simplify). The Hunyuan3D worker maps `tier` +
+ texture size per tier (draft 12 steps/1K, standard 35/2K, high 50/4K;
+ texture sizes must be powers of two or the nvdiffrast bake hard-fails); the
+ worker clamps every knob server-side (`_clamped_quality`, defaults 40 steps
+ / 4K texture / 0.75 simplify). The Hunyuan3D worker maps `tier` +
`target_polycount` to its own generation budgets.
---
diff --git a/docs/ops/production-log-triage.md b/docs/ops/production-log-triage.md
index 4380bc9c8..2cb69e8c1 100644
--- a/docs/ops/production-log-triage.md
+++ b/docs/ops/production-log-triage.md
@@ -30,8 +30,10 @@ var or add quota · 🟢 self-healing, no action needed.
> **You no longer need a log export to see most of this.** The platform now
> self-reports internal-dependency health: **[/status](https://three.ws/status)**
> renders it with a plain-language fix for each degradation, and
-> **`/api/healthz`** carries a machine-readable `subsystems` block (cache, database,
-> Helius RPC, x402 ring, **x402 settlement success**, **Forge 3D generation**, world, x402 config). The uptime cron
+> **`/api/healthz`** carries a machine-readable `subsystems` block (database, cache,
+> rate limiter, Helius RPC, the whole Solana RPC lane tier (`rpc_lanes`), x402 ring,
+> **x402 settlement success**, **Forge 3D generation**, world, sniper, the OKX chat
+> bot, x402 config). The uptime cron
> ([api/cron/uptime-check.js](../../api/cron/uptime-check.js)) parks a snapshot
> each tick and re-pages a degradation that persists. Source of the roll-up:
> [api/_lib/ops/subsystem-health.js](../../api/_lib/ops/subsystem-health.js). This
@@ -110,16 +112,18 @@ HTTP 502 POST /api/x402/<any endpoint> ua: threews-x402-autonomous/1.0 (~334
"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
+- **Fixed and deployed (2026-07-17):** 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.
+ probe. The wave stopped on the revision carrying the fix, so the dedicated
+ monitor signature (`ring-duplicate-signature-502`) has been retired from
+ [scripts/gcp-triage.mjs](../../scripts/gcp-triage.mjs); ring self-pay 5xx
+ now classifies under `x402-wallets-dry-5xx` (next section), which is a
+ funding shape, not this bug.
+- **If this exact shape recurs** (settle_failed, empty simulation logs,
+ interleaved on-chain successes) on a revision carrying `93430b4fb`, treat it
+ as a regression and re-investigate the payment builder; do not fund wallets
+ for it, and do not let the wallets-dry classification mask it.
- **Now watched continuously:** this wave went undetected for eight days
because every sensor read "ring armed / discovery up" while a third of
settles silently failed. The **x402 settlement success** subsystem
@@ -183,8 +187,10 @@ HTTP 502/503 GET|POST /api/x402/*, /api/mcp ua: threews-x402-autonomous/1.0 or
Only `eip155:8453` back, no `solana:mainnet`, means the accept is withdrawn.
Fix is the same free self-heal as cause 1 above (`treasury-topup`). Since
2026-07-30 healthz reports this itself: `x402_settle.metrics.cause` is
- `sponsor_floor` (vs `rail`) and `detail` names the withdrawal, so the sensor
- no longer points at the facilitator for a funding problem.
+ `sponsor_floor` (vs `fee_governor` when the wallet fee governor is pacing the
+ window, or `rail` for real payment-rail faults) and `detail` names the
+ withdrawal, so the sensor no longer points at the facilitator for a funding
+ problem.
- **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
@@ -538,9 +544,14 @@ ws error: Unexpected server response: 301
its own routine traffic and every Solana call cascaded down the chain onto the
exhausted paid lanes. Measured 2026-07-30, this was the last remaining
`solana-rpc` line in production after the primary was repointed.
-- **Resolve:** 🟢 nothing required for the blocked-call-shape case. It now
- cools for 30 s (a fail-over for that request only) instead of benching the
- lane, so the node keeps serving every other method. 🔴 for the credential
+- **Resolve:** 🟢 nothing required for the blocked-call-shape case. Since
+ commit `955146961` the rotating fetch recognises the refusal and demotes
+ just that (lane, method) pair (`markMethodDemotion`) with no lane cooldown
+ at all, so the node keeps serving every other call shape; the exported
+ `markEndpointCooldown` path still sizes a shape refusal at 30 s instead of
+ the 30 min auth bench. The monitor classifies the short-cooldown line as
+ `solana-rpc-policy-block` (self-healing) in
+ [scripts/gcp-triage.mjs](../../scripts/gcp-triage.mjs). 🔴 for the credential
case, rotate the key on that provider.
- **Tell them apart:**
```sh