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.

test(forge): give the forge-store mocks the creation-context wrapper so 18 lane tests run again

overstepping9acf0cba2f89
diff --git a/tests/api/forge-credit-exhaustion-rescue.test.js b/tests/api/forge-credit-exhaustion-rescue.test.js
index 00a121a80..a1f783f17 100644
--- a/tests/api/forge-credit-exhaustion-rescue.test.js
+++ b/tests/api/forge-credit-exhaustion-rescue.test.js
@@ -109,6 +109,7 @@ vi.mock('../../api/_lib/forge-store.js', () => ({
materializeCreation: vi.fn(async ({ glbUrl }) => ({ id: 'creation-1', glbUrl })),
markFailed: vi.fn(async () => {}),
findByJob: vi.fn(async () => null),
+ runWithCreationContext: (_facts, fn) => fn(),
}));
vi.mock('../../api/_lib/forge-image-validate.js', () => ({
diff --git a/tests/api/forge-fallback.test.js b/tests/api/forge-fallback.test.js
index af277952c..f5b2ec6f6 100644
--- a/tests/api/forge-fallback.test.js
+++ b/tests/api/forge-fallback.test.js
@@ -86,6 +86,7 @@ vi.mock('../../api/_lib/forge-store.js', () => ({
materializeCreation: vi.fn(async ({ glbUrl }) => ({ id: 'creation-1', glbUrl })),
markFailed: vi.fn(async () => {}),
findByJob: vi.fn(async () => null),
+ runWithCreationContext: (_facts, fn) => fn(),
}));
// Vision pre-check is a no-op pass (irrelevant to text→3D anyway).
diff --git a/tests/api/forge-free-first.test.js b/tests/api/forge-free-first.test.js
index ba2c9aecf..cf934c47c 100644
--- a/tests/api/forge-free-first.test.js
+++ b/tests/api/forge-free-first.test.js
@@ -91,6 +91,7 @@ vi.mock('../../api/_lib/forge-store.js', () => ({
materializeCreation: vi.fn(async ({ glbUrl }) => ({ id: 'creation-1', glbUrl })),
markFailed: vi.fn(async () => {}),
findByJob: vi.fn(async () => null),
+ runWithCreationContext: (_facts, fn) => fn(),
}));
vi.mock('../../api/_lib/forge-image-validate.js', () => ({
diff --git a/tests/api/forge-multiview-photo.test.js b/tests/api/forge-multiview-photo.test.js
index a5c16c86f..393b313b3 100644
--- a/tests/api/forge-multiview-photo.test.js
+++ b/tests/api/forge-multiview-photo.test.js
@@ -58,6 +58,7 @@ vi.mock('../../api/_lib/forge-store.js', () => ({
materializeCreation: vi.fn(async ({ glbUrl }) => ({ id: 'creation-1', glbUrl })),
markFailed: vi.fn(async () => {}),
findByJob: vi.fn(async () => null),
+ runWithCreationContext: (_facts, fn) => fn(),
}));
// Lane health: the real snapshot probes the worker URL over the network, which