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): tell a withdrawn Solana accept apart from a rejected settle

nirholasa37d672e20c1
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5d0982574..ecca076af 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,10 @@
Public history for [three.ws](https://three.ws), newest first. New pages come from `added` dates in data/pages.json; everything else is curated in data/changelog.json. Also available as [JSON](https://three.ws/changelog.json) and [RSS](https://three.ws/changelog.xml), live at [three.ws/changelog](https://three.ws/changelog).
+## 2026-07-30
+
+- **Payment health now names the real cause when settlements stall** — The platform watches how many of its automated payments actually settle. When that number fell, the alert always said the same thing: payments are being rejected. That was misleading in the most common case, where nothing is rejected at all. The platform simply stops offering Solana as a payment option while its sponsor wallet is topped up, so its own agents have nothing they can pay. The health report now tells these two situations apart by name, counts how often the Solana option was unavailable, and points at the one-command self-repair instead of sending whoever is on call to the wrong system. `[infra, improvement]`
+
## 2026-07-29
- **Generation Watch** (`/watch`) — Live progress page for a running text-to-3D generation: real countdown, the painted concept art, and an automatic hand-off into the interactive viewer the moment the model is ready.
diff --git a/api/_lib/ops/x402-settle-health.js b/api/_lib/ops/x402-settle-health.js
index b4a386f3b..9dccdbaf3 100644
--- a/api/_lib/ops/x402-settle-health.js
+++ b/api/_lib/ops/x402-settle-health.js
@@ -76,6 +76,66 @@ export function isRailFault(reason) {
return RAIL_STATUS.test(r) || RAIL_SIGNATURE.test(r);
}
+// The ring reports `no_solana_accept` when a 402 challenge carried no Solana
+// accept it could pay. On OUR OWN endpoints that is never the ring's choice: it
+// means buildRequirements() dropped the Solana accept, and the reason it drops
+// one in production is sponsorKnownBelowFloor() (api/_lib/x402-paid-endpoint.js).
+const NO_SOLANA_ACCEPT = 'no_solana_accept';
+// The sponsor-floor refusal, as the ring records it. x402-spec.js answers 503
+// `settlement_unavailable` for a fee wallet under its floor, so the reason token
+// arrives either as the 503 prose or as the raw floor signature.
+const SPONSOR_FLOOR = /^(settlement temporarily unavailable|fee_wallet_below_floor|sponsor_sol_floor|sol_floor)/i;
+
+/**
+ * Why did the settle rate fall? Two failure shapes are indistinguishable in the
+ * rate alone and have opposite fixes, and the generic hint sent operators at the
+ * wrong one for a full shift on 2026-07-29:
+ *
+ * FAULTS ROSE the denominator grew; settles are being attempted and
+ * rejected. Look at the facilitator.
+ * NUMERATOR FELL rail faults stayed flat while settlements stopped
+ * happening, because the Solana accept was withdrawn from
+ * every challenge and the (Solana-only) ring had nothing it
+ * could pay. Look at the sponsor's SOL balance. On 07-29 this
+ * read as "settle 22%" while faults sat at their normal
+ * ~100/h and `no_solana_accept` went 0 to 374/h.
+ *
+ * Solana is the home chain, so a withdrawn Solana accept is a platform outage,
+ * not the benign "ring chose not to pay" the rate deliberately excludes.
+ * @param {{ noSolanaAccept: number, floorSignals: number, settled: number, faults: number }} s
+ * @returns {{ cause: 'sponsor_floor'|'rail', hint: string }}
+ */
+export function diagnoseSettleDrop({ noSolanaAccept, floorSignals, settled, faults }) {
+ // A floor refusal is proof on its own. Absent that, treat the home chain going
+ // unpayable more often than it settles as the same cause: the accept is
+ // withdrawn for most of the window, which is what a flapping floor looks like
+ // through a cache-backed, fail-open check.
+ if (floorSignals > 0 || (noSolanaAccept > 0 && noSolanaAccept > settled)) {
+ return {
+ cause: /** @type {const} */ ('sponsor_floor'),
+ hint:
+ 'The Solana accept is being WITHDRAWN, not rejected: ' +
+ `${noSolanaAccept} no_solana_accept + ${floorSignals} floor refusal(s) against ${faults} rail faults. ` +
+ 'sponsorKnownBelowFloor() drops Solana from every 402 challenge while the sponsor sits under ' +
+ 'X402_SPONSOR_SOL_FLOOR_LAMPORTS, so the ring has nothing payable and settlements stop. ' +
+ 'Do NOT start at the facilitator. Check the sponsor balance, then let the free self-heal run: ' +
+ 'POST /api/cron/treasury-topup?dry=1 (Bearer CRON_SECRET) to see the plan, then without ?dry=1 ' +
+ 'to apply. Owner SOL is needed only when every reclaim source reports at_or_below_floor. ' +
+ 'See docs/ops/production-log-triage.md.',
+ };
+ }
+ return {
+ cause: /** @type {const} */ ('rail'),
+ hint:
+ 'Payments are being rejected at settle. Check the self-facilitator: ' +
+ '`npm run logs -- -s three-ws-api --grep "settle_failed" --since 3h`. ' +
+ 'A 502 cluster with empty simulation logs is a duplicate-signature or ' +
+ 'RPC-preflight fault; a 402 cluster is verify/facilitator rejection. A 503 ' +
+ 'cluster is not a rail fault at all, it is the sponsor floor (checked above). ' +
+ 'See docs/ops/production-log-triage.md.',
+ };
+}
+
/**
* Classify pre-aggregated settle buckets into a subsystem verdict. Pure — no DB,
* no clock — so the thresholds and the rail-fault split are unit-testable
@@ -89,6 +149,12 @@ export function isRailFault(reason) {
export function classifySettleBuckets(buckets, { minAttempts = MIN_ATTEMPTS } = {}) {
let settled = 0;
let faults = 0;
+ // Counted but deliberately kept OUT of the rate: these two explain a collapse
+ // the rate can only report. Folding them into `faults` would change what the
+ // percentage means (and peg it red on a benign quiet ring); dropping them
+ // entirely is what made the 07-29 numerator collapse unreadable.
+ let noSolanaAccept = 0;
+ let floorSignals = 0;
/** @type {Record<string, number>} */
const faultBy = {};
for (const b of Array.isArray(buckets) ? buckets : []) {
@@ -96,7 +162,12 @@ export function classifySettleBuckets(buckets, { minAttempts = MIN_ATTEMPTS } =
if (n <= 0) continue;
if (b.success && b.paid) {
settled += n;
- } else if (!b.success && isRailFault(b.reason)) {
+ continue;
+ }
+ if (b.success) continue;
+ if (b.reason === NO_SOLANA_ACCEPT) noSolanaAccept += n;
+ if (SPONSOR_FLOOR.test(String(b.reason || ''))) floorSignals += n;
+ if (isRailFault(b.reason)) {
faults += n;
faultBy[b.reason] = (faultBy[b.reason] || 0) + n;
}
@@ -126,16 +197,21 @@ export function classifySettleBuckets(buckets, { minAttempts = MIN_ATTEMPTS } =
return { status: 'ok', settled, faults, attempts, rate, faultClasses, detail: base };
}
const status = rate < DOWN_RATE ? 'down' : 'degraded';
+ const { cause, hint } = diagnoseSettleDrop({ noSolanaAccept, floorSignals, settled, faults });
+ // Name the withdrawal in `detail` too: the hint is one field deep in the JSON,
+ // but `detail` is what the dashboard row, the digest and /api/status all print.
+ const withdrawn =
+ cause === 'sponsor_floor'
+ ? `; Solana accept withdrawn (${noSolanaAccept} no_solana_accept, sponsor under SOL floor)`
+ : '';
return {
status,
settled, faults, attempts, rate, faultClasses,
- detail: `${base}; ${faults} rail faults${topFaults ? ` (${topFaults})` : ''}`,
- hint:
- 'Payments are being rejected at settle. Check the self-facilitator: ' +
- '`npm run logs -- -s three-ws-api --grep "settle_failed" --since 3h`. ' +
- 'A 5xx/502 cluster with empty simulation logs is a duplicate-signature or ' +
- 'RPC-preflight fault; a 402 cluster is verify/facilitator rejection. See ' +
- 'docs/ops/production-log-triage.md.',
+ cause,
+ noSolanaAccept,
+ floorSignals,
+ detail: `${base}; ${faults} rail faults${topFaults ? ` (${topFaults})` : ''}${withdrawn}`,
+ hint,
};
}
@@ -176,6 +252,11 @@ export async function gatherX402SettleHealth() {
attempts: v.attempts,
rate: v.rate == null ? null : Math.round(v.rate * 1000) / 1000,
topFaults: v.faultClasses.slice(0, 5),
+ // The collapse-vs-rejection split. `cause` is what an operator should
+ // read first; noSolanaAccept is the volume the rate cannot show.
+ ...(v.cause ? { cause: v.cause } : {}),
+ noSolanaAccept: v.noSolanaAccept ?? 0,
+ floorSignals: v.floorSignals ?? 0,
},
};
} catch (err) {
diff --git a/data/changelog.json b/data/changelog.json
index 3cf08dedc..94f42c48d 100644
--- a/data/changelog.json
+++ b/data/changelog.json
@@ -1,6 +1,15 @@
{
"$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-30",
+ "title": "Payment health now names the real cause when settlements stall",
+ "summary": "The platform watches how many of its automated payments actually settle. When that number fell, the alert always said the same thing: payments are being rejected. That was misleading in the most common case, where nothing is rejected at all. The platform simply stops offering Solana as a payment option while its sponsor wallet is topped up, so its own agents have nothing they can pay. The health report now tells these two situations apart by name, counts how often the Solana option was unavailable, and points at the one-command self-repair instead of sending whoever is on call to the wrong system.",
+ "tags": [
+ "infra",
+ "improvement"
+ ]
+ },
{
"date": "2026-07-29",
"title": "Hardened how agent and model text is displayed across the site",
diff --git a/docs/ops/production-log-triage.md b/docs/ops/production-log-triage.md
index 94aaa0971..14a686a75 100644
--- a/docs/ops/production-log-triage.md
+++ b/docs/ops/production-log-triage.md
@@ -168,6 +168,23 @@ HTTP 502/503 GET|POST /api/x402/*, /api/mcp ua: threews-x402-autonomous/1.0 or
- **Symptom map:** `502` = fee wallet below its SOL floor or settle broadcast
failed; `503` = the payer's self-pay refused or a data_unavailable refund;
`402` from a ring agent = its buyer wallet is out of USDC.
+- **The quiet variant: no storm at all, just a settle-rate collapse
+ (`no_solana_accept`).** Observed 2026-07-29 16:00 UTC. The sponsor drifts
+ under its floor and
+ [buildRequirements()](../../api/_lib/x402-paid-endpoint.js) WITHDRAWS the
+ Solana accept from every 402 challenge (`sponsorKnownBelowFloor()`), so the
+ ring, which is Solana-only, never gets to attempt a payment. There is no 5xx
+ storm to grep, because nothing is being rejected. The fingerprint is:
+ settlements collapse (that hour: 735/h to 13/h) while rail faults stay at
+ their normal level (~100/h all day), and `no_solana_accept` in
+ `x402_autonomous_log` goes from exactly 0 to 300-400/h. Confirm the mechanism
+ from outside the box, no logs needed:
+ `curl -s https://three.ws/api/x402/three-intel | jq '.accepts[].network'`.
+ 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.
- **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
diff --git a/public/changelog.json b/public/changelog.json
index 69ba1f88e..2f501f5c2 100644
--- a/public/changelog.json
+++ b/public/changelog.json
@@ -1,11 +1,22 @@
{
- "generated_at": "2026-07-29T23:18:18.843Z",
+ "generated_at": "2026-07-30T01:06:33.118Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json",
"site": {
"name": "three.ws",
"url": "https://three.ws"
},
"entries": [
+ {
+ "date": "2026-07-30",
+ "type": "update",
+ "title": "Payment health now names the real cause when settlements stall",
+ "summary": "The platform watches how many of its automated payments actually settle. When that number fell, the alert always said the same thing: payments are being rejected. That was misleading in the most common case, where nothing is rejected at all. The platform simply stops offering Solana as a payment option while its sponsor wallet is topped up, so its own agents have nothing they can pay. The health report now tells these two situations apart by name, counts how often the Solana option was unavailable, and points at the one-command self-repair instead of sending whoever is on call to the wrong system.",
+ "link": null,
+ "tags": [
+ "infra",
+ "improvement"
+ ]
+ },
{
"date": "2026-07-29",
"type": "launch",
diff --git a/public/changelog.xml b/public/changelog.xml
index cc529c9d8..44dbe51a2 100644
--- a/public/changelog.xml
+++ b/public/changelog.xml
@@ -6,6 +6,14 @@
<atom:link href="https://three.ws/changelog.xml" rel="self" type="application/rss+xml"/>
<description>What's new on three.ws — features, improvements, and releases, newest first.</description>
<language>en</language>
+ <item>
+ <title>Payment health now names the real cause when settlements stall</title>
+ <link>https://three.ws/changelog</link>
+ <guid isPermaLink="false">2026-07-30:Payment health now names the real cause when settlements stall</guid>
+ <pubDate>Thu, 30 Jul 2026 12:00:00 GMT</pubDate>
+ <category>infra</category>
+ <description>The platform watches how many of its automated payments actually settle. When that number fell, the alert always said the same thing: payments are being rejected. That was misleading in the most common case, where nothing is rejected at all. The platform simply stops offering Solana as a payment option while its sponsor wallet is topped up, so its own agents have nothing they can pay. The health report now tells these two situations apart by name, counts how often the Solana option was unavailable, and points at the one-command self-repair instead of sending whoever is on call to the wrong system.</description>
+ </item>
<item>
<title>Generation Watch</title>
<link>https://three.ws/watch</link>
diff --git a/public/features.json b/public/features.json
index de0be2fcc..1137499e3 100644
--- a/public/features.json
+++ b/public/features.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-07-29T23:18:18.832Z",
+ "generated_at": "2026-07-30T01:06:33.111Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json",
"site": {
"name": "three.ws",
diff --git a/tests/api/x402-settle-health.test.js b/tests/api/x402-settle-health.test.js
index 34d748ada..563fa99a0 100644
--- a/tests/api/x402-settle-health.test.js
+++ b/tests/api/x402-settle-health.test.js
@@ -122,6 +122,79 @@ describe('classifySettleBuckets — verdict from real bucket shapes', () => {
expect(classifySettleBuckets(undefined).status).toBe('unknown');
});
+ // The 2026-07-29 outage. Rail faults sat at their normal level all day while
+ // settlements fell 750/h → 25/h, because the sponsor dropped under its SOL
+ // floor and buildRequirements() withdrew the Solana accept from every
+ // challenge. The rate alone reads identically to a facilitator rejection, and
+ // the old hint sent an operator to the facilitator, where the 503s look flat
+ // and nothing explains the drop.
+ const acceptWithdrawnBuckets = [
+ { success: true, paid: true, reason: 'none', n: 87 },
+ { success: false, paid: false, reason: 'http_503', n: 154 },
+ { success: false, paid: false, reason: 'http_402', n: 133 },
+ { success: false, paid: false, reason: 'rpc_error', n: 12 },
+ { success: false, paid: false, reason: 'This operation was aborted', n: 8 },
+ // The mechanism, which the rate deliberately does not count:
+ { success: false, paid: false, reason: 'no_solana_accept', n: 1059 },
+ { success: false, paid: false, reason: 'settlement temporarily unavailable', n: 26 },
+ // Excluded noise, same as any window:
+ { success: false, paid: false, reason: 'datapoint_sweep_calls_failed', n: 24 },
+ { success: false, paid: false, reason: 'cap_would_exceed', n: 8 },
+ ];
+
+ it('blames the sponsor floor, not the facilitator, when the Solana accept is withdrawn', () => {
+ const v = classifySettleBuckets(acceptWithdrawnBuckets);
+ expect(v.status).toBe('down');
+ expect(v.cause).toBe('sponsor_floor');
+ expect(v.noSolanaAccept).toBe(1059);
+ expect(v.floorSignals).toBe(26);
+ // The rate itself is unchanged: no_solana_accept and the 503-prose floor
+ // refusals must not become rail faults, or the percentage stops meaning
+ // "of the settles we attempted, how many landed".
+ expect(v.settled).toBe(87);
+ expect(v.faults).toBe(307);
+ expect(v.detail).toMatch(/Solana accept withdrawn \(1059 no_solana_accept/);
+ expect(v.hint).toMatch(/WITHDRAWN, not rejected/);
+ expect(v.hint).toMatch(/treasury-topup/);
+ // And it must NOT send the operator down the facilitator path.
+ expect(v.hint).not.toMatch(/Payments are being rejected at settle/);
+ });
+
+ it('still blames the rail when faults rose and Solana is payable', () => {
+ const v = classifySettleBuckets(liveOutageBuckets);
+ expect(v.cause).toBe('rail');
+ expect(v.noSolanaAccept).toBe(0);
+ expect(v.floorSignals).toBe(0);
+ expect(v.hint).toMatch(/Payments are being rejected at settle/);
+ expect(v.detail).not.toMatch(/withdrawn/i);
+ });
+
+ it('a single floor refusal is enough to name the cause, even under heavy rail noise', () => {
+ // The flapping case: sponsorKnownBelowFloor() is cache-backed and fail-open,
+ // so some settles still land and no_solana_accept can be lower than settled.
+ // One 503-prose floor refusal is still proof of what is happening.
+ const v = classifySettleBuckets([
+ { success: true, paid: true, reason: 'none', n: 40 },
+ { success: false, paid: false, reason: 'http_502', n: 60 },
+ { success: false, paid: false, reason: 'no_solana_accept', n: 3 },
+ { success: false, paid: false, reason: 'fee_wallet_below_floor', n: 1 },
+ ]);
+ expect(v.cause).toBe('sponsor_floor');
+ expect(v.floorSignals).toBe(1);
+ });
+
+ it('no_solana_accept below the settled count alone does not cry sponsor floor', () => {
+ // A handful of third-party endpoints that only advertise Base is normal and
+ // is genuinely the ring choosing not to pay. Do not hijack the diagnosis.
+ const v = classifySettleBuckets([
+ { success: true, paid: true, reason: 'none', n: 60 },
+ { success: false, paid: false, reason: 'http_502', n: 40 },
+ { success: false, paid: false, reason: 'no_solana_accept', n: 5 },
+ ]);
+ expect(v.cause).toBe('rail');
+ expect(v.noSolanaAccept).toBe(5);
+ });
+
it('boundary: exactly 90% is OK, just under is DEGRADED', () => {
const ok = classifySettleBuckets([
{ success: true, paid: true, reason: 'none', n: 90 },