diff --git a/REUSE.md b/REUSE.md index 239c4ff9..2da5265c 100644 --- a/REUSE.md +++ b/REUSE.md @@ -80,7 +80,7 @@ | `store.NoteAppList` / `AppPresences` + `offsitekeys.agreeEnded` (D72/D84, `07` §8.2f) | hub/internal/store/offsite_ended.go, hub/internal/offsitekeys/ended.go | `NoteAppList(customerID, deployed, claimed, now)`; `agreeEnded(now, presence, notices, listing, haveListing, claims)` | The hub's OWN record of when an app left a box's app list (fed by `handleReport`), and the decision which snapshot ids of ended apps a window may remove outside its cap | **The box's dates decide nothing.** An id is agreed only when its app has been absent 30 days by the hub's clock AND the hub's own listing shows the file older than that absence. `WindowCredit.CapExplains` is the cap's part, `EndedIDs` the agreed ids — a reader that explains ids by name must not also spend `Explains`. **After the review of 2026-11-15:** one window agrees to at most the cap's size from the hub's OWN count (`endedCap`/`boundEndedToCap`); a request for more than half of the store waits a week — its first sight is the hub's own row (`store.NoteLargeEndedRequest`, key `largeSetKey` = a hash of the whole app set), never a search of text a box could write; `store.NoteAppListClaims` returns never-seen apps once for the operator's warning; a claimed name that is not an app name is written nowhere (`ledgerName`). | | `notify.householdReceiptEvents` + `Dispatcher.SendEndNotice` (D84; the notice lock, `09` §3 decision 315) | hub/internal/notify/end_notice.go | register; `SendEndNotice(customerID, app, ends) (EndNoticeOutcome, why)` | The mail that tells the household about its own press (one type: `offsite_end_scheduled`). **The box's event mails nobody**: the hub sends the notice from its own state (`api.endNotices`, at every report, until the mail service accepts it) | Bypasses the household's group switches; the hub writes it from a checked app name and its OWN day. `SendEndNotice` keeps no state and tries once: only `EndNoticeSent` tells the household; the daily limit (5 per household, counted in the sent log) answers `EndNoticeLimit` — the caller tries again, it never drops. **Every new entry needs its own ruling** — pinned by `TestD84_Receipt_OpensNothingElse`, `TestNotice_*`. | | `store.NoteEndNotices` / `EndNotices` / `MarkEndNoticeTold` + `api.endNotices` (the notice lock, `07` §8.2f) | hub/internal/store/offsite_end_notice.go, hub/internal/api/end_notice.go | `NoteEndNotices(customerID, deployed, claims, tierOn, now)`; `EndNotices(customerID)`; `MarkEndNoticeTold(customerID, app, press, to, now)` | The hub's OWN record that a household (or the operator in its place) was told that an app's off-site copies will be deleted. `offsitekeys.agreeEnded` agrees only when it says „told” 30 days ago | **Written only by the hub, only after the mail service accepted the mail; never derived from the sent log or from a box's date.** `press` (the box's `removed_at`) is a key only: another value VOIDS the notice. An install, a take-back (a report that shows the tier ON and no record) and a household delete remove the row. A new condition of a deletion goes HERE, not into `notification_log`. | -| `Dispatcher.SendOperatorNow` | hub/internal/notify/end_notice.go | `SendOperatorNow(customerID, eventType, severity, message, detailsJSON) error` | An operator mail whose DELIVERY is a condition of something else: it answers only when the mail service has (nil = accepted) | Operator-only types only; no cooldown and no background retry — the caller keeps its own „told once” record and tries again. For every other operator mail use `ProcessEvent`. | +| `Dispatcher.SendOperatorNow` | hub/internal/notify/end_notice.go | `SendOperatorNow(customerID, eventType, severity, message, detailsJSON) error` | An operator mail whose DELIVERY is a condition of something else: it answers only when the mail service has (nil = accepted) | Operator-only types only; no cooldown and no background retry — the caller keeps its own „told once” record and tries again, **and bounds itself** from the sent log (`store.CountOperatorSentSince`, `OperatorSentAboutSince`: per household a day, per thing a week — `api.endNoticeToOperator`). For every other operator mail use `ProcessEvent`. | | `accesslog.New` / `Middleware` / `Mark` (v0.158.0, R-1140) | hub/internal/accesslog/accesslog.go | `Mark(ctx, kind)` | The hub's own access log (`/access-log/`, 90 days) and marking the identity KIND an auth check established | Never log a value: the path only (no query; `/bind/` and 32+-char segments redacted). A new auth path calls `Mark` with its kind. A logging failure never fails a request. | | the timed SQLite driver `sqlite-timed` + `SetSlowStatementThreshold` (v0.178.0, R-1346) | hub/internal/store/timeddriver.go | `store.New` opens it — nothing to call | Names a statement over 1 s: `[WARN] slow statement: (over 1s): ` | The SQL text only, never a bound value. Put a heavy statement's SQL in a const and pin its plan (`r1346_speed.go`, `TestR1346_HeavyStatementsUseTheirIndex`): on the hub's network disk a whole-table read is seconds to minutes. | | `(*Store).SaveOneTimeSecret` / `OffsitePassword` / `SealLegacyOffsiteSecrets` | hub/internal/store/offsite_seal.go | — | Storing / reading the sub-account password | **Sealed AES-256-GCM; no key → refused (fail-closed).** Under `go test` every store gets a fixed key (`testing.Testing()`); production needs `OFFSITE_SECRET_KEY`. Never serve the value to a box. | diff --git a/documentation/architecture/07-backup-architecture.md b/documentation/architecture/07-backup-architecture.md index cdd24a5f..5a40f755 100644 --- a/documentation/architecture/07-backup-architecture.md +++ b/documentation/architecture/07-backup-architecture.md @@ -1835,7 +1835,7 @@ minutes). **[FACT]** 9202 rc.6: an image that exits after 20 s → not started, unit back → success, copy released 3 minutes later. Tester 1 on 0.343.0: a unit restore and a set-aside restore, each „ran stably for 3m0s … the restore copy is released" (`audits/release-2026-10-26/`). -### 8.2f The off-site copies of a removed app end 30 days after „delete backup data” `[FACT — built, not released: controller `f628cb5` and hub `01a106b7` + `a63f5b2b` (after v0.182.0), 2026-11-15; NO box has run it]` (D72 and D84, `09` §3 decisions 292 and 309, R-1374 part 1; designed 2026-11-14) +### 8.2f The off-site copies of a removed app end 30 days after „delete backup data” `[FACT — built, not released: controller `f628cb5` and hub `01a106b7` + `a63f5b2b` (after v0.182.0), 2026-11-15; the notice lock and the text changes: hub `42ef25c2`, `9ef8cee1`, `c9d67309` and controller `10df99b`, 2026-11-15 evening; NO box has run it]` (D72 and D84, `09` §3 decisions 292 and 309; the notice lock and the texts, decisions 315 and 316; R-1374 part 1; designed 2026-11-14) **The ruling.** When the household removes an app and presses „delete backup data” (`remove_backups`), that app's off-site copies end 30 days later, at the next clean-up after that day — the number of a restore copy (D62). When the @@ -1876,6 +1876,7 @@ section adds one thing to that window. names and upload times) holds it, uploaded before that absence (`offsitekeys/ended.go`). A refused app is named, with the reason, in the answer, on the window's own row and on the customer page's window block; a clear disagreement raises `offsite_ended_app_refused` to the operator. The box's dates decide nothing on the hub. + **And only when the hub's own record says the household was told 30 days ago** — „No notice, no deletion”, below. For an app the hub never saw installed (removed before the hub kept this record) the hub's clock starts when the box first names the app in a pending end record (the report's `offsite.ended_apps`). 5. **Local copies are unchanged.** They are deleted at once, as before. The dialog says both. @@ -1890,13 +1891,74 @@ cap plus those. `store.WindowCreditsBetween` gives the two parts apart. itself agreed to — are explained by name and raise nothing. Every other vanished file is judged against the cap's part alone, exactly as before, and still raises `offsite_snapshots_vanished`. -**The mail (D84)** `[FACT — built, not released]`. At the press the box sends `offsite_end_scheduled`; the hub mails -it to the household's own notification address — once per press, in the household's language, whatever its group -switches say (a receipt: `notify.householdReceiptEvents`), and not to the operator. **The hub writes the mail, not the -box** (review of 2026-11-15): subject and body come from the hub's own bundle, with an app name the hub checked and -the end date it parsed from the details; the box's sentence is never mailed. A household gets at most 5 receipts in -24 hours (counted in the hub's sent log); the rest are dropped and said once a day in the hub's log. **A household with no -notification address gets no mail: the page is all it has.** A blocked household gets none either. +**No notice, no deletion — the notice lock (D84; `09` §3 decision 315, operator, 2026-11-15 evening)** +`[FACT — built, not released: hub `42ef25c2` + `c9d67309`; no box has run it, no mail has reached a real inbox]`. + +*Why.* In the first build the household's mail left once, when the box's event `offsite_end_scheduled` arrived. A +box's event is lost when the hub is away for nine seconds (R-1361); a send that failed was not tried again; a sixth +receipt in 24 hours was dropped. In each case the hub still agreed 30 days later, because the absence alone decided. +The mail D84 promises was not a condition of the deletion. Now it is. + +*The design, as built.* + +1. **The hub sends the notice itself, from its own state.** Every controller report names the box's pending end + records (`offsite.ended_apps` — while the off-site tier is switched on). The hub keeps one row per (household, + app) such a report names (`offsite_end_notices`, `store.NoteEndNotices`) and, after each report, mails every row + that is not told (`api.endNotices` → `notify.SendEndNotice`) — at that report and at later ones until the mail + service accepts the mail. Only then does the row say „told”, with the hub's time. One row per press: one notice + per press, however many reports name it. **The box's event mails nobody**; it is the operator's record only. So a + lost event, an event sent twice and an event that never comes all change nothing. +2. **The hub agrees only 30 days after the notice.** `offsitekeys.agreeEnded` now needs BOTH: the app absent from + the box's app list for 30 days by the hub's clock (as before), AND the hub's own row saying „told” at least 30 + days ago by the hub's clock. No row, a row not told, a row told later: refused, and the window's answer names the + reason. The day in the mail is the hub's own — the day of the mail + 30 days, in Budapest time — not the box's. +3. **Where „told” is kept.** In the hub's own table, written only by the hub and only after the mail service + accepted the mail. Not derived from the sent log (`notification_log` — nothing prunes a living household's rows + today, but a condition of a deletion must not rest on a log), and never from a box's word. The box's `removed_at` + is kept only as the KEY of a press: another value voids the notice; no value can make one. +4. **A take-back or an install voids the notice.** The row is deleted when a report lists the app as installed, or + when a report that shows the off-site tier ON no longer names the app (a take-back; also after the window has + run). Another press (another key) resets it. A new press needs a new notice and a new 30 days. A report that + does not show the tier (it is off) changes nothing: its silence is not a take-back. +5. **The limit per day delays; it never drops.** At most 5 notices per household in 24 hours, counted in the hub's + sent log; the sixth stays „not told” and goes at a later report. +6. **A household with no address, or a blocked one — the operator is told in its place, and that starts the 30 + days.** One mail per app (`offsite_end_notice_operator`, operator-only, sent with `SendOperatorNow`, which + answers only when the mail service has). When the household gets an address later, the hub mails the household + and **the 30 days start again from that mail**. Bounded (security review of the commit): at most 5 such operator + mails about one household in 24 hours, and the same app again no sooner than 7 days; a notice that waits for + these limits is NOT told. *Both halves are a choice — decided by CC unattended on 2026-11-15; the operator may + reverse it.* The other choices: no deletion ever for a household with no address (cost: a household that never + gave an address can never have off-site copies deleted this way), or the operator's mail stays the one that + counts when an address comes later (cost: a person who holds the login can remove the address, press, and put + the address back on day 29 — the household then reads „deleted tomorrow”). +7. **A notice that cannot go out** (the mail-hold marker, a send that fails, no mail service): nobody is told, the + row keeps the reason in the hub's own words, the next try is at a report at least one hour later, and nothing is + agreed. **After 3 days** without a notice the operator gets one line (`offsite_end_notice_stuck`, once per app, at + most 5 per household a day, not while the mail hold is on). *Why 3 days:* it is longer than any outage of the + mail service the hub has had, longer than the hold on a restored copy is meant to last, and longer than the + daily limit delays an honest household (15 apps removed at once are all told inside it) — so the line means + „this will not heal by itself”; and it is short enough that a deletion the household asked for has lost three + days, not a month, when the operator hears of it. +8. **A box that asks a window for an app it never named in a report** is refused („the hub has no record that the + household was told”) and the operator is told (`offsite_ended_app_refused`): an honest box names a pending record + in every report. +9. **The hub's database put back from a copy** that lacks the row: there is no notice. The hub mails again at the + next report and waits 30 days again. (A restored copy is started with the mail-hold marker in place — `hub/internal/mailhold` — so until the + operator releases it nobody is told and nothing is agreed.) +10. **The controller is not changed.** It already reports its pending records. An older controller reports none: + nothing is told and nothing is agreed, as before. + +*Accepted, and the operator may reverse it (not a decision):* the notice ignores the household's notification +switches; no end record on a box whose off-site target is the household's own NAS; „delete in 30 days” is offered for +every removed app with copies and no mark. + +*A limit of the built design* `[DESIGN — proposed, not built]`: the controller names its pending records only while +the off-site tier is switched ON (`OffboxStatusForReport`). A household that presses „delete backup data” while the +tier is pinned but switched off gets no notice until the tier is on again — the page shows a date, the mail comes +later, and the 30 days count from the mail. No copy is deleted meanwhile (no window runs either). To close it the +controller would report `ended_apps` also with the tier off; that changes the report's shape for a tier that is off +and needs a test on a box with an older hub. Not built; named in the build's report for the register. **Edge cases, each with its rule and its test.** @@ -1906,7 +1968,20 @@ notification address gets no mail: the page is all it has.** A blocked household | The app is installed again after the copies are gone | Nothing special: a new history starts | — | | The household kept the backups at removal | No record. The copies stay with no end. The off-site list offers „delete in 30 days” (the next row) | `TestD72_NoRecordNoDeletion`, `TestD72_RemovalWritesTheEndRecordOnlyWithDeleteBackupData` | | The household changes its mind | „Keep it after all” until the window has run; after that the page says the copies are not marked or are already deleted | `TestD72_StartAndKeepHandlers`, `TestD72_AfterTheTakeBackTheWindowRemovesNothing` | -| Two presses for the same app | One record, one mail; the date does not move | `TestD72_EndRecord_ASecondPressChangesNothing`, `TestD84_OnePressOneMail`, hub `TestD84_Receipt_OncePerPress` | +| Two presses for the same app | One record, one mail; the date does not move | `TestD72_EndRecord_ASecondPressChangesNothing`, `TestD84_OnePressOneMail`, hub `TestNotice_AReportNamesAnApp_TheHubMailsTheHouseholdOncePerPress` | +| **The notice lock's wrong cases** | | | +| The box's event never arrives, or arrives twice | The event mails nobody; the notice comes from the report | hub `TestNotice_TheBoxesEventMailsNobody`, `TestNotice_AReportNamesAnApp_…` (no event is posted in it) | +| The box names the app only in the window request, never in a report | No notice row: refused, the operator is told | hub `TestNotice_Window_TheNoticeRecordDecides` (a), `TestNotice_AgreeEnded_NoNoticeNoDeletion` | +| The hub's database is put back from a copy that lacks the notice | No row: the hub mails again and waits again | hub `TestNotice_ADatabaseWithoutTheNoticeTellsAgain` | +| The address is added after the press | The operator was told in its place; the household is mailed when the address appears, and the 30 days start again | hub `TestNotice_NoAddress_TheOperatorIsToldInItsPlace_AndAnAddressLaterRestarts` | +| Press, take-back and press again within one day | The take-back deletes the notice; the second press gets its own notice and its own 30 days | hub `TestNotice_ATakeBackOrAnInstallVoidsTheNotice`, `TestNotice_Record_WhatVoidsIt` | +| Two apps pressed in one minute | Two rows, two notices | hub `TestNotice_TwoAppsInOneMinute_TwoNotices` | +| A household deleted between the notice and the window | The notice rows go with the household; nothing is agreed, nobody is mailed | hub `TestNotice_ADeletedHouseholdHasNoNotice`, `TestNotice_Record_GoesWithTheHousehold`, `TestNotice_Window_…` (e) | +| The send fails, or the mail hold is on | Not told; tried again an hour later; told only when the mail went; one operator line after 3 days | hub `TestNotice_AFailedSendIsTriedAgainUntilItHasGone`, `TestNotice_TheMailHoldTellsNobody`, `TestNotice_StuckForThreeDays_TheOperatorGetsOneLine` | +| Seven apps removed in one day | Five notices that day, two the next; none is dropped | hub `TestNotice_TheDailyLimitDelaysAndNeverDrops` | +| Told 29 days ago; told, but absent for 10 days only | Refused: both 30 days are needed | hub `TestNotice_AgreeEnded_NoNoticeNoDeletion` | +| A box of a household with no address names presses without end | The operator gets at most 5 in-place notices a day for that household, the same app once in 7 days; the rest wait and are not told | hub `TestNotice_NoAddress_ABoxCannotFloodTheOperator` | +| A box changes the press's key in every report | The notice is reset each time: the household gets at most 5 mails a day, and nothing is ever agreed | hub `TestNotice_Record_WhatVoidsIt`, `TestNotice_TheDailyLimitDelaysAndSurvivesARestart` | | The box is off at the date, or the store cannot be reached | The next window that runs does it: the record does not age | `TestD72_EndRecord_Due` | | The off-site tier is switched off at the date | No run, no window, no call to the store; the record stays | `TestD72_TierOffAtTheDate_TheRecordWaits` | | The household is deleted or RESET before the date | Nothing to do: the account goes with all copies; the hub's app record goes with the household | hub `TestD72_AppRecordGoesWithTheHousehold` | @@ -1938,6 +2013,9 @@ notification address gets no mail: the page is all it has.** A blocked household see sizes, and the box does not send them. - *The receipt does not read the household's group switches.* D84's reason is a household whose login someone else uses; that person could switch a group off first. **The operator may reverse this.** +- *The mail leaves at the first report after the press, not at the press* (the notice lock): up to one report + interval later (15 minutes). Its day is the hub's (the mail's day + 30), so it can be one day later than the day + the page shows, and later still when the mail waited. **A limit, said plainly (rewritten after the review of 2026-11-15).** The hub cannot read a snapshot's tags (the repository is encrypted; the password never leaves the box — decision 68), and its record of which apps a box runs is @@ -1957,11 +2035,27 @@ clock, and then name snapshots of other apps under it. What bounds that now, all younger than 30 days can go this way. - A box that removes more than was agreed raises the drop alarm at the close and the vanished-files alarm at 07:10. -**What is still open:** a box that stops listing a living app is NOT told at the start (it looks exactly like an -honest removal); the hub hears of it only in the window, and then only if the request is for more than half of the -store. Under that size, such a box can remove up to the cap's size per week beside the cap, without a mail — twice -what it could remove silently before this feature (R-822's accepted limit, `09` §3 decision 166). And one window can -still take the cap AND the cap's size again; after a large request that is a week after the operator was mailed. +**What a taken-over box can still do, after the notice lock (rewritten 2026-11-15 evening).** In plain words: + +- **It cannot have anything removed in silence.** To have an app's copies agreed it must name the app in a report — + and the hub then mails the household at once: the app's name, the day, „if you did not ask for this, take it back + and change your password”. This holds for an invented app and for a living app the box stops listing. A box that + names the app only in the window request gets nothing and the operator is told. +- **Size and time, if the household does not act on the mail:** nothing for 30 days after the mail. Then at most the + size of the window's cap per weekly window, beside the cap — the cap is half of the store's snapshots (at least + 5). A request for more than half of the store waits one more week after a mail to the operator: 37 days. The + files it names must be older than the day the hub saw the app leave; the hub cannot check that they are that + app's copies (it cannot read tags). +- **The take-back goes through the box.** A household that reads the mail and presses „keep it after all” is safe + when its login was used by somebody else (the mail's case, D84). When the box itself is taken over, the box can + show „kept” and go on naming the app. The mail's last line then does not help; the operator does (the mail's + sign-off), by switching the weekly windows off for that household. **Open.** +- **A household with no address is not told; the operator is.** What happens next depends on the operator. +- **The address is the one on record at the mail.** A person who holds the login and changes the notification + address first gets the mail himself. Whether the old address is told of such a change was not checked in this + build. **Open.** +- **Noise, not loss:** a box can make the hub mail its household 5 notices a day (by changing the press's key), and + the operator 5 in-place notices and 5 „stuck” lines a day per household. Nothing is agreed while it does. **A narrowing of D84 — decided by CC unattended on 2026-11-15; the operator may reverse it.** *Question:* may one window remove every snapshot the hub agreed to for removed apps, however many? *Option A (built):* no — at most the @@ -1973,11 +2067,16 @@ list for 30 days can have the whole store removed in one window, and the first m the ruling's own reason for the allowance was that the hub's 30-day check does the cap's job; the review showed the 30-day check rests on the box's own reports, so it cannot do that job alone. -**The texts, as built — NOT published; the operator reads them before a release.** The Hungarian date carries its own -final dot (`2026. 12. 15.`), so the Hungarian sentences have no dot after it. +**The texts, as built — NOT published; the operator reads them before a release.** **One date form in every place +of this feature** (decision 316, built): Hungarian `2026. 12. 15.`, English `2026-12-15` — the controller's +`i18n.FormatDate` on the page and in the dialog, the same form made by the hub (`notify.receiptDate`) in the mail's +subject and body. The written-month form („2026. december 15.”) stood only in the first build's note; no code makes +it. The Hungarian date carries its own final dot, so the Hungarian sentences have no dot after it. Rows marked +**(316)** changed on 2026-11-15 evening. | Where | Hungarian | English | |---|---|---| +| The remove dialog, under „Mentési adatok törlése”, on a box that shows NO date (no hub off-site tier) — the older sentence, unchanged; **(316)** it is no longer shown where the next row shows | „Az éjszakai restic pillanatképek nem törölhetők egyenként — a megőrzési szabályok szerint automatikusan elavulnak.” | "The nightly restic snapshots cannot be deleted one by one — they expire automatically under the retention rules." | | The remove dialog, under „Mentési adatok törlése” | „A helyi mentések most törlődnek. A távoli másolatok még 30 napig megmaradnak. Törlésük napja: {dátum} Addig a Mentések oldalon visszavonhatod.” | "The local backups are deleted now. The off-site copies stay for 30 more days. They are deleted on: {date}. Until then you can take this back on the Backups page." | | The off-site list, the app's line (also the notice after „delete in 30 days”) | „Törlésre kijelölve. Törlés napja: {dátum}” | "Marked for deletion. Deleted on: {date}." | | The button | „Mégis megtartom” | "Keep it after all" | @@ -1987,18 +2086,25 @@ final dot (`2026. 12. 15.`), so the Hungarian sentences have no dot after it. | A removed app with no record | „Ennek az alkalmazásnak a távoli másolatai megmaradtak.” + button „Törlés 30 nap múlva” | "The off-site copies of this app were kept." + "Delete in 30 days" | | A press that is refused (the app is installed; no hub tier) | „Ennek az alkalmazásnak a távoli másolatait most nem lehet törlésre kijelölni.” | "The off-site copies of this app cannot be marked for deletion now." | | A record that could not be saved | „Nem sikerült elmenteni. Próbáld újra.” | "This could not be saved. Try again." | -| **The mail — subject** | „[Felhom] Információ: {app}: a távoli másolatok törlésre kijelölve” | "[Felhom] Information: {app}: the off-site copies are marked for deletion" | -| **The mail — body** (the HUB's own sentence, `mail.receipt.offsite_end_scheduled`, inside the hub's ordinary household mail frame: greeting, server, time, level, type, sign-off; the box's event carries the same sentence for the event list only) | „{app}: az alkalmazás távoli másolatai törlésre vannak kijelölve. Törlésük napja: {dátum} Addig a Mentések oldalon a „Mégis megtartom” gombbal visszavonhatod.” | "{app}: the off-site copies of this app are marked for deletion. They are deleted on: {date}. Until then you can take this back on the Backups page with the “Keep it after all” button." | +| **The mail — subject (316)** (`mail.receipt.offsite_end_scheduled.subject`; the receipt has its own subject, the frame's „[Felhom] Információ: …” is not used for it) | „[Felhom] {app}: a távoli másolatok törlésének napja: {dátum}” | "[Felhom] {app}: the off-site copies will be deleted on {date}" | +| **The mail — headline** (the frame's first line, `mail.event.offsite_end_scheduled`; unchanged) | „{app}: a távoli másolatok törlésre kijelölve” | "{app}: the off-site copies are marked for deletion" | +| **The mail — the message line** (the HUB's own sentence, `mail.receipt.offsite_end_scheduled`, inside the hub's ordinary household mail frame: greeting, server, time, level, type, sign-off; unchanged. The date is the hub's: the mail's day + 30) | „{app}: az alkalmazás távoli másolatai törlésre vannak kijelölve. Törlésük napja: {dátum} Addig a Mentések oldalon a „Mégis megtartom” gombbal visszavonhatod.” | "{app}: the off-site copies of this app are marked for deletion. They are deleted on: {date}. Until then you can take this back on the Backups page with the “Keep it after all” button." | +| **The mail — after the message line, a paragraph of its own (316)** (`….not_you`) | „Ha ezt nem te kérted, vond vissza a Mentések oldalon, és változtasd meg a jelszavadat.” | "If you did not ask for this, take it back on the Backups page and change your password." | +| The event list on the box (the box's own sentence, `event.offsite_end_scheduled`; unchanged, never mailed) | „{app}: az alkalmazás távoli másolatai törlésre vannak kijelölve. Törlésük napja: {dátum} Addig a Mentések oldalon a „Mégis megtartom” gombbal visszavonhatod.” | "{app}: the off-site copies of this app are marked for deletion. They are deleted on: {date}. Until then you can take this back on the Backups page with the “Keep it after all” button." | No mail to the household at the deletion: it can do nothing with it (`08` §8.1). The operator's records are -`offsite_ended_app_removed` (info, per app, not mailed) and `offsite_ended_app_refused` (warning) — `08` §6.5. +`offsite_ended_app_removed` (info, per app, not mailed), `offsite_ended_app_refused` (warning), +`offsite_end_notice_operator` and `offsite_end_notice_stuck` (warnings, mailed) — `08` §6.5. **Not measured, and what a box must show before a release:** (1) one whole run on a test box — press, record, 30 days by BOTH clocks (or a hub record back-dated by hand on a test household), window, the files gone from the provider, the 07:10 audit silent; (2) how long `prune` takes after a whole app's history goes (the largest removal a window has made is 209 snapshots, refused), and that restic 0.19.1 frees the space in the same window, inside the window's 20 minutes; (3) the mail in a real inbox, in both languages; (4) the hub's listing times against the -provider's clock for a file older than six months (the listing then shows a date with no time). +provider's clock for a file older than six months (the listing then shows a date with no time); (5) the notice lock +on a box: a press, the mail in the inbox within one report, a window before day 30 refused with the reason, a +take-back and a second press mailed again; and the remove dialog in a browser on a box with and without the hub's +off-site tier (the suite reads the script's two branches; no browser has run it). ### 8.2c Decisions in code that no document recorded [DESIGN — confirmed by the operator 2026-10-25 (D44 = all picks, R-1265)] diff --git a/documentation/architecture/08-alarm-ladder.md b/documentation/architecture/08-alarm-ladder.md index 244dc680..863a8036 100644 --- a/documentation/architecture/08-alarm-ladder.md +++ b/documentation/architecture/08-alarm-ladder.md @@ -470,16 +470,20 @@ own records. What that adds here: | Event | Severity | Who | When | |---|---|---|---| -| `offsite_end_scheduled` (from the box) | info | **the household** — a receipt: one mail per press to its own notification address, whatever its group switches say; never the operator (`notify.householdReceiptEvents`) | the household pressed „delete backup data” at a removal, or „delete in 30 days” on the restore page | +| `offsite_end_scheduled` (from the box) | info | recorded, **mailed to nobody** (the notice lock, `09` §3 decision 315): the operator's record of the press | the household pressed „delete backup data” at a removal, or „delete in 30 days” on the restore page | +| the household's notice (hub; no event — logged in the sent log as `offsite_end_scheduled`) | — | **the household** — one mail per press to its own notification address, whatever its group switches say; never the operator (`notify.SendEndNotice`). Sent by the hub from the box's REPORT, at every report until the mail service accepts it; at most 5 per household in 24 hours (the rest go later) | a report first names the app in a pending end record. The hub agrees to the deletion no earlier than 30 days after this mail | +| `offsite_end_notice_operator` (hub; decision 315) | warning, **mailed** (sent at once, the answer of the mail service is awaited) | operator-only, once per app; at most 5 per household in 24 hours, the same app once in 7 days | the household has no notification address, or is blocked: this mail is the notice in its place and starts the 30 days. An address added later: the household is mailed and the 30 days start again | +| `offsite_end_notice_stuck` (hub; decision 315) | warning, **mailed** | operator-only, once per app (details `subject`); at most 5 per household in 24 hours; not while the mail hold is on | a notice has told nobody for 3 days (the mail hold, a failing send, the daily limit). Nothing of that app is removed meanwhile | | `offsite_ended_app_removed` (hub) | info | operator-only, recorded, not mailed | a window removed an app's agreed snapshots — one per app, with the count | | `offsite_end_claim_unseen` (hub; review of 2026-11-15) | warning, **mailed** | operator-only, once per household and app, at most 8 per household | a box first names, in a pending end record, an app the hub never saw in its app list — 30 days before the hub could agree to anything. The text names the household, the app and the day | | `offsite_ended_large_agreement` (hub; review of 2026-11-15) | warning, **mailed** | operator-only, once per app set | a window was asked to remove more than half of the store's snapshots for removed apps. That window removes none of them; a window a week later does, at most the cap's size | -| `offsite_ended_app_refused` (hub) | warning | operator-only, once per app (details `subject`) | a box asked for an app the hub's records clearly do not show ended: the app is in its app list, or absent for less than 29 days. A box that asks less than a day early is refused quietly | +| `offsite_ended_app_refused` (hub) | warning | operator-only, once per app (details `subject`) | a box asked for an app the hub's records clearly do not show ended: the app is in its app list, or absent for less than 29 days — or (decision 315) no report of the box ever named it in a pending end record. A box that asks less than a day early, or whose notice is not 30 days old yet, is refused quietly | The count detector above and the 07:10 listing check (`offsite_snapshots_vanished`) both know the allowance: a window explains its cap's part as before, and — by name — the ids the hub agreed to for ended apps. A file that vanished for any other reason raises exactly as before. The household gets NO mail at the deletion (§8.1: it can act on none). -A household with no notification address gets no receipt: the page is all it has. +A household with no notification address gets no notice of its own: the operator is told in its place +(`offsite_end_notice_operator`). **No notice, no deletion** — the rule and its wrong cases are in `07` §8.2f. ## 7. The intent test [DESIGN, R-386 — CLOSED controller v0.223.0] @@ -567,9 +571,10 @@ app-mail settings).* | **2. „Az alkalmazásaim"** — your apps | `app_stopped_unhealthy`, `app_start_failed`, `app_update_held`, `app_update_undone` | mostly us; the household may want to know an app is down | | **3. „Amit mi intézünk"** — what we handle | `backup_failed`, `db_dump_failed`, `backup_integrity_failed`, `crossdrive_failed`, `expected_backup_missed`, `expected_dbdump_missed`, `node_down`, `health_critical`, `health_recovered` | us (the operator always gets these, with the detail) | -**One mail outside the groups (D84, `09` §3 decision 309)** `[FACT — built, not released]`: the receipt -`offsite_end_scheduled` (§6.5) is not a detector and belongs to no group — it confirms the household's own press, and -a switch must not be able to silence it. It is the only such type; a second one needs its own ruling. +**One mail outside the groups (D84, `09` §3 decision 309)** `[FACT — built, not released]`: the notice about +„delete backup data” (§6.5; sent by the hub itself since decision 315, logged as `offsite_end_scheduled`) is not a +detector and belongs to no group — it tells the household about its own press, and a switch must not be able to +silence it. It is the only such type; a second one needs its own ruling. **Options:** diff --git a/documentation/audits/build-release-4b-2026-11-15/B/redproof-texts-controller.txt b/documentation/audits/build-release-4b-2026-11-15/B/redproof-texts-controller.txt new file mode 100644 index 00000000..507bb0c1 --- /dev/null +++ b/documentation/audits/build-release-4b-2026-11-15/B/redproof-texts-controller.txt @@ -0,0 +1,19 @@ +== MUTATION: the older sentence is shown on every box again (beside the new line) + RED on the mutant, GREEN on the real file + --- FAIL: TestD72_TheRemoveDialogShowsTheOlderSentenceOnlyWithoutTheDate (0.12s) + offsite_ends_test.go:326: [hu] the older sentence is on the page 2 times, want once (inside the no-date branch) + offsite_ends_test.go:326: [en] the older sentence is on the page 2 times, want once (inside the no-date branch) +== MUTATION: the older sentence is shown on no box + RED on the mutant, GREEN on the real file + --- FAIL: TestD72_TheRemoveDialogShowsTheOlderSentenceOnlyWithoutTheDate (0.12s) + offsite_ends_test.go:322: [en] WITHOUT a date the dialog must show the older sentence and not the new line: + offsite_ends_test.go:326: [en] the older sentence is on the page 0 times, want once (inside the no-date branch) + offsite_ends_test.go:322: [hu] WITHOUT a date the dialog must show the older sentence and not the new line: +== MUTATION: the two branches are swapped + RED on the mutant, GREEN on the real file + --- FAIL: TestD72_TheRemoveDialogShowsTheOlderSentenceOnlyWithoutTheDate (0.16s) + offsite_ends_test.go:319: [hu] WITH a date the dialog must show the new line and not the older sentence: + offsite_ends_test.go:322: [hu] WITHOUT a date the dialog must show the older sentence and not the new line: + offsite_ends_test.go:326: [hu] the older sentence is on the page 2 times, want once (inside the no-date branch) + +3 mutations, 0 not a red-proof