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(tests): give the guard-registry fixture the published copy it audits

nirholas9b7066928730
diff --git a/tests/audit-guards.test.js b/tests/audit-guards.test.js
index 75a15c06a..65d55adaa 100644
--- a/tests/audit-guards.test.js
+++ b/tests/audit-guards.test.js
@@ -44,29 +44,28 @@ function makeRepo(name, { guards, exempt = [], stages, scripts, extraScripts = [
if (hookTemplate !== undefined) writeFileSync(join(dir, 'scripts', 'setup-git-hooks.mjs'), hookTemplate);
writeFileSync(join(dir, 'package.json'), JSON.stringify({ name: 'fixture', scripts }, null, 2));
- writeFileSync(
- join(dir, 'data', 'guards.json'),
- JSON.stringify(
- {
- updated: '2026-07-30',
- summary: 'fixture',
- stages: stages ?? [
- { id: 'prebuild', title: 'Prebuild', when: 'x', description: 'y' },
- { id: 'gate', title: 'Gate', when: 'x', description: 'y' },
- { id: 'build:gcp', title: 'Deploy build', when: 'x', description: 'y' },
- { id: 'pre-push', title: 'Pre-push', when: 'x', description: 'y' },
- { id: 'manual', title: 'On demand', when: 'x', description: 'y' },
- ],
- guards: guards.map(({ __skipFile, ...g }) => g),
- // Every fixture necessarily contains a copy of the auditor, which the
- // reverse check would otherwise report as an unregistered guard. The
- // real repo registers it properly instead of exempting it.
- exempt: [...exempt, { pattern: 'scripts/audit-guards.mjs', reason: 'the auditor under test' }],
- },
- null,
- 2,
- ),
- );
+ const registry = {
+ updated: '2026-07-30',
+ summary: 'fixture',
+ stages: stages ?? [
+ { id: 'prebuild', title: 'Prebuild', when: 'x', description: 'y' },
+ { id: 'gate', title: 'Gate', when: 'x', description: 'y' },
+ { id: 'build:gcp', title: 'Deploy build', when: 'x', description: 'y' },
+ { id: 'pre-push', title: 'Pre-push', when: 'x', description: 'y' },
+ { id: 'manual', title: 'On demand', when: 'x', description: 'y' },
+ ],
+ guards: guards.map(({ __skipFile, ...g }) => g),
+ // Every fixture necessarily contains a copy of the auditor, which the
+ // reverse check would otherwise report as an unregistered guard. The
+ // real repo registers it properly instead of exempting it.
+ exempt: [...exempt, { pattern: 'scripts/audit-guards.mjs', reason: 'the auditor under test' }],
+ };
+ writeFileSync(join(dir, 'data', 'guards.json'), JSON.stringify(registry, null, 2));
+ // The auditor also checks the published copy the /guards page fetches, and
+ // requires it byte-identical to the tab-serialized registry. Without it every
+ // fixture would fail on that one note regardless of what it means to test.
+ mkdirSync(join(dir, 'public'), { recursive: true });
+ writeFileSync(join(dir, 'public', 'guards.json'), `${JSON.stringify(registry, null, '\t')}\n`);
return dir;
}