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
fix(x-content): keep every model's failure in a review blocker, not just the first line
nirholas7375af1510f6
diff --git a/api/_lib/x-content/review.js b/api/_lib/x-content/review.jsindex 8e3c0ddfe..d372114fb 100644--- a/api/_lib/x-content/review.js+++ b/api/_lib/x-content/review.js@@ -86,6 +86,14 @@ async function calibrationPosts(env) {}}+// The chain's error lists every rung on its own line. A blocker is one line,+// and it keeps them all, because which rung failed and why is the only thing+// the operator can act on.+export function editorFailure(message) {+ if (!message) return 'the AI editor did not run';+ return `the AI editor did not run: ${String(message).replace(/:?\s*\n\s*/g, (gap) => (gap.startsWith(':') ? ': ' : '; ')).trim()}`;+}+export async function reviewItem(item, { root, glossary = [], quality = {}, env = process.env, skipEditor = false }) {const maximum = maxLengthOf(quality);const lint = lintItem(item, { maximum });@@ -121,7 +129,7 @@ export async function reviewItem(item, { root, glossary = [], quality = {}, envconst overridden = item.editorOverride?.reason && editor.verdict === 'revise' && !editor.issues.some((row) => row.severity === 'blocking');if (editor.verdict !== 'publish' && !overridden) blockers.push(`editor verdict is ${editor.verdict}`);} else {- blockers.push(editorError ? `the AI editor did not run: ${editorError.split('\n')[0]}` : 'the AI editor did not run');+ blockers.push(editorFailure(editorError));}// The editor's rewrite is a draft like any other: lint it, and list everydiff --git a/tests/x-content-llm.test.js b/tests/x-content-llm.test.jsindex 25cd2df37..821a6b23c 100644--- a/tests/x-content-llm.test.js+++ b/tests/x-content-llm.test.js@@ -86,3 +86,11 @@ describe('an empty reply', () => {await expect(chatCompletionsRung(request, { ...rung, fetchImpl })).rejects.toThrow('nvidia returned an empty reply (finish_reason length) after 3 tries');});});++describe('a review whose editor never ran', () => {+ it('keeps every rung failure on the one blocker line', async () => {+ const { editorFailure } = await import('../api/_lib/x-content/review.js');+ expect(editorFailure('no model was reachable:\n Vertex 403: billing\n nvidia fetch failed (after 3 tries)')).toBe('the AI editor did not run: no model was reachable: Vertex 403: billing; nvidia fetch failed (after 3 tries)');+ expect(editorFailure(null)).toBe('the AI editor did not run');+ });+});