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

fix: normalize backup restore path assertion

[._.]/ Adam Eivy9b815c612620
diff --git a/server/services/backup.test.js b/server/services/backup.test.js
index 666cfbf6e2..2c0a97a0ba 100644
--- a/server/services/backup.test.js
+++ b/server/services/backup.test.js
@@ -79,7 +79,7 @@ vi.mock('fs/promises', async (importOriginal) => {
import { checkHealth, getServerMajorVersion } from '../lib/db.js';
import { getBackendName } from './memoryBackend.js';
-import { join } from 'path';
+import { join, resolve } from 'path';
import { PATHS } from '../lib/fileUtils.js';
import * as fs from 'fs/promises';
// Partial mock of the settings service: only reloadSettings is overridden, so a
@@ -1062,7 +1062,7 @@ describe('restoreSnapshot snapshotId, filter flags, and settings re-sync', () =>
it('builds the exact include/exclude chain for a valid subdirFilter', async () => {
await runRestore('/dest', 'snap-1', { dryRun: true, subdirFilter: 'brain' });
- const srcDir = join('/dest', 'snapshots', machineHost, 'snap-1', 'data');
+ const srcDir = resolve('/dest', 'snapshots', machineHost, 'snap-1', 'data');
// Asserted as an exact array (not arrayContaining): the ORDER matters to
// rsync — `--exclude=*` must come last, after both includes, or the
// targeted restore silently degrades into a full-tree restore.