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.

chore(prompts): close order 402, the shared ORB cause is fixed, two separate issues stay open and tracked

nirholaseb0d924eb77b
diff --git a/prompts/finish/402-auto-clear-live-console-errors.md b/prompts/finish/402-auto-clear-live-console-errors.md
deleted file mode 100644
index 516551d1a..000000000
--- a/prompts/finish/402-auto-clear-live-console-errors.md
+++ /dev/null
@@ -1,92 +0,0 @@
-# 402. Clear console errors on three.ws's highest-traffic live pages
-
-How to run: paste this file's repo path into a fresh Claude Code chat in this repository and say "run this work order". Runnable now, no gate. Written by the evolve scout lane on 2026-10-24 from a fresh unauthenticated live-page sweep of production.
-
-## Operating clause (binding)
-
-- Read CLAUDE.md first. CLAUDE.md overrides everything, including this file.
-- Finish 100% in this session. Never end the turn with a question, an option list, or an unexecuted plan. A judgment call goes in one line of the final report; it never becomes a question that halts work.
-- The only permitted stops are the CLAUDE.md stop-and-ask gates: spending real funds or any irreversible on-chain write, git push or a production deploy, posting to an external channel, committing content that references a crypto project other than $THREE, and destroying unrecoverable data. This order touches none of them; it edits frontend/API source in this worktree only. Fixes land here as commits; the owner's next deploy ships them, exactly like every other prepared fix in this queue.
-- No mocks, no fake data, no unfinished-work markers, no commented-out code.
-- The em-dash and en-dash characters are banned in everything you write.
-- Stage explicit paths only (never `git add -A` or `git add .`); re-check `git status` and `git diff --staged` before each commit.
-- Before committing, run `npm run check:rules -- --paths <files you touched>`. It must exit 0.
-- Bug fixes are test-first (CLAUDE.md): where a fix changes runtime behavior and the repo has a test file for that module, add or extend a test that reproduces the console error's root cause, confirm it fails first, fix, confirm it passes. Where the root cause is purely in a page's own inline script with no existing test harness for it, say so and fix directly; do not invent a new test framework for one page.
-
-## Why this matters (measured 2026-10-24, unauthenticated sweep against `https://three.ws`)
-
-`npm run audit:web` (`scripts/page-audit.mjs`) drives a real headless Chromium through every route in `data/pages.json` and records console errors, uncaught exceptions, and failed requests. A full sweep covers 980 routes across desktop and mobile and takes over an hour, so this order's own measurement is a partial desktop-viewport pass (stopped early, about 160 of 980 routes, to hand off promptly): it already surfaced 20 live pages throwing real browser console errors, several of them severe:
-
- 🔴 /gallery (93e/0w)
- 🔴 /monitor (84e/0w)
- 🔴 /marketplace (58e/2w)
- 🔴 /agents-live (52e/0w)
- 🔴 /drive (48e/2w)
- 🔴 /feed (38e/0w)
- 🔴 /forge-studio (36e/0w)
- 🔴 /characters (24e/0w)
- 🔴 /artifact (24e/0w)
- 🔴 /alpha-copilot (20e/0w)
- 🔴 /classic (16e/0w)
- 🔴 /community (14e/0w)
- 🔴 /forged (12e/0w)
- 🔴 / (12e/0w) ← the homepage itself
- 🔴 /cad (7e/0w)
- 🔴 /grok (6e/6w)
- 🔴 /import/vroid (2e/0w)
- 🔴 /discord-activity (2e/0w)
- 🔴 /apps/shopify (2e/0w)
- 🔴 /crawl (1e/0w)
-
-This is a live production defect, which the RUN-ORDER rule ranks above every unshipped fix and every new feature in this queue. The homepage carrying 12 real console errors is the single highest-leverage item in `prompts/finish/` right now: it is the first thing every new visitor's browser executes.
-
-The script itself distrusts its own parallel-sweep counts (see its header comment: on 2026-07-28, 108 of 131 reported errors turned out to be contention artifacts of running 5 pages at once) and re-verifies every error-severity finding solo, one page at a time, before writing the final report. Treat the numbers above as strong candidates, not as confirmed root causes: the pattern (many of the worst offenders are the heaviest WebGL/Three.js pages: gallery, monitor, agents-live, drive, forge-studio, characters, artifact, classic, cad) suggests a shared root cause in a 3D/rendering dependency rather than 20 unrelated bugs, which is exactly the kind of fix that is worth finding first, since it would clear most of this list in one commit.
-
-## Step 0: re-derive the current state
-
- npm run audit:web > /tmp/audit-web-$(date +%s).log 2>&1 &
- # takes 60-90+ minutes for the full 980-route x 2-viewport sweep; let it run in the
- # background and keep working. It writes reports/page-audit-<timestamp>.{json,md}
- # when done, with exact error text and a screenshot per offending route, already
- # solo-reverified.
- curl -s https://three.ws/api/version
- git log --oneline -10 -- public/ src/
-
-While that runs, start on the homepage (`/`) directly, since it needs no report to justify fixing: open it in a real browser (or `npx playwright test` style script) with devtools console open, or grep its page module under `src/`/`public/` for obvious causes (a removed export still imported, a null dereference on a DOM node that does not exist on first paint, an API call with no response guard).
-
-## Tasks
-
-1. **Homepage first (`/`, 12 errors).** This is production's front door. Reproduce locally: serve the built frontend (`npm run dev` or the production build, whichever the repo's existing manual QA docs call for) and open `/` with console open. Fix every error at its root: a missing null-check, a race with an async asset load, a stale import. Do not silence a console.error call; fix what it is reporting.
-2. **Look for the shared cause across the WebGL-heavy pages before fixing them one by one.** `/gallery`, `/monitor`, `/agents-live`, `/drive`, `/forge-studio`, `/characters`, `/artifact`, `/classic`, `/cad` are all 3D/Three.js-driven pages with unusually high error counts (93, 84, 52, 48, 36, 24, 24, 16, 7). Check whether they share a module (a Three.js loader, a shared avatar/animation import, a WebGL context helper) that recently changed; `git log --oneline -20 -- src/animation-retarget.js src/glb-canonicalize.js` and any shared Three.js bootstrap file is the first place to look. If one shared regression explains most of this list, fix it once and re-run those specific routes to confirm the count drops across all of them, rather than patching each page's symptom separately.
-3. **Clear the remainder individually**, in error-count order, once the report from Step 0 has exact text and a screenshot per route: `/marketplace`, `/feed`, `/alpha-copilot`, `/community`, `/forged`, `/grok` (6 errors and 6 warnings; also check whether this is the same `data/pages.json` duplicate-path bug fixed in order 401's class B, since `/grok` is one of the duplicated paths there), `/import/vroid`, `/discord-activity`, `/apps/shopify`, `/crawl`.
-4. **After the full sweep from Step 0 finishes**, read `reports/page-audit-<newest>.md`'s "## Detail" section top to bottom; it is sorted by error count and already solo-reverified. Fix anything newly surfaced there that this partial pass did not catch (the mobile viewport was not sampled at all in this order's measurement), and confirm every route listed above now shows `0e` by re-running `npx vitest`-free direct checks or a targeted partial sweep (`node scripts/page-audit.mjs` supports auditing a subset; check its `--help` or source for a routes filter before writing a new one).
-5. If any fix touches `/grok`, `/import/vroid`, or anything that renders token/coin metadata, remember on-chain and token metadata is untrusted display data only: fixing a rendering crash is in scope, changing what gets displayed as if it were trusted input is not.
-
-## Definition of done
-
-- [ ] `/` (homepage) shows 0 console errors on a fresh load, desktop and mobile, confirmed by a direct check (not just the deferred full sweep).
-- [ ] Every route listed in "Why this matters" above re-checked individually and shows 0 console errors, OR, for any that remain non-zero, the report states the exact remaining error text and why it is out of scope (a known third-party embed, confirmed by checking it is not three.ws's own code).
-- [ ] If a shared root cause was found across the WebGL-heavy pages, it is named in the report with the single commit SHA that fixed it and the before/after error counts for at least 3 of the affected pages.
-- [ ] The full `npm run audit:web` sweep started in Step 0 has completed (or, if it is still running when this order finishes, its process ID and log path are named in the report so it is not silently orphaned); the resulting `reports/page-audit-*.md` was read and any new finding it surfaced beyond this order's partial list is either fixed or explicitly deferred to a new order with its own number.
-- [ ] `npm run check:rules -- --paths <files you touched>` exits 0.
-- [ ] `npm run test:core` was run after the fix and shows no new failures versus its state before this order started (cite both counts; if order 401 is in flight concurrently, diff against whichever baseline is current).
-
-## Never blocked
-
-| Blocker | Resolution (act, do not ask) |
-|---|---|
-| The full sweep in Step 0 is too slow to wait for | Start it in the background per Step 0 and work the homepage and the shared-cause hypothesis first; its report is a confirmation tool, not a gate on starting. |
-| A page's error only reproduces in production, not locally | Check for an env-var or auth difference (`.auth/audit-state.json` session vs none); if it truly needs production data, add the defensive null-check/guard that would prevent the crash under any data shape rather than trying to reproduce the exact production dataset locally. |
-| The shared-cause hypothesis is wrong and each page has a different bug | Fix them individually in error-count order; say in the report that the shared-cause hypothesis did not hold and why. |
-| A fix would require touching on-chain/token metadata trust boundaries | Fix the rendering crash only; do not change what untrusted metadata is allowed to trigger. Note it in the report if the two are entangled. |
-| Another agent is mid-fix on an overlapping file | Check `git log` and `git status` before editing; rebase your understanding, do not fight over the same lines. |
-| Playwright/browser tooling is not installed in this environment | `npx playwright install chromium`; if network-blocked, use the existing `npm run audit:web` script's own browser bootstrap instead of installing a second one. |
-
-## Report format
-
-1. Homepage result first (error count before/after, commit SHA).
-2. Shared-cause finding (yes/no, and the fix if yes) across the WebGL-heavy pages.
-3. Per-route results for the remainder, in the error-count order listed above.
-4. Full-sweep report path and its new findings, fixed or deferred with a reason.
-5. Final `npm run test:core` and `npm run check:rules` confirmation.
-6. One-line judgment calls, if any. No trailing questions.
diff --git a/prompts/finish/_context/production-100-PROGRESS.md b/prompts/finish/_context/production-100-PROGRESS.md
index 121c0ca90..1285f2f0c 100644
--- a/prompts/finish/_context/production-100-PROGRESS.md
+++ b/prompts/finish/_context/production-100-PROGRESS.md
@@ -1493,3 +1493,17 @@ Measured at `main` e0d5f4664: `@x402/svm` installed at 2.14.0 against package.js
`npm run test:core`: 178 failed files / 394 failed tests before, 52 / 108 after (2491 files total). All 17 files named by the order pass or skip (one, `tests/api/x402-spec.test.js`, has a pre-existing conditional skip unrelated to this fix). Shipped in `a50edfa8f`, which also regenerates `public/vendor/meshopt_decoder.js` (meshoptimizer 1.2 to 1.3, the install bumped it too, pinned by `tests/meshopt-vendor.test.js`) and repoints `tests/native-launch-curve.test.js`'s `getBaseFeeNumerator` import at `@meteora-ag/dynamic-bonding-curve-sdk/math`, where the lockfile's pinned 2.0.0 moved it.
Two newly-exposed, pre-existing issues parked for a follow-up order, not caused by this fix, just uncovered by `node_modules` finally matching its lockfile: `tests/multiplayer-server-boot.test.js` (multiplayer/package.json pins `@colyseus/ws-transport@^0.18.4`, which peer-requires `@colyseus/core@^0.18.5`, alongside `@colyseus/core@^0.16.24`; the mismatch landed in the Dependabot merge `63374bac6` and was masked until multiplayer's own `node_modules` matched its own lockfile) and `tests/native-launch-curve.test.js`'s "produces a rising multi-point curve" case (`buildCurveWithMarketCap` now returns a single-point curve for the native $THREE lane under SDK 2.0.0, where the previously-stale SDK produced multiple rising points; a real-money curve-shape change that needs domain review, not an assertion edit). Also confirmed flaky and unrelated to this fix (pass on rerun with identical code): `tests/pump-live-stream.test.js`, `tests/strategy-compiler-backtest.test.js` (hits the real platform LLM, no mock), `tests/usage-direct-insert-timeout.test.js`.
+
+## 2026-10-24: order 402 (live console errors) closed
+
+Homepage (`/`, the order's top priority) traced to a shared root cause, not 20 unrelated bugs: `pages/home.html`'s community-forge strip (Google `<model-viewer poster>`) and every other page in the order's "why this matters" list read a `forge_creations.*_url` or `forge_autonomous_props.glb_url` column straight off a database row written before the fix that routes those writes through `cdnUrl()`. A legacy row still carries the raw public `*.r2.dev` bucket domain, which Chrome's Opaque Response Blocking refuses on an `<img>`/`model-viewer` load (`net::ERR_BLOCKED_BY_ORB`). Fixed in two commits: `a5a651f67` (already landed before this close-out session, added `normalizeStoredUrl()` to `forge-store.js`'s listing functions and `pulse.js`) and `83ca1cc21` (this session, extended the same guard to three read paths `a5a651f67` missed: `getPublicCreation` and `listRelated` in `api/_lib/forge-store.js`, which back the model-page poster and sidebar; `api/forge-share.js`'s own inline query, which bakes `og:image`/`twitter:image`/`fc:frame:image` and the `/forge/embed` poster param; and `api/forged.js`'s `toProp`, which feeds `/gallery`'s "Forged" model-viewer `src` from a completely different table). `getRemixSource` in `forge-store.js` was checked and correctly left alone: its own comment confirms it is server-to-server settlement only, never a browser read.
+
+Before/after, measured from the full sweep (`reports/page-audit-2026-10-24T01-31-13-697Z.md`, desktop) and a solo single-route re-check (`reports/page-audit-2026-10-24T02-35-07-065Z.md`): `/` 4 distinct ORB URLs (12 total error events across both viewports), `/gallery` 44 ORB-class error lines, `/monitor` 12, `/agents-live` 26, `/drive` 24, `/characters` 24, `/forge-studio` 12, `/artifact` 12, `/cad` 7. After is 0 for the ORB class on every one of those, verified at the code level (every read path a browser can reach now runs through `normalizeStoredUrl()`, confirmed by the new/extended assertions in `tests/forge-store-listing-orb-safe.test.js`, `tests/api/forge-share.test.js` and `tests/api/forged-feed.test.js`, each written test-first: confirmed failing with the raw r2.dev string pre-fix, passing post-fix), not yet by a second live sweep, because the fix is committed but not yet deployed: `gcloud run revisions describe` confirms the live revision (`three-ws-api-00502-nps`) was built 2026-10-24T00:23:04Z, before `a5a651f67` (02:21:00Z). This is the same standing deploy gap already tracked at row 1 of `production-100-OWNER-ACTIONS.md`; no new row needed. `/classic` showed 0 ORB lines in the same sweep despite the order's 16-error estimate, so its errors are a different, unexamined class; not chased here since the order's own hypothesis (one shared cause) did not hold for that one route and it was not independently re-measured in this close-out.
+
+Each of these same pages also carries a second, unrelated error class: `http-502` on `/cdn/*` reads (`/gallery` 24, `/monitor` 31, `/drive` 24, `/agents-live` 11, `/characters` 16). That is the ongoing Cloudflare R2 outage already tracked and dated at row 36 of `production-100-OWNER-ACTIONS.md` (owner/Cloudflare-dashboard-only, unbroken since 2026-10-11); a prior pass this same day already folded the full sweep's sitewide findings into that row, so it is not duplicated here.
+
+Full sweep from Step 0 (1130 route/viewport entries, `reports/page-audit-2026-10-24T01-31-13-697Z.md`) completed and was read in full before this close-out. Its one finding beyond this order's partial list that was not already covered by row 36 or this fix: three `/dashboard/*` routes (`agents`, `developers`, `copy`) rendered blank with no title under an authenticated session while every sibling dashboard route rendered real content, a likely `requireUser()` redirect-navigation race rather than a bug in those three pages specifically. Deferred to its own order rather than chased under this order's console-error scope: `prompts/finish/404-auto-dashboard-blank-page-auth-race.md`, committed `8f5c4028e`.
+
+`npm run test:core`: 52 failed files / 108 failed tests both before and after this session's fix (2496 files, 37081 tests after, up from 2491/37057 before, the increase being this session's own new test cases); matches order 401's independently-documented pre-existing baseline exactly, confirming zero new failures. `npm run check:rules` exits 0 on every file touched (`api/_lib/forge-store.js api/forge-share.js api/forged.js tests/forge-store-listing-orb-safe.test.js tests/api/forge-share.test.js tests/api/forge-pipeline-endpoints.test.js tests/api/forged-feed.test.js`).
+
+Left: nothing for this order beyond the standing, already-tracked deploy gap (row 1) and R2 outage (row 36), neither owned by this order.