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
docs(best3d): re-verify order 067 on retry, log row 38 for the pending model-trellis2 deploy
nirholas5dafeeae7342
diff --git a/prompts/finish/067-best3d-01-trellis2-default-lane.md b/prompts/finish/067-best3d-01-trellis2-default-lane.mdindex 90d5fb0de..854d7f65c 100644--- a/prompts/finish/067-best3d-01-trellis2-default-lane.md+++ b/prompts/finish/067-best3d-01-trellis2-default-lane.md@@ -1,5 +1,7 @@# best3d 01: TRELLIS.2 becomes the default image-to-3D lane; Hunyuan3D 2.1 is territory-gated or retired+**Evolve status (2026-10-11, retry):** everything in this order is built, wired and tested except one owner-gated step. `workers/model-trellis2/` exists (Dockerfile, `cloudbuild.yaml` pinned to `three-ws-build@`), the Forge lane registry already makes `trellis2` the default image-to-3D backend with the old chain as failover, the territory router keeps the EU, UK and South Korea off every Tencent lane, and `workers/model-hunyuan3d/README.md` carries the territory rule and `NOTICE` file. Re-verified this session: territory router tests (75/75), worker tests (64 passed, 1 skipped), `npm run check:vendored` (OK), `npm run audit:docs` (15 findings, none new or related to this order), docs/STRUCTURE.md row/changelog entry all present from the prior session's commits (`c977a7193`, `5e8115967`, `a74cd22dd`). What remains is the two Definition of done lines that need a live GPU service: `gcloud run services describe model-trellis2` still answers "Cannot find service" and `three-ws-api` has no `MODEL_TRELLIS2_URL`, so deploying the worker (a production Cloud Run deploy, gate 2) and running one real generation against it is the owner's action, tracked as row 38 in [`_context/production-100-OWNER-ACTIONS.md`](_context/production-100-OWNER-ACTIONS.md). The Hunyuan vs TRELLIS.2 retirement decision stays open for the same reason: no benchmark is possible until the worker is live.+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.## Operating clause (binding)diff --git a/prompts/finish/_context/best3d-PROGRESS.md b/prompts/finish/_context/best3d-PROGRESS.mdindex b833afca2..624a29e85 100644--- a/prompts/finish/_context/best3d-PROGRESS.md+++ b/prompts/finish/_context/best3d-PROGRESS.md@@ -9,3 +9,4 @@ Append a dated entry per closed order, with commit SHAs.- Still open, owner: (1) deploy with `gcloud builds submit --config workers/model-trellis2/cloudbuild.yaml`, (2) set MODEL_TRELLIS2_URL on three-ws-api, (3) run a real generation, validate the GLB with packages/glb-tools, confirm the forge_creations row shows backend trellis2, then delete the order file. (4) nvdiffrast is under NVIDIA's 1-Way Commercial source licence (non-commercial use for licensees); the v1 lane already ships it, decision needed on a commercial grant or a replacement rasteriser.- Hunyuan vs TRELLIS.2 decision: the measured Forge benchmark comparison is not possible until the worker is deployed, so Hunyuan is NOT retired. It stays an explicit lane and a fallback, gated by territory (EU, UK, KR and unknown country never reach hunyuan3d or the HuggingFace Spaces chain). Revisit retirement once the benchmark exists.- Failover note: the chain behind trellis2 is TRELLIS v1, Hunyuan3D, HuggingFace, NIM, with TripoSG as the final poll-time rung. There is no TripoSR lane in the Forge registry, so it was not added.+- 2026-10-11: order 067 re-verified on retry, still NOT closed, same reason. Nothing drifted: territory router tests (75/75, `tests/forge-territory.test.js`), worker tests (64 passed, 1 skipped, `workers/model-trellis2/`), `npm run check:vendored` (OK, 32 copies across 39 workers), `npm run check:rules` (exit 0), `npm run audit:docs` (15 findings, none naming trellis2 or this order), `data/changelog.json`/STRUCTURE.md row/README all present from the prior commits. `gcloud run services describe model-trellis2 --region us-central1` still answers "Cannot find service" and `three-ws-api` still has no `MODEL_TRELLIS2_URL`, confirming the deploy has not happened. Added row 38 to `_context/production-100-OWNER-ACTIONS.md` naming the exact deploy command, and an "Evolve status" paragraph under the order's title. No code changed this pass; commit is docs/log only.diff --git a/prompts/finish/_context/production-100-OWNER-ACTIONS.md b/prompts/finish/_context/production-100-OWNER-ACTIONS.mdindex c5cba4e82..6a18c7a36 100644--- a/prompts/finish/_context/production-100-OWNER-ACTIONS.md+++ b/prompts/finish/_context/production-100-OWNER-ACTIONS.md@@ -9,7 +9,7 @@ it and, if that unblocks a work order, say which one in the owning pack's `produRows carry the date they were added so staleness is visible. Re-verify a row before actingon it; some resolve themselves as other work lands.-## Open rows (2026-10-11 (order 404 close-out): row 34 deleted, its premise cleared by merge commit `d77b89178` (the `evolve`/`main` reconciliation) which also carried the `x-mention-reply.js` `chainFor()` fix row 34 called out, verified live with `RUN_LLM_TESTS=1 npx vitest run tests/x-mention-reply.llm.test.js` (16/16 `source: 'model'`, no `buildBody` TypeError); 2026-10-11 (scout lane): row 36 added for the Cloudflare R2 flapping degraded/down pattern; 2026-10-11 (even later): row 24 re-measured again after order 400's ring-leak-scan tiering/lock fix shipped on `evolve`; 2026-10-11 (later): row 35 added for the agent mention-policy migration; 2026-10-11 04:16 UTC: rows 1 and 24 re-measured by the deep triage sweep; row 34 added for the evolve/main branch divergence; 2026-10-10: row 33 added for the xAI MCP e2e key; rows 1, 19 and 24 re-measured by the triage sweep; 2026-10-09: rows 1, 2 and 24 re-measured by the triage sweep, row 31 added for the GPU worker redeploy and row 32 for database table retention; row 30 added for the Grok Bot CLI setup rerun; 2026-10-08: row 26 added for the coin-gated MCP catalog regeneration; rows 1 and 2 re-measured by the triage sweep, row 24 added for the paid Solana RPC credits, row 25 added for the MCP connector OAuth deploy; 2026-09-30: row 23 added for the $THREE receiver wallets; 2026-09-29: row 19 re-measured after the agent-sniper deploy; 2026-09-09: row 19 added, and row 1 corrected because its outage premise no longer holds; rows 1, 2, 3, 9, 13, 15 and 16 re-measured 2026-09-04; the former row 18 was cleared that day and its number is not reused; the 2026-09-02 and 2026-08-09 passes are folded in below)+## Open rows (2026-10-11 (best3d order 067 retry): row 38 added for the `model-trellis2` first deploy; 2026-10-11 (order 404 close-out): row 34 deleted, its premise cleared by merge commit `d77b89178` (the `evolve`/`main` reconciliation) which also carried the `x-mention-reply.js` `chainFor()` fix row 34 called out, verified live with `RUN_LLM_TESTS=1 npx vitest run tests/x-mention-reply.llm.test.js` (16/16 `source: 'model'`, no `buildBody` TypeError); 2026-10-11 (scout lane): row 36 added for the Cloudflare R2 flapping degraded/down pattern; 2026-10-11 (even later): row 24 re-measured again after order 400's ring-leak-scan tiering/lock fix shipped on `evolve`; 2026-10-11 (later): row 35 added for the agent mention-policy migration; 2026-10-11 04:16 UTC: rows 1 and 24 re-measured by the deep triage sweep; row 34 added for the evolve/main branch divergence; 2026-10-10: row 33 added for the xAI MCP e2e key; rows 1, 19 and 24 re-measured by the triage sweep; 2026-10-09: rows 1, 2 and 24 re-measured by the triage sweep, row 31 added for the GPU worker redeploy and row 32 for database table retention; row 30 added for the Grok Bot CLI setup rerun; 2026-10-08: row 26 added for the coin-gated MCP catalog regeneration; rows 1 and 2 re-measured by the triage sweep, row 24 added for the paid Solana RPC credits, row 25 added for the MCP connector OAuth deploy; 2026-09-30: row 23 added for the $THREE receiver wallets; 2026-09-29: row 19 re-measured after the agent-sniper deploy; 2026-09-09: row 19 added, and row 1 corrected because its outage premise no longer holds; rows 1, 2, 3, 9, 13, 15 and 16 re-measured 2026-09-04; the former row 18 was cleared that day and its number is not reused; the 2026-09-02 and 2026-08-09 passes are folded in below)| # | Action | Size | Unblocks | Detail lives in ||---|---|---|---|---|@@ -48,6 +48,7 @@ on it; some resolve themselves as other work lands.| 35 | **Apply the agent mention-policy migration, then ship it with the next deploy** (added 2026-10-11 by the evolve loop, x-grok order 061, which is otherwise complete and retired). `api/_lib/migrations/20261011220000_agent_mention_policy.sql` adds `mention_replies_enabled`, `mention_replies_dry_run`, `mention_replies_daily_cap` and `mention_replies_allowed_intents` to `agent_x_policies`, the four fields the new "Answer mentions" panel on `pages/agent-edit.html` (Social tab) reads and writes. `npm run db:status` on 2026-10-11 lists it as the only pending migration. The read path (`GET /api/x/agents`) already works without it, since the query is `select *` and `rowToPolicy()` defaults the missing columns; only the write path breaks: `saveAgentPolicy`'s `INSERT` names the four columns explicitly, so a save attempt against the unmigrated table answers 500 with Postgres `42703 undefined_column`, verified live in a local run of the full UI against the real dev database on 2026-10-11 (every other state, no-connection/missing-scope/connected/populated-decisions, was verified working by temporarily granting `X_OAUTH_CLIENT_ID`/`SECRET` in `.env.local` only, never in production). Apply it with `node scripts/apply-migrations.mjs --apply --file 20261011220000_agent_mention_policy.sql`, or `npm run db:status` then `npm run db:migrate` (nothing else is pending as of this writing). `npm run db:check` blocks the next deploy on it until then. Separately, and not blocking this row: production has never set `X_OAUTH_CLIENT_ID`/`X_OAUTH_CLIENT_SECRET` at all (`node scripts/read-service-env.mjs '^X_OAUTH_CLIENT'` finds nothing), so the whole per-agent "connect this agent's own X account" flow (distinct from the company bot account's `X_API_KEY`/`X_ACCESS_TOKEN` posting credentials, which are set) answers "X connections are not enabled on this deployment" for every agent today; that is a pre-existing gap this order did not create and its settings UI already degrades to that state correctly. | one command | The "Answer mentions" save button in the agent settings UI | [x-grok-PROGRESS.md](x-grok-PROGRESS.md), 2026-10-11 entry for order 061 || 36 | **Check Cloudflare R2's own status/dashboard for the bucket behind `S3_BUCKET`: it flaps between healthy and unreachable without any corresponding change on our side** (added 2026-10-11 by the evolve scout lane). Queried `ops_alerts` directly (columns: `signature, title, detail, severity, count, environment, first_seen, last_seen`): since 2026-09-08 the `object_storage` sensor (`api/_lib/ops/object-storage-health.js`) has logged roughly 167 "DEGRADED: Object storage (Cloudflare R2)" events (`bucket reachable but slow, signed list ~1095ms` against a 1000ms threshold) and about 18 "DOWN" events, interleaved with many "RESOLVED" events minutes apart showing a healthy 150 to 300ms. Reproduced live with production's own `S3_ACCESS_KEY_ID`/`S3_SECRET_ACCESS_KEY`/`S3_BUCKET`/`S3_ENDPOINT` (pulled via `node scripts/read-service-env.mjs` one variable at a time, used in-process, then deleted from disk immediately): `gatherObjectStorageHealth()` returned `{"status":"down","detail":"bucket unreachable: Please enable R2 through the Cloudflare Dashboard.","metrics":{"latencyMs":135,"credentialFault":false}}`, a 135ms response, i.e. the bucket answered fast but Cloudflare's own API told us R2 was not enabled, which cannot be true most of the time this account is clearly serving reads. Ruled out as a code cause: the credential is not rejected (`credentialFault:false`, no `SignatureDoesNotMatch`), and the AWS SDK's Node HTTP handler already defaults to keep-alive on (`keepAlive:true, maxSockets:50` in `@smithy/node-http-handler`), so this is not the classic missing-keep-alive latency bug. The probe itself is a single signed `ListObjectsV2Command` with no retry (`api/_lib/ops/object-storage-health.js:76-92`), so a genuinely transient one-off Cloudflare hiccup is indistinguishable from a sustained outage in this sensor today, which may be inflating the DOWN/DEGRADED counts above a one-retry version would show. Two independent things to do, neither owned by this reconciliation order: (a) check Cloudflare's own R2 dashboard/status page for the account behind `S3_BUCKET` for incidents correlated with the alert timestamps above (owner/dashboard access this agent does not have); (b) if the pattern looks like a true transient flap rather than sustained Cloudflare-side degradation, a future order could add one immediate retry before `gatherObjectStorageHealth()` classifies `down`/`degraded`, with a test proving a single synthetic failure followed by a synthetic success no longer pages. Not attempted here because the current evidence does not confidently distinguish "add a retry" from "mute a real recurring problem", and CLAUDE.md is explicit that a check does not get weakened without a dated, measured reason; this row exists so neither path gets silently skipped. | Cloudflare dashboard check (owner), then optionally a small, test-covered retry (agent) | Every avatar, thumbnail and generated GLB reads through this bucket; `/cdn/*` and the forge both degrade when it flaps | `ops_alerts` table, queried 2026-10-11 || 37 | **Ship the cron time-budget fix with the next deploy** (added 2026-10-11 by the evolve loop, order 403, otherwise complete and retired). `wrapCron()` in `api/_lib/http.js` now races every cron handler against a real time budget (`maxDurationMs`, wired from each handler's own `export const maxDuration * 1000`, defaulting to 120000ms) and answers a clean `503 { reason: 'cron_timeout' }` instead of hanging until Cloud Run's blind 900s ingress kill, which is what `/api/cron/x402-ring-leak-scan` was hitting repeatedly before order 400 landed its own fix. Verified locally: a real `http.createServer` hosting `wrapCron` with an 800ms budget and a never-resolving handler answered `503 cron_timeout` at 0.809s (not 900s, not instantly); the new `tests/http-cron-timeout.test.js` (4 tests) and the added `wrapCron` case in `tests/http-db-unavailable-boundary.test.js` pass 10/10, and the timeout test was proven red (indefinite hang) against the pre-fix code via a path-scoped `git stash` before the fix landed. No migration, no env var, nothing else needed; this is a pure code fix sitting on `evolve` waiting for row 1's routine deploy cadence to carry it to `main` and production. Ship with `npm run deploy:gcp:full` (row 1 already tracks the general "approve the next deploy" gate; this row exists only so the new behavior is named for verification). Post-deploy verification: re-run the step 0 query from `prompts/finish/403-auto-cron-timeout-enforcement.md` (`gcloud logging read 'resource.type="cloud_run_revision" resource.labels.service_name="three-ws-api" textPayload:"maximum request timeout"' --freshness=24h --project aerial-vehicle-466722-p5`) after the deploy window; a healthy rollout shows that query going quiet (or near-quiet) while `textPayload:"exceeded its"` picks up any genuine stuck cron with its name attached, cross-referenced against order 400's `x402-ring-leak-scan` fix so a recurrence is distinguished from a different handler entirely. | one deploy (already covered by row 1's cadence) | Clean, diagnosable cron timeouts platform-wide instead of a blank "maximum request timeout" | `docs/ops/production-log-triage.md`, "HTTP timeout with no cron context" section |+| 38 | **Deploy `model-trellis2` (the TRELLIS.2 GPU worker), then point `MODEL_TRELLIS2_URL` at it** (re-measured 2026-10-11 by the evolve loop, best3d order 067, built and tested on 2026-10-09, not yet deployed). `workers/model-trellis2/` is complete (Dockerfile, `cloudbuild.yaml` pinned to `three-ws-build@`, 64 of 65 local tests passing, 1 skipped), the Forge lane registry already makes `trellis2` the default image-to-3D backend with the old chain (`trellis_selfhost`, `hunyuan3d`, `trellis`, `modly`, `triposg`) as failover, and the territory router already keeps the EU, the UK and South Korea off every Tencent lane regardless. Confirmed live today: `gcloud run services describe model-trellis2 --region us-central1` answers "Cannot find service", and `three-ws-api`'s env has no `MODEL_TRELLIS2_URL`, so the registry's default lane is currently unreachable and every image-to-3D request falls through to the next lane in the chain, same as the 2026-10-09 measurement. This is a production deploy (new Cloud Run GPU service, gate 2), so no agent runs it. Commands, in order: `gcloud builds submit --config workers/model-trellis2/cloudbuild.yaml --region us-central1 --project aerial-vehicle-466722-p5 .` from the repo root, then `gcloud run services update three-ws-api --region us-central1 --update-env-vars=MODEL_TRELLIS2_URL=<service-url>` (never `--set-env-vars`, which replaces the whole set). After that, run one real image-to-3D generation and confirm the `forge_creations` row for it shows `backend: 'trellis2'`, and validate the returned GLB with `packages/glb-tools`; both are the two remaining Definition of done lines in the order file. | one build + one env update + one test generation | Closes best3d order 067; makes TRELLIS.2 (MIT, EU/UK/KR-safe) the live default instead of the untested fallback chain | [067-best3d-01-trellis2-default-lane.md](../067-best3d-01-trellis2-default-lane.md), [best3d-PROGRESS.md](best3d-PROGRESS.md) |Deleted 2026-09-01: the former row 5 (`WALLET_ENCRYPTION_KEY_PREVIOUS` policy), whichdeclared itself "delete on reading" and had outlived that by three weeks.