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(ops): status page phantom outage — probe real x402/viewer paths, purge bogus history, fit graduations sync in its budget

fudjiae2afb0352a5e
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 90bf911f4..448b252b3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr
- **@three-ws/retarget — the animation engine behind every avatar, now a standalone package** — The rig-agnostic animation system that powers all three.ws avatars is now on npm as @three-ws/retarget. It maps bone names from Mixamo, VRM/VRoid, Avaturn, Daz, MakeHuman, Unreal, and Blender rigs onto one canonical skeleton, retargets any clip onto any humanoid with rest-pose and hip-axis correction, and ships the crossfading runtime that keeps characters from ever freezing in a T-pose. Only dependency: your own copy of Three.js. Same engine, same tests (2,800 lines of them) — now usable in any Three.js project. `[sdk, feature]`
- **2,000+ new motion-capture animations in the library** — The animation library just grew from around 100 curated clips to over 2,000 — the full professional motion-capture set, every one retargeted to the universal three.ws skeleton so it plays on any humanoid avatar. Walks, runs, dances, combat, idles, reactions, sports, and hundreds more are all searchable in the animations gallery, previewable on a live avatar, and one click away from the pose studio or any embed. The clips are served from the CDN, so the site stays fast no matter how big the library gets. (`/animations`) `[feature, improvement]`
+- **Status page no longer reports a phantom outage — and graduation tracking runs clean** — The public status page had been showing the x402 paid-API discovery feed and the 3D viewer as down for days while both were actually healthy: the uptime monitor was probing two URLs that never existed. The probes now hit the real public paths, and the falsely-recorded downtime history is purged so the 90-day uptime bars reflect the services, not the monitor bug. The pump.fun graduation tracker was also timing out on every heartbeat tick because it listened longer than the heartbeat allows — it now fits its budget and reports a clean run. (`/status`) `[fix, infra]`
- **The agent economy now watches itself and pages the team** — After weeks of the agent-to-agent economy silently stalling and being diagnosed hours late, the platform now monitors it as a system: every 5 minutes it checks that the per-minute heartbeat is alive, that no engine is failing or stuck on a fixable problem (missing config, an unfundable payment, a full database), and that real on-chain agent activity is still flowing. Any of those pages the ops channel immediately, keeps re-paging hourly until fixed, and announces recovery. The status page's JSON feed also keeps 24 hours of health history so anyone can see exactly when a stall began. `[improvement, infra]`
- **The sniper engine now pages us when it goes down — and restarts itself** — The on-chain sniper worker went quiet on July 3 and nothing noticed: the status page showed the engine offline and zero launches scored, but no alert fired. The platform's watchdog now checks the sniper's own heartbeat every 5 minutes and pages the ops channel within 10 minutes of a stall, with hourly re-pages until it recovers. The worker also gained a dead-man switch: if it loses its database for 15 minutes straight it restarts itself instead of running as a zombie that scores nothing. (`/status`) `[fix, infra]`
diff --git a/api/cron/[name].js b/api/cron/[name].js
index efa94b9b5..1bf8d0d5d 100644
--- a/api/cron/[name].js
+++ b/api/cron/[name].js
@@ -1647,7 +1647,12 @@ async function pumpfunSaveCursor(source, lastSeenMs, lastSignature) {
// /api/pump/recent-graduations and the MCP graduations tool stay live. No
// external bot or API key required — it's the public PumpPortal WebSocket.
-const GRAD_SYNC_WINDOW_MS = 100_000;
+// Must finish inside economy-tick's 60s per-engine budget (CALL_TIMEOUT_MS in
+// api/cron/economy-tick.js) — the every-minute heartbeat is this handler's only
+// real scheduler (its own vercel.json cron entry sits past Vercel's 40-cron
+// cutoff and never fires). A 100s window here read as `failed: timeout` on
+// every tick and stacked overlapping PumpPortal sockets.
+const GRAD_SYNC_WINDOW_MS = 45_000;
async function handlePumpfunGraduationsSync(req, res) {
if (cors(req, res, { methods: 'GET,POST,OPTIONS' })) return;
diff --git a/api/cron/uptime-check.js b/api/cron/uptime-check.js
index 43f0d8e79..aa459c38c 100644
--- a/api/cron/uptime-check.js
+++ b/api/cron/uptime-check.js
@@ -31,9 +31,9 @@ export const UPTIME_TARGETS = [
{
id: 'x402',
label: 'x402 paid-API discovery',
- path: '/.well-known/x402-discovery?name=x402-discovery',
+ path: '/.well-known/x402.json',
},
- { id: 'viewer', label: '3D viewer', path: '/viewer' },
+ { id: 'viewer', label: '3D viewer', path: '/app' },
];
const PROBE_TIMEOUT_MS = 10_000;
@@ -75,6 +75,30 @@ const PULSE_SILENT_MS = 90 * 60_000; // the money feed should never be quiet thi
const ACTIONABLE_REASON =
/disabled|not_configured|not configured|unset|base58|undecodable|db_at_storage_cap|insufficient|sol_floor|settle_unaffordable|treasury|invalid|schema_failed|redis_unavailable|rpc_|escrow/i;
+// Targets whose probe path was corrected AFTER history had been recorded for
+// them without a path stamp (`p`). Their un-stamped rows measured a URL that
+// never existed (the July 2026 x402/viewer probes 404'd for days while the real
+// surfaces were healthy), so they are purged; un-stamped rows for every other
+// target are grandfathered as genuine.
+const REPROBED_IDS = new Set(['x402', 'viewer']);
+
+// Drop stored history recorded against a DIFFERENT probe path than the
+// target's current one: it measured the old URL, not the service. Mutates
+// `snapshots` (24h raw rounds) and `daily` (90-day aggregates) in place.
+// Exported for tests.
+export function purgeStaleHistory(snapshots, daily, targets = UPTIME_TARGETS) {
+ for (const t of targets) {
+ const stale = (rec) =>
+ rec != null && rec.p !== t.path && (rec.p !== undefined || REPROBED_IDS.has(t.id));
+ for (const snap of snapshots) {
+ if (stale(snap.results?.[t.id])) delete snap.results[t.id];
+ }
+ for (const day of daily) {
+ if (stale(day.targets?.[t.id])) delete day.targets[t.id];
+ }
+ }
+}
+
async function probe(target, origin) {
const controller = new AbortController();
const timer = setTimeout(() => controller.abort(), PROBE_TIMEOUT_MS);
@@ -120,13 +144,19 @@ export default wrapCron(async (req, res) => {
const origin = env.APP_ORIGIN || 'https://three.ws';
const results = Object.fromEntries(
await Promise.all(
- UPTIME_TARGETS.map(async (t) => [t.id, await probe(t, origin)]),
+ // `p` records WHICH path produced each result, so history recorded
+ // against a since-corrected path can be told apart from history of the
+ // service itself (see the purge below).
+ UPTIME_TARGETS.map(async (t) => [t.id, { ...(await probe(t, origin)), p: t.path }]),
),
);
const now = Date.now();
// Rolling raw snapshots (24h window).
const snapshots = (await cacheGet(SNAPSHOTS_KEY)) || [];
+ const daily = (await cacheGet(DAILY_KEY)) || [];
+ purgeStaleHistory(snapshots, daily, UPTIME_TARGETS);
+
const previous = snapshots[snapshots.length - 1] || null;
snapshots.push({ t: now, results });
while (snapshots.length > SNAPSHOT_WINDOW) snapshots.shift();
@@ -134,7 +164,6 @@ export default wrapCron(async (req, res) => {
// Per-day aggregates (90-day window) — drives the status page uptime bars.
const day = new Date(now).toISOString().slice(0, 10);
- const daily = (await cacheGet(DAILY_KEY)) || [];
let today = daily[daily.length - 1];
if (!today || today.d !== day) {
today = { d: day, targets: {} };
@@ -142,7 +171,7 @@ export default wrapCron(async (req, res) => {
while (daily.length > DAILY_WINDOW) daily.shift();
}
for (const [id, r] of Object.entries(results)) {
- const agg = (today.targets[id] ||= { n: 0, up: 0, msSum: 0 });
+ const agg = (today.targets[id] ||= { n: 0, up: 0, msSum: 0, p: r.p });
agg.n += 1;
if (r.ok) agg.up += 1;
agg.msSum += r.ms;
diff --git a/data/changelog.json b/data/changelog.json
index d07add9c3..b488e1e32 100644
--- a/data/changelog.json
+++ b/data/changelog.json
@@ -1,6 +1,16 @@
{
"$comment": "Curated changelog entries for three.ws — the editorial layer of the public changelog. New PAGE launches are tracked automatically via the `added` field in data/pages.json; this file is for everything else holders care about: improvements, fixes, SDK releases, trading/payments capabilities, security work. scripts/build-page-index.mjs merges both sources into CHANGELOG.md, public/changelog.json, and public/changelog.xml. Newest first. Allowed tags: feature, improvement, fix, sdk, infra, docs, security. `link` is optional and must be a live three.ws path.",
"entries": [
+ {
+ "date": "2026-07-05",
+ "title": "Status page no longer reports a phantom outage — and graduation tracking runs clean",
+ "summary": "The public status page had been showing the x402 paid-API discovery feed and the 3D viewer as down for days while both were actually healthy: the uptime monitor was probing two URLs that never existed. The probes now hit the real public paths, and the falsely-recorded downtime history is purged so the 90-day uptime bars reflect the services, not the monitor bug. The pump.fun graduation tracker was also timing out on every heartbeat tick because it listened longer than the heartbeat allows — it now fits its budget and reports a clean run.",
+ "tags": [
+ "fix",
+ "infra"
+ ],
+ "link": "/status"
+ },
{
"date": "2026-07-05",
"title": "2,000+ new motion-capture animations in the library",
diff --git a/public/changelog.json b/public/changelog.json
index fcd85d0c6..e34687473 100644
--- a/public/changelog.json
+++ b/public/changelog.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-07-05T08:29:37.932Z",
+ "generated_at": "2026-07-05T08:34:25.093Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json",
"site": {
"name": "three.ws",
@@ -28,6 +28,17 @@
"improvement"
]
},
+ {
+ "date": "2026-07-05",
+ "type": "update",
+ "title": "Status page no longer reports a phantom outage — and graduation tracking runs clean",
+ "summary": "The public status page had been showing the x402 paid-API discovery feed and the 3D viewer as down for days while both were actually healthy: the uptime monitor was probing two URLs that never existed. The probes now hit the real public paths, and the falsely-recorded downtime history is purged so the 90-day uptime bars reflect the services, not the monitor bug. The pump.fun graduation tracker was also timing out on every heartbeat tick because it listened longer than the heartbeat allows — it now fits its budget and reports a clean run.",
+ "link": "/status",
+ "tags": [
+ "fix",
+ "infra"
+ ]
+ },
{
"date": "2026-07-05",
"type": "update",
diff --git a/public/changelog.xml b/public/changelog.xml
index 029e673fd..ff1c83852 100644
--- a/public/changelog.xml
+++ b/public/changelog.xml
@@ -22,6 +22,14 @@
<category>feature</category>
<description>The animation library just grew from around 100 curated clips to over 2,000 — the full professional motion-capture set, every one retargeted to the universal three.ws skeleton so it plays on any humanoid avatar. Walks, runs, dances, combat, idles, reactions, sports, and hundreds more are all searchable in the animations gallery, previewable on a live avatar, and one click away from the pose studio or any embed. The clips are served from the CDN, so the site stays fast no matter how big the library gets.</description>
</item>
+ <item>
+ <title>Status page no longer reports a phantom outage — and graduation tracking runs clean</title>
+ <link>https://three.ws/status</link>
+ <guid isPermaLink="false">2026-07-05:Status page no longer reports a phantom outage — and graduation tracking runs clean</guid>
+ <pubDate>Sun, 05 Jul 2026 12:00:00 GMT</pubDate>
+ <category>fix</category>
+ <description>The public status page had been showing the x402 paid-API discovery feed and the 3D viewer as down for days while both were actually healthy: the uptime monitor was probing two URLs that never existed. The probes now hit the real public paths, and the falsely-recorded downtime history is purged so the 90-day uptime bars reflect the services, not the monitor bug. The pump.fun graduation tracker was also timing out on every heartbeat tick because it listened longer than the heartbeat allows — it now fits its budget and reports a clean run.</description>
+ </item>
<item>
<title>The agent economy now watches itself and pages the team</title>
<link>https://three.ws/changelog</link>
diff --git a/public/features.json b/public/features.json
index 0ad265c1d..fd535efbc 100644
--- a/public/features.json
+++ b/public/features.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-07-05T08:21:26.854Z",
+ "generated_at": "2026-07-05T08:34:25.080Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json",
"site": {
"name": "three.ws",
diff --git a/tests/economy-watchdog.test.js b/tests/economy-watchdog.test.js
index 2f8b2afb5..6f365aafa 100644
--- a/tests/economy-watchdog.test.js
+++ b/tests/economy-watchdog.test.js
@@ -1,6 +1,6 @@
import { describe, it, expect } from 'vitest';
-import { classifyEngine } from '../api/cron/uptime-check.js';
+import { classifyEngine, purgeStaleHistory, UPTIME_TARGETS } from '../api/cron/uptime-check.js';
// The economy watchdog's judgment call: which heartbeat engine results page an
// operator, and which are benign cadence skips. Getting this wrong either
@@ -42,3 +42,57 @@ describe('economy watchdog — classifyEngine', () => {
expect(classifyEngine({})).toBeNull();
});
});
+
+// History recorded against a corrected probe path measured the OLD URL, not the
+// service — the July 2026 x402/viewer probes 404'd against paths that never
+// existed while the real surfaces were healthy, painting a phantom 0%-uptime
+// outage on the status page. The purge drops exactly that history and nothing else.
+describe('uptime history — purgeStaleHistory', () => {
+ const targets = [
+ { id: 'site', label: 'Website', path: '/' },
+ { id: 'x402', label: 'x402 paid-API discovery', path: '/.well-known/x402.json' },
+ ];
+
+ it('drops rows stamped with a different path, keeps rows stamped with the current one', () => {
+ const snapshots = [
+ { t: 1, results: { site: { ok: true, p: '/' }, x402: { ok: false, p: '/.well-known/x402-discovery' } } },
+ { t: 2, results: { site: { ok: true, p: '/' }, x402: { ok: true, p: '/.well-known/x402.json' } } },
+ ];
+ const daily = [
+ { d: '2026-07-04', targets: { site: { n: 288, up: 288, msSum: 1, p: '/' }, x402: { n: 288, up: 0, msSum: 1, p: '/.well-known/x402-discovery' } } },
+ { d: '2026-07-05', targets: { site: { n: 10, up: 10, msSum: 1, p: '/' }, x402: { n: 10, up: 10, msSum: 1, p: '/.well-known/x402.json' } } },
+ ];
+ purgeStaleHistory(snapshots, daily, targets);
+ expect(snapshots[0].results.x402).toBeUndefined();
+ expect(snapshots[1].results.x402).toBeDefined();
+ expect(daily[0].targets.x402).toBeUndefined();
+ expect(daily[1].targets.x402).toBeDefined();
+ expect(snapshots[0].results.site).toBeDefined();
+ expect(daily[0].targets.site).toBeDefined();
+ });
+
+ it('purges un-stamped rows only for reprobed ids; grandfathers everyone else', () => {
+ const snapshots = [{ t: 1, results: { site: { ok: true }, x402: { ok: false }, viewer: { ok: false } } }];
+ const daily = [{ d: '2026-07-04', targets: { site: { n: 5, up: 5, msSum: 1 }, x402: { n: 5, up: 0, msSum: 1 }, viewer: { n: 5, up: 0, msSum: 1 } } }];
+ const all = [...targets, { id: 'viewer', label: '3D viewer', path: '/app' }];
+ purgeStaleHistory(snapshots, daily, all);
+ expect(snapshots[0].results.site).toBeDefined(); // genuine un-stamped history kept
+ expect(snapshots[0].results.x402).toBeUndefined();
+ expect(snapshots[0].results.viewer).toBeUndefined();
+ expect(daily[0].targets.site).toBeDefined();
+ expect(daily[0].targets.x402).toBeUndefined();
+ expect(daily[0].targets.viewer).toBeUndefined();
+ });
+
+ it('tolerates snapshots and days with missing shapes', () => {
+ expect(() => purgeStaleHistory([{ t: 1 }, {}], [{ d: 'x' }, {}], targets)).not.toThrow();
+ });
+
+ it('live targets probe real public paths (the 2026-07 phantom paths stay dead)', () => {
+ const paths = UPTIME_TARGETS.map((t) => t.path);
+ expect(paths).toContain('/.well-known/x402.json');
+ expect(paths).toContain('/app');
+ expect(paths).not.toContain('/viewer');
+ expect(paths.some((p) => p.startsWith('/.well-known/x402-discovery'))).toBe(false);
+ });
+});