Review fix 2: a take-back or an install during the clean-up window keeps the copies (D72)
The due end records and the candidates were read once, before the hub was
asked, and never again before the forget. A „Mégis megtartom” or an install
while the hub answered still deleted the copies.
The window now reads the records again immediately before the forget and takes
out every id whose record is gone, changed or no longer due. From that look
until the forget has ended, a take-back is answered „not marked, or already
deleted”, never „kept”. Not covered: an install during the forget itself.
Tests seen red on f628cb5, then green; mutations in felhom.eu
documentation/audits/build-release-4-2026-11-15/A/redproof-review-2.txt.
Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
This commit is contained in:
1 parent
f628cb5082
commit
3928c3db28
5 files changed
+221
-1
No files matched your search
@@ -276,6 +276,13 @@ func (m *Manager) offsiteWindowRetention(ctx context.Context, base, env []string
|
||||
if len(endedIDs) > 0 {
|
||||
m.logger.Printf("[INFO] [offbox] clean-up window %d: %d snapshot(s) of removed apps are due and agreed by the hub — removed beside the policy's %d (D84)", w.ID, len(endedIDs), len(ids))
|
||||
}
|
||||
// THE LAST LOOK (review of 2026-11-15). The records were read before the hub was asked; the hub's answer, the dry
|
||||
// run and the guard took seconds to minutes. A take-back („Mégis megtartom”) or an install in that time deleted
|
||||
// the record — so the records are read AGAIN here, immediately before the forget, and an id whose record is gone,
|
||||
// changed or no longer due is taken out. From here until the forget has ended, a take-back for one of these apps
|
||||
// is answered „not marked, or already deleted” (KeepOffsiteCopies), never „kept”.
|
||||
endedIDs, claims = m.lastLookAtEnded(snaps, claims, endedIDs)
|
||||
defer m.endedRemovalOver()
|
||||
ids = append(ids, endedIDs...)
|
||||
if len(ids) == 0 {
|
||||
res.Outcome = "nothing"
|
||||
|
||||
Reference in new issue
Block a user