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): log order 068 close-out, add row 39 for the model-pixal3d deploy
nirholas60e2757b97b3
diff --git a/prompts/finish/068-best3d-02-pixal3d-multiview.md b/prompts/finish/068-best3d-02-pixal3d-multiview.mdindex f0fe55afa..caa17a484 100644--- a/prompts/finish/068-best3d-02-pixal3d-multiview.md+++ b/prompts/finish/068-best3d-02-pixal3d-multiview.md@@ -1,5 +1,7 @@# best3d 02: Pixal3D fidelity lane and 1 to 4 image multi-view input in Forge+**Evolve status (2026-10-11):** Everything except the production deploy is done. `workers/model-pixal3d/` is built and tested (81 passed, 1 skipped); `api/forge.js`, `api/_lib/forge-tiers.js`, `api/_lib/forge-options.js` and `api/_providers/gcp.js` register and wire the `pixal3d` backend end to end (1-4 images, `view_labels`, `fill_other_sides`, request-boundary validation, opt-in only, never a default or failover target); `src/forge.js` and `pages/forge.html` ship the "Match my photo" engine button, panel, and per-engine slot cap; docs, STRUCTURE.md row and the changelog entry are in. What remains is the owner-gated GPU deploy (row 39 of `_context/production-100-OWNER-ACTIONS.md`): `gcloud run services describe model-pixal3d --region us-central1` still answers "Cannot find service", so the lane reports `backend_unconfigured` in production and the first two Definition of done lines (a real 3-image request returning a GLB; the `forge_creations` row recording all input URLs) cannot be verified against production until that deploy lands. Commits: `5b4f31d05` (backend + worker + tests), `d85ce1936` (frontend UI), `192c01233` (docs + changelog).+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 bd1ed8a07..7a86edd14 100644--- a/prompts/finish/_context/best3d-PROGRESS.md+++ b/prompts/finish/_context/best3d-PROGRESS.md@@ -11,3 +11,7 @@ Append a dated entry per closed order, with commit SHAs.- 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.- 2026-10-11 (second retry pass, same day): re-verified again, nothing drifted and no code changed. Confirmed fresh: territory router (`npx vitest run tests/forge-territory.test.js`, 75/75), worker suite (`pytest -q` in `workers/model-trellis2/`, 64 passed 1 skipped), `npm run check:vendored` (OK, 32 copies across 39 workers), `npm run audit:docs` (15 findings, same set, none naming trellis2), `npm run check:rules` (exit 0), `data/changelog.json` line 980 and the STRUCTURE.md fleet row both still present. `gcloud run services describe model-trellis2 --region us-central1` still "Cannot find service"; `node scripts/read-service-env.mjs` still shows no `MODEL_TRELLIS2_URL` on `three-ws-api`. Row 38 of `_context/production-100-OWNER-ACTIONS.md` and the order's "Evolve status" paragraph were already accurate for today, so neither needed an edit. This is the order's second (and, per the README, final permitted) automatic retry; the remaining step stays the owner's GPU deploy.+- 2026-10-11: order 068 (Pixal3D fidelity lane) built and committed, NOT closed. Step 0 confirmed `TencentARC/Pixal3D` (MIT) exists and is unindexed on Forge; `workers/model-trellis2` existed but shares no FastAPI entrypoint boundary clean enough to extend without dependency conflicts (Pixal3D needs `natten` on top of TRELLIS.2's stack), so it was built as its own worker, `workers/model-pixal3d/`, per the order's own fallback clause. Registered the `pixal3d` backend in `api/_lib/forge-tiers.js` as an opt-in-only self-host image lane (never a named free default, never a failover target in either direction); extended `api/_lib/forge-options.js` with `view_labels` and `fill_other_sides`; wired `api/forge.js`'s request boundary (4-image cap tighter than the generic 6, `view_labels` length check, `fill_other_sides` single-image check) and `api/_providers/gcp.js`'s `pixal3d` mode (forwards every image, not just the first, unlike every other self-host lane). Frontend: "Match my photo" engine button and info panel in `src/forge.js`/`pages/forge.html`, a per-engine `activeMaxImages()` slot cap (clamped so it can only tighten, never widen, past the existing 6-slot grid), and `view_labels` pinned to slot index so a drag-reorder never mislabels a photo. Docs: `docs/forge.md` engine grid entry plus curl examples, STRUCTURE.md fleet row, `data/changelog.json` entry, `npm run build:pages`.+ - Passing: 52/52 on the touched test files (`tests/forge-options.test.js`, `tests/forge-view-slots.test.js`, `tests/api/forge-pixal3d.test.js`, `tests/api/forge-pixal3d-request.test.js`, `tests/api/forge-multiview-photo.test.js`); the broader `tests/api/forge-*.test.js` + `tests/forge-*.test.js` run shows 996 passed, 3 pre-existing failures in files outside this diff (`forge-director-rewrite.test.js`, `forge-director.test.js`) unrelated to pixal3d/view-slots, not caused by this change; worker suite 81 passed, 1 skipped (`pytest -q` in `workers/model-pixal3d/`); `npm run check:vendored` OK (33 copies across 40 workers); `npm run audit:docs` 15 findings, same pre-existing set, none naming pixal3d or this order; `npm run check:rules` exit 0 on every touched file. Verified in a real browser (Playwright against a synthetic catalog entry, since the worker isn't deployed): the engine button renders, the panel toggles, slots 4/5 disable/re-enable correctly, and the views counter denominator tracks the per-engine cap.+ - Still open, owner (row 39 of `_context/production-100-OWNER-ACTIONS.md`): (1) `workers/model-pixal3d/stage_weights.sh`, (2) `gcloud builds submit --config workers/model-pixal3d/cloudbuild.yaml --region us-central1 --project aerial-vehicle-466722-p5 --substitutions=SHORT_SHA=manual$(date +%s) .`, (3) `gcloud run services update three-ws-api --region us-central1 --update-env-vars MODEL_PIXAL3D_URL=<service-url>`, (4) run one real 3-image generation, confirm the `forge_creations` row records all three input URLs and the GLB validates, then delete the order file.+ - Commits: `5b4f31d05` (backend + worker + tests), `d85ce1936` (frontend UI), `192c01233` (docs + changelog).diff --git a/prompts/finish/_context/production-100-OWNER-ACTIONS.md b/prompts/finish/_context/production-100-OWNER-ACTIONS.mdindex 6a18c7a36..192dd58c5 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 (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)+## Open rows (2026-10-11 (best3d order 068 close-out): row 39 added for the `model-pixal3d` first deploy; 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 ||---|---|---|---|---|@@ -49,6 +49,7 @@ on it; some resolve themselves as other work lands.| 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) |+| 39 | **Deploy `model-pixal3d` (the Pixal3D fidelity-lane GPU worker), then point `MODEL_PIXAL3D_URL` at it** (added 2026-10-11 by the evolve loop, best3d order 068, built and tested same day). `workers/model-pixal3d/` is complete (Dockerfile, `cloudbuild.yaml` pinned to `three-ws-build@`, 81 of 82 local tests passing, 1 skipped), `api/forge.js`/`api/_lib/forge-tiers.js`/`api/_providers/gcp.js` already register and wire the `pixal3d` backend (1-4 photos, `view_labels`, `fill_other_sides`, opt-in only: never a named default or a failover target), and `src/forge.js`/`pages/forge.html` already ship the "Match my photo" engine button and panel. Confirmed live today: `gcloud run services describe model-pixal3d --region us-central1` answers "Cannot find service", and `three-ws-api`'s env has no `MODEL_PIXAL3D_URL`, so the lane reports `backend_unconfigured` today and the engine button does not render in the catalog (verified against a synthetic catalog entry in a local browser session, since the real worker isn't deployed yet). This is a production deploy (new Cloud Run GPU service, gate 2), so no agent runs it. Commands, in order (from `workers/model-pixal3d/README.md`): `workers/model-pixal3d/stage_weights.sh` (one time, idempotent weight mirror), then `gcloud builds submit --config workers/model-pixal3d/cloudbuild.yaml --region us-central1 --project aerial-vehicle-466722-p5 --substitutions=SHORT_SHA=manual$(date +%s) .` from the repo root, then `gcloud run services update three-ws-api --region us-central1 --update-env-vars MODEL_PIXAL3D_URL=$(gcloud run services describe model-pixal3d --region us-central1 --format='value(status.url)')` (never `--set-env-vars`, which replaces the whole set). After that, run one real 3-image generation with `backend: "pixal3d"` and confirm the `forge_creations` row records all three input URLs and the returned GLB is valid; that is the order's last unverified Definition of done line. | one weight stage + one build + one env update + one test generation | Closes best3d order 068; makes "Match my photo" (pixel-aligned fidelity to the caller's own photos, MIT + Apache-2.0) live in the Forge engine grid | [068-best3d-02-pixal3d-multiview.md](../068-best3d-02-pixal3d-multiview.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.