hub (unreleased): a deleted box or household leaves no rows in the tables that had no delete; the delete journal stays (R-1376, D73)
gates / gates (push) Successful in 2m4s

Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
This commit is contained in:
admin committed 2026-11-14 18:32:34 +01:00
1 parent 0ce752a370
commit 73d99d06c5
12 files changed
+440 -5

No files matched your search

@@ -437,6 +437,32 @@ repository's fake provider (`hetznerapi.Fake`); 9 mutations seen red, one of the
added (`audits/night-build-2026-11-14/B/redproof-hub-offsite-record.txt`).
### 14.2 What a deleted box or household leaves in the hub [FACT — built, not released: hub `main` after v0.181.0, 2026-11-14; D73, `09` §3 decision 293, R-1376]
The endings list found thirteen hub tables with no delete statement anywhere. Seven of them hold rows that name a box
or a household. The ruling: a delete removes them, with one exception — the delete journal.
| Table | Named by | Goes when | How |
|---|---|---|---|
| `os_host_settings`, `os_reports`, `os_kernel_notices` | the box | the box is deleted | `store.DeleteHost`, in its one transaction |
| the hub's own alarm marks that name the box (`hub_settings`, `os_alarm:<kind>:<box>…`) | the box | the box is deleted | the same transaction; matched on the whole id between colons, so a box whose id only starts with this id keeps its marks |
| `offsite_keys`, `offsite_windows`, `offsite_abandon_requests` | the household | the household is deleted (the purge leg, after the outside legs) | `store.PurgeCustomerResidue`; counted in the delete dialog's residue |
| `operator_actions` (the operator's own action log) | the household | **one year after the deletion**, with `events` and `notification_log` | `store.PruneDeletedCustomerAudit`. *Decided by CC unattended — the operator may reverse:* it is an audit record of the same kind as the other two, and the one-year rule (decision 181) is the design's rule for those; the other option, at once, loses „who did what” on the day of the deletion |
| **`host_deletions`, `customer_resets`** — the delete journal | both | **never** | the ruling's one exception: an id and timestamps, no personal data. The privacy text must say so (proposed, not published) |
**Rows left by boxes and households deleted before this release** (Peti's box, the test boxes of 2026-11): the daily
prune runs `store.PurgeOrphanRows` — the six tables of the first and third rows, for a box with no `hosts` row and for
a household with neither a config row nor a box. A household in the middle of its delete (boxes gone, config still
there) and a „ghost” that still has a box lose nothing. It finds something once.
**Not in this:** the six tables that name no box or household (`api_tokens`, `os_candidates`, `os_releases`,
`r172_probe` and the two journals). The update reports of a LIVE box still grow with no end: an age limit there needs
its own design, because the kernel lane reads a box's old reports to know which kernel it must never offer again.
**Not proven:** on a deployed hub; no hub database was read. Tests on the real store with look-alike ids
(`TestD73_*`), 16 mutations seen red (`audits/night-build-2026-11-14/B/redproof-hub-d73.txt`).
## 15. Customer e-mails — what the hub writes to a household [hub v0.118.0, R-558]
**The section this document did not have.** The hub composes every sentence a household reads before