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([issue-10127]): pin preserved restore authority paths

[._.]/ Adam Eivyb25fac56dc78
diff --git a/server/services/backup.js b/server/services/backup.js
index 9e705da048..65f2e76a47 100644
--- a/server/services/backup.js
+++ b/server/services/backup.js
@@ -1509,7 +1509,7 @@ export async function restoreSnapshot(destPath, snapshotId, { dryRun = true, sub
// never promises a restore that execution would silently skip.
if (restoreScopeIsPreservedFile(subdirFilter)) {
throw new ServerError(
- 'Machine-local authority and recovery records (database-authority.json, peer-execution-authority.json, peer-execution-recovery.jsonl and workflow-maintenance) are never restored from a snapshot. Restore application records with a data or database restore; existing local authority and unresolved owners must be reconciled on this machine (see docs/STORAGE.md).',
+ 'These machine-local authority and recovery records (database-authority.json, peer-execution-authority.json, peer-execution-recovery.jsonl and workflow-maintenance) are never restored from a snapshot. Restore application records with a data or database restore; existing local authority and unresolved owners must be reconciled on this machine (see docs/STORAGE.md).',
{ status: 400, code: 'BACKUP_RESTORE_MACHINE_LOCAL' },
);
}
diff --git a/server/services/backup.test.js b/server/services/backup.test.js
index 4a40cd7e76..1faf139afe 100644
--- a/server/services/backup.test.js
+++ b/server/services/backup.test.js
@@ -3041,6 +3041,9 @@ describe('restoreSnapshot snapshotId, filter flags, and settings re-sync', () =>
'--exclude=._*',
// Machine-local admission state is never installed by a restore (#10064).
'--exclude=/[dD][aA][tT][aA][bB][aA][sS][eE]-[aA][uU][tT][hH][oO][rR][iI][tT][yY].[jJ][sS][oO][nN]',
+ '--exclude=/[pP][eE][eE][rR]-[eE][xX][eE][cC][uU][tT][iI][oO][nN]-[aA][uU][tT][hH][oO][rR][iI][tT][yY].[jJ][sS][oO][nN]',
+ '--exclude=/[pP][eE][eE][rR]-[eE][xX][eE][cC][uU][tT][iI][oO][nN]-[rR][eE][cC][oO][vV][eE][rR][yY].[jJ][sS][oO][nN][lL]',
+ '--exclude=/[wW][oO][rR][kK][fF][lL][oO][wW]-[mM][aA][iI][nN][tT][eE][nN][aA][nN][cC][eE]',
'--dry-run',
// Leading `/` is load-bearing: rsync matches an unanchored pattern
// against the end of every path, so `brain/***` would also restore
@@ -3067,6 +3070,9 @@ describe('restoreSnapshot snapshotId, filter flags, and settings re-sync', () =>
'--exclude=desktop.ini',
'--exclude=._*',
'--exclude=/[dD][aA][tT][aA][bB][aA][sS][eE]-[aA][uU][tT][hH][oO][rR][iI][tT][yY].[jJ][sS][oO][nN]',
+ '--exclude=/[pP][eE][eE][rR]-[eE][xX][eE][cC][uU][tT][iI][oO][nN]-[aA][uU][tT][hH][oO][rR][iI][tT][yY].[jJ][sS][oO][nN]',
+ '--exclude=/[pP][eE][eE][rR]-[eE][xX][eE][cC][uU][tT][iI][oO][nN]-[rR][eE][cC][oO][vV][eE][rR][yY].[jJ][sS][oO][nN][lL]',
+ '--exclude=/[wW][oO][rR][kK][fF][lL][oO][wW]-[mM][aA][iI][nN][tT][eE][nN][aA][nN][cC][eE]',
]);
});