fix restore breaking lifecycle stuff

This commit is contained in:
legop3
2026-09-15 14:39:17 -04:00
parent 73255831f1
commit 7539898f98
3 changed files with 9 additions and 2 deletions
@@ -35,7 +35,11 @@ function listActiveDataEntries({ includeRuntime = true } = {}) {
}
function removeActiveData() {
for (const name of listActiveDataEntries()) {
// Runtime contains disposable work owned by active companion processes as
// well as the lifecycle controller's status directory. It is deliberately
// absent from backup archives, so restore must leave it untouched instead
// of trying to delete root-owned controller state from the non-root server.
for (const name of listActiveDataEntries({ includeRuntime: false })) {
fs.rmSync(path.join(resolveDataDir(), name), { recursive: true, force: true });
}
}