Skip to content

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

test(backup): match sprite publication seams with native paths

[._.]/ Adam Eivyc4412a684e0b
diff --git a/server/services/sprites/atlas.test.js b/server/services/sprites/atlas.test.js
index 68457cd312..1245011168 100644
--- a/server/services/sprites/atlas.test.js
+++ b/server/services/sprites/atlas.test.js
@@ -994,7 +994,7 @@ describe('atlas backup publication', () => {
it('drains atlas bytes through the real current-pointer write', async () => {
const id = await finalizedAmbientPlace();
const reached = backupDeferred(); const commit = backupDeferred();
- beforeAssetWrite = async path => { if (path.endsWith('runtime/current.json')) { reached.resolve(); await commit.promise; } };
+ beforeAssetWrite = async path => { if (path === join(TEST_ROOT, 'sprites', id, 'runtime', 'current.json')) { reached.resolve(); await commit.promise; } };
const work = compileAtlas(id);
await Promise.race([reached.promise, work.then(() => { throw new Error('missed pointer seam'); })]);
let ready = false; const cut = acquireBackupSnapshotCut().then(release => { ready = true; return release; });
diff --git a/server/services/sprites/walkTrims.test.js b/server/services/sprites/walkTrims.test.js
index 6647dac911..f9668e4b56 100644
--- a/server/services/sprites/walkTrims.test.js
+++ b/server/services/sprites/walkTrims.test.js
@@ -8,7 +8,7 @@
import { describe, it, expect, vi, beforeEach, afterAll } from 'vitest';
import { mkdtempSync, rmSync } from 'fs';
import { tmpdir } from 'os';
-import { join } from 'path';
+import { dirname, join } from 'path';
import sharp from 'sharp';
import { writeFile, mkdir, readFile, readdir } from 'fs/promises';
@@ -351,7 +351,7 @@ describe('trim backup publication', () => {
it('drains the real strip and GIF writes through their manifest commit', async () => {
const id = await characterWithRun(newId());
const reached = backupDeferred(); const commit = backupDeferred();
- beforeAssetWrite = async path => { if (path.includes('/trims/') && path.endsWith('.json')) { reached.resolve(); await commit.promise; } };
+ beforeAssetWrite = async path => { if (dirname(path) === join(TEST_ROOT, 'sprites', id, 'walk', 'trims') && path.endsWith('.json')) { reached.resolve(); await commit.promise; } };
const work = saveLoopTrim(id, { runId: RUN_ID, enabledColumns: [0, 1] });
await Promise.race([reached.promise, work.then(() => { throw new Error('missed trim seam'); })]);
let ready = false; const cut = acquireBackupSnapshotCut().then(release => { ready = true; return release; });