kept data: the choice at reinstall, the list, the read-only view, the load (09 decision 36); R-690 fixed
gates / gates (push) Successful in 26s

An install over an app's kept drive folder (appdata/<app> non-empty) asks the household:
"use my kept data" (a load from the newest copy of THIS drive's install, own unit or
second-drive mirror, then the template's after_load) or "start fresh" (the folder is
renamed into <drive>/kept/<app>/<date>/ with the removed app's unit; nothing deleted).
The install API answers 409 kept_data_choice until one is chosen; DeployStack refuses
too. New page Megorzott adatok / Kept data (/kept-data): Load / Look / Delete (typed
confirmation, the only deletion of kept data). FileBrowser gets a read-only source.
The drive-full warning names the kept folders. <drive>/kept is protected and outside
every backup leg.

R-690: the removed-app restore (R-487) never found a unit on a DATA drive — it asked
GetStackComposePath (true for every catalog app) and restored nextcloud with no env.
Now isStackDeployed; pinned with a production-shaped provider.

Red-proofs: audits/night-2026-09-26/E/redproofs/.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
This commit is contained in:
2026-09-25 13:32:30 +02:00
parent 5a731b45b9
commit 43e99d160c
44 changed files with 3311 additions and 37 deletions
+9 -5
View File
@@ -38,14 +38,18 @@ func (m *Manager) ListRestorePoints(stackName string) (points []RestorePoint, fo
if m.stackProvider == nil {
return nil, false
}
if _, ok := m.stackProvider.GetStackComposePath(stackName); !ok {
// R-487: a removed app whose backups were kept is not deployed, but its unit is on a drive
// and POST /backup/restore reinstalls from it. The picker used to be told 404 here while the
// restore itself worked — the list is keyed on the drive now, the way R-237 keyed the
// off-site list on the store.
// R-487: a removed app whose backups were kept is not deployed, but its unit is on a drive
// and POST /backup/restore reinstalls from it. The picker used to be told 404 here while the
// restore itself worked — the list is keyed on the drive now, the way R-237 keyed the
// off-site list on the store.
// R-690: "removed" is isStackDeployed, not GetStackComposePath — the latter is true for every
// catalog app on a box, so the picker offered 0 copies for a removed app on a data drive.
if !m.isStackDeployed(stackName) {
if u, found := m.RemovedAppUnitFor(stackName); found {
return []RestorePoint{{Time: u.Time, ShortID: restorePointShortID, Tier: 1, DriveLabel: u.DriveLabel}}, true
}
}
if _, ok := m.stackProvider.GetStackComposePath(stackName); !ok {
return nil, false
}