docs: two designs, proposed and not built — the off-site copies of a removed app end after 30 days (D72), the installer below 200 GB (D75); hub: the account record never reaches the box's config
gates / gates (push) Successful in 2m9s
gates / gates (push) Successful in 2m9s
Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
This commit is contained in:
1 parent
73d99d06c5
commit
a044eb8c16
7 files changed
+182
-3
No files matched your search
@@ -1835,6 +1835,89 @@ 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” `[DESIGN — proposed, not built]` (D72, `09` §3 decision 292, R-1374 part 1; written 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
|
||||
household keeps the app's backups, the off-site copies stay; no end is named for them, by ruling. The page must show
|
||||
the end date BEFORE anything is deleted.
|
||||
|
||||
**Today (read in source, 2026-11-14).** „Delete backup data” deletes the unit, every second-drive mirror and the
|
||||
app's backup preferences at once, and never touches an off-site snapshot (R-474). The weekly clean-up runs
|
||||
`forget --group-by host,tags` with keep 7 daily / 4 weekly / 6 monthly per (host, app tag) — and an app that is gone
|
||||
makes no new snapshots, so its group keeps its last ones for ever (`backup/offbox_window.go:80-82`). Every off-site
|
||||
snapshot carries the marker tag `felhom-offbox` and one tag per app it belongs to (`offbox_inventory.go:64`). The box
|
||||
can delete off-site only inside the weekly window the hub opens, by snapshot id, behind the guard and under the
|
||||
window's cap (decisions 68–69).
|
||||
|
||||
**The design, in five parts.**
|
||||
|
||||
1. **The record.** At a removal with „delete backup data” the controller writes an *off-site end record* for the app:
|
||||
`{app, removed_at, ends_at = removed_at + 30 days}`, in its settings (it survives a controller restart). No record
|
||||
= no deletion, ever. A guest rebuild loses the record: the copies then stay (the safe direction).
|
||||
2. **The household sees the date before it presses, and can take it back.** The remove dialog names the date under
|
||||
the tick box. Until the copies are gone, the off-site list on the Backups page (which is keyed on the store, not on
|
||||
what is installed — R-237) shows the app with „marked for deletion: <date>” and one button to keep it after all;
|
||||
the button deletes the record. Nothing else in the product starts or shortens the clock.
|
||||
3. **The deletion rides the weekly window, nothing else.** At the first window on or after `ends_at`, the box adds to
|
||||
the window's plan the ids of the snapshots **whose app tags are all ended apps** (a snapshot that also belongs to
|
||||
a living app stays until that app ends too). The removal is `forget <ids>` and the window's own `prune`, the calls
|
||||
the window makes today. The window's result names them apart (`removed_for_ended_apps`), so the hub's 07:10 audit
|
||||
explains the vanished files and raises nothing.
|
||||
4. **The hub agrees first — the box cannot use this to delete a living app's history.** The box reports its pending
|
||||
end records. The hub allows an app in a window only when ITS OWN records agree: the app has been absent from that
|
||||
box's reported app list for 30 days by the hub's clock (not the box's). A box that claims an end the hub cannot
|
||||
see gets the app refused, and the window says so. This keeps decision 68's custody: a taken-over box gains no new
|
||||
way to remove copies.
|
||||
5. **Local copies are unchanged.** They are deleted at once, as today. The text says both.
|
||||
|
||||
**Edge cases, each with its rule.**
|
||||
|
||||
| Case | Rule | Why |
|
||||
|---|---|---|
|
||||
| The app is installed again before the date | The install deletes the end record. The old copies are restore sources again („use my kept data”) | the household uses the app; deleting its history a few days later would be a surprise |
|
||||
| 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 ruling: it follows the household's own choice |
|
||||
| The household changes its mind | „Keep it after all” until the window has run; after that the copies are gone and the page says so | a deletion is not undoable off-site |
|
||||
| The box is off at the date, or the off-site store cannot be reached | The next window that runs does it | the record does not age |
|
||||
| The off-site tier is switched off before the date | The record stays and does nothing; if the tier comes back, the next window does it | no call to a store that is off |
|
||||
| The household is deleted or RESET before the date | Nothing to do: the account goes with all copies | `05` §14.1 |
|
||||
| A snapshot carries two apps' tags | It stays until BOTH have ended | a living app's copy is never removed by another app's end |
|
||||
| The `_shares` pseudo-app and the infrastructure stacks | Never eligible | they are not apps a household removes |
|
||||
| The window's cap (half the store; R-1294) | **Open — a decision:** the ended apps' snapshots count toward the cap, or have their own allowance | see below |
|
||||
| The box's clock is wrong | The hub's clock decides (part 4) | R-1384 |
|
||||
| An app removed with „delete backup data” BEFORE this is built | No record exists, so nothing is deleted. The off-site list shows the app with a button „delete in 30 days”: the household starts the clock itself | never a deletion the household was not told about |
|
||||
| The guard refuses the window (a future-dated snapshot, a young removal) | The ended apps wait with everything else | one guard, no second path |
|
||||
| The app's name is used by another catalog app later | The record is keyed on the app name AND `removed_at`; an install deletes it (first row) | same tag, new owner |
|
||||
|
||||
**What it costs if nothing is built:** the off-site copies of every removed app stay for ever; the paid space only
|
||||
grows; the household that pressed „delete backup data” is told a thing that is not true off-site.
|
||||
|
||||
**The open decision (for the operator).** Do the ended apps' snapshots count toward the window's weekly cap?
|
||||
*CC's pick: no — their own allowance, only for ids the hub agreed to (part 4).* Why: the cap exists to stop a
|
||||
taken-over box from deleting a living history fast; the hub's own 30-day check does that job for this path, and under
|
||||
the cap a household that removes one big app could stop every clean-up for weeks (R-1294's shape). The other option —
|
||||
they count — needs no new rule, and costs a refused window, then the operator's one-shot grant, at each large removal.
|
||||
|
||||
**The texts — a proposal, NOT published.** No suffix on the date, so one sentence serves every date.
|
||||
|
||||
| Where | Hungarian | English |
|
||||
|---|---|---|
|
||||
| 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 | „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" |
|
||||
| After the button | „A távoli másolatok megmaradnak.” | "The off-site copies are kept." |
|
||||
| After the deletion, in the list's history line | „A távoli másolatok törölve: {dátum}.” | "The off-site copies were deleted on {date}." |
|
||||
| An app removed before this existed | „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" |
|
||||
|
||||
No mail to the household at the deletion: it can do nothing with it (`08` §8.1). One operator-only event per app
|
||||
(`offsite_ended_app_removed`: app, snapshots, bytes).
|
||||
|
||||
**Not measured, and what must be measured before a build:** nothing in this design is a new mechanism on the box —
|
||||
the window removes by id today. To measure in the build: 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.
|
||||
|
||||
### 8.2c Decisions in code that no document recorded [DESIGN — confirmed by the operator 2026-10-25 (D44 = all picks, R-1265)]
|
||||
|
||||
Read at `file:line` on `main` (controller `321df1f`, hub `44d19042`) by the main session:
|
||||
|
||||
@@ -412,9 +412,58 @@ below 200 GB — refuse, or warn (R-1370). demo-hp (128 GB) stays as a test box.
|
||||
| Helper images carry no version; the guest's journal has no stated cap; off-site restores have no limit | R-1372 |
|
||||
| Old kernels: the clean-up is built for ring-0 boxes (agent v0.174.0); a ring-1 box still keeps every kernel | `11-os-updates.md` §5.11.1 |
|
||||
| The parts of the host disk with no limit and no cleaner (H4, H5, H6, H13) | R-1087, R-1368 |
|
||||
| The smallest disk is ruled (200 GB, `09` §3 decision 295). Nothing enforces it: what the installer does below 200 GB (refuse, or warn) is open | R-1370 |
|
||||
| The smallest disk is ruled (200 GB, `09` §3 decision 295). Nothing enforces it: what the installer does below 200 GB is a written design with a pick (refuse, with one flag for the operator) — §14.5; it waits for the operator's yes | R-1370 |
|
||||
| What to do by hand when a disk is full | `runbooks/disk-full.md` (R-1369) |
|
||||
|
||||
### 14.5 What the installer does on a system disk below 200 GB `[DESIGN — proposed, not built]` (the open point of D75, `09` §3 decision 295, R-1370; written 2026-11-14)
|
||||
|
||||
**The ruling.** The smallest system disk is 200 GB, with or without a backup drive. Open: what the installer does
|
||||
below it — refuse, or warn.
|
||||
|
||||
**Today (read in source, 2026-11-14).** The installer reads the free space of the thin pool and WARNS below 120 GiB
|
||||
(`RECOMMENDED_MIN_LVM_GIB`, „a recommendation, not a floor”; R-130); the install goes on. It reads no disk size.
|
||||
A 75 GiB box installed fully on 2026-07-03.
|
||||
|
||||
**What „the system disk” is, and how its size is read.** The disk that holds the `pve` volume group — the one the
|
||||
Proxmox installer wrote. Its size is a kernel fact (`/sys/block/<disk>/size`, in 512-byte sectors), read before
|
||||
anything is changed. A disk sold as „200 GB” has 200,049,647,616 bytes by the makers' common formula; a virtual disk
|
||||
made as „200G” has 200 GiB. So the line is **200 × 10⁹ bytes**: both pass, a 128 GB or 180 GB disk does not. NOT
|
||||
MEASURED: no disk's sector count was read for this design; the three test boxes' disks are 128, 200 and 512 GB by
|
||||
their labels (`audits/space-list-2026-11-10/`).
|
||||
|
||||
**The two options.**
|
||||
|
||||
| | A — refuse (CC's pick) | B — warn |
|
||||
|---|---|---|
|
||||
| What the household sees | The install stops before it changes anything: „This machine's system disk is 128 GB. Felhom needs 200 GB.” | The install goes on; one line in the installer's output, and one line on the hub's page for the box |
|
||||
| What it protects | The promise is one number, and it is true for every box in a household | Nothing by itself: on the public image the installer runs with nobody watching, so a warning in its output is read by nobody |
|
||||
| What it costs | A household with a 128 GB machine cannot join. That is the ruling's own cost | A 128 GB box gets a pool of 54 GiB for a guest that was promised 82 GiB (`16` §14.3); the guest's own space guards read the promise, so only the hub's thin-pool alarm stands before a full pool |
|
||||
| The way round | One named flag for the operator, `--accept-small-disk`, that prints the cost and records it (`small_disk: true` in the install state and on the hub) | none needed |
|
||||
|
||||
**CC's pick: A, with the flag.** The reasons: the ruling chose one number so that it can be promised; a warning that
|
||||
nobody reads keeps no promise; and the cost of B is paid by the household months later, as a box that stops its local
|
||||
copies. The flag keeps demo-hp (128 GB, a test box by the ruling) and a reinstall of an existing small box possible —
|
||||
by a person who was told.
|
||||
|
||||
**Edge cases, each with its rule.**
|
||||
|
||||
| Case | Rule |
|
||||
|---|---|
|
||||
| A BYO host (the owner's own Proxmox) | **Warn only, never refuse.** The disk layout is the owner's; there may be no `pve` volume group to read. The line names the 200 GB |
|
||||
| A reinstall of a box that was accepted earlier | The same rule as a new install. The operator's flag is the way |
|
||||
| The size cannot be read (no `pve` group, an unusual layout, a RAID) | Appliance: refuse with „cannot read the system disk's size” and name the flag. A refusal that can be explained is better than an install on an unknown disk |
|
||||
| Two disks: a small system disk and a large second one | The rule reads the SYSTEM disk. The large disk becomes the internal place or a drive; it does not make the system disk larger |
|
||||
| Exactly 200 GB by the label | Passes (the line is 200 × 10⁹ bytes) |
|
||||
| A virtual machine (the OMV and test installs) | The same rule on the virtual disk; the tester makes the disk 200 GB |
|
||||
| The public image, nobody watching | The refusal must reach a person: the box still pairs, and the hub's page for it reads „install refused: system disk 128 GB, needs 200 GB”. **Open in the build:** today a failed install's reason does not reach the hub's page — to be read before the build |
|
||||
| The existing 120 GiB pool warning | Stays, as the second check (a 200 GB disk with a small pool is a broken install, not a small disk) |
|
||||
|
||||
**Where the refusal sits.** In the installer's preflight, with the other checks that run before any change, so a
|
||||
refused machine is exactly as it was. One test per row above in `scripts/test_hostinstall.py`, the sizes fed through a
|
||||
seam (no real disk).
|
||||
|
||||
**If nothing is decided:** the installer accepts any disk, as today; the 200 GB is a sentence in a document.
|
||||
|
||||
## Decisions in code no section records [DESIGN — confirmed by the operator 2026-10-25 (D44 = all picks, R-1265)]
|
||||
|
||||
Read at `file:line` on `main` by the main session:
|
||||
|
||||
Reference in new issue
Block a user