The off-site copies of a removed app end 30 days after „delete backup data” — the box's half (felhom.eu R-1374 part 1; D72, D84)
gates / gates (push) Successful in 41s

Built, not released; no box has run it. felhom.eu `07-backup-architecture.md` §8.2f.
It does nothing without a hub that knows it: an older hub agrees to no id.

- The record: settings `offsite_ends` {app, removed_at, ends_at}. One writer
  (backup.StartOffsiteEnd), called by a removal only with „delete backup data”
  and by „Törlés 30 nap múlva” on the restore page. A second press changes
  nothing. No record, no deletion. Only on the hub-provisioned tier.
- The date is on the remove dialog before the press; the restore page shows
  „Törlésre kijelölve …” with „Mégis megtartom”, and one history line per
  carried-out end. An install of the same app deletes the record.
- The weekly window: after the guard has passed the policy's plan under the cap
  as before, it adds the snapshots whose app tags are ALL due records, that the
  hub agreed to and the box named in the same request; the result names them
  apart (removed_for_ended_apps). `_shares`, the box's own stacks and an
  installed app are never due.
- The report carries the pending records; the household gets one mail per
  press (offsite_end_scheduled), in both languages.

MinAgent unchanged (0.158.1). 143 parity fixtures gained the dialog's one new
script line (patched, not regenerated); one new parity case.
Tests TestD72_*, TestD84_*; 56 mutations seen red
(felhom.eu documentation/audits/build-release-4-2026-11-15/A/redproof-ctrl-*.txt).

Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
This commit is contained in:
admin committed 2026-11-15 14:09:47 +01:00
1 parent 591195fadd
commit f628cb5082
177 files changed
+3705 -164

No files matched your search

+31
View File
@@ -1604,6 +1604,37 @@ func (n *Notifier) NotifyRestoreCopyDeleted(d RestoreCopyDeletedDetails) {
n.pushEventBoth("restore_copy_deleted", "info", msg, "", d)
}
// OffsiteEndScheduledDetails is offsite_end_scheduled's record. Subject is the press's own key (app + the record's
// time): the hub mails once per subject, so two apps removed in one hour are two mails and one press delivered twice
// is one. StackName is what the hub's mail headline names the app from.
type OffsiteEndScheduledDetails struct {
StackName string `json:"stack_name"`
RemovedAt string `json:"removed_at"` // RFC 3339, UTC
EndsAt string `json:"ends_at"` // RFC 3339, UTC
Subject string `json:"subject"`
}
// NotifyOffsiteEndScheduled (D84, `09` §3 decision 309; `07` §8.2f): the household pressed „delete backup data” for
// an app — its off-site copies end on endsOn. ONE mail per press to the household's own address, naming the app, the
// day and the way back; a receipt on the hub (never switched off by a group, never mailed to the operator). `info`:
// nothing is wrong. The day is written in each language's own date form, so both sentences are rendered here.
// Pinned by TestD84_OffsiteEndScheduledEvent.
func (n *Notifier) NotifyOffsiteEndScheduled(app, removedAt, endsAt string, endsOn time.Time) {
const key = "event.offsite_end_scheduled"
d := OffsiteEndScheduledDetails{StackName: app, RemovedAt: removedAt, EndsAt: endsAt, Subject: app + "|" + removedAt}
b, err := i18n.Shared()
if err != nil {
n.logger.Printf("[ERROR] NotifyOffsiteEndScheduled: bundle unavailable: %v", err)
n.pushEventBoth("offsite_end_scheduled", "info", key, "", d)
return
}
household := ""
if lang := n.boxLang(); lang != i18n.Default {
household = b.Msgf(lang, key, app, i18n.FormatDate(lang, endsOn))
}
n.pushEventBoth("offsite_end_scheduled", "info", b.Msgf(i18n.Default, key, app, i18n.FormatDate(i18n.Default, endsOn)), household, d)
}
// healthSeverity is the event severity a health status would be sent at (R-647): the disabled path
// names what it drops, and "warn" is a health STATUS, not a severity the hub knows.
func healthSeverity(status string) string {