Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
address review (codex): make variant-rejection test order-independent
Adam Eivy799b01ee6452
diff --git a/server/routes/avatar.test.js b/server/routes/avatar.test.jsindex 7abadf31b5..042ede292c 100644--- a/server/routes/avatar.test.js+++ b/server/routes/avatar.test.js@@ -100,6 +100,10 @@ describe('avatar routes', () => {it('rejects path-traversal / illegal variant names with 404', async () => {existsSync.mockReturnValue(true);+ // Stub the stream so the empty-string fallback (which hits the default+ // model.glb GET success path) is deterministic in isolation — don't rely+ // on a prior test's mockReturnValue leaking through vi.clearAllMocks().+ createReadStream.mockReturnValue(Readable.from([Buffer.from('DEFAULT-GLB')]));for (const bad of ['../secret', 'a/b', 'foo.glb', 'UP', '']) {const res = await request(buildApp()).get(`/api/avatar/model.glb?variant=${encodeURIComponent(bad)}`);// Empty string falls back to default model.glb (200); the rest are 404.