D47 / R-1269 (P2): a new install never writes into an earlier install's backup — every install has an identity (install_id), the unit records it, every unit writer asks first; another install's unit is set aside whole (backups/set-aside/<app>/<stamp>, a D25 kept copy, „Visszaállítás” + „Eltávolítás” on the restore page); a move that fails refuses the write. Red-proved. Commit only.
gates / gates (push) Successful in 1m33s

This commit is contained in:
admin committed 2026-10-25 09:27:48 +01:00
1 parent e1613aea8d
commit 02daebe9c5
30 files changed
+1990 -17

No files matched your search

+32
View File
@@ -22,6 +22,38 @@ brief 2026-10-24, Part 4 (commit only; the release rides the next normal train).
`…OnlyWhenTheAgentWaitsAndAnAppRuns`, `…QBLimitRuleSkipsAHeldLimit`, `…TheTwoAppsReadAndWriteTheirLimit`,
`TestLineTestRunOutlastsTheClientTimeout`, `TestStartUpwatchRecoversTheHoldFirst`, `TestUpwatchHoldGetsBothAgentCalls`.
### A new install never writes into an earlier install's backup (D47, R-1269, P2) — 2026-10-25, commit only
Operator ruling D47 (2026-10-25 08:38, `09` §3): a recovery unit's definition and its data are written only together,
by a backup of the same install; a unit an earlier install left is set aside whole and stays restorable. MinAgent
unchanged. Design: felhom.eu `07` §6.3 / §8.2a.
- **Measured before (9202, 0.342.0 = `e1613ae` for these files; `audits/restore-truth-2026-10-25/before/`):** Tandoor,
one account, „Mentés most", remove keeping data and backups, install again → 08:00:36 the five-minute refresh
rewrote the kept unit's `app.yaml` (checksum `cbfcb538…` → `e19d2610…`) beside the old data; the restore paired the
new password with the old data directory (`password authentication failed` ×44 app / ×23 postgres), the app stayed
`starting`, the account was gone. Cause: `captureRecoveryUnit`'s one „same definition" test is the pins (`frozen`,
`recovery_unit.go:194`); a reinstall of the same version has the same pins.
- **Every install has an identity** (`stacks.AppConfig.InstallID`, `install_id:`): minted at a fresh install and at an
import, carried by every load-then-save, taken from the unit by a restore (the app then holds that unit's data), and
minted once for an app from before D47 (`EnsureInstallID`). The unit records it in its `app.yaml`.
- **`internal/backup/unit_owner.go` — the guard in every writer:** the capture and refresh, the night database dump,
the pre-backup dump, the update's pre-backup, the volume dump, the second drive's unit copy and the stale-drive prune
ask `guardUnitWrite`/`guardUnitDir` first. A unit of another install (different ids; or, for a unit from before D47,
a carried secret that differs) is MOVED whole to `<namespace>/backups/set-aside/<app>/<UTC stamp>/` and recorded as
a kept copy (D25's record); the writer then writes the new install's own unit. A move that fails refuses the write
with an ERROR naming the app and both identities; the unit stays byte for byte. Never during that app's restore.
- **The restore page lists a set-aside unit under „Megőrzött másolatok" with „Visszaállítás"** (`POST
/backup/kept/restore`, by its record only — path inside its tree, same device + inode) beside „Eltávolítás". Remove
with „delete its backups too" deletes the app's set-aside units too (the D25 / R-1252 H9 rule).
- A put-back writes the live install's identity back (the live definition copy carries it).
- Tests (each seen failing with the guard off — `audits/restore-truth-2026-10-25/redproof/`):
`TestD47_TheSweepOrderNeverRewritesTheKeptUnit`, `…AUnitFromBeforeD47IsSetAsideWhenItsPasswordDiffers`,
`…TheSetAsideUnitRestoresWithItsOwnPassword`, `…TheWriterRefusesWhenTheUnitCannotBeSetAside`,
`…TheNightDatabaseDumpSetsTheEarlierUnitAsideFirst`, `…NoSetAsideWhileTheAppIsRestored`; the controls
`…ASameInstallBackupStillRefreshesTheUnit`, `…OwnerVerdict`; stacks `TestD47_ARestoreTakesTheUnitsInstall` (+3);
web `TestD47_RestorePageOffersRestoreOnlyForASetAsideUnit`, `…KeptUnitRestoreHandlerRefusals`.
### An export never replaces another operation's restore record (R-1253, P2; review round 2 HUNT-1 H3) — 2026-10-24 night, commit only
- **An export with „stop the app first" no longer overwrites a running restore's crash record.** The app-stop marker