Files
felhom.eu/documentation/audits/endings-list-2026-11-10/TABLE.md
T
admin 807175c27d
gates / gates (push) Successful in 2m1s
audits: the Endings list (2026-11-10) — 67 endings, 536 answers, 22 not found in 6 classes
What every thing a customer can end leaves behind, and who is told.
- documentation/audits/endings-list-2026-11-10/: README (one page), TABLE (67 endings x 8 questions,
  each answer with a mark and a pointer), MATRIX, the search list with controls, the helpers' raw
  answers, and the ageing drill on scratch guest 9202 (five rounds, put back).
- Marks: A 499, D 0, K 15, N 22. 9 endings are not named in the architecture folder.
- Register: six new rows, one per class (R-1373 … R-1378); 230 -> 236 open rows. Nine existing rows
  get a dated pointer line; none is closed, merged or re-ranked.
- STATUS.md: four decisions for the operator (D71 … D74).

No code change. No release. Machines: scratch guest 9202 only, put back.

Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
2026-11-10 13:52:31 +01:00

1209 lines
140 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# The Endings list — the table
Built 2026-11-10 from the source of the four repositories and from one drill on scratch guest 9202. One block for each
ending: a way in which a thing of the product stops, goes away or is replaced. `tools/make-table.py` writes this file
from the helpers' answers (`evidence/helpers/`) and from `tools/marks.py`; do not edit it by hand.
**The eight questions:** 1 what ends, who starts it · 2 what the thing created · 3 what the ending removes, and what it
keeps on purpose · 4 what it leaves by accident · 5 can it be undone, until when · 6 who is told · 7 the half-way state,
and what the next start does with it · 8 how do we know (`MEASURED`, a test, `SOURCE`, a document, or nobody knows).
A ninth line, outside the marks: is the hand step written in a runbook?
**Marks:** `A` answered, with a pointer · `D` decided, not built · `K` known gap, with its row · `N` nobody asked — it
survived the searches in `EV/searches.txt` (S01…S42; controls in the same file). Every `N` names its class row:
**E1** = R-1373 a second door that does less than the first · **E2** = R-1374 kept with no end named · **E3** = R-1375 the
outside part of an ending is by hand or not done · **E4** = R-1376 records of a thing that is gone · **E5** = R-1377
nobody is told · **E6** = R-1378 half-way with no finish, or no way back that nobody chose.
**Who read what.** A cell whose mark is `K` or `N`, and every `A` in question 4 to 7 that `tools/marks.py` carries, holds
the main session's words: the pointer was opened and read. Every other cell holds a helper's words with the mark `A`:
`tools/resolve-helper.py` opened each of its pointers (the file and the line exist, and the name the helper gave stands
at that line), and nobody read the claim against the code by eye. Treat those cells as a map, not as proof.
**Pointers:** `AG/` = `felhom-agent/` · `CT/` = `felhom-controller/controller/` · `HUB/` = `felhom.eu/hub/internal/` ·
`E/` = `felhom.eu/` · `AR/` = `felhom.eu/documentation/architecture/` · `RB/` = `felhom.eu/documentation/runbooks/` ·
`EV/` = this folder's `evidence/`. `tools/check-pointers.py` prints the text behind each one.
**Named status** (does an architecture document name this ending?): `NAMED` and `MENTIONED` with a pointer were read in
the documents. Where the line says "a machine count", the status comes from a search of the architecture folder:
0 lines = `UNNAMED`, else `MENTIONED`.
## The seed kinds, and where each ending is
| Seed kind | Endings (worst mark) | Named · mentioned · named nowhere |
|---|---|---|
| App | EC00 (K), EC01 (K), EC02 (N), EC03 (N), EC04 (A), EC09 (A) | 3 · 3 · 0 |
| Drive | EA06 (A), EA07 (A), EA08 (N), EA09 (A), EA10 (A), EA11 (N), EA12 (A), EC12 (A), EC13 (N), EC14 (A), EC15 (N), EC16 (K) | 3 · 7 · 2 |
| Copies | EA14 (A), EA16 (K), EA20 (K), EC08 (A), EC17 (A), EC18 (N), EC19 (A), EC20 (A), EC21 (K), EC22 (A), EC23 (N), EC24 (A), EC25 (A), EC26 (A), EC27 (N), EH07 (A) | 8 · 6 · 2 |
| Box | EA00 (N), EA01 (K), EA02 (A), EA03 (A), EH10 (A), EH12 (A) | 3 · 2 · 1 |
| Household | EH00 (N), EH01 (N), EH02 (N), EH13 (A), EH21 (N) | 3 · 1 · 1 |
| Access | EA22 (A), EA27 (N), EA28 (A), EA29 (A), EH08 (A), EH09 (A), EH11 (A), EH19 (A) | 5 · 2 · 1 |
| Versions | EA23 (K), EA24 (K), EA25 (A), EA26 (K), EC06 (K), EC07 (A), EC11 (K), EC28 (A) | 6 · 1 · 1 |
| Outside | EA21 (N), EH03 (K), EH04 (A), EH05 (A), EH06 (N), EH23 (A) | 3 · 2 · 1 |
## Seed endings that no code path carries
| Ending | Mark | Answer | Pointer |
|---|---|---|---|
| A household leaves Felhom | K | No designed path; capability E16 is MISSING. The pieces are EH01, EH02, EH03, EH04, EH05. | R-810 (`E/documentation/backlog/ROADMAP.md:59`) `AR/00-capability-map.md:206` |
| A tester ends | N | No handler and no runbook. It is done by hand with EH00 and EH02 (Peti's box, 2026-09-25); no list says what to collect from the tester or the box. | `RB/target-selection.md:170` · class E3 · S40 |
| A drive is dead or is replaced | A | No single operation. The parts exist: move all apps (EC13) when the old drive still works; the restore paths when it does not. | `AR/07-backup-architecture.md:1675-1676` |
| An app is taken out of the catalog while installed | A | No ending by design: the app keeps full function. | `AR/capability-map-detail/C.md:196` |
| The guest is rebuilt in place | A | By hand, with a runbook. | `RB/RUNBOOK-manual-guest-restore.md:1` |
| The household's place on a mail list | A | No mail list exists in the source or in the documents. The mail service's own account was NOT MEASURED (fence: no account call). | `EV/helpers/helper-docs.md:1` |
| An old installer or install disc | A | Published by tag; an old one is replaced at the next publish. Old discs that people hold: NOT MEASURED. | `E/INSTALLER-TAG:1` |
## Not in the table
**Tiny endings that cannot grow (named once, not tabled):** an app is stopped (C05) · the gate files of an install (C10) · a catalog sync replaces the templates (C29) · the file browser's database is reset (C30) · a launcher link (C31) · a file share is removed (C32) · a session ends (C33) · old metric rows (C34) · the emergency password is replaced (A04) · the first-boot bootstrap file (A05) · a half-written copy (A17) · a stale lock (A18) · a claim code (H14) · a bind link (H15; decision 210) · a device registration (H16) · an operator token (H17) · an operator session or password (H18) · a finished signed job (H20) · a diagnostics upload (H22) · a pruned artifact version (H24).
**Left out for another reason:**
- A13 the internal place — it has no ending.
- A15 a leaked test guest — the helper's leak claim was not confirmed; the architecture says the next run removes it (`AR/03-host-agent.md:524`, closed R-1298).
- A19 a guest snapshot — the agent has the route, and no line in the controller calls it (grep `"/snapshot` in `CT/`: 0 lines); no product path makes one.
- A30 the controller swap rolled back — it is the host half of EC28.
- the hold logs of an update — 400 lines for each service, kept as evidence by closed R-651; an orphan delete removes them with the stack folder.
- H08 key rows after the window closes — tiny rows; inside EH21's count.
---
### EA00 — The uninstall script on a host · Box · MENTIONED
architecture: seed row 19 in `EV/helpers/helper-docs.md` · helper section: agent „1. Uninstall of a host (`--uninstall`)”
| # | Answer | Mark | Pointer |
|---|---|---|---|
| 1 | The whole Felhom install on one Proxmox host ends. Started by operator / BYO owner on the host console (TTY required,). Entry: `run_uninstall`. There is no separate uninstall script (see Not found). | A | `E/scripts/felhom-host-install.sh:1141-1147` `E/scripts/felhom-host-install.sh:1149` |
| 2 | Created while it lived: guest LXC + its volumes; agent binary/unit/sudoers/state dir/config; root wrappers `/usr/local/sbin/felhom-*`; PVE user, token, pool, roles and ACLs; storage entry `felhom-backup` (, id); `felhom-pbs` storage (ACL set); drive mount units; `/mnt/felhom-drives`; LV `pve/felhom-belso`; island bridge stanza; dnsmasq drop-ins; WG conf; OOB sshd … | A | `AG/internal/storage/mountunit.go:56-75` |
| 3 | REMOVES: guest `pct stop` + `pct destroy` (no `--purge`); agent unit/sudoers/binary/`.bak-*`/state dir/user; agent config dir (`_purge_agent_config`); WG unit + conf; mgmt watchdog; OOB sshd + nft table + `felhom-op`; self-update wrapper, rollback unit, `.prev`, `.new.*`; shared-parent unit; network-share units … | A | `E/scripts/felhom-host-install.sh:1141-1147` `E/scripts/felhom-host-install.sh:1149` (the code path of question 1) |
| 4 | The mount units and host mounts of household drives stay. This was said when R-179 closed, and capability A22 is PARTIAL, but no open row carries it. The storage entries stay by the no-delete law. Not determined without a box: whether the role removal stops on an access rule that is left. | N | `E/scripts/felhom-host-install.sh:1109-1129` `E/scripts/felhom-host-install.sh:1359-1380` `AR/00-capability-map.md:98` · class E4 · S26 |
| 5 | Not undoable for the guest (destroyed). Data drives, PBS copies, escrow blob and hub record survive, so a reinstall + restore is the way back; no time limit in this code. | A | `E/scripts/felhom-host-install.sh:1141-1147` `E/scripts/felhom-host-install.sh:1149` (the code path of question 1) |
| 6 | Console log + printed statement only (, closing notes). No hub call inside (searched `curl/hub_` in that range: 0 hits); note at says the host record stays in the hub. | A | `E/scripts/felhom-host-install.sh:1141-1147` `E/scripts/felhom-host-install.sh:1149` (the code path of question 1) |
| 7 | Each step accepts 'already gone', and the state file goes last. A second run finishes the job. There is no journal. | A | `E/scripts/felhom-host-install.sh:1141-1147` `E/scripts/felhom-host-install.sh:1149` (the code path of question 1) |
| 8 | test_uninstall_wiring; test_uninstall_removes_every_bundle_file; `:138,154,170` test_purge_*; `:251,265,276,287` test_wg_*; test_statement_names_the_tunnel_and_the_peer; `:465,483,496,507,515` test_net_units_*; `:405,410` archive-storage ACL. No test found for the drive mount units or the `felhom-backup` ACL at uninstall. | A | `E/scripts/test_hostinstall.py:215` |
**Hand step in a runbook?** yes — `RB/day0-install.md:490`
### EA01 — The box is installed again on the same hardware · Box · NAMED
architecture: seed row 17 in `EV/helpers/helper-docs.md` · helper section: agent „2. Reinstall on the same hardware (installer run again, or after an uninstall)”
| # | Answer | Mark | Pointer |
|---|---|---|---|
| 1 | The previous install's identity is replaced. Operator. Entry: `step_preflight`, `--resume` via state file. | A | `E/scripts/felhom-host-install.sh:2137-2400` |
| 2 | Old agent config, binary, unit, PVE token, local-API leaf, token store, golden archive, older whole-guest copies made under the old key. | A | `E/scripts/felhom-host-install.sh:2137-2400` (the code path of question 1) |
| 3 | REPLACES: PVE token reused or removed and re-added; old agent config sealed aside (`_seal_old_agent_config`); binary kept as `.bak-<ts>`; unit backup; leaf guard — refuses to regenerate the leaf under a live Felhom guest unless `--preserve-state-from` / `--allow-new-leaf`; enroll answers 201/200/409; hub refusal for a live box `die_live_box`. … | A | `E/scripts/felhom-host-install.sh:2137-2400` (the code path of question 1) |
| 4 | Each run leaves dated copies of the files it replaces. | K | R-1368 |
| 5 | Sealed config and `.bak-*` allow a hand rollback; no code path does it. | A | `E/scripts/felhom-host-install.sh:2137-2400` (the code path of question 1) |
| 6 | Console log; hub enroll response. | A | `E/scripts/felhom-host-install.sh:2137-2400` (the code path of question 1) |
| 7 | `state.json` step marks + `--resume`; provision failure says "re-run with --resume". | A | `E/scripts/felhom-host-install.sh:2137-2400` (the code path of question 1) |
| 8 | test_seal_*; test_local_golden_is_checked_before_use; test_byo_disclosure_names_the_golden_reuse. | A | `E/scripts/test_hostinstall.py:185` `E/scripts/test_hostinstall.py:208` |
**Hand step in a runbook?** yes — `RB/day0-install.md:113`
### EA02 — An install with --force over a guest · Box · UNNAMED
architecture folder: 0 lines in 0 files match `/--force/` (a machine count, not a reading) · helper section: agent „3. `--force` over an existing guest id”
| # | Answer | Mark | Pointer |
|---|---|---|---|
| 1 | Meant to end an existing guest and provision over it. Operator. Entry. | A | `E/scripts/felhom-host-install.sh:2362-2376` |
| 2 | The existing guest (any guest holding that VMID). | A | `AG/internal/reconcile/bringup.go:290-302` (the code path of question 3) |
| 3 | The log line promises "it WILL be destroyed by provision". No code does it: the only `pct destroy` in the installer is (uninstall), and the agent's bring-up refuses an existing VMID (, message). | A | `AG/internal/reconcile/bringup.go:290-302` |
| 4 | The flag removes nothing by itself. It lets the install go on, and the bring-up then destroys the guest. The log line says so before it happens. | A | `E/scripts/felhom-host-install.sh:2362-2376` |
| 5 | n/a (nothing destroyed). | A | `AG/internal/reconcile/bringup.go:290-302` (the code path of question 3) |
| 6 | Console only. | A | `AG/internal/reconcile/bringup.go:290-302` (the code path of question 3) |
| 7 | State file keeps earlier steps; `--resume` repeats the same refusal. | A | `AG/internal/reconcile/bringup.go:290-302` (the code path of question 3) |
| 8 | None found for the `--force` path (searched `force` in: one hit, about a busy network share). | A | `E/scripts/test_hostinstall.py` |
**Hand step in a runbook?** yes — `RB/day0-install.md:113`
### EA03 — The hardware is replaced (bring-up from the copies) · Box · NAMED
architecture: seed row 18 in `EV/helpers/helper-docs.md` · helper section: agent „4. Hardware replaced / disaster bring-up of a guest”
| # | Answer | Mark | Pointer |
|---|---|---|---|
| 1 | The old box is gone; a guest is brought up from a copy on new hardware. Operator. Entry: bring-up (mode `dr`), selftest wrapper; installer side `--preserve-state-from`. | A | `AG/internal/reconcile/bringup.go:290` `AG/cmd/felhom-agent/main.go:2702-2832` `E/scripts/felhom-host-install.sh:2760-2775` |
| 2 | Restored guest, throwaway volumes that the structural binds (mp8/mp9) displace, per-guest bootstrap dir `<stateDir>/guests/<vmid>/bootstrap`. | A | `AG/internal/provision/backhalf.go:25-51` |
| 3 | REMOVES: displaced throwaway volumes (`unusedN`) after the bind swap; on a failed bring-up the half-built guest via `rollbackBringUp` (intent); DR selftest removes the per-guest dir. KEEPS: the old host record in the hub (hub answers 409 for a live box,). | A | `AG/internal/reconcile/bringup.go:538-585` `AG/cmd/felhom-agent/main.go:2821-2828` `E/scripts/felhom-host-install.sh:233-238` |
| 4 | A guest that a crash leaves half-built can stay; the source names it as an accepted rest. A displaced volume whose delete fails is logged. | A | `AG/internal/reconcile/bringup.go:578` `AG/internal/reconcile/recover.go:44-45` |
| 5 | Bring-up is undone by its own rollback until it reports success; after that only by a signed op (see Not found: no guest-destroy executor). | A | `AG/internal/reconcile/bringup.go:538-585` `AG/cmd/felhom-agent/main.go:2821-2828` (the code path of question 3) |
| 6 | Agent log; start warning carried in the bring-up result (``). | A | `AG/internal/reconcile/bringup.go:581` |
| 7 | Journal entry with Rollback flag; next start runs `Recover` (, bring-up branch; callers). | A | `AG/internal/reconcile/recover.go:30-52` `AG/cmd/felhom-agent/main.go:1164` `AG/cmd/felhom-agent/main.go:2659` `AG/cmd/felhom-agent/main.go:2777` |
| 8 | . | A | `AG/internal/reconcile/bringup_test.go:335` `AG/internal/reconcile/bringup_test.go:404` `AG/internal/reconcile/bringup_test.go:478` `AG/internal/reconcile/bringup_test.go:693` |
**Hand step in a runbook?** yes — `RB/RUNBOOK-manual-guest-restore.md:1`
### EA06 — A drive is ejected (host side) · Drive · MENTIONED
architecture: seed row 8 in `EV/helpers/helper-docs.md` · helper section: agent „7. Drive ejected (safe removal)”
| # | Answer | Mark | Pointer |
|---|---|---|---|
| 1 | The drive's place in the guest ends for now. Household (controller → agent). Entry `POST /disks/eject`, handler. | A | `AG/internal/localapi/server.go:605` `AG/internal/localapi/disks.go:506` |
| 2 | Intent record `uuid:<fs-uuid>`; by-UUID mount unit; bind under `/mnt/felhom-drives/<name>`; guest bind record. | A | `AG/internal/localapi/disks.go:504` (the code path of question 3) |
| 3 | Unmounts the guest-facing bind, sets intent `ejected`; refuses the backup target drive. KEEPS on purpose: data, the raw `/mnt/<name>` mount, re-attachable (``). | A | `AG/internal/localapi/disks.go:504` |
| 4 | The host mount stays after the eject, by design (see EC14). | A | `AG/internal/localapi/disks.go:537-556` |
| 5 | Yes — plug back and enrol again; no limit. | A | `AG/internal/localapi/disks.go:504` (the code path of question 3) |
| 6 | Agent log only (no hub event seen in the handler). | A | `AG/internal/localapi/disks.go:504` (the code path of question 3) |
| 7 | No journal; the 20 s storage tick re-evaluates intent vs mounts. | A | `AG/internal/storage/hostops.go:276-284` |
| 8 | TestEject_UnmountAndDependents, TestEject_RoleGated; (test bodies not opened). | A | `AG/internal/localapi/disks_test.go:311` `AG/internal/localapi/backup_target_guard_test.go:64` `AG/internal/localapi/backup_target_guard_test.go:102` `AG/internal/localapi/internalplace_test.go:147` |
**Hand step in a runbook?** no hand step
### EA07 — A drive is retired by the household (host side) · Drive · NAMED
architecture: seed row 7 in `EV/helpers/helper-docs.md` · helper section: agent „8. Drive decommissioned by the household (self-serve)”
| # | Answer | Mark | Pointer |
|---|---|---|---|
| 1 | The drive stops being part of the box, data untouched. Household. Entry `POST /disks/decommission`, handler. | A | `AG/internal/localapi/server.go:606` `AG/internal/localapi/disks.go:567` |
| 2 | As ending 7, plus legacy `mpN` entry on old boxes. | A | `AG/internal/localapi/disks.go:559-567` (the code path of question 3) |
| 3 | Sets intent `decommissioned`, removes the guest-bind record, detaches the drive, detaches a legacy `mpN` (`` and body). Never mkfs. KEEPS: data; the intent record. | A | `AG/internal/localapi/disks.go:559-567` |
| 4 | The host mount and its unit stay until the drive is gone. Then EA09 forgets them. | A | `AG/internal/storage/forget_retired.go:10-20` |
| 5 | Yes — enrol again (data intact). | A | `AG/internal/localapi/disks.go:559-567` (the code path of question 3) |
| 6 | Agent log only. | A | `AG/internal/localapi/disks.go:559-567` (the code path of question 3) |
| 7 | No recovery code found (searched `journal/marker` in `disks.go`: two comment hits, and, neither is recovery); steps are idempotent sets. | A | `AG/internal/localapi/disks.go:559-567` (the code path of question 3) |
| 8 | (bind-store Remove) and `:78,101,143,170`. | A | `AG/internal/localapi/decommission_test.go:230` |
**Hand step in a runbook?** no hand step
### EA08 — A drive is retired by a signed operator job · Drive · MENTIONED
architecture folder: 1 lines in 1 files match `/signed.{0,60}decommission|decommission.{0,60}signed/` (a machine count, not a reading) · helper section: agent „9. Drive decommissioned by a signed operator job”
| # | Answer | Mark | Pointer |
|---|---|---|---|
| 1 | Same end, operator-signed. Entry (op name). | A | `AG/internal/signedjobs/decommission.go:66` |
| 2 | As ending 8. | A | `AG/internal/signedjobs/decommission.go:66` (the code path of question 1) |
| 3 | `SetDecommissioned`; prunes guest-bind records. | A | `AG/internal/signedjobs/decommission.go:66` (the code path of question 1) |
| 4 | The signed job sets the 'retired' record and removes the drive from the guest's record. It does not take the drive out of the running guest, which the household's own door does. | N | `AG/internal/signedjobs/decommission.go:86-103` `AG/internal/localapi/disks.go:559-567` · class E1 · S20 |
| 5 | As ending 8. | A | `AG/internal/signedjobs/decommission.go:66` (the code path of question 1) |
| 6 | Log `:86,104`; job result to the hub via the signed-job channel. | A | `AG/internal/signedjobs/decommission.go:66` (the code path of question 1) |
| 7 | Nonce is burned; no half-way recovery code found. | A | `AG/internal/signedjobs/decommission.go:66` (the code path of question 1) |
| 8 | . | A | `AG/internal/signedjobs/decommission_test.go:19` `AG/internal/signedjobs/decommission_test.go:31` `AG/internal/signedjobs/decommission_test.go:42` `AG/internal/signedjobs/decommission_test.go:53` |
**Hand step in a runbook?** NO
### EA09 — A retired drive that is gone is forgotten · Drive · NAMED
architecture: `AR/03-host-agent.md:118` · helper section: agent „10. Retired drive forgotten (drive pulled and never back)”
| # | Answer | Mark | Pointer |
|---|---|---|---|
| 1 | The mount unit of a decommissioned, absent drive ends. Timer (20 s storage tick). Entry `ForgetRetiredDrives`; callers. | A | `AG/internal/storage/forget_retired.go:21` `AG/cmd/felhom-agent/main.go:1586` `AG/cmd/felhom-agent/main.go:1625` |
| 2 | Unit file "Managed by felhom-agent". | A | `AG/internal/storage/mountunit.go:10` |
| 3 | Only when decommissioned AND absent AND not mounted (``): disable, `felhom-priv-apply unit-forget` (root half AG/configs/felhom-priv-apply:469-499), daemon-reload. KEEPS on purpose: the intent record; there is no delete function in. | A | `AG/internal/storage/forget_retired.go:10-20` `AG/internal/storage/intent.go:84-131` |
| 4 | Only a drive that is retired AND gone is forgotten. An ejected drive that never comes back keeps its mount unit and its record, by design: it can come back. | A | `AG/internal/storage/forget_retired.go:10-20` |
| 5 | n/a (drive is gone); plugging it back needs a new enrol. | A | `AG/internal/storage/forget_retired.go:10-20` `AG/internal/storage/intent.go:84-131` (the code path of question 3) |
| 6 | Log only. | A | `AG/internal/storage/forget_retired.go:10-20` `AG/internal/storage/intent.go:84-131` (the code path of question 3) |
| 7 | Idempotent; runs again every tick. | A | `AG/internal/storage/forget_retired.go:10-20` `AG/internal/storage/intent.go:84-131` (the code path of question 3) |
| 8 | . | A | `AG/internal/storage/forget_retired_test.go:88` `AG/internal/storage/forget_retired_test.go:112` `AG/internal/storage/forget_retired_test.go:125` `AG/internal/storage/forget_retired_test.go:147` |
**Hand step in a runbook?** no hand step
### EA10 — A drive is formatted · Drive · MENTIONED
architecture folder: 13 lines in 4 files match `/mkfs|format.{0,30}(drive|disk)/` (a machine count, not a reading) · helper section: agent „11. Drive formatted (blank drive, or data-bearing behind a signature)”
| # | Answer | Mark | Pointer |
|---|---|---|---|
| 1 | The old contents of a drive end. Household for a blank drive; operator signature for one with data (`pending_signature`). Entry `POST /disks/format`, handler; job. | A | `AG/internal/localapi/server.go:607` `AG/internal/localapi/disks.go:843` `AG/internal/localapi/formatjob.go:97-125` |
| 2 | A format-job record with the durable id. | A | `AG/internal/localapi/server.go:607` `AG/internal/localapi/disks.go:843` (the code path of question 1) |
| 3 | mkfs through the guarded wrapper; record updated to done/failed. | A | `AG/internal/localapi/server.go:607` `AG/internal/localapi/disks.go:843` (the code path of question 1) |
| 4 | Nothing found in the source. Not measured on a box: 9202 has no agent. | A | `AG/internal/localapi/server.go:607` `AG/internal/localapi/disks.go:843` (the code path of question 1) |
| 5 | No. | A | `AG/internal/localapi/server.go:607` `AG/internal/localapi/disks.go:843` (the code path of question 1) |
| 6 | Status endpoint `GET /disks/format/status` (``, ``); log. | A | `AG/internal/localapi/server.go:608` `AG/internal/localapi/disks.go:823` |
| 7 | Yes: a `running` record is re-resolved by durable id and re-run at start (``, `RecoverFormatJob`); a legacy record without a durable id is marked failed; a drive that no longer resolves is marked failed. | A | `AG/internal/localapi/formatjob.go:15-16` |
| 8 | (TestRecoverFormatJob_ReRunsInterrupted). | A | `AG/internal/localapi/formatjob_test.go:61` `AG/internal/localapi/formatjob_test.go:85` `AG/internal/localapi/formatjob_test.go:113` `AG/internal/localapi/formatjob_test.go:131` |
**Hand step in a runbook?** no hand step
### EA11 — A drive is wiped by a signed job · Drive · MENTIONED
architecture folder: 3 lines in 1 files match `/signed.{0,60}wipe|wipe.{0,60}signed/` (a machine count, not a reading) · helper section: agent „12. Drive wiped by a signed job”
| # | Answer | Mark | Pointer |
|---|---|---|---|
| 1 | All data on a drive ends. Operator (signed `storage_wipe`). Entry (op); gate; class. | A | `AG/internal/signedjobs/wipe.go:61` `AG/internal/reconcile/gate.go:209` `AG/internal/reconcile/classify.go:33-35` `AG/internal/reconcile/classify.go:133` |
| 2 | The drive's filesystem, its intent record, its by-UUID mount unit. | A | `AG/internal/signedjobs/wipe.go:61` `AG/internal/reconcile/gate.go:209` (the code path of question 1) |
| 3 | Resolve, anti-retarget check, re-inspect; mkfs. | A | `AG/internal/signedjobs/wipe.go:61` `AG/internal/reconcile/gate.go:209` (the code path of question 1) |
| 4 | The job formats the drive and touches neither the drive's record nor its mount unit. A wiped drive that was added before keeps a record and a unit that name the old filesystem. | N | `AG/internal/signedjobs/wipe.go:61-110` · class E4 · S20 |
| 5 | No. | A | `AG/internal/signedjobs/wipe.go:61` `AG/internal/reconcile/gate.go:209` (the code path of question 1) |
| 6 | Log only inside the executor; job result to the hub. | A | `AG/internal/signedjobs/wipe.go:61` `AG/internal/reconcile/gate.go:209` (the code path of question 1) |
| 7 | Nonce burned before the run — an interrupted wipe cannot be replayed; a new signature is needed. State after a half mkfs: unreadable filesystem, no recovery code. | A | `AG/internal/signedjobs/wipe.go:61` `AG/internal/reconcile/gate.go:209` (the code path of question 1) |
| 8 | . | A | `AG/internal/signedjobs/wipe_test.go:47-131` |
**Hand step in a runbook?** NO
### EA12 — A network share is removed (host side) · Drive · UNNAMED
architecture folder: 0 lines in 0 files match `/network (share|storage).{0,60}remov/` (a machine count, not a reading) · helper section: agent „13. Network share removed”
| # | Answer | Mark | Pointer |
|---|---|---|---|
| 1 | A NAS mount ends. Household. Entry `POST /netstorage/remove`, handler. | A | `AG/internal/localapi/server.go:629` `AG/internal/localapi/netstorage.go:204-230` |
| 2 | Automount + mount units, staged copies, SMB credentials file, mountpoint dir. | A | `AG/internal/storage/netmount.go:423-473` `AG/internal/localapi/netstorage.go:257-262` (the code path of question 3) |
| 3 | `RemoveNetworkMount`: stop/disable, reset-failed, remove units and staged copies, daemon-reload, `rmdir` only; credentials ``. KEEPS on purpose: a non-empty mountpoint (WARN, never forced). | A | `AG/internal/storage/netmount.go:423-473` `AG/internal/localapi/netstorage.go:257-262` |
| 4 | A non-empty mountpoint dir (by design). | A | `AG/internal/storage/netmount.go:423-473` `AG/internal/localapi/netstorage.go:257-262` (the code path of question 3) |
| 5 | Add the share again. | A | `AG/internal/storage/netmount.go:423-473` `AG/internal/localapi/netstorage.go:257-262` (the code path of question 3) |
| 6 | Log ``. | A | `AG/internal/localapi/netstorage.go:228` |
| 7 | Steps are idempotent; uninstall has its own sweep by marker. | A | `E/scripts/felhom-host-install.sh:1108-1134` |
| 8 | TestRemoveNetworkMount_ZeroResidue, …NeverForceRemovesMountpoint;. | A | `AG/internal/storage/netresidue_test.go:15` `AG/internal/storage/netmount_test.go:309` `AG/internal/localapi/netstorage_test.go:167` |
**Hand step in a runbook?** no hand step
### EA14 — A test guest of the restore test is removed · Copies · NAMED
architecture: `AR/03-host-agent.md:524` · helper section: agent „15. Restore-test scratch guest torn down”
| # | Answer | Mark | Pointer |
|---|---|---|---|
| 1 | The throwaway guest of a restore test ends. Product (end of each test). Entry `teardownScratch`. | A | `AG/internal/reconcile/restoretest.go:476-512` |
| 2 | A guest in the scratch band 990000–990009 with its thin volumes; a journal entry with the Scratch flag (``). | A | `E/scripts/felhom-host-install.sh:347-361` `AG/internal/reconcile/restoretest.go:113-129` |
| 3 | API destroy first; on failure the fenced root fallback → `destroyScratchPrivileged` →. | A | `AG/internal/proxmox/privileged.go:195` |
| 4 | A test guest that a crash leaves is removed by the next run. | A | `AR/03-host-agent.md:524` |
| 5 | No (throwaway). | A | `AG/internal/proxmox/privileged.go:195` (the code path of question 3) |
| 6 | Restore-test result to the hub. | A | `AG/internal/proxmox/privileged.go:195` (the code path of question 3) |
| 7 | Journal entry stays in flight → ending 16. | A | `AG/internal/proxmox/privileged.go:195` (the code path of question 3) |
| 8 | . | A | `AG/internal/reconcile/restoretest_test.go:23` `AG/internal/reconcile/restoretest_test.go:233` `AG/internal/reconcile/restoretest_test.go:262` `AG/internal/reconcile/restoretest_test.go:444` |
**Hand step in a runbook?** no hand step
### EA16 — Old whole-guest copies are cleaned · Copies · MENTIONED
architecture folder: 6 lines in 2 files match `/prune-backups|keep-last/` (a machine count, not a reading) · helper section: agent „17. Old whole-guest copies pruned (local vzdump)”
| # | Answer | Mark | Pointer |
|---|---|---|---|
| 1 | Older local copies end. Product, after each backup. Entry `localPruneSpec`. | A | `AG/internal/backup/runner.go:133-160` |
| 2 | vzdump archives + logs + notes on the local/`felhom-backup` storage. | A | `AG/internal/config/config.go:553-573` `AG/internal/backup/runner.go:98-110` (the code path of question 3) |
| 3 | Prune by `keep-daily=N` (; default 3, never below 1). KEEPS on purpose: PBS is never pruned from the box unless opted in (``; server-side there); skips prune when the storage lookup fails. | A | `AG/internal/config/config.go:553-573` `AG/internal/backup/runner.go:98-110` |
| 4 | The clean-up rides the backup of a living guest on the present target. Copies of a guest that is gone, or copies on an old target, have no cleaner. | K | `AG/internal/backup/runner.go:138-160` · R-1087 |
| 5 | No. | A | `AG/internal/config/config.go:553-573` `AG/internal/backup/runner.go:98-110` (the code path of question 3) |
| 6 | Log; backup report to the hub. | A | `AG/internal/config/config.go:553-573` `AG/internal/backup/runner.go:98-110` (the code path of question 3) |
| 7 | Prune is stateless; next backup prunes again. | A | `AG/internal/config/config.go:553-573` `AG/internal/backup/runner.go:98-110` (the code path of question 3) |
| 8 | (TestPrune_NeverPrunesPBS);. | A | `AG/internal/backup/prune_test.go:24` `AG/internal/backup/prune_test.go:44` `AG/internal/backup/prune_test.go:63` `AG/internal/backup/prune_test.go:76` |
**Hand step in a runbook?** no hand step
### EA20 — The target of the whole-guest copy is moved · Copies · UNNAMED
architecture: seed row 15 in `EV/helpers/helper-docs.md` · helper section: agent „21. Backup target moved to another drive”
| # | Answer | Mark | Pointer |
|---|---|---|---|
| 1 | The old place of the second copy stops being used. Household. Entry `POST /backup/target`, handler. | A | `AG/internal/localapi/server.go:584` `AG/internal/localapi/backup_target.go:52-111` |
| 2 | PVE storage entry `felhom-backup`, an ACL grant, config, archives on the old drive. | A | `AG/internal/localapi/backup_target.go:31-51` (the code path of question 3) |
| 3 | Removes nothing. Order create → grant → config; "worst interruption leaves an unused storage, never a broken tier" (``). The root wrapper refuses to repoint an existing id (AG/configs/felhom-backup-target-apply:35,89-92) and never deletes. | A | `AG/internal/localapi/backup_target.go:31-51` |
| 4 | The copies on the old target stay. | K | R-1087 |
| 5 | Move back; old archives are still there. | A | `AG/internal/localapi/backup_target.go:31-51` (the code path of question 3) |
| 6 | Log ``. | A | `AG/internal/localapi/backup_target.go:100` |
| 7 | By ordering only (comment); no journal. | A | `AG/internal/localapi/backup_target.go:31-51` (the code path of question 3) |
| 8 | . | A | `AG/internal/localapi/backup_target_move_test.go:75` `AG/internal/localapi/backup_target_move_test.go:111` `AG/internal/localapi/backup_target_move_test.go:132` `AG/internal/localapi/backup_target_move_test.go:150` |
**Hand step in a runbook?** a dated record, not a procedure — `RB/RUNBOOK-vzdump-target-move-2026-07-29.md:1`
### EA21 — The second off-site tier (ep0) is switched off · Outside · MENTIONED
architecture: `AR/05-hub-architecture.md:391` · helper section: agent „22. Off-site (PBS DR) tier switched off, re-keyed or replaced”
| # | Answer | Mark | Pointer |
|---|---|---|---|
| 1 | The off-site tier stops or changes. Operator in the hub. Entry `Apply`. | A | `AG/internal/pbsdr/manager.go:264-274` |
| 2 | PVE storage entry `felhom-pbs`, encryption key and password under `/etc/pve/priv/storage/`, fingerprint pin, namespace and snapshots on the PBS side. | A | `AG/internal/pbsdr/manager.go:273` `AG/internal/pbsdr/manager.go:456-461` (the code path of question 3) |
| 3 | Removes nothing: disabled → status only, "NO teardown in this slice" (``); laws; wrapper SET-ONLY (AG/configs/felhom-pbs-apply:7-10, verbs). Only removal: the consumed-failed marker on convergence (``). | A | `AG/internal/pbsdr/manager.go:273` `AG/internal/pbsdr/manager.go:456-461` |
| 4 | Nothing is taken down: the storage entry, the token and the copies stay. The source calls the teardown 'a deliberate future op'; no row carries it. | N | `AG/internal/pbsdr/manager.go:274` `AG/internal/pbsdr/loop.go:15` · class E3 · S34 |
| 5 | Yes — re-enable; key and pin are still there. | A | `AG/internal/pbsdr/manager.go:273` `AG/internal/pbsdr/manager.go:456-461` (the code path of question 3) |
| 6 | Tier status to the hub. | A | `AG/internal/pbsdr/manager.go:273` `AG/internal/pbsdr/manager.go:456-461` (the code path of question 3) |
| 7 | Verify-pin-before-consume; a failed consume leaves a marker cleared at the next convergence (``). | A | `AG/internal/pbsdr/manager.go:456-461` |
| 8 | TestSetOnlyLaw, TestOldHubAndDisabledCompat, `:399,478`;. | A | `AG/internal/pbsdr/manager_test.go:309` `AG/internal/pbsdr/rearm_test.go:29-183` |
**Hand step in a runbook?** NO
### EA22 — A key ceremony runs out of time · Access · UNNAMED
architecture folder: 0 lines in 0 files match `/ceremony.{0,60}(expir|timeout|time out)/` (a machine count, not a reading) · helper section: agent „23. Escrow ceremony expires or is superseded; staged secret wiped”
| # | Answer | Mark | Pointer |
|---|---|---|---|
| 1 | An unclaimed recovery code / staged key ends. Timer (TTL), household (re-run), controller (wipe call). Entry; `DELETE /escrow/stage-secret`, handler. | A | `AG/internal/localapi/escrow_ceremony.go:261-275` `AG/internal/localapi/escrow_ceremony.go:299-312` `AG/internal/localapi/server.go:638` `AG/internal/localapi/escrow_stage.go:59-77` |
| 2 | In-memory recovery code R and confirm state; staged file `/var/lib/felhom-agent/escrow-stage/restic_repo_password`; the escrow blob at the hub. | A | `AG/internal/escrow/identity.go:44-59` |
| 3 | Confirm TTL 30 min (``); wipe functions; expiry marks `unclaimed_void`; staged file and its `.tmp` removed (``); temp dir of a consume removed. KEEPS on purpose: the previous escrow stays current when a new one is not confirmed (``). | A | `AG/internal/localapi/escrow_ceremony.go:156-158` `AG/internal/localapi/escrow_stage.go:59-77` `AG/internal/escrow/consume.go:49-54` `AG/internal/localapi/escrow_ceremony.go:261-275` |
| 4 | Nothing on the box. The hub's side is EH09. | A | `AG/internal/localapi/escrow_ceremony.go:156-158` `AG/internal/localapi/escrow_stage.go:59-77` (the code path of question 3) |
| 5 | No — an expired code is gone (410,); run the ceremony again. | A | `AG/internal/localapi/escrow_ceremony.go:156-158` `AG/internal/localapi/escrow_stage.go:59-77` (the code path of question 3) |
| 6 | HTTP status to the controller; log. | A | `AG/internal/localapi/escrow_ceremony.go:156-158` `AG/internal/localapi/escrow_stage.go:59-77` (the code path of question 3) |
| 7 | In-memory state is lost on agent restart; the staged file wipe is idempotent. | A | `AG/internal/localapi/escrow_ceremony.go:156-158` `AG/internal/localapi/escrow_stage.go:59-77` (the code path of question 3) |
| 8 | . | A | `AG/internal/localapi/escrow_ceremony_test.go:231` `AG/internal/localapi/escrow_ceremony_test.go:297` `AG/internal/localapi/escrow_ceremony_test.go:375` `AG/internal/localapi/escrow_ceremony_test.go:404` |
**Hand step in a runbook?** no hand step
### EA23 — The agent replaces itself · Versions · NAMED
architecture: seed row 28a in `EV/helpers/helper-docs.md` · helper section: agent „24. Agent self-update: apply, commit, rollback”
| # | Answer | Mark | Pointer |
|---|---|---|---|
| 1 | The running agent binary is replaced. Operator (signed `agent_update` job). Entry; root side AG/configs/felhom-os-apply:688-731; swap AG/configs/felhom-selfupdate-guarded:18-21. | A | `AG/internal/selfupdate/executor.go:87` |
| 2 | Staged binary `<stateDir>/selfupdate/felhom-agent-<ver>` (``); root copy in `/var/lib/felhom-os-apply/agent-update` (`felhom-os-apply:184`); `<bin>.new.*`, `<bin>.prev`, pending marker (`felhom-selfupdate-guarded:86-97`); `pending.json`. | A | `AG/internal/selfupdate/executor.go:106-110` `AG/internal/selfupdate/selfupdate.go:44-48` |
| 3 | Root copy removed in `finally` (`felhom-os-apply:718-722`); stale `.new.*` swept at entry (`felhom-selfupdate-guarded:44`); plan file removed (``); pending marker cleared on commit (`felhom-selfupdate-guarded:109-116`). KEEPS on purpose: `.prev` until the next apply. | A | `AG/internal/selfupdate/executor.go:154` |
| 4 | Each update leaves its downloaded file in the update folder. | K | `AG/internal/selfupdate/executor.go:100-172` · R-1368 |
| 5 | Automatic rollback while the pending marker exists (crash within the dwell); after commit only `.prev` by hand. | A | `AG/internal/selfupdate/executor.go:154` (the code path of question 3) |
| 6 | Job result to the hub; WARN on version mismatch. | A | `AG/internal/selfupdate/commit.go:89-92` |
| 7 | Yes: pending marker + `OnFailure` unit → `felhom-selfupdate-guarded rollback` (, no-op without the marker); commit after dwell ``. | A | `AG/configs/felhom-agent-rollback.service` `AG/internal/selfupdate/commit.go:114` |
| 8 | . No test found asserting the staged binary is gone after success. | A | `AG/internal/selfupdate/executor_test.go:102` `AG/internal/selfupdate/executor_test.go:136` `AG/internal/selfupdate/executor_test.go:151` `AG/internal/selfupdate/executor_test.go:166` |
**Hand step in a runbook?** no hand step
### EA24 — A signed file set or a system update is replaced (old kernels) · Versions · NAMED
architecture: `AR/11-os-updates.md:1` · helper section: agent „25. Root files replaced by a config bundle; OS-update leftovers; kernel step dropped”
| # | Answer | Mark | Pointer |
|---|---|---|---|
| 1 | Older root files, a staged kernel step and update leftovers end. The operator starts it with a signed job; the wrapper `felhom-os-apply` does the work. | A | `AG/configs/felhom-os-apply:2113-2116` `AG/configs/felhom-os-apply:158` `AG/configs/felhom-os-apply:1488-1495` |
| 2 | Previous copies of each replaced root file, the used-number file, the package cache, the installed kernels, the one-shot boot flag and the default-kernel pin. | A | `AG/configs/felhom-os-apply:189-190` `AG/configs/felhom-os-apply:127` `AG/configs/felhom-os-apply:144` |
| 3 | Keeps the newest 3 sets of previous copies and removes older sets. Cleans the package cache. Keeps on purpose: a plan that would remove a package is refused (rule R4), so the product never removes an old kernel. A cancelled kernel step leaves the package installed. | A | `AG/configs/felhom-os-apply:2315-2318` `AG/configs/felhom-os-apply:1417` `AG/configs/felhom-os-apply:1369` `AG/configs/felhom-os-apply:1712` |
| 4 | Old kernels and dated copies of replaced files stay. | K | R-1368 |
| 5 | Root files: a signed undo puts a kept previous copy back, 3 sets deep. Kernel: one revert into the old kernel, which is still the default. | A | `AG/configs/felhom-os-apply:2294-2296` `AG/configs/felhom-os-apply:1488-1495` |
| 6 | The job result goes to the hub, and the wrapper writes its log. | A | `AG/configs/felhom-os-apply:1488-1495` `AR/11-os-updates.md:1` |
| 7 | The used number is burned after the flip. After a reboot the wrapper reads what became of the kernel step and judges it. | A | `AG/configs/felhom-os-apply:729` `AG/configs/felhom-os-apply:1488-1495` |
| 8 | (removal refused), `:863,866,1455` (undo), `:1972,1990,1999` (revert), test_cancel_clears_the_flag. | A | `AG/configs/test_felhom_os_apply.py:440` |
**Hand step in a runbook?** no hand step
### EA25 — An old published agent version · Versions · NAMED
architecture: seed row 28a in `EV/helpers/helper-docs.md` · helper section: agent „26. Published agent versions retired from the registry”
| # | Answer | Mark | Pointer |
|---|---|---|---|
| 1 | Old released agent binaries end. Operator, by hand. Policy (reader). | A | `AG/scripts/retention-policy.json` `AG/scripts/check-published-versions.py` |
| 2 | One published binary + signature per release. | A | `AG/scripts/retention-policy.json` `AG/scripts/check-published-versions.py` (the code path of question 1) |
| 3 | Policy: keep the newest 5 + the hub's floor version + the day-0 manifest version; never retire a git tag. No code deletes — the checker only reads. | A | `AG/scripts/retention-policy.json` `AG/scripts/check-published-versions.py` (the code path of question 1) |
| 4 | Old versions stay published until the operator prunes them. The runbook has the step. | A | `RB/RUNBOOK-manual-build.md:244` |
| 5 | Re-publish from the tag. | A | `AG/scripts/retention-policy.json` `AG/scripts/check-published-versions.py` (the code path of question 1) |
| 6 | n/a. | A | `AG/scripts/retention-policy.json` `AG/scripts/check-published-versions.py` (the code path of question 1) |
| 7 | n/a. | A | `AG/scripts/retention-policy.json` `AG/scripts/check-published-versions.py` (the code path of question 1) |
| 8 | The checker itself; no removal to pin. | A | `AG/scripts/retention-policy.json` `AG/scripts/check-published-versions.py` (the code path of question 1) |
**Hand step in a runbook?** yes — `RB/RUNBOOK-manual-build.md:244`
### EA26 — An old guest template (golden) · Versions · UNNAMED
architecture: seed row 28b in `EV/helpers/helper-docs.md` · helper section: agent „27. Golden archives and the golden build guest”
| # | Answer | Mark | Pointer |
|---|---|---|---|
| 1 | An older golden image ends being used; the build guest ends being needed. Operator. Entries `step_golden`;. | A | `E/scripts/felhom-host-install.sh:3518-3573` `AG/configs/build-golden.sh:100-106` `AG/configs/build-golden.sh:440-463` `AG/configs/build-golden.sh:511` |
| 2 | `vzdump-lxc-<GOLDEN_VMID>-<ts>.tar.zst` in the dump dir; a build guest. | A | `E/scripts/felhom-host-install.sh:1520-1535` `AG/configs/build-golden.sh:425-430` (the code path of question 3) |
| 3 | Only `--uninstall --remove-golden` frees every golden archive. In-guest cleanup before the bake (``). | A | `E/scripts/felhom-host-install.sh:1520-1535` `AG/configs/build-golden.sh:425-430` |
| 4 | Old templates stay on the host system disk. | K | R-1368 |
| 5 | Re-download. | A | `E/scripts/felhom-host-install.sh:1520-1535` `AG/configs/build-golden.sh:425-430` (the code path of question 3) |
| 6 | Console. | A | `E/scripts/felhom-host-install.sh:1520-1535` `AG/configs/build-golden.sh:425-430` (the code path of question 3) |
| 7 | `--resume`. | A | `E/scripts/felhom-host-install.sh:1520-1535` `AG/configs/build-golden.sh:425-430` (the code path of question 3) |
| 8 | (golden refusal),. | A | `E/scripts/test_hostinstall.py:547` `E/scripts/test_hostinstall.py:552` |
**Hand step in a runbook?** only a flag — `RB/day0-install.md:531`
### EA27 — A guest's token is replaced · Access · MENTIONED
architecture folder: 4 lines in 1 files match `/per-guest token|guest token/` (a machine count, not a reading) · helper section: agent „28. Per-guest local-API token replaced”
| # | Answer | Mark | Pointer |
|---|---|---|---|
| 1 | A guest's old token ends. Product, when a guest is provisioned again. Entry `Mint`; caller. | A | `AG/internal/localapi/tokenstore.go:127` `AG/internal/provision/backhalf.go:137-159` |
| 2 | A hash line in the append-only token log; plaintext only in `<stateDir>/guests/<vmid>/bootstrap/bootstrap.json` (0600, ``). | A | `AG/internal/provision/backhalf.go:25-51` |
| 3 | Last write wins per VMID; the superseded hash is dropped on load (` `). | A | `AG/internal/localapi/tokenstore.go:24-32` `AG/internal/localapi/tokenstore.go:114-116` |
| 4 | A new token for the same guest number replaces the old one. The token store has no remove: the token of a guest that is destroyed stays valid until a new guest takes its number. | N | `AG/internal/localapi/tokenstore.go:127-210` · class E4 · S12 |
| 5 | No (old token is dead once re-minted). | A | `AG/internal/localapi/tokenstore.go:24-32` `AG/internal/localapi/tokenstore.go:114-116` (the code path of question 3) |
| 6 | Log. | A | `AG/internal/localapi/tokenstore.go:24-32` `AG/internal/localapi/tokenstore.go:114-116` (the code path of question 3) |
| 7 | Append-only log; a torn last line is the only risk (not checked). | A | `AG/internal/localapi/tokenstore.go:24-32` `AG/internal/localapi/tokenstore.go:114-116` (the code path of question 3) |
| 8 | TestTokenStore_RemintRevokesOld,. | A | `AG/internal/localapi/tokenstore_test.go:63` |
**Hand step in a runbook?** no hand step
### EA28 — The tunnel key is replaced · Access · NAMED
architecture: seed row 25 in `EV/helpers/helper-docs.md` · helper section: agent „29. Off-site tunnel key rotated (WireGuard rekey)”
| # | Answer | Mark | Pointer |
|---|---|---|---|
| 1 | The old tunnel key ends. Timer (rekey bounds). Entry `rotateKey`. | A | `AG/internal/wgtunnel/rekey.go:33-39` |
| 2 | `private.key`, `private.key.prev`, `private.key.prev.<unix>`, last-rekey file in the state dir. | A | `AG/internal/wgtunnel/rekey.go:33-39` (the code path of question 1) |
| 3 | Old key hard-linked aside, new key renamed in, older `.prev.<unix>` pruned to 3. KEEPS on purpose: `private.key.prev` always, because the escrow may hold it. | A | `AG/internal/wgtunnel/rekey.go:33-39` (the code path of question 1) |
| 4 | Nothing found in the source. Not measured on a box. | A | `AG/internal/wgtunnel/rekey.go:33-39` (the code path of question 1) |
| 5 | Previous key on disk. | A | `AG/internal/wgtunnel/rekey.go:33-39` (the code path of question 1) |
| 6 | New public key registered with the hub; log. | A | `AG/internal/wgtunnel/rekey.go:33-39` (the code path of question 1) |
| 7 | Atomic rename; `private.key` is always a complete key. | A | `AG/internal/wgtunnel/rekey.go:33-39` (the code path of question 1) |
| 8 | . | A | `AG/internal/wgtunnel/rekey_test.go:35` `AG/internal/wgtunnel/rekey_test.go:86` `AG/internal/wgtunnel/rekey_test.go:103` `AG/internal/wgtunnel/rekey_test.go:119` |
**Hand step in a runbook?** no hand step
### EA29 — The hub revokes the box's tunnel · Access · NAMED
architecture: seed row 27 in `EV/helpers/helper-docs.md` · helper section: agent „30. Off-site peer revoked by the hub”
| # | Answer | Mark | Pointer |
|---|---|---|---|
| 1 | The box's tunnel ends. Operator (hub drops the peer). Entry `teardownLocked`. | A | `AG/internal/wgtunnel/manager.go:470-486` |
| 2 | `/etc/wireguard/wg-felhom.conf` (``), unit `wg-quick@wg-felhom`, keys in the state dir, last-applied hash file, registration marker. | A | `AG/internal/pbsdr/manager.go:31` |
| 3 | `systemctl disable --now`, removes the last-applied file. KEEPS on purpose: the marker, so no re-registration. | A | `AG/internal/wgtunnel/manager.go:470-486` (the code path of question 1) |
| 4 | The tunnel is switched off. The marker and the key stay on purpose, so that the box does not register again. | A | `AG/internal/wgtunnel/manager.go:470-486` |
| 5 | Operator re-adds the peer in the hub. | A | `AG/internal/wgtunnel/manager.go:470-486` (the code path of question 1) |
| 6 | WARN in the agent log. | A | `AG/internal/wgtunnel/manager.go:470-486` (the code path of question 1) |
| 7 | Idempotent: checked again every tick; a failed disable returns before removing the hash file, so it retries. | A | `AG/internal/wgtunnel/manager.go:470-486` (the code path of question 1) |
| 8 | . | A | `AG/internal/wgtunnel/manager_test.go:427` `AG/internal/wgtunnel/manager_test.go:678` |
**Hand step in a runbook?** no hand step
### EC00 — An app is removed and its data is kept · App · NAMED
architecture: seed row 1 in `EV/helpers/helper-docs.md` · helper section: controller „App removed, data kept (the default press)”
| # | Answer | Mark | Pointer |
|---|---|---|---|
| 1 | A deployed catalog app; the household (dashboard) — `POST /api/stacks/<n>/remove` -> `removeStack` -> `RemoveStack`. | A | `CT/internal/api/router.go:248` `CT/internal/api/router.go:1025` `CT/internal/stacks/delete.go:624` |
| 2 | Containers, named volumes, drive folder (`HDD_PATH`), `app.yaml`, applied record (`applied-compose.yml`, `applied-meta/`), pre-update and undo copies, gate files, backups (primary unit, Tier-2 mirror, set-aside, verification copy), off-site snapshots, backup prefs, holds, images. | A | `CT/internal/stacks/delete.go:734` `CT/internal/stacks/delete.go:753` (the code path of question 3) |
| 3 | Removes: containers + named volumes `compose down --volumes`; update state; undo copies; labelled volumes the definition no longer declares; `app.yaml`; applied record; update hold; interrupted-restore notice; old images via `retainAfterRemoveFn`. Keeps on purpose: template files "preserved for redeploy"; drive data; backups (not in the path list unless asked,) … | A | `CT/internal/stacks/delete.go:734` `CT/internal/stacks/delete.go:753` `CT/internal/stacks/delete.go:756` `CT/internal/stacks/delete.go:763-769` |
| 4 | Docker volumes with no name and the empty import folder stay. The kept data folder stays on purpose (see EC09). | K | R-995 |
| 5 | Not undoable for containers/volumes. Drive data stays and is offered at the next install as kept data. | A | `CT/internal/stacks/kept.go:17-42` |
| 6 | Hub `NotifyAppRemoved`; integrations `OnStackRemove`; report push; JSON answer to the UI. | A | `CT/internal/api/router.go:1132-1134` `CT/internal/api/router.go:1137-1139` `CT/internal/api/router.go:1147` |
| 7 | A remove writes a 'remove pending' record first. A controller that starts and finds the record finishes the containers and volumes, and it does not delete drive data. | A | `CT/internal/stacks/delete.go:723` `CT/internal/stacks/remove_interrupted.go:48-94` |
| 8 | MEASURED on 9202 (`EV/drill/diff-all.txt`, snaps keep-2, drive-5, drive-7): the drive folder stays and the kept-data page lists it; the named volume goes. · `TestRemoveStack_R442_KeepsDataWhenNotAsked`; `TestR651_RemoveDeletesTheAppliedRecord`; `TestR1117_RemoveDeletesALabelledVolumeTheDefinitionNoLongerDeclares`; `TestUndo_RemovalDeletesKeptCopies`; `TestR552_RemoveClearsTheInterruptedRestoreNotice`. | A | `EV/drill/diff-all.txt` `CT/internal/stacks/delete_r442_test.go:144` `CT/internal/stacks/r651_r658_remove_test.go:18` `CT/internal/stacks/r1117_leftover_volume_test.go:16` `CT/internal/stacks/undo_test.go:434` |
**Hand step in a runbook?** yes — `RB/VOLUNTEER-first-hour.en.md:182`
### EC01 — An app is removed with its drive data · App · NAMED
architecture: seed row 2 in `EV/helpers/helper-docs.md` · helper section: controller „App removed with its drive data (`remove_hdd_data`)”
| # | Answer | Mark | Pointer |
|---|---|---|---|
| 1 | Same press with the "delete my data too" box; body flag. | A | `CT/internal/api/router.go:1034-1037` |
| 2 | As above; the drive folder is `appHDDPath`, resolved for removal by `hddPathForRemoval`. | A | `CT/internal/stacks/delete.go:106` `CT/internal/stacks/delete.go:136` |
| 3 | Removes the app's drive folders: loop, `RemoveAll`. Keeps: `ProtectedHDDPaths` /:778 and `keepOnRemoval` /:786 (shared and read-only paths, R-1027; userdata named as kept, R-800). Refuses (409) when the drive cannot be resolved or is absent. | A | `CT/internal/stacks/delete.go:778-818` `CT/internal/stacks/delete.go:805` `CT/internal/stacks/delete.go:242` `CT/internal/stacks/delete.go:293` |
| 4 | The empty parent folder on the drive stays. | K | R-1276 |
| 5 | No. | A | `CT/internal/stacks/delete.go:778-818` `CT/internal/stacks/delete.go:805` (the code path of question 3) |
| 6 | As above; response names what was kept. | A | `CT/internal/stacks/delete.go:778-818` `CT/internal/stacks/delete.go:805` (the code path of question 3) |
| 7 | The start-up recovery finishes the containers and volumes. It does not delete drive data on its own: the household must press remove again. | A | `CT/internal/stacks/remove_interrupted.go:22-26` |
| 8 | MEASURED on 9202 (`EV/drill/diff-all.txt`): ten install-and-remove rounds left nothing (snaps cheap-01…10). With a drive app (snap drive-2) one empty folder stayed, 4,096 bytes, and it does not grow with more rounds. · `TestRemoveStack_R442_RemovesDeclaredDriveData`; `..._RefusesWhenDriveUnresolvable`; `..._RefusesWhenDriveAbsent`; `TestRemoveStack_R1027_NeverDeletesSharedOrReadOnly`; `TestR682_InterruptedRemoveIsFinishedAtBootKeepingData`. | A | `EV/drill/diff-all.txt` `CT/internal/stacks/delete_r442_test.go:114` `CT/internal/stacks/delete_r442_test.go:172` `CT/internal/stacks/delete_r442_test.go:225` `CT/internal/stacks/delete_r1027_test.go:15` |
**Hand step in a runbook?** no hand step
### EC02 — An app is removed with its backups · App · MENTIONED
architecture: seed row 3 in `EV/helpers/helper-docs.md` · helper section: controller „App removed with its backups (`remove_backups`)”
| # | Answer | Mark | Pointer |
|---|---|---|---|
| 1 | Same press with the backups box; refused together with certain states by decision 27. | A | `CT/internal/api/router.go:1046-1049` |
| 2 | Primary recovery unit per drive namespace, Tier-2 mirror, set-aside units, off-site verification copy, backup prefs. | A | `CT/internal/stacks/delete.go:839-857` `CT/internal/stacks/delete.go:851` (the code path of question 3) |
| 3 | Removes: backup paths (`RemoveAll`; a path outside the base is refused); `RemoveTier2Mirrors`; `RemoveSetAsideUnits`; `removeVerificationCopy`; `DeleteAppBackupPrefs`. Keeps on purpose: off-site snapshots; restore copies (`backups/restore-undo/<app>`) — not in this path, they age out (see "Restore copy"). | A | `CT/internal/stacks/delete.go:839-857` `CT/internal/stacks/delete.go:851` `CT/internal/stacks/delete.go:842-845` `CT/internal/api/router.go:1095-1097` |
| 4 | The app's snapshots in the off-site store stay. The removal keeps them by ruling (closed R-474). No rule says when they end: the store keeps the last snapshots of each app for ever. The restore copy does go (the open row R-1268 still says that it stays). | N | `AR/07-backup-architecture.md:380` `CT/internal/backup/offbox_window.go:80-82` `CT/internal/api/router.go:1064` · class E2 · S04 |
| 5 | No (local). Off-site history stays restorable by hand. | A | `CT/internal/stacks/delete.go:839-857` `CT/internal/stacks/delete.go:851` (the code path of question 3) |
| 6 | As for remove; Tier-2/set-aside removal is log only (area). | A | `CT/internal/backup/r474_remove_mirrors.go:87` |
| 7 | As for remove; boot recovery keeps backups. | A | `CT/internal/stacks/remove_interrupted.go:78-82` |
| 8 | MEASURED on 9202 (`EV/drill/diff-all.txt`, snap upd1-4): the remove took away the local unit, the second-drive copy and the restore copy. Off-site: 9202 has none. · `TestR474_RemoveHandlerDeletesUnitMirrorAndPrefs`; `TestR486_RemovalKeepsTheTier2RecordUnlessBackupsGo`; `TestR706_RemovalWithBackupsDeletesTheVerificationCopy`; `TestR474_OnlyTheAppsOwnMirrorIsRemoved`. | A | `EV/drill/diff-all.txt` `CT/internal/api/r474_remove_wiring_test.go:16` `CT/internal/api/r474_remove_wiring_test.go:51` `CT/internal/api/r706_verify_copy_test.go:22` `CT/internal/backup/r477_r474_test.go:55` |
**Hand step in a runbook?** no hand step
### EC03 — An app's record is deleted by the second door (orphan delete) · App · MENTIONED
architecture folder: 1 lines in 1 files match `/orphan.{0,40}(delete|stack)|DELETE /api/stacks/` (a machine count, not a reading) · helper section: controller „Installed app that left the catalog (orphan) — deleted”
| # | Answer | Mark | Pointer |
|---|---|---|---|
| 1 | A deployed stack whose template is no longer in the catalog: marked `Orphaned` in `ScanStacks` (; skipped when templates are unavailable). The household deletes it: `DELETE /api/stacks/<n>` -> `deleteStack` -> `DeleteStack`. | A | `CT/internal/stacks/manager.go:764-791` `CT/internal/stacks/manager.go:780` `CT/internal/stacks/manager.go:770` `CT/internal/api/router.go:252` |
| 2 | Everything an app creates (see first section). | A | `CT/internal/stacks/delete.go:375` `CT/internal/stacks/delete.go:395-435` (the code path of question 3) |
| 3 | Removes: `compose down --rmi local --volumes`; drive data only if asked (`RemoveAll`); the whole stack dir; images via `retainAfterRemoveFn`. Guards: must be orphaned, not deploying, stopped. | A | `CT/internal/stacks/delete.go:375` `CT/internal/stacks/delete.go:395-435` `CT/internal/stacks/delete.go:422` `CT/internal/stacks/delete.go:442` |
| 4 | This door removes the containers, the volumes and the stack record. It does not remove the undo copy, the update record or the backup folders that the normal remove takes away. | N | `CT/internal/stacks/delete.go:305-460` `CT/internal/api/router.go:1150-1178` · class E1 · S01 |
| 5 | No. | A | `CT/internal/stacks/delete.go:375` `CT/internal/stacks/delete.go:395-435` (the code path of question 3) |
| 6 | The hub gets a fresh report and no 'app removed' event. | N | `CT/internal/api/router.go:1150-1178` · class E5 · S01 |
| 7 | This door writes no 'remove pending' record. A controller that stops in the middle does not finish the job at the next start. | N | `CT/internal/stacks/delete.go:305-460` · class E6 · S01 |
| 8 | `TestDeleteStack_R442_RefusesWhenDriveUnresolvable`; `TestDeleteStack_R442_RemovesDeclaredDriveData`. No test found for backups/prefs/hub event on this path (searched test names with `DeleteStack`, `Orphan`). | A | `CT/internal/stacks/delete_r442_test.go:370` `CT/internal/stacks/delete_r442_test.go:385` |
**Hand step in a runbook?** NO — no document says when to use this door
### EC04 — An install fails or is cut · App · MENTIONED
architecture: seed row 4 in `EV/helpers/helper-docs.md` · helper section: controller „Install that failed or was cut by a restart”
| # | Answer | Mark | Pointer |
|---|---|---|---|
| 1 | A deploy that errors (`runComposeDeploy` +) or a controller restart mid-install (`RecoverInterruptedInstalls`, called). | A | `CT/internal/stacks/deploy.go:612` `CT/internal/stacks/install_interrupted.go:51-100` `CT/cmd/controller/main.go:2206` |
| 2 | Pulled images, containers, named volumes, `app.yaml`, applied record, `.felhom-install-pending` marker, gate file. | A | `CT/internal/stacks/install_interrupted.go:28-29` |
| 3 | Removes: containers by `down` WITHOUT `-v` (R-649); install-pending marker; gate rolled back /:526/:529; on restart: applied record, `.felhom-install-interrupted` written. Keeps on purpose: `app.yaml`; volumes. | A | `CT/internal/stacks/deploy.go:632` `CT/internal/stacks/deploy.go:624-631` `CT/internal/stacks/deploy.go:656` `CT/internal/stacks/deploy.go:511` |
| 4 | The images that the failed install pulled stay until the image clean-up (EC11). Named volumes of an app that never ran stay until a remove. Both are by design. | A | `CT/internal/stacks/image_retention_test.go:167` |
| 5 | The household retries or removes. | A | `CT/internal/stacks/deploy.go:632` `CT/internal/stacks/deploy.go:624-631` (the code path of question 3) |
| 6 | `deployDoneHook(false, …)` and (hub `app_deploy_failed`); UI page says the install was interrupted. | A | `CT/internal/stacks/deploy.go:657-659` `CT/internal/stacks/install_interrupted.go:94-96` |
| 7 | This IS the recovery; a second cut re-runs it at the next start (marker stays until handled). | A | `CT/internal/stacks/deploy.go:632` `CT/internal/stacks/deploy.go:624-631` (the code path of question 3) |
| 8 | `TestR649_AFailedInstallRemovesWhatItStarted`; `TestR681_InterruptedInstallIsFinishedAndReported`; `TestR681_PageSaysTheInstallWasInterrupted`. | A | `CT/internal/stacks/r649_failed_deploy_cleanup_test.go:17` `CT/internal/stacks/r681_install_interrupted_test.go:16` `CT/internal/web/r681_install_interrupted_page_test.go:15` |
**Hand step in a runbook?** no hand step
### EC06 — An update ends well · Versions · NAMED
architecture: seed row 28a in `EV/helpers/helper-docs.md` · helper section: controller „App update concluded (the old version's safety net goes)”
| # | Answer | Mark | Pointer |
|---|---|---|---|
| 1 | A successful update, after the health watch: `verifyAndConclude`. | A | `CT/internal/stacks/update.go:1014-1061` |
| 2 | Pre-update copies in the stack dir, undo-copy volumes (label, helper image `alpine`), the update journal, the previous image. | A | `CT/internal/stacks/undo.go:71` `CT/internal/stacks/undo.go:133` |
| 3 | Removes: undo copies /1046; journal `clearJournal`; `removePreUpdateCopies`; older images `retainAfterUpdate`. Keeps on purpose: the previous image (decisions 53/56/285,); the Postgres conversion copy for its own window. | A | `CT/internal/stacks/update.go:1038` `CT/internal/stacks/update.go:1050` `CT/internal/stacks/update.go:1401` `CT/internal/stacks/update.go:1051` |
| 4 | The small helper image has no version and no cleaner. Old app images wait for the image clean-up (EC11). | K | R-1372 |
| 5 | After conclude the automatic undo is gone (copies deleted); the previous image stays for one version. | A | `CT/internal/stacks/update.go:1038` `CT/internal/stacks/update.go:1050` (the code path of question 3) |
| 6 | Hub update events via the conclude path (not read line by line); UI. | A | `CT/internal/stacks/update.go:1038` `CT/internal/stacks/update.go:1050` (the code path of question 3) |
| 7 | A controller that starts finishes or resumes an update that was cut. | A | `CT/internal/stacks/update.go:1421-1489` `CT/internal/stacks/update.go:1493` `CT/cmd/controller/main.go:542` `CT/cmd/controller/main.go:1432-1435` |
| 8 | MEASURED on 9202 (snaps upd1-2, upd1-4): after the update the old image stayed (+0.8 GB); the remove took both images away. · `TestUndo_ASuccessfulUpdateEndsTheUndoneNote`; `TestImageRetention_ADoneUpdateRunsItWithThePrevious`. | A | `EV/drill/diff-all.txt` `CT/internal/stacks/undo_test.go:403` `CT/internal/stacks/image_retention_test.go:275` |
**Hand step in a runbook?** no hand step
### EC07 — An update is undone or held · Versions · NAMED
architecture: seed row 5 in `EV/helpers/helper-docs.md` · helper section: controller „App update undone, or held after a failed undo”
| # | Answer | Mark | Pointer |
|---|---|---|---|
| 1 | Automatic when the new version fails its check (decision 15): `tryUndo`; if the undo itself fails: `failAndHold`. | A | `CT/internal/stacks/undo.go:510-571` `CT/internal/stacks/update.go:1095-1139` |
| 2 | Undo copies, `pre-update-convert`, `hold-logs/<ts>/compose-logs.txt`, update hold flag. | A | `CT/internal/stacks/update.go:1072-1090` `CT/internal/stacks/update.go:1074` |
| 3 | Undo removes the new version's state and `pre-update-convert`. Hold: KEEPS the undo copies on purpose; sets the hold; clears the journal. | A | `CT/internal/stacks/undo.go:560` `CT/internal/stacks/update.go:1108` `CT/internal/stacks/update.go:1118` `CT/internal/stacks/update.go:1127` |
| 4 | The undo copy goes when the restore that lifts the hold ends (closed R-671). The hold logs stay on purpose: 400 lines for each service (closed R-651). | A | `CT/internal/backup/update_guard.go:694` `CT/cmd/controller/main.go:684` |
| 5 | The undo is the undo. A hold is ended by the operator/household clearing it. | A | `CT/internal/stacks/undo.go:560` `CT/internal/stacks/update.go:1108` (the code path of question 3) |
| 6 | Hub events `app_update_undone` / `app_update_held` (undo.go ~:596-600;); app page shows the kept log. | A | `CT/internal/stacks/update.go:1137` `CT/internal/stacks/manager.go:1568` |
| 7 | `TestUndo_PowerCutDuringTheUndoResumesIt`; `TestUndo_PowerCutDuringTheCopyPutsTheOldVersionBack` — recovery in `RecoverUpdates`. | A | `CT/internal/stacks/undo_test.go:343` `CT/internal/stacks/undo_test.go:381` `CT/internal/stacks/update.go:1421` |
| 8 | `TestUndo_FailedUpdateIsPutBackWithItsData`; `TestUndo_RestoreFailureIsHalf`; `TestD64_ForgetUpdateHeld`. No test found pinning removal of `hold-logs`. | A | `CT/internal/stacks/undo_test.go:182` `CT/internal/stacks/undo_test.go:284` `CT/internal/stacks/d64_forget_update_held_test.go:15` |
**Hand step in a runbook?** yes — `RB/VOLUNTEER-first-hour.en.md:182`
### EC08 — The copy from a database conversion is released · Copies · MENTIONED
architecture folder: 4 lines in 2 files match `/conversion.{0,60}(copy|kept|dump)/` (a machine count, not a reading) · helper section: controller „Postgres conversion copy released”
| # | Answer | Mark | Pointer |
|---|---|---|---|
| 1 | Scheduler, hourly: `ReleaseConversionCopies` (wired). | A | `CT/internal/stacks/pgconvert.go:648-672` `CT/cmd/controller/main.go:1407` |
| 2 | A copy of the old database volume made before a major-version conversion, recorded in `app.yaml` as `ConversionCopy`, plus the dump dir `pre-update-convert` in the stack dir. | A | `CT/internal/stacks/pgconvert.go:76-86` `CT/internal/stacks/pgconvert.go:63-65` |
| 3 | Removes the volume copy (`copier.Remove`:698, log:702) only when the app has a backup PROVEN after the conversion (:681) AND a dump written by the new engine (:685-697); otherwise kept and retried. The dump dir is "kept on a HOLD (evidence), removed on done and undone":63-64. | A | `CT/internal/stacks/update.go:1045` `CT/internal/stacks/undo.go:560` |
| 4 | The copy stays until a backup made after the conversion is proven. That is the rule, not a leftover. | A | `AR/07-backup-architecture.md:1124-1125` |
| 5 | No after release; before it, the copy is the way back to the old engine. | A | `CT/internal/stacks/update.go:1045` `CT/internal/stacks/undo.go:560` (the code path of question 3) |
| 6 | Log only (:702; DEBUG when kept:694). | A | `CT/internal/stacks/update.go:1045` `CT/internal/stacks/undo.go:560` (the code path of question 3) |
| 7 | Idempotent hourly pass; a failed removal is "kept, tried again later":699. | A | `CT/internal/stacks/update.go:1045` `CT/internal/stacks/undo.go:560` (the code path of question 3) |
| 8 | `TestConvert_ReleaseIsWiredAtStartup`; `TestR697_ASecondConversionDoesNotOrphanTheFirstCopy`. | A | `CT/cmd/controller/conversion_wiring_test.go:8` `CT/internal/stacks/r700_records_carried_test.go:60` |
**Hand step in a runbook?** no hand step
### EC09 — Kept data of a removed app is deleted or used again · App · NAMED
architecture: seed row 1 in `EV/helpers/helper-docs.md` · helper section: controller „Kept data folder (old app data set aside at reinstall)”
| # | Answer | Mark | Pointer |
|---|---|---|---|
| 1 | Household: delete on the kept-data card — (route) -> `DeleteKept`. Or it is loaded back: `FinishKeptLoad`. | A | `CT/internal/web/kept_handlers.go:154` `CT/internal/web/server.go:741` `CT/internal/stacks/kept.go:415-429` `CT/internal/stacks/kept.go:468-491` |
| 2 | Created by `KeepAside` (a rename, called from) when an install finds old data. | A | `CT/internal/stacks/kept.go:143` `CT/internal/stacks/deploy.go:460` |
| 3 | Removes the kept folder `RemoveAll`, only if it is one the list shows (name must match,). Rule 4: "THE BOX NEVER DELETES KEPT DATA BY ITSELF". | A | `CT/internal/stacks/kept.go:421` `CT/internal/web/kept_handlers.go:165-166` `CT/internal/stacks/kept.go:39-42` |
| 4 | Kept data has no age limit, on purpose. Only the household deletes it. | A | `CT/internal/stacks/kept.go:39-42` `AR/07-backup-architecture.md:1045` |
| 5 | No. | A | `CT/internal/stacks/kept.go:421` `CT/internal/web/kept_handlers.go:165-166` (the code path of question 3) |
| 6 | Flash message; log. | A | `CT/internal/web/kept_handlers.go:174` |
| 7 | Single `RemoveAll`; a cut leaves a partly deleted folder still listed — pressing again finishes. nrf. | A | `CT/internal/stacks/kept.go:421` `CT/internal/web/kept_handlers.go:165-166` (the code path of question 3) |
| 8 | MEASURED on 9202 (`EV/drill/putback-1.txt`): the delete on the kept-data page removed the data and left the empty folder `appdata/grimmory` (the same leftover as R-1276). · `TestKept_DeleteRefusesAnythingNotListed`; `TestKept_KeepAsideIsARenameAndRollsBack`; `TestKept_KeptDirIsProtected`. | A | `EV/drill/diff-all.txt` `CT/internal/stacks/kept_test.go:171` `CT/internal/stacks/kept_test.go:76` `CT/internal/stacks/kept_test.go:130` |
**Hand step in a runbook?** no hand step
### EC11 — Old app images are cleaned · Versions · MENTIONED
architecture folder: 4 lines in 2 files match `/image.{0,30}(prune|clean-up|cleanup)/` (a machine count, not a reading) · helper section: controller „Old images (app, controller, infrastructure)”
| # | Answer | Mark | Pointer |
|---|---|---|---|
| 1 | Automatic: after an update (`RetainImagesAfterUpdate`), after a remove (`RetainImagesAfterRemove`), once per box (`RunImageRetentionOnce`, marker `image-retention-v2.done`); controller images at start (`RetainControllerImages`, wired); infra images `RetainInfraImages` (`RunInfraImageRetention`). | A | `CT/internal/stacks/image_retention.go:291` `CT/internal/stacks/image_retention.go:332` `CT/internal/stacks/image_retention.go:370` `CT/internal/stacks/image_retention.go:362-364` |
| 2 | Every pull leaves an image. | A | `CT/internal/stacks/image_retention.go:261` `CT/internal/stacks/controller_image_retention.go:187` (the code path of question 3) |
| 3 | Removes images not in the keep set: `rmi`,. Keeps on purpose: running + previous version (headers,); the controller's recorded previous image (`RecordedPrevious`); nothing is deleted when the keep set is unreadable. | A | `CT/internal/stacks/image_retention.go:261` `CT/internal/stacks/controller_image_retention.go:187` `CT/internal/stacks/infra_image_retention.go:149` `CT/internal/stacks/image_retention.go:17-31` |
| 4 | Images with no version tag (the helper image) are outside the clean-up. | K | R-1372 |
| 5 | An image can be pulled again while the registry has it. | A | `CT/internal/stacks/image_retention.go:261` `CT/internal/stacks/controller_image_retention.go:187` (the code path of question 3) |
| 6 | Log only. | A | `CT/internal/stacks/image_retention.go:261` `CT/internal/stacks/controller_image_retention.go:187` (the code path of question 3) |
| 7 | Skipped while an update or swap runs; next trigger retries. nrf needed. | A | `CT/internal/stacks/image_retention.go:261` `CT/internal/stacks/controller_image_retention.go:187` (the code path of question 3) |
| 8 | `TestImageRetention_KeepsRunningAndPreviousDeletesOlder`; `..._UnreadableKeepSetDeletesNothing`; `TestControllerRetention_KeepsRunningAndPreviousDeletesOlder`; `TestInfraRetention_KeepsPinAndPreviousDeletesOlder`; `TestRecordedPrevious`. | A | `CT/internal/stacks/image_retention_test.go:111` `CT/internal/stacks/image_retention_test.go:189` `CT/internal/stacks/controller_image_retention_test.go:36` `CT/internal/stacks/infra_image_retention_test.go:42` |
**Hand step in a runbook?** no hand step
### EC12 — A drive is retired by the household · Drive · NAMED
architecture: seed row 7 in `EV/helpers/helper-docs.md` · helper section: controller „Drive retired (decommission)”
| # | Answer | Mark | Pointer |
|---|---|---|---|
| 1 | Household on the storage page: `handleStorageDecommission` (route). Mode "migrate" (`MigrateAllAndDecommission`) or "anyway" (`decommissionAnyway`, type-to-confirm). | A | `CT/internal/web/storage_handlers.go:521` `CT/internal/web/storage_handlers.go:440` `CT/internal/stacks/migrate.go:206` `CT/internal/web/storage_handlers.go:649` |
| 2 | Registry entry in settings, the drive's namespace (app data, `backups/…`), FileBrowser mount. | A | `CT/internal/settings/settings.go:2447-2467` `CT/internal/settings/settings.go:760` (the code path of question 3) |
| 3 | `finalizeDecommissionWith`:733: agent `Decommission`:742 ("intent + unmount; never formats":724), `SetDecommissioned`:753 (— entry KEPT, soft-marked, with date and `MigratedTo`), default promoted, FileBrowser mounts synced. "Anyway" stops the apps but keeps their `HDD_PATH`. | A | `CT/internal/settings/settings.go:2447-2467` `CT/internal/settings/settings.go:760` `CT/internal/settings/settings.go:767` `CT/internal/settings/settings.go:653` |
| 4 | The apps that lived on the drive stay stopped, by design. The data on the drive stays; the host mount stays until the drive is gone (EA09). | A | `CT/internal/web/storage_handlers.go:653` `CT/internal/web/intermediary.go:605-606` |
| 5 | Yes — reconnect re-enrolls a retired drive ("decommission is non-destructive", handler); `ClearDecommissioned`. | A | `CT/internal/web/intermediary.go:584-587` `CT/internal/web/intermediary.go:588-624` `CT/internal/settings/settings.go:2470` |
| 6 | The household sees the page. The box's report carries the retired drive, and the hub does not read that field: ruled 2026-10-05 (decision 130, closed row R-888) that the hub does not need it. No event goes to the hub. | A | `E/documentation/backlog/CLOSED-ITEMS.md:994` `CT/internal/web/storage_handlers.go:521-780` |
| 7 | Agent refusal changes nothing; refusal after stop restarts the apps that ran. Migrate mode: journal (next section). | A | `CT/internal/settings/settings.go:2447-2467` `CT/internal/settings/settings.go:760` (the code path of question 3) |
| 8 | `TestFinalizeDecommission_AgentRefusalChangesNothing`; `TestR1144_RefusalAfterStopStartsTheRunningAppsAgain`; `TestR1144_AcceptedRetirementKeepsTheAppsStopped`; `TestAutoDiscoverStoragePaths_DecommissionedNotReactivated`. | A | `CT/internal/web/decommission_test.go:131` `CT/internal/web/r1144_decommission_anyway_test.go:50` `CT/internal/web/r1144_decommission_anyway_test.go:92` `CT/internal/settings/storage_discovery_test.go:139` |
**Hand step in a runbook?** no hand step
### EC13 — An app's data is moved to another drive · Drive · MENTIONED
architecture folder: 2 lines in 2 files match `/(migrat|move).{0,40}(another|other|new) drive/` (a machine count, not a reading) · helper section: controller „App data moved to another drive (source clean-up)”
| # | Answer | Mark | Pointer |
|---|---|---|---|
| 1 | Household moves one app (`MigrateApp`) or everything before retiring a drive; `runMigration`. | A | `CT/internal/stacks/migrate.go:211` `CT/internal/stacks/migrate.go:206` `CT/internal/stacks/migrate.go:418-474` |
| 2 | Journal `<dataDir>/migration.json` (:5/:44); a full copy on the target. | A | `CT/internal/stacks/migrate.go:211` `CT/internal/stacks/migrate.go:206` (the code path of question 1) |
| 3 | `migCleanup`:616-654 removes from the SOURCE: app data:626, the recovery unit:630, and for scope "all" every remaining child of the source namespace:640-647 — only after the app runs from the target (`migCleanupAllowed`:658). | A | `CT/internal/stacks/migrate.go:211` `CT/internal/stacks/migrate.go:206` (the code path of question 1) |
| 4 | A move of ONE app removes that app's data folder and its backup unit from the old drive. The restore copy, a set-aside backup and kept data of that app stay on the old drive. Only the move of ALL apps clears the old drive. | N | `CT/internal/stacks/migrate.go:616-654` · class E1 · S22 |
| 5 | Before clean-up: abort keeps the source. After: no. | A | `CT/internal/stacks/migrate.go:211` `CT/internal/stacks/migrate.go:206` (the code path of question 1) |
| 6 | `migDoneHook`:468-469 (`OnMigrationDone`); UI progress. | A | `CT/internal/web/storage_handlers.go:775` |
| 7 | `RecoverMigration` resumes at boot (aborted/done journals ignored), called; drive flip persisted `persistDriveFlip`. | A | `CT/internal/stacks/migrate.go:701-716` `CT/internal/stacks/migrate.go:707` `CT/cmd/controller/main.go:2209` `CT/cmd/controller/main.go:763` |
| 8 | `TestMigration_CleanupOnlyAfterRedeploy`; `TestMigration_HappyPathCleansSource`; `TestCleanupGate`. | A | `CT/internal/stacks/migrate_test.go:188` `CT/internal/stacks/migrate_test.go:216` `CT/internal/stacks/migrate_test.go:378` |
**Hand step in a runbook?** no hand step
### EC14 — A drive is ejected · Drive · MENTIONED
architecture: seed row 8 in `EV/helpers/helper-docs.md` · helper section: controller „Drive safely removed (eject), incl. the media drive”
| # | Answer | Mark | Pointer |
|---|---|---|---|
| 1 | Household: `handleStorageEject` (route). | A | `CT/internal/web/storage_handlers.go:1143` `CT/internal/web/storage_handlers.go:418` |
| 2 | Registry entry, mount, FileBrowser mount. | A | `CT/internal/settings/settings.go:1689-1706` `CT/internal/settings/settings.go:1200` (the code path of question 3) |
| 3 | Media drive (R-1044): safe removal:1177, event `removed`:1178, entry KEPT. Other drives: agent `EjectDisk`:1181, then `RemoveStoragePath`:1197 and FileBrowser sync; `SetEjected`, `ClearEjected` on failure. | A | `CT/internal/settings/settings.go:1689-1706` `CT/internal/settings/settings.go:1200` `CT/internal/settings/settings.go:3082` `CT/internal/web/storage_handlers.go:1185` |
| 4 | The agent takes the drive out of the guest and keeps the host mount, so that a drive that comes back binds again. It does not refuse when guests use the drive: it lists them in its answer. | A | `AG/internal/localapi/disks.go:537-556` `CT/internal/web/storage_handlers.go:1143-1200` |
| 5 | Plug it back; discovery re-adds it. | A | `CT/internal/settings/settings.go:1689-1706` `CT/internal/settings/settings.go:1200` (the code path of question 3) |
| 6 | UI JSON; media: `mediaDriveEvent`. | A | `CT/internal/web/media_events.go:110` |
| 7 | Agent failure -> `ClearEjected`:1185. nrf for a cut between eject and deregister (searched: `SetEjected`, `ClearEjected`). | A | `CT/internal/settings/settings.go:1689-1706` `CT/internal/settings/settings.go:1200` (the code path of question 3) |
| 8 | `TestEjectDisk_RefusalReasonSurfaced`. No web-layer test found for the deregister step. | A | `CT/internal/agentapi/refusal_test.go:52` |
**Hand step in a runbook?** no hand step
### EC15 — A drive is wiped · Drive · MENTIONED
architecture folder: 12 lines in 6 files match `/(wipe|format).{0,40}(drive|disk)/` (a machine count, not a reading) · helper section: controller „Drive wiped (format)”
| # | Answer | Mark | Pointer |
|---|---|---|---|
| 1 | Household, type-to-confirm: `handleStorageWipe` (route). | A | `CT/internal/web/storage_handlers.go:911` `CT/internal/web/storage_handlers.go:420` |
| 2 | Everything on the drive. | A | `CT/internal/web/storage_handlers.go:911` `CT/internal/web/storage_handlers.go:420` (the code path of question 1) |
| 3 | Agent `EjectDisk`:954 (a failure is only a WARN and the handler goes on), `RemoveStoragePath`:956, agent `FormatDisk` probe:964 and confirmed:982. | A | `CT/internal/web/storage_handlers.go:911` `CT/internal/web/storage_handlers.go:420` (the code path of question 1) |
| 4 | The handler removes the drive from the registered places BEFORE the format. If the format then fails, the drive is not registered and still holds the old data. A failed eject is a warning only, and the handler does not look for apps on the drive. | N | `CT/internal/web/storage_handlers.go:911-1000` · class E6 · S21 |
| 5 | No. | A | `CT/internal/web/storage_handlers.go:911` `CT/internal/web/storage_handlers.go:420` (the code path of question 1) |
| 6 | The household types a word to confirm. No event goes to the hub. | N | `CT/internal/web/storage_handlers.go:911-1000` · class E5 · S41 |
| 7 | There is no record of a wipe in progress. A controller that stops between 'not registered' and 'formatted' leaves that state, and nothing finishes or undoes it. | N | `CT/internal/web/storage_handlers.go:911-1000` · class E6 · S21 |
| 8 | SOURCE only — no test pins the order of the steps. | A | `CT/internal/web/storage_handlers.go:911-1000` |
**Hand step in a runbook?** no hand step
### EC16 — A storage place or a network share is removed · Drive · UNNAMED
architecture folder: 0 lines in 0 files match `/(storage path|network share).{0,60}remov/` (a machine count, not a reading) · helper section: controller „Drive set away, storage path or network share removed”
| # | Answer | Mark | Pointer |
|---|---|---|---|
| 1 | `handleStorageDisconnect`; `settingsStorageRemoveHandler`; `handleNetStorageRemove`. | A | `CT/internal/web/intermediary.go:562-580` `CT/internal/web/handlers.go:3633-3677` `CT/internal/web/netstorage_handlers.go:288-329` |
| 2 | Registry entry; for a share, the mount made by the agent. | A | `CT/internal/web/intermediary.go:562-580` `CT/internal/web/handlers.go:3633-3677` (the code path of question 1) |
| 3 | Disconnect: stops the apps on the path:567, marks it `SetDisconnected(…, stopped)`:574 (an agent eject failure is only a WARN:570-572). Path remove: registry only, refuses when apps use it:3644, default:3652 or last path:3661; `RemoveStoragePath`:3667. Share: refuses while a deployed app is on it:306-310; agent `RemoveNetStorage`:316; `RemoveStoragePath`:321. … | A | `CT/internal/web/intermediary.go:562-580` `CT/internal/web/handlers.go:3633-3677` (the code path of question 1) |
| 4 | The page does not name the backup copies on the other drive that stay. | K | R-1064 |
| 5 | Yes — reconnect / add again. | A | `CT/internal/web/intermediary.go:562-580` `CT/internal/web/handlers.go:3633-3677` (the code path of question 1) |
| 6 | UI; for a backup-target drive a hub event exists (`TestStorageDisconnectedActuallyReachesTheHub`). | A | `CT/internal/notify/backup_target_notify_test.go:96` |
| 7 | nrf (searched: marker in the three handlers). | A | `CT/internal/web/intermediary.go:562-580` `CT/internal/web/handlers.go:3633-3677` (the code path of question 1) |
| 8 | `TestDisconnectDoesNotClearTheTarget`; `TestR1323_AnotherDisconnectFailureKeepsTheAlarm`. | A | `CT/internal/settings/backup_target_role_test.go:91` `CT/internal/stacks/r1323_gate_replaced_test.go:71` |
**Hand step in a runbook?** no hand step
### EC17 — A restore ends: the copy of the old state · Copies · NAMED
architecture: seed row 12 in `EV/helpers/helper-docs.md` · helper section: controller „Restore copy (the data as it was before a restore)”
| # | Answer | Mark | Pointer |
|---|---|---|---|
| 1 | Made before every restore; ended by: success (`drop`), the late-start watch (`watchLateStart`), the 6-hourly sweep (`SweepUnusedRestoreCopies`, wired), or the household (`restoreCopyDeleteHandler` -> `DeleteRestoreCopy`). | A | `CT/internal/backup/offbox_restore_undo.go:176-189` `CT/internal/backup/restore_verdict.go:73-89` `CT/internal/backup/restore_copy_sweep.go:36-101` `CT/cmd/controller/main.go:1414-1415` |
| 2 | `backups/restore-undo/<app>/<stamp>` (`RestoreUndoDir`) + a crash record (`persistUndoForCrash`). | A | `CT/internal/backup/offbox_restore_undo.go:50` `CT/internal/backup/restore_crash_putback.go:53` |
| 3 | Removes: on success `RemoveAll`; partial copy on error; unused after 30 days /:89 (empty app folder). Keeps on purpose: a copy after a failed put-back + hold (header); copies of held apps; a copy when the app did not start stably ("stays for support"); the "needed" reasons. | A | `CT/internal/backup/offbox_restore_undo.go:184` `CT/internal/backup/offbox_restore_undo.go:165` `CT/internal/backup/restore_copy_sweep.go:29` `CT/internal/backup/restore_copy_sweep.go:97` |
| 4 | A restore copy that nobody uses goes after 30 days. It also goes when the app's backups are removed. | A | `CT/internal/backup/restore_copy_sweep.go:29` `CT/internal/backup/restore_copy_sweep.go:89` `CT/internal/api/router.go:1064` |
| 5 | The copy IS the undo; gone after the sweep or a manual delete (typed app name; 409 when needed). | A | `CT/internal/web/kept_copies.go:218` `CT/internal/web/kept_copies.go:212-215` |
| 6 | Log; UI list; hold sentence (`TestUndo_HoldSentenceSaysTheUndoWasTriedAndTheDataState`). | A | `CT/internal/backup/restore_copy_sweep.go:93` `CT/internal/backup/undo_hold_test.go:21` |
| 7 | Power cut mid-restore: `PutBackInterruptedRestore` at start (wired); a failed put-back leaves the marker and is retried next start; interrupted restore reported. | A | `CT/internal/backup/restore_crash_putback.go:186` `CT/cmd/controller/main.go:444` `CT/cmd/controller/main.go:481` `CT/cmd/controller/main.go:29-30` |
| 8 | MEASURED on 9202 (snaps upd1-3, upd1-4): the restore made a restore copy (1.8 MB); the remove with backups took it away. · `TestD62_AnUnusedCopyIsKept30Days`; `TestR1256_H8_TheSweepIsWiredAtStartup`; `TestR1195_AKilledLocalRestoreIsPutBackOnStart`; `TestR1195_AFailedPutBackOnStartLeavesTheAppStopped`. | A | `EV/drill/diff-all.txt` `CT/internal/backup/d62_restore_copies_test.go:18` `CT/cmd/controller/r1256_sweep_wiring_test.go:8` `CT/internal/backup/r1177_local_putback_test.go:199` `CT/internal/backup/r1177_local_putback_test.go:303` |
**Hand step in a runbook?** yes — `RB/VOLUNTEER-first-hour.en.md:182`
### EC18 — A whole restore from the second drive ends · Copies · MENTIONED
architecture folder: 29 lines in 6 files match `/whole.{0,30}restore|before-restore/` (a machine count, not a reading) · helper section: controller „Whole restore from the second drive — replaced files kept beside”
| # | Answer | Mark | Pointer |
|---|---|---|---|
| 1 | Household restores a whole folder from the Tier-2 copy: (rules). | A | `CT/internal/backup/tier2_whole.go` `CT/internal/backup/tier2_whole.go:19-40` |
| 2 | For every file it replaces, the live one is kept beside it as `<name>.felhom-<UTC stamp>` (rule 4:36-37; suffix:52; link/remove:191-200). | A | `CT/internal/backup/tier2_whole.go` `CT/internal/backup/tier2_whole.go:19-40` (the code path of question 1) |
| 3 | Removes nothing live (rule 1). Keeps the beside-copies on purpose. | A | `CT/internal/backup/tier2_whole.go` `CT/internal/backup/tier2_whole.go:19-40` (the code path of question 1) |
| 4 | The restore moves the old files beside the restored ones, with a fixed ending in the name. Nothing in the source removes them later, and no page lists them. | N | `CT/internal/backup/tier2_whole.go:52` `CT/internal/backup/tier2_whole.go:132` `CT/internal/backup/tier2_whole.go:345` · class E2 · S05 |
| 5 | Yes, by hand — rename the beside-copy back. | A | `CT/internal/backup/tier2_whole.go` `CT/internal/backup/tier2_whole.go:19-40` (the code path of question 1) |
| 6 | Result line counts restored/replaced/kept-newer:345 (log + UI result). | A | `CT/internal/backup/tier2_whole.go` `CT/internal/backup/tier2_whole.go:19-40` (the code path of question 1) |
| 7 | Not determined (the resume path was not read). | A | `CT/internal/backup/tier2_whole.go` `CT/internal/backup/tier2_whole.go:19-40` (the code path of question 1) |
| 8 | Not located by name. | A | `CT/internal/backup/tier2_whole.go` `CT/internal/backup/tier2_whole.go:19-40` (the code path of question 1) |
**Hand step in a runbook?** no hand step
### EC19 — A second-drive copy whose source is gone · Copies · NAMED
architecture: seed row 11 in `EV/helpers/helper-docs.md` · helper section: controller „Second-drive copy whose source is gone (kept copies, mirrors, stray copy containers)”
| # | Answer | Mark | Pointer |
|---|---|---|---|
| 1 | Tier-2 run / reconcile (`tier2Reconcile`); household "Eltávolítás": `keptCopyRemoveHandler` (route) -> `RemoveKeptCopy`. | A | `CT/internal/backup/tier2.go:300` `CT/internal/web/kept_copies.go:51-78` `CT/internal/web/server.go:850` `CT/internal/backup/tier2_kept.go:117-156` |
| 2 | Mirrors `backups/secondary/<app>`, share copies, a record of kept copies (`keepCopy`). | A | `CT/internal/backup/tier2_kept.go:27` |
| 3 | D25: a copy whose source is gone is KEPT; only the household removes it (header:15-23). Removal checks the folder identity (dev+inode:143-146) then `tier2SafeRemove`:151. A deleted or renamed share's copy is pruned at the next run, own drive only (, R-1175). … | A | `CT/internal/backup/tier2.go:260-270` `CT/internal/backup/tier2_shares.go:255-262` `CT/internal/backup/tier2_copy_lifecycle.go:31` `CT/internal/backup/tier2_copy_lifecycle.go:255` |
| 4 | A kept second-drive copy stays until the household removes it. No age limit, by design. | A | `CT/internal/backup/tier2.go:260-270` `CT/internal/backup/tier2_shares.go:255-262` (the code path of question 3) |
| 5 | No after removal. | A | `CT/internal/backup/tier2.go:260-270` `CT/internal/backup/tier2_shares.go:255-262` (the code path of question 3) |
| 6 | Flash only; log. | A | `CT/internal/web/kept_copies.go:51-78` `CT/internal/backup/tier2_kept.go:154` |
| 7 | Stray container at start is cleared before the scheduler (`TestStrayCopy_ClearIsWiredBeforeTheScheduler`); a restore is refused while a copy may run (`Tier2CopyBlocksRestore`). | A | `CT/cmd/controller/straycopy_wiring_test.go:12` `CT/internal/backup/tier2_copy_lifecycle.go:319` |
| 8 | `TestR1175_MissingFolderKeptDeletedSharePruned`; `TestR1175_AnAwayDrivesShareCopyIsKeptAndListed`; `TestStrayCopy_StartUpRemovesEveryLeftover`. | A | `CT/internal/backup/r1175_shares_kept_test.go:74` `CT/internal/backup/r1175_shares_kept_test.go:42` `CT/internal/backup/tier2_copy_lifecycle_test.go:158` |
**Hand step in a runbook?** no hand step
### EC20 — A backup unit is set aside · Copies · NAMED
architecture: `AR/07-backup-architecture.md:1800` · helper section: controller „Backup unit of an earlier install, set aside (D47)”
| # | Answer | Mark | Pointer |
|---|---|---|---|
| 1 | Automatic when a backup writer finds a unit made by another install of the same app: `guardUnitWrite` -> `setAsideUnit`. | A | `CT/internal/backup/unit_owner.go:147` `CT/internal/backup/unit_owner.go:207` |
| 2 | `backups/set-aside/<app>/<stamp>` (`setAsideRoot`:53), a whole unit with its own password. | A | `CT/internal/backup/unit_owner.go:147` `CT/internal/backup/unit_owner.go:207` (the code path of question 1) |
| 3 | "Nothing deletes a set-aside unit but the household":33-34. Removed with the app's backups (`RemoveSetAsideUnits`:281, `RemoveAll`:296); restoring one retires the replaced unit quietly (`retireReplacedUnit`:359-381). | A | `CT/internal/backup/unit_owner.go:147` `CT/internal/backup/unit_owner.go:207` (the code path of question 1) |
| 4 | A set-aside unit stays with no limit, by design. The household removes it. | A | `CT/internal/backup/unit_owner.go:147` `CT/internal/backup/unit_owner.go:207` (the code path of question 1) |
| 5 | Yes — `RestoreSetAsideUnit`:339. | A | `CT/internal/backup/unit_owner.go:147` `CT/internal/backup/unit_owner.go:207` (the code path of question 1) |
| 6 | The operator is told once (`TestD47_ASetAsideTellsTheOperatorOnce`). | A | `CT/internal/backup/unit_owner_test.go:308` |
| 7 | Writer refuses when it cannot set aside (`TestD47_TheWriterRefusesWhenTheUnitCannotBeSetAside`:192). nrf for a cut mid-rename. | A | `CT/internal/backup/unit_owner.go:147` `CT/internal/backup/unit_owner.go:207` (the code path of question 1) |
| 8 | `TestD47_AUnitFromBeforeD47IsSetAsideWhenItsPasswordDiffers`; `TestR1278_KeptBackupsForCountsTheSetAsideUnits`; `TestR1288_ARestoreOfASetAsideUnitRetiresTheReplacedUnitQuietly`. | A | `CT/internal/backup/unit_owner_test.go:143` `CT/internal/backup/unit_owner_test.go:378` `CT/internal/backup/unit_owner_test.go:330` |
**Hand step in a runbook?** no hand step
### EC21 — A copy fetched from the off-site store · Copies · MENTIONED
architecture: `AR/07-backup-architecture.md:1019` · helper section: controller „Verification copy of an off-site restore test”
| # | Answer | Mark | Pointer |
|---|---|---|---|
| 1 | Household deletes it: `offboxVerifyCopyDeleteHandler` (route) -> `DeleteOffsiteRestoreCopy`; or removal of the app with backups. | A | `CT/internal/web/offbox_handlers.go:629` `CT/internal/web/server.go:847` `CT/internal/backup/offbox_verify_copies.go:115-143` `CT/internal/api/router.go:1007-1023` |
| 2 | `backups/offsite-restore/<app>` (:34) and `backups/offsite-proof` (:42). | A | `CT/internal/web/offbox_handlers.go:629` `CT/internal/web/server.go:847` (the code path of question 1) |
| 3 | `RemoveAll`:136, log:139. | A | `CT/internal/web/offbox_handlers.go:629` `CT/internal/web/server.go:847` (the code path of question 1) |
| 4 | The fetched copy has no age limit and no cleaner. | K | R-1372 |
| 5 | No (it is a copy; run the test again). | A | `CT/internal/web/offbox_handlers.go:629` `CT/internal/web/server.go:847` (the code path of question 1) |
| 6 | UI flash; log. | A | `CT/internal/web/offbox_handlers.go:629` `CT/internal/web/server.go:847` (the code path of question 1) |
| 7 | Single `RemoveAll`. nrf. | A | `CT/internal/web/offbox_handlers.go:629` `CT/internal/web/server.go:847` (the code path of question 1) |
| 8 | `TestDeleteVerifyCopyRemovesOnlyTheNamedOne`; `TestDeleteVerifyCopyStaysInsideTheSandbox`. | A | `CT/internal/backup/offbox_verify_copies_test.go:90` `CT/internal/backup/offbox_verify_copies_test.go:147` |
**Hand step in a runbook?** no hand step
### EC22 — Old local backups are cleaned · Copies · MENTIONED
architecture folder: 38 lines in 13 files match `/retention/` (a machine count, not a reading) · helper section: controller „Local backup clean-up (stale dumps, temp files, old-drive unit)”
| # | Answer | Mark | Pointer |
|---|---|---|---|
| 1 | Each backup run: and; database dumps `cleanupTmpFiles`. | A | `CT/internal/backup/backup.go:947-969` `CT/internal/backup/backup.go:1590-1614` `CT/internal/appbackup/dbdump.go:976-997` |
| 2 | `volume-dumps/*.tar`, `*.tar.tmp`, `db-dumps/*.tmp`, a primary unit on a drive the app used to live on. | A | `CT/internal/backup/backup.go:957-958` `CT/internal/backup/backup.go:961-964` (the code path of question 3) |
| 3 | Removes: `.tar.tmp`; the tar of a volume that no longer exists or is excluded (R-49); the stale primary unit on the old drive (guards, log); `.tmp` older than 1 h. | A | `CT/internal/backup/backup.go:957-958` `CT/internal/backup/backup.go:961-964` `CT/internal/backup/backup.go:1610` `CT/internal/backup/backup.go:1590-1606` |
| 4 | One unit for each app; the newest replaces the last. There is nothing to prune. | A | `CT/internal/backup/r379_rollback_test.go:273` |
| 5 | No. | A | `CT/internal/backup/backup.go:957-958` `CT/internal/backup/backup.go:961-964` (the code path of question 3) |
| 6 | Log only. | A | `CT/internal/backup/backup.go:957-958` `CT/internal/backup/backup.go:961-964` (the code path of question 3) |
| 7 | `.tmp` + rename; the leftovers are exactly what the next run removes. | A | `CT/internal/backup/backup.go:957-958` `CT/internal/backup/backup.go:961-964` (the code path of question 3) |
| 8 | `TestR379_PruneKeepsTheNewestByStamp`; stale-tar test not located by name. | A | `CT/internal/backup/r379_rollback_test.go:273` |
**Hand step in a runbook?** no hand step
### EC23 — Old off-site snapshots are cleaned · Copies · NAMED
architecture: seed row 14 in `EV/helpers/helper-docs.md` · helper section: controller „Off-site history ages out (retention)”
| # | Answer | Mark | Pointer |
|---|---|---|---|
| 1 | After each off-site run: `offsiteWindowRetention` (job). | A | `CT/internal/backup/offbox_window.go:207-275` `CT/cmd/controller/main.go:1641` |
| 2 | restic snapshots tagged `felhom-offbox` + `<stack>`. | A | `CT/internal/backup/offbox.go:1563` |
| 3 | Household SFTP: `forget … --prune`:213-214 with the policy:80-82. Hub-provisioned (pinned, append-only key): only inside a hub clean-up window:228, plan checked by the guard:252-257, `forget <ids> --prune`:265-266, window closed with the result:239-245. Stale locks: `unlock`, `unlock --remove-all`. | A | `CT/internal/backup/offbox.go:922` `CT/internal/backup/offbox.go:944` |
| 4 | The weekly clean-up keeps the last snapshots of each app for ever, also for an app that is removed (same finding as EC02). | N | `CT/internal/backup/offbox_window.go:80-82` · class E2 · S04 |
| 5 | No. | A | `CT/internal/backup/offbox.go:922` `CT/internal/backup/offbox.go:944` (the code path of question 3) |
| 6 | Log; window result to the hub (:239-245). | A | `CT/internal/backup/offbox.go:922` `CT/internal/backup/offbox.go:944` (the code path of question 3) |
| 7 | A clean-up that its own guard refuses removes nothing, and each refused week makes the next plan bigger. | K | R-1294 |
| 8 | `TestRetention_PinnedWithoutWindowDeletesNothing`; `TestOffsiteGuard_HonestPlanPrunesOldestFirst`; `TestRetentionPolicy_BuiltFromTheGuardConstants`; `TestOffbox3a_ForgetGrouping_MainRun`. | A | `CT/internal/backup/offbox_window_test.go:99` `CT/internal/backup/offbox_window_test.go:176` `CT/internal/backup/offbox_window_test.go:557` `CT/internal/backup/offbox_3a_test.go:381` |
**Hand step in a runbook?** no hand step
### EC24 — The off-site target is cleared on the box · Copies · UNNAMED
architecture folder: 0 lines in 0 files match `/off-?site.{0,40}(target|config).{0,40}(clear|remov|unset)/` (a machine count, not a reading) · helper section: controller „Off-site target cleared (household's own store)”
| # | Answer | Mark | Pointer |
|---|---|---|---|
| 1 | Household: `offboxClearHandler` (confirm=1; route) -> `ClearOffboxTarget`. | A | `CT/internal/web/offbox_handlers.go:337` `CT/internal/web/offbox_handlers.go:343` `CT/internal/web/server.go:835` `CT/internal/backup/offbox_clear.go:63-101` |
| 2 | Target settings, `ssh_key`, `known_hosts`, the repository password, the sealed escrow package. | A | `CT/internal/web/offbox_handlers.go:337` `CT/internal/web/offbox_handlers.go:343` (the code path of question 1) |
| 3 | Removes the key files:86-94 and the target `SetOffboxTarget(nil)`:95. NEVER touches the repository:17-18. Keeps the repository password when anything may still depend on it:20-30 (`offboxRepoPasswordNeeded`:58-60). Refused for the hub tier:69-71 and while an abandonment runs:72-74. | A | `CT/internal/web/offbox_handlers.go:337` `CT/internal/web/offbox_handlers.go:343` (the code path of question 1) |
| 4 | Clearing the target on the box deletes nothing at the far end. The far store ends only by the abandon path (EC26) or by the operator. | A | `CT/internal/web/offbox_handlers.go:337` `CT/internal/web/offbox_handlers.go:343` (the code path of question 1) |
| 5 | Yes — enter the same target again (password kept). | A | `CT/internal/web/offbox_handlers.go:337` `CT/internal/web/offbox_handlers.go:343` (the code path of question 1) |
| 6 | Flash only; log. | A | `CT/internal/web/offbox_handlers.go:349-360` `CT/internal/backup/offbox_clear.go:98` |
| 7 | Files first, then the setting (:86-95): a cut leaves a target that fails loudly rather than a forgotten one. nrf. | A | `CT/internal/web/offbox_handlers.go:337` `CT/internal/web/offbox_handlers.go:343` (the code path of question 1) |
| 8 | `TestR729_Clear_ForgetsTargetAndDeletesSecrets`; `TestR729_Clear_KeepsRepoPasswordWhenSomethingDependsOnIt`; `TestR729_ClearHandler_RefusesHubTier`. | A | `CT/internal/backup/offbox_clear_r729_test.go:45` `CT/internal/backup/offbox_clear_r729_test.go:69` `CT/internal/web/r729_offbox_clear_test.go:79` |
**Hand step in a runbook?** no hand step
### EC25 — An off-site store that belongs to nobody is reset · Copies · NAMED
architecture: seed row 14 in `EV/helpers/helper-docs.md` · helper section: controller „Orphaned off-site store reset (old history moved aside)”
| # | Answer | Mark | Pointer |
|---|---|---|---|
| 1 | The box finds a store it cannot open (`markOrphaned`). Reset by the household (`offboxResetHandler`, confirm=1 -> `ResetOrphanedRepo`) or automatically on an unclaimed box. | A | `CT/internal/backup/offbox.go:376-392` `CT/internal/web/offbox_handlers.go:311` `CT/internal/web/offbox_handlers.go:320` `CT/internal/backup/offbox.go:464-480` |
| 2 | The old repository and its escrow package. | A | `CT/internal/backup/offbox.go:376-392` `CT/internal/web/offbox_handlers.go:311` (the code path of question 1) |
| 3 | `resetOrphanedRepo`:397-460 "moves aside (never deletes)… Reversible":394-396: hub tier asks the hub:403-416; SFTP `mv` to `<repo>.orphaned-<date>[-n]`:422-439; new `init`:444; name recorded `OrphanedRenamedTo`:450. | A | `CT/internal/backup/offbox.go:376-392` `CT/internal/web/offbox_handlers.go:311` (the code path of question 1) |
| 4 | The old history is moved aside and stays with no end date. The source says that this is on purpose: a box as delivered must not start a 14-day delete clock on a store it did not make. | A | `CT/internal/backup/offbox.go:473-481` |
| 5 | Yes until the 14-day abandonment completes (recovery code opens the old store). | A | `CT/internal/backup/offbox.go:376-392` `CT/internal/web/offbox_handlers.go:311` (the code path of question 1) |
| 6 | Hub events `offbox_repo_orphaned`:389 and `offbox_repo_reset`:457; flash. | A | `CT/internal/backup/offbox.go:376-392` `CT/internal/web/offbox_handlers.go:311` (the code path of question 1) |
| 7 | The handler runs it in a goroutine with a 5-minute limit and only logs a failure; the orphan flag stays, so the card returns. | A | `CT/internal/web/offbox_handlers.go:324-330` |
| 8 | `TestResetOrphaned_PinnedAsksTheHub`. | A | `CT/internal/backup/offbox_window_test.go:239` |
**Hand step in a runbook?** no hand step
### EC26 — An off-site store is abandoned (14 days) · Copies · NAMED
architecture: seed row 14 in `EV/helpers/helper-docs.md` · helper section: controller „Off-site store abandoned (14-day countdown)”
| # | Answer | Mark | Pointer |
|---|---|---|---|
| 1 | Starts with the claimed, confirmed reset (`startAbandonCountdown`); executed by the daily sweep 05:10 (`AbandonSweep`, wired). | A | `CT/internal/backup/offbox_abandon.go:68-93` `CT/internal/backup/offbox_abandon.go:214-307` `CT/cmd/controller/main.go:1693` |
| 2 | The moved-aside store + its sealed package at the hub. | A | `CT/cmd/controller/main.go:1205` (the code path of question 3) |
| 3 | "ONLY thing in the product that deletes a customer's off-site history":199-200. Two phases, store first:207-211: SFTP `rm -rf`:286-287; hub tier hands over to the hub, which deletes after its own delay:257-279; then the package purge is requested (`AbandonPurgeRequested`:295-301) and cleared when confirmed (`ClearAbandonPurgeIfConfirmed`:316-331; /:1218). | A | `CT/cmd/controller/main.go:1205` |
| 4 | A store whose delete fails stays due, and the box tries again each day. | A | `CT/cmd/controller/main.go:1205` (the code path of question 3) |
| 5 | Yes for 14 days (`abandonGraceDays`:31): `CancelAbandon`:173-197; operator `ExtendAbandon`:348, `StopAbandon`:388. | A | `CT/cmd/controller/main.go:1205` (the code path of question 3) |
| 6 | Reminders at 5/3/1 days:40; hub event `offbox_abandon_completed`:237/:304. | A | `CT/cmd/controller/main.go:1205` (the code path of question 3) |
| 7 | The two-phase markers are the recovery; hub-pending states:221-247. | A | `CT/cmd/controller/main.go:1205` (the code path of question 3) |
| 8 | `TestAbandon_PinnedHandsToHubAndFollows`. | A | `CT/internal/backup/offbox_window_test.go:324` |
**Hand step in a runbook?** no hand step
### EC27 — An app is exported to a file or imported from one · Copies · MENTIONED
architecture folder: 34 lines in 7 files match `/\.fab/` (a machine count, not a reading) · helper section: controller „App imported from a `.fab` bundle over an installed app; export and upload staging”
| # | Answer | Mark | Pointer |
|---|---|---|---|
| 1 | Household import: calls `RemoveStackVolumes` (, `compose down --volumes`). Staging: download, upload. | A | `CT/internal/appexport/restore.go:407-417` `CT/cmd/controller/main.go:3801-3827` `CT/cmd/controller/main.go:3819` `CT/internal/web/handler_export_download.go` |
| 2 | Staged bundle files, upload parts, exported `.fab` files in a drive's exports folder (`ExportDir`). | A | `CT/internal/appexport/estimate.go:215` |
| 3 | Removes: the running app's volumes before import (refused for a deployed-but-stopped app:401-405); the staged bundle after a successful download:157; staged downloads older than 1 h (`fabDownloadTTL`:24, `sweepFabDownloads`:165-190, also at start); idle upload parts and `CleanupStaleUploadParts` (start,); temp dirs /:267/:288. | A | `CT/internal/web/server.go:333` `CT/internal/web/server.go:393-395` `CT/internal/web/server.go:400-420` `CT/cmd/controller/main.go:2230` |
| 4 | An exported file stays in the export folder of the drive. The export pages can start, list and read an export; none deletes one, and nothing ages it. Only half-uploaded parts are swept. | N | `CT/internal/web/handler_export.go:30-87` `CT/internal/web/handler_export_upload.go:400-416` · class E2 · S07 |
| 5 | An import over an installed app replaces the app's volumes. The import code makes no undo copy first. | N | `CT/internal/web/handler_export.go:312-356` `CT/internal/appexport/restore.go:288` · class E6 · S32 |
| 6 | UI progress; log:160. | A | `CT/internal/web/server.go:333` `CT/internal/web/server.go:393-395` (the code path of question 3) |
| 7 | Startup sweeps cover staging. A cut after the volumes are removed and before the import ends: nrf (searched: journal/marker in restore.go). | A | `CT/internal/web/server.go:333` `CT/internal/web/server.go:393-395` (the code path of question 3) |
| 8 | `TestR1187c_AStoppedAppIsNotImportedOver`. | A | `CT/internal/appexport/r1187c_test.go:16` |
**Hand step in a runbook?** no hand step
### EC28 — The controller replaces itself (and the swap is rolled back) · Versions · NAMED
architecture: seed row 28a in `EV/helpers/helper-docs.md` · helper section: controller „Controller self-update (the old controller)”
| # | Answer | Mark | Pointer |
|---|---|---|---|
| 1 | Household button or auto: `TriggerUpdate`, `MaybeAutoUpdate`, `performUpdate` (the host agent does the swap); jobs /:1874. | A | `CT/internal/selfupdate/updater.go:517` `CT/internal/selfupdate/updater.go:612` `CT/internal/selfupdate/updater.go:724` `CT/internal/selfupdate/updater.go:773` |
| 2 | `update-state.json`, the previous image. | A | `CT/internal/selfupdate/state.go:11` |
| 3 | `VerifyStartup` concludes; `ClearState`; old images by `RetainControllerImages` (see "Old images"). Keeps the recorded previous image (decision 56,). | A | `CT/internal/selfupdate/updater.go:823` `CT/internal/selfupdate/state.go:66-73` `CT/internal/selfupdate/state.go:79-84` |
| 4 | Nothing in the controller. The old container is the agent's to remove. | A | `CT/internal/selfupdate/updater.go:823` `CT/internal/selfupdate/state.go:66-73` (the code path of question 3) |
| 5 | Rollback is the agent's crash-rollback, not in this repo. | A | `CT/internal/selfupdate/updater.go:823` `CT/internal/selfupdate/state.go:66-73` (the code path of question 3) |
| 6 | Hub via the report; UI. | A | `CT/internal/selfupdate/updater.go:823` `CT/internal/selfupdate/state.go:66-73` (the code path of question 3) |
| 7 | `VerifyStartup` at the next start reads the state file. | A | `CT/internal/selfupdate/updater.go:823` `CT/internal/selfupdate/state.go:66-73` (the code path of question 3) |
| 8 | `TestRecordedPrevious`; `TestControllerRetention_NothingWhileSwappingAndNewerKept`. | A | `CT/internal/selfupdate/state_test.go:7` `CT/internal/stacks/controller_image_retention_test.go:105` |
**Hand step in a runbook?** no hand step
### EH00 — The operator deletes a box in the hub · Household · NAMED
architecture: seed row 22 in `EV/helpers/helper-docs.md` · helper section: hub „1. Operator deletes a host”
| # | Answer | Mark | Pointer |
|---|---|---|---|
| 1 | A host record ends. Operator, hub UI (session-only route). Entry (`handleHostDelete`); impact preview. Gates: ONLINE host refused 409; typed host id; escrow acknowledgement, a silent host becomes deletable after 360 s, (R-30,). | A | `HUB/web/hosts.go:1036` `HUB/web/hosts.go:937` `HUB/web/hosts.go:1061` `HUB/web/hosts.go:763-770` |
| 2 | While it lived: `hosts`, `guests`, `host_reports`, `host_escrow`, `signed_jobs`, `wg_peers`, `host_recovery` (break-glass), `host_pbs_secrets`, `log_bundle_requests`, `log_bundles`; host-keyed `os_host_settings`, `os_reports`, `os_kernel_notices`, `operator_actions.host_id` … | A | `HUB/store/store.go:356` `HUB/store/os_updates.go:19` `HUB/store/opactions.go:192` `HUB/store/store.go:2379` |
| 3 | Removes: (guests, host_reports, signed_jobs, host_recovery, host_pbs_secrets, log bundles, wg_peers, hosts) in one transaction from `DeleteHost`; WG peer pushed off the endpoint (R-276). Keeps on purpose: escrow is DEMOTED to `host_escrow_superseded`, never destroyed —, table comment ("NO pruning"), a provenance row in `host_deletions`, table … | A | `HUB/store/store.go:3317-3325` `HUB/web/hosts.go:1087` `HUB/store/store.go:3304-3311` `HUB/web/hosts.go:1110-1113` |
| 4 | The delete removes the box, its guests, reports, keys and tunnel rows. Three tables keyed by the box have no delete statement at all: the box's update settings, its update reports and its kernel notices. | N | `HUB/store/store.go:3286-3328` `EV/hub-delete-statements.txt` · class E4 · S11 |
| 5 | Not undone. The box can enroll again as a new host; the retained escrow package is then carried to it (ending 11). No time limit on the retained package short of a customer delete. | A | `HUB/store/store.go:3317-3325` `HUB/web/hosts.go:1087` (the code path of question 3) |
| 6 | Log; event `host_deleted_box_off`; the household gets a fresh connect-link mail when no host is left → (R-509). | A | `HUB/web/hosts.go:1087` `HUB/web/hosts.go:1101` `HUB/web/selfbind_mint.go:145-150` |
| 7 | One SQLite transaction, so no half state in the DB; the WG push and the mail are after-commit and best-effort (never fails the caller). Re-run on a gone host is a not-found. | A | `HUB/web/selfbind_mint.go:97-105` |
| 8 | Tests: `TestDeleteHost_CascadeAndIsolation`; `TestDeleteHost_ProvenanceRecord`; `TestDeleteHost_DemotesEscrowNeverDestroys`; `TestR276_HostDeleteRemovesPeerAndPushes`; `TestSelfBind_HostDeleteSendsLink`; handler gates. Runbook: (§G) names it as the first step of offboarding. | A | `HUB/store/host_delete_test.go:91` `HUB/store/host_delete_demote_test.go:11` `HUB/web/r276_host_delete_wg_test.go:17` `HUB/web/selfbind_waiting_test.go:68` |
**Hand step in a runbook?** no hand step
### EH01 — The operator resets a household (RESET) · Household · NAMED
architecture: seed row 16 in `EV/helpers/helper-docs.md` · helper section: hub „2. Operator RESETs a customer (household starts again, record kept)”
| # | Answer | Mark | Pointer |
|---|---|---|---|
| 1 | Everything a household's box made at the hub and outside, except the customer record. Operator, hub UI. Entry (`handleCustomerReset`), preview. Refused while any host row exists. | A | `HUB/web/customer_reset.go:88` |
| 2 | Hetzner sub-account/box + repo data, PBS namespace + token on ep0, claim row, provisioned descriptor in the config, `one_time_secrets`, `dr_recipe`, retained escrow, log bundles, pending operator actions. | A | `HUB/store/store.go:650` |
| 3 | Order (external first, DB last) in `commitCustomerReset`: Hetzner leg, PBS leg, claim reset, descriptor clear, DB purge → (retained escrow only with the acknowledgement; pending operator actions are CLOSED not deleted, "the row is the record",). Kept on purpose: the customer config row; `customer_resets` journal; `host_deletions`; events. | A | `HUB/web/customer_reset.go:203` `HUB/store/customer_reset.go:147` `HUB/store/store.go:751` |
| 4 | RESET takes the off-site account down only when the tier is ticked. A household whose tier was unticked before the RESET keeps its account and data at the provider, and the hub keeps no record of it. | N | `HUB/web/customer_reset.go:203-245` `HUB/web/configs.go:1737-1743` · class E3 · S09 |
| 5 | External legs are not undoable (repo data and namespace are destroyed). The DB side cannot be restored except from a hub DB snapshot. | A | `HUB/web/customer_reset.go:203` `HUB/store/customer_reset.go:147` (the code path of question 3) |
| 6 | Event `customer_reset`; the household is mailed a new connect link at completion. | A | `HUB/web/customer_reset.go:149-153` `AR/05-hub-architecture.md:359-366` |
| 7 | Per-leg journal, a failed external leg stops before the DB purge and the next press resumes; legs are idempotent. | A | `HUB/store/customer_reset.go:73` `HUB/offsite/offsite.go:365-367` `HUB/tenantsync/client.go:117-121` |
| 8 | Tests: (RefusesWhileHostsExist), (HappyPath), (PartialFailureIsResumable);. Runbook:. | A | `HUB/web/customer_reset_test.go:78` `HUB/store/customer_reset_test.go:42` `HUB/store/customer_reset_test.go:84` `RB/RUNBOOK-onboarding-draft-v4.md:217-245` |
**Hand step in a runbook?** a draft — `RB/RUNBOOK-onboarding-draft-v4.md:217`
### EH02 — The operator deletes a household · Household · NAMED
architecture: seed row 32 in `EV/helpers/helper-docs.md` · helper section: hub „3. Operator deletes a customer (the cascade; also "household leaves" and "tester ends")”
| # | Answer | Mark | Pointer |
|---|---|---|---|
| 1 | The whole household record. Operator, hub UI. Entry (`handleCustomerDelete`), preview, three acknowledgements, host-count check, online host refuses. There is no other "leaves Felhom" path: says offboarding is "not yet designed". | A | `HUB/web/customer_delete.go:179` `AR/01-topology-and-trust.md:398` |
| 2 | Everything in endings 1 and 2, plus `customer_configs`, `reports`, `app_telemetry`, `app_log_tails`, `log_tail_requests`, `customer_notifications`, `selfbind_tokens`, `appliance_registrations`. | A | `HUB/store/store.go:165` |
| 3 | Legs in order: journal; every host `DeleteHost(hostID,true)`; RESET legs; residue →, config + ALL escrow custody → (,) — "the one true purge point". Kept on purpose: events, notification_log, host_deletions, customer_resets —; the first two go after one year (R-901),. | A | `HUB/web/customer_delete.go:243` `HUB/store/customer_delete.go:55-66` `HUB/store/store.go:1975` `HUB/store/customer_delete.go:20-26` |
| 4 | The purge walks seven tables. The off-site key rows, the off-site window rows and the abandon requests of the household have no delete statement in the hub source (the operator's action log and the two delete journals also stay; they read as kept records). The rows of EH00 stay too. | N | `HUB/store/customer_delete.go:55-66` `HUB/store/customer_delete.go:89-108` `EV/hub-delete-statements.txt` · class E4 · S11 |
| 5 | No undo. Rows survive in the hub DB snapshots (2 on the volume, up to 8 weeks on ep0 — ending 24), which is the only way back and also a retention fact. | A | `HUB/web/customer_delete.go:243` `HUB/store/customer_delete.go:55-66` (the code path of question 3) |
| 6 | The operator gets a critical event and the dialog lists the outside objects. No mail goes to the household: a household that leaves has no designed path (capability E16, MISSING). | K | `HUB/web/customer_delete.go:306` · R-810 (`E/documentation/backlog/ROADMAP.md:59`) |
| 7 | Journal-driven and resumable; an external failure leaves hosts already deleted and the config row in place, the next press continues.: "unit-proven; the end-to-end live leg is not run". | A | `HUB/web/customer_delete.go:243-291` `AR/_recovery-inventory-2026-07-28.md:968-969` |
| 8 | Tests: (HappyPath_LegOrder), (GatesFailClosed), (ResumesAfterExternalFailure), (PurgesResidueAndUnlistsCustomer), (Ghost), (TestR688_PreviewNamesCloudflareByHand); `TestDeleteCustomer_PurgesEscrowCustody`; `TestR901_DeletedCustomerAuditGoesAfterOneYear`. Runbook: (RESET vs Delete, ghost customers, verify Hetzner by hand on `skipped_no_config`); a real use is recorded in. | A | `HUB/web/customer_delete_test.go:137` `HUB/store/customer_delete_purge_test.go:9` `HUB/store/deleted_customer_audit_test.go:11` `RB/RUNBOOK-onboarding-draft-v4.md:217-245` |
**Hand step in a runbook?** a draft — `RB/RUNBOOK-onboarding-draft-v4.md:217`
### EH03 — The off-site account is taken down · Outside · NAMED
architecture: seed row 30 in `EV/helpers/helper-docs.md` · helper section: hub „4. Off-site storage at Hetzner is torn down (leg of RESET / delete)”
| # | Answer | Mark | Pointer |
|---|---|---|---|
| 1 | The household's Storage Box sub-account (shared tier) or dedicated box. Started by ending 2 or 3. Entry (`Deprovision`), comment. | A | `HUB/offsite/offsite.go:335` |
| 2 | A sub-account + home folder with the restic repo and any set-aside `.orphaned-…` copies; the sealed `OffsitePassword` in the config; the append-only box key (HUB/offsitekeys/). | A | `HUB/store/offsite_seal.go:102-119` |
| 3 | Dedicated: box deleted. Shared: folder purged through the sub-account's own login FIRST, then the sub-account is deleted, (R-32; wired at). Kept on purpose: when the purge cannot run or fails the sub-account is KEPT and the leg fails. | A | `HUB/offsite/offsite.go:337-356` `HUB/offsitekeys/service.go:163-180` `E/hub/cmd/hub/main.go:608` `HUB/offsite/offsite.go:369-374` |
| 4 | The account is an access object: taking it down does not remove the data folder behind it. | K | R-32 |
| 5 | No. Hetzner's own snapshot of the main box is not reachable from the hub (not in source). | A | `HUB/offsite/offsite.go:337-356` `HUB/offsitekeys/service.go:163-180` (the code path of question 3) |
| 6 | Leg status in the `customer_resets` journal and the hub log; nothing to the household. | A | `HUB/offsite/offsite.go:337-356` `HUB/offsitekeys/service.go:163-180` (the code path of question 3) |
| 7 | Idempotent: an already-gone sub-account is success. | A | `HUB/offsite/offsite.go:365-367` |
| 8 | Tests: `TestDeprovision_SharedIdempotent`;. Runbook: only the "verify Hetzner by hand" line in. | A | `HUB/offsite/r32_purge_test.go:27` `HUB/offsite/r32_purge_test.go:47` `HUB/offsite/r32_purge_test.go:62` `HUB/offsite/offsite_test.go:413` |
**Hand step in a runbook?** a draft — `RB/RUNBOOK-onboarding-draft-v4.md:217`
### EH04 — The copies on ep0 are taken down · Outside · NAMED
architecture: seed row 31 in `EV/helpers/helper-docs.md` · helper section: hub „5. PBS namespace on ep0 is torn down — and the copies of it that are not”
| # | Answer | Mark | Pointer |
|---|---|---|---|
| 1 | The household's PBS namespace, backup groups and token on ep0. Started by ending 2 or 3. Entry → (`Deprovision`). | A | `HUB/web/customer_reset.go:232-243` `HUB/tenantsync/client.go:117-121` |
| 2 | Namespace + token on ep0; a staged token secret in `host_pbs_secrets` (— "consumed" marks delivery, the value stays); the second copy of ep0 on DooPlex PBS (, `remove-vanished false`). | A | `HUB/store/pbsdr.go:57-85` `AR/06-offsite-connectivity.md:215` |
| 3 | Removes namespace, all groups and the token; idempotent; the shared `felhom@pbs` user is never touched. `host_pbs_secrets` goes with the host. | A | `HUB/tenantsync/client.go:117-121` `HUB/store/store.go:3321` |
| 4 | A box delete alone keeps the copies on ep0, on purpose; the household delete takes them down. The copy of ep0 on DooPlex: NOT MEASURED (operator ruling: DooPlex is not measured). | A | `RB/ep0-datastore-copy.md:84` |
| 5 | No. | A | `HUB/tenantsync/client.go:117-121` `HUB/store/store.go:3321` (the code path of question 3) |
| 6 | Journal + hub log only. | A | `HUB/tenantsync/client.go:117-121` `HUB/store/store.go:3321` (the code path of question 3) |
| 7 | Idempotent leg; a failure stops the cascade before the DB purge. | A | `HUB/tenantsync/client.go:117-121` `HUB/store/store.go:3321` (the code path of question 3) |
| 8 | Tests: the PBS leg rides the customer delete/reset tests; `TestPBSDR_DisableKeepsTenancy` pins the keep. Runbooks: (copy GC, not installed),. ep0 per-household prune keep-weekly 2 at 03:30:. | A | `HUB/web/customer_delete_test.go:137` `HUB/web/customer_delete_test.go:286` `HUB/web/pbsdr_test.go:341` `RB/ep0-datastore-copy.md:84-100` |
**Hand step in a runbook?** yes — `RB/ep0-datastore-copy.md:84` (the heading is stale)
### EH05 — The tunnel and the DNS record of a deleted household · Outside · MENTIONED
architecture: seed row 29 in `EV/helpers/helper-docs.md` · helper section: hub „6. Cloudflare tunnel and DNS records (a hand step), and the geo rule removal”
| # | Answer | Mark | Pointer |
|---|---|---|---|
| 1 | The household's tunnel, DNS records and API token at Cloudflare. NOBODY in code: the operator removes them by hand after a customer delete. The dialog text is built at (`cloudflareManualRemoval`, R-688). The only Cloudflare delete in the hub is the geo rule: (`handleGeoDisable`) → (`RemoveGeoRules`). | A | `HUB/web/customer_delete.go:319-339` `HUB/web/configs.go:1835` `HUB/cloudflare/unblock.go:22` |
| 2 | Tunnel + DNS + token are created outside the hub (the config only stores them); geo rules are created by the hub. | A | `E/documentation/backlog/CLOSED-ITEMS.md:1026` (the code path of question 3) |
| 3 | Removes: geo rules only. Keeps on purpose: tunnel and DNS — R-688 closed as accepted by the operator,. A design decision, not a defect. | A | `E/documentation/backlog/CLOSED-ITEMS.md:1026` |
| 4 | They stay. The operator accepted that on 2026-10-05 (closed R-688); the dialog lists them for removal by hand. The capability map still says 'tunnel + zone removed'. | A | `HUB/web/customer_delete.go:319-339` `AR/00-capability-map.md:97` |
| 5 | Not applicable. | A | `E/documentation/backlog/CLOSED-ITEMS.md:1026` (the code path of question 3) |
| 6 | The delete dialog and preview only (`TestR688_PreviewNamesCloudflareByHand`). | A | `HUB/web/customer_delete_test.go:595` |
| 7 | No state in the hub. | A | `E/documentation/backlog/CLOSED-ITEMS.md:1026` (the code path of question 3) |
| 8 | Test above pins the wording, not a removal. Runbook: NOT in any runbook — grep of `RB/` for `cloudflare/tunnel` with `delete/remove` returned only; §G of the onboarding runbook does not mention Cloudflare. | A | `RB/target-selection.md:194` |
**Hand step in a runbook?** NO — the dialog names the objects; no runbook gives the steps
### EH06 — The off-site tier is switched off for a household · Outside · UNNAMED
architecture folder: 0 lines in 0 files match `/tier.{0,40}(untick|switched off|disabled)/` (a machine count, not a reading) · helper section: hub „7. Off-site tier or DR tier switched off on the customer form”
| # | Answer | Mark | Pointer |
|---|---|---|---|
| 1 | The tier stops being offered to the box. Operator, config form. Entry (`handleConfigUpdate`) → off-site at; DR tier (`applyPBSDR`), disable branch. | A | `HUB/web/configs.go:865` `HUB/web/pbsdr.go:126` |
| 2 | Hetzner sub-account + repo; ep0 namespace + token. | A | `HUB/web/configs.go:1737-1741` `HUB/web/pbsdr.go:146` (the code path of question 3) |
| 3 | Removes: nothing outside. Off-site: "disabled by omission; the Hetzner resource is NOT deprovisioned this slice". DR: "descriptor enabled:false (coords kept; NO ep0 deprovision)", log. Both kept on purpose. | A | `HUB/web/configs.go:1737-1741` `HUB/web/pbsdr.go:146` |
| 4 | Unticking the tier takes nothing down and leaves no reminder. A later RESET or delete then skips the account (see EH01). | N | `HUB/web/configs.go:1737-1743` · class E3 · S09 |
| 5 | Yes: ticking again re-enables; re-issue path (`handleOffsiteReissue`) →. | A | `HUB/web/configs.go:985` `HUB/offsite/offsite.go:201` |
| 6 | Hub log only. | A | `HUB/web/configs.go:1737-1741` `HUB/web/pbsdr.go:146` (the code path of question 3) |
| 7 | No half state. | A | `HUB/web/configs.go:1737-1741` `HUB/web/pbsdr.go:146` (the code path of question 3) |
| 8 | Tests: `TestProvision_DisableNoDeprovision`; `TestPBSDR_DisableKeepsTenancy`. Runbook: none found for "tier switched off, then customer removed". | A | `HUB/offsite/offsite_test.go:399` `HUB/web/pbsdr_test.go:341` |
**Hand step in a runbook?** NO
### EH07 — An old off-site copy is set aside, then abandoned · Copies · NAMED
architecture: seed row 14 in `EV/helpers/helper-docs.md` · helper section: hub „8. Old off-site copy set aside, then abandoned by the household”
| # | Answer | Mark | Pointer |
|---|---|---|---|
| 1 | A previous restic repo ("set-aside copy"). Move-aside is started by the hub's key service on a key change; deletion only by a household request from the box, executed by the hub after 7 days. Entries (`MoveAside`), (`RequestAbandon`), (`CancelAbandon`), (`SweepAbandons`); delay const; sweeper every 60 s. | A | `HUB/offsitekeys/service.go:133-161` `E/hub/cmd/hub/main.go:645-646` |
| 2 | A renamed `.orphaned-…` folder in the sub-account; a row in `offsite_abandon_requests`; a tag on the retained escrow package. | A | `HUB/store/store.go:862` `HUB/store/store.go:4396` |
| 3 | Removes: the set-aside folder (`DeleteSetAside`) and only the retained packages tagged to it (R-1182, comment). Keeps on purpose: move-aside renames, never deletes; the request row is marked, not deleted. | A | `HUB/offsitekeys/offsitekeys.go:424` `HUB/store/store.go:4360-4362` `HUB/offsitekeys/offsitekeys.go:369` `HUB/store/offsite_keys.go:352` |
| 4 | A set-aside copy that nobody abandons stays. The architecture says so: no automatic abandon on a date. | A | `AR/07-backup-architecture.md:2093` |
| 5 | Cancel within 7 days; after the sweep, no. | A | `HUB/offsitekeys/service.go:507-508` |
| 6 | Events `offsite_abandon_requested` / `_cancelled` / `_deleted` / `_failed`. | A | `HUB/offsitekeys/service.go:435-448` |
| 7 | A failed delete records `last_error` and is retried by the next sweep (row columns). | A | `HUB/store/store.go:870-871` |
| 8 | Tests: `TestAbandon_DelayCancelAndScope`; `TestMoveAside_RenamesNeverDeletes`;. Runbook: none found for a hand removal of a set-aside copy. | A | `HUB/offsitekeys/service_test.go:134` `HUB/offsitekeys/offsitekeys_test.go:190` `HUB/store/escrow_abandon_scope_test.go:11` `HUB/store/escrow_abandon_scope_test.go:83` |
**Hand step in a runbook?** no hand step
### EH08 — The window to clean the off-site store closes · Access · MENTIONED
architecture folder: 15 lines in 5 files match `/offsite.{0,20}window|clean-up window/` (a machine count, not a reading) · helper section: hub „9. Off-site key clean-up window closes; unpinned keys removed”
| # | Answer | Mark | Pointer |
|---|---|---|---|
| 1 | A 20-minute window in which the box may delete in its repo. Opened by the hub for the box; closed by the box's result or by the sweeper. Entries (`SweepExpiredWindows`), (`RemoveUnpinnedKeys`); (`CloseWindow`), (`RemoveUnpinned`); expiry query. | A | `HUB/offsitekeys/service.go:412-413` `HUB/offsitekeys/offsitekeys.go:341` `HUB/store/offsite_keys.go:152` |
| 2 | A row in `offsite_windows`; a `hub_settings` grant `offsite_window_grant:<customer>`; an unpinned key line in the sub-account's authorized keys. | A | `HUB/store/store.go:850` `HUB/store/offsite_keys.go:187` |
| 3 | Removes: the unpinned key at Hetzner; the grant is cleared. Keeps: the window row (ledger) — no `DELETE` on `offsite_windows` or `offsite_keys` exists. | A | `HUB/store/offsite_keys.go:197-243` |
| 4 | One row for each clean-up window. The rows stay; they are counted in EH21. | A | `EV/hub-delete-statements.txt` |
| 5 | Not applicable. | A | `HUB/store/offsite_keys.go:197-243` (the code path of question 3) |
| 6 | Hub log; daily key audit 07:10, audit at start. | A | `E/hub/cmd/hub/main.go:651` |
| 7 | A window the hub cannot close stays expired and is retried by the 60 s sweeper. | A | `HUB/store/offsite_keys.go:197-243` (the code path of question 3) |
| 8 | Tests: (window sweep),. Runbook: (context only). | A | `HUB/offsitekeys/service_test.go:99` `RB/offsite-endpoint.md:377` |
**Hand step in a runbook?** no hand step
### EH09 — A key package is replaced and the old one is kept · Access · NAMED
architecture: `AR/05-hub-architecture.md:236-254` · helper section: hub „10. Escrow package superseded, retained, carried to a rebuilt box, or purged”
| # | Answer | Mark | Pointer |
|---|---|---|---|
| 1 | A box's key-escrow blob. Superseded by the box itself on a new upload (`handleHostEscrowPut`); demoted by host delete (ending 1); carried on a new enroll; purged by customer delete (ending 3), acknowledged RESET (ending 2) or the abandon purge (ending 8). | A | `HUB/api/handler.go:1397` `HUB/store/escrow_carry.go:8-37` |
| 2 | `host_escrow`; `host_escrow_superseded`. | A | `HUB/store/store.go:408` |
| 3 | Supersede demotes the current row, never overwrites:. Carry MOVES the retained row to the new host and deletes the old retained row. Kept on purpose: "Append-only … NO pruning". | A | `HUB/store/store.go:3470` `HUB/store/escrow_carry.go:148` `HUB/store/store.go:417-439` |
| 4 | Kept packages only grow: each replace and each box delete adds one. That is the ruling: only the operator opens or removes one. | A | `HUB/store/store.go:417-439` |
| 5 | A retained package can be opened by the operator path as long as the customer exists. | A | `HUB/store/store.go:3470` `HUB/store/escrow_carry.go:148` (the code path of question 3) |
| 6 | Events `escrow_superseded`, `offsite_repo_key_changed`, `escrow_blob_served`. | A | `HUB/api/handler.go:1466` |
| 7 | Each step is one transaction. | A | `HUB/store/store.go:3470` `HUB/store/escrow_carry.go:148` (the code path of question 3) |
| 8 | Tests: `TestSaveHostEscrow_RetainsSuperseded`;. Runbook:. | A | `HUB/store/escrow_superseded_test.go:9` `HUB/store/escrow_identity_retention_test.go:24` `HUB/store/escrow_identity_retention_test.go:88` `HUB/store/escrow_carry_test.go:27` |
**Hand step in a runbook?** yes — `RB/RUNBOOK-open-retained-package.md:1`
### EH10 — A box installs again and takes its old record · Box · NAMED
architecture: seed row 17 in `EV/helpers/helper-docs.md` · helper section: hub „11. Box reinstalled on the same hardware”
| # | Answer | Mark | Pointer |
|---|---|---|---|
| 1 | The old installation ends, the hardware stays. Started by the household/operator reinstalling; the hub sees it as an enroll for a customer that already has a host. Entry (`handleHostEnroll`), rule comment. | A | `HUB/api/handler.go:1220-1229` `HUB/api/reenroll.go:12-42` |
| 2 | The old `hosts` row with its key, escrow, break-glass credential, WG peer, ep0 token. | A | `HUB/api/reenroll.go:58` `HUB/api/passphrase_scope.go:13-30` (the code path of question 3) |
| 3 | Removes nothing. The old host record is REUSED (mint-once-reuse): no new key is issued and the operator is mailed —, events. Once the box uses its own key, the passphrase gives no keys: 409 on `/host-enroll`, `/config`, `/recovery` —,. The operator's host delete is the gate (,). | A | `HUB/api/reenroll.go:58` `HUB/api/passphrase_scope.go:13-30` `HUB/api/handler.go:1291` `AR/05-hub-architecture.md:239-245` |
| 4 | A box that installs again while its old record stands cannot enroll. The operator deletes the old record first; until then the old record alarms as silent (EH12). | A | `HUB/api/handler.go:1328-1345` `HUB/claim/engine.go:196` |
| 5 | Yes: delete the old host (ending 1), then enroll; the retained package is carried (ending 10). | A | `HUB/api/reenroll.go:58` `HUB/api/passphrase_scope.go:13-30` (the code path of question 3) |
| 6 | Operator mail via events `host_reinstall_over_old_host`, `host_reenroll_while_live`, `passphrase_keys_refused`; `claim_reissued_reenroll`. | A | `HUB/api/reenroll.go:44-47` `HUB/api/passphrase_scope.go:42` `HUB/api/handler.go:1345` |
| 7 | Refusal is stateless; repeatable. | A | `HUB/api/reenroll.go:58` `HUB/api/passphrase_scope.go:13-30` (the code path of question 3) |
| 8 | Tests: `TestReissueForReenroll`. Runbooks: §G of the onboarding runbook. | A | `HUB/api/r1154_reenroll_test.go:191` `HUB/api/r1154_reenroll_test.go:218` `HUB/api/r1154_reenroll_test.go:252` `HUB/api/r1154_reenroll_test.go:316` |
**Hand step in a runbook?** yes — `RB/day0-install.md:113`
### EH11 — A box enrolls again after a disaster (its hub key is replaced) · Access · NAMED
architecture: seed row 25 in `EV/helpers/helper-docs.md` · helper section: hub „12. Hardware replaced — DR re-enroll (recovery mode, host key rotation)”
| # | Answer | Mark | Pointer |
|---|---|---|---|
| 1 | The old box's hub access ends; a new box takes the host id. Operator arms recovery mode with the global key; the new box calls `handleReEnroll` (gate). | A | `HUB/api/dr.go:31-34` `HUB/api/dr.go:101` |
| 2 | A recovery-mode flag with an expiry on the host row; the host API key. | A | `HUB/store/store.go:3809` |
| 3 | Removes: the old key — "revoked the instant this commits", call. Recovery mode ends by itself (TTL, log) or by `handleClearRecoveryMode` →. Keeps: host row, escrow, everything else. | A | `HUB/store/store.go:3827-3829` `HUB/api/dr.go:130` `HUB/api/dr.go:67` `HUB/store/store.go:3822` |
| 4 | Nothing found in the hub source. | A | `HUB/store/store.go:3827-3829` `HUB/api/dr.go:130` (the code path of question 3) |
| 5 | No way back to the old key. | A | `HUB/store/store.go:3827-3829` `HUB/api/dr.go:130` (the code path of question 3) |
| 6 | A hub log line only. The operator starts the recovery, so the operator knows. | A | `HUB/api/dr.go:101-145` |
| 7 | One update; without recovery mode → 403. | A | `HUB/api/dr.go:96-99` |
| 8 | Tests: `TestReEnroll_GatedOnRecoveryMode`; `TestReEnroll_RevokesOldKey`. Runbook: not searched by name beyond the rehearsal runbook; treat as "not confirmed". | A | `HUB/api/dr_test.go:14` |
**Hand step in a runbook?** yes — `RB/RUNBOOK-manual-guest-restore.md:1`
### EH12 — A box that never reports again · Box · MENTIONED
architecture folder: 5 lines in 5 files match `/(silent|stale).{0,60}(for ever|forever|never)/` (a machine count, not a reading) · helper section: hub „13. A host that stops reporting for ever”
| # | Answer | Mark | Pointer |
|---|---|---|---|
| 1 | Nothing ends by itself. The monitor is (`Check`), comment. | A | `HUB/monitor/host_staleness.go:112` |
| 2 | As ending 1. | A | `HUB/monitor/host_staleness.go:188-193` (the code path of question 3) |
| 3 | Removes: only in-memory state for ids no longer in `hosts`. Reports, host_reports and events older than 90 days fall to the daily prune (ending 22), so after 90 days the hub holds the host row with no report behind it. | A | `HUB/monitor/host_staleness.go:188-193` |
| 4 | Nothing ends it. The record and everything that hangs on it stay until the operator deletes the box (EH00). The alarm is not repeated, by choice. | A | `HUB/monitor/host_staleness.go:60-70` |
| 5 | Not applicable. | A | `HUB/monitor/host_staleness.go:188-193` (the code path of question 3) |
| 6 | One `host_stale`, then one `host_down` per transition; alarms already raised are not repeated after a hub restart (R-1001); a household's deliberate switch-off holds the alarm for 14 days, backup-deadline alarms. A blocked customer's state is dropped. | A | `HUB/monitor/host_staleness.go:211-215` `HUB/store/deliberateoff.go:17-18` `HUB/monitor/host_staleness.go:134` `HUB/monitor/deadline.go:313` |
| 7 | Not applicable. | A | `HUB/monitor/host_staleness.go:188-193` (the code path of question 3) |
| 8 | No test for an expiry (none exists). Runbook: none for "silent for ever"; describes the box-off delete only. | A | `AR/05-hub-architecture.md:88-111` |
**Hand step in a runbook?** NO
### EH13 — The registered address of a household changes · Household · MENTIONED
architecture: seed row 24 in `EV/helpers/helper-docs.md` · helper section: hub „14. Registered e-mail changes; the household clears its alert address”
| # | Answer | Mark | Pointer |
|---|---|---|---|
| 1 | (a) The operator changes the registered address, (b) the household clears or changes the alert address on the box, pushed to (`handleSavePreferences`). | A | `HUB/web/configs.go:865` `HUB/api/handler.go:2808` |
| 2 | Two addresses: `customer_configs.email` (operator-set) and `customer_notifications.email`, seeded once at claim,. | A | `HUB/store/store.go:143` `HUB/store/store.go:1141-1145` `HUB/claim/engine.go:260` |
| 3 | (a) removes nothing; the only action is a new connect link when no host exists. (b) a deliberate clear deletes the alert address (R-922), saved at; an empty push without the flag is refused (no-clobber). | A | `HUB/web/configs.go:949-950` `HUB/api/handler.go:2846-2857` |
| 4 | The alarm address is a second, separate setting of the household (decision 196). A change of the registered address does not change it: alarms go to the old address until the household saves its notification page. | A | `HUB/web/configs.go:877-951` `HUB/store/store.go:1043-1050` `HUB/notify/dispatcher.go:352` `AR/09-update-architecture.md:1473` |
| 5 | (a) yes, edit again. | A | `HUB/web/configs.go:949-950` `HUB/api/handler.go:2846-2857` (the code path of question 3) |
| 6 | (a) nobody is told; the old address gets no "your address was changed" mail (none found in `handleConfigUpdate`). | A | `HUB/web/configs.go:949-950` `HUB/api/handler.go:2846-2857` (the code path of question 3) |
| 7 | Single update. | A | `HUB/web/configs.go:949-950` `HUB/api/handler.go:2846-2857` (the code path of question 3) |
| 8 | Tests: `TestSavePreferences_DeliberateClearDeletesAddress`,. No test found that an operator e-mail change reaches the alert address (it does not). Runbook: none. | A | `HUB/api/preferences_guard_test.go:73` |
**Hand step in a runbook?** NO
### EH19 — A tunnel peer is removed · Access · NAMED
architecture: seed row 27 in `EV/helpers/helper-docs.md` · helper section: hub „20. WG peer removed; off-site endpoint deleted”
| # | Answer | Mark | Pointer |
|---|---|---|---|
| 1 | A box's WireGuard peer on the off-site endpoint, or the endpoint record. Operator/API; UI; host delete (ending 1). | A | `HUB/api/wg.go:375-378` `HUB/web/offsite.go:243-245` |
| 2 | `wg_peers`, `wg_endpoints`; the peer in the endpoint's live config. | A | `HUB/store/store.go:552` |
| 3 | (peer), (endpoint); the push to the endpoint follows. An endpoint with peers in its subnet is refused 409. Revocation = the hub deletes the peer:. | A | `HUB/store/wg.go:344-346` `HUB/web/offsite.go:264-274` `AR/06-offsite-connectivity.md:176-182` |
| 4 | The hub deletes the peer row first and pushes the change after. An end point that cannot be reached keeps the peer until the next push. | A | `HUB/web/hosts.go:1087` |
| 5 | The peer can be re-added. | A | `HUB/store/wg.go:344-346` `HUB/web/offsite.go:264-274` (the code path of question 3) |
| 6 | Hub log. | A | `HUB/store/wg.go:344-346` `HUB/web/offsite.go:264-274` (the code path of question 3) |
| 7 | DB first, push retried by the next request. | A | `HUB/store/wg.go:344-346` `HUB/web/offsite.go:264-274` (the code path of question 3) |
| 8 | Tests: `TestOffsiteEndpointDelete_Guard`. Runbook:. | A | `HUB/api/wg_test.go:477` `HUB/store/wg_test.go:132` `HUB/web/offsite_test.go:264` `RB/offsite-endpoint.md` |
**Hand step in a runbook?** no hand step
### EH21 — The hub's daily clean-up · Household · UNNAMED
architecture folder: 0 lines in 0 files match `/(daily|nightly).{0,30}prune|Prune\(/` (a machine count, not a reading) · helper section: hub „22. Daily retention prune (reports, events, telemetry, issues, deleted-customer audit)”
| # | Answer | Mark | Pointer |
|---|---|---|---|
| 1 | Old rows. A timer in the hub process, at start and daily at 04:30: (`pruneAll`). Settings (`max_days: 90`, `prune_schedule: "04:30"`); defaults,. There is no CronJob in any manifest (grep `kind:` over E/manifests/, the secret manifest not read). | A | `E/hub/cmd/hub/main.go:860-863` `E/manifests/hub.yaml:81-83` `E/hub/cmd/hub/main.go:1025-1026` |
| 2 | `reports`, `host_reports`, `events`, `app_telemetry`, `app_log_issues`. | A | `HUB/store/store.go:1606-1619` `HUB/store/telemetry.go:513-514` (the code path of question 3) |
| 3 | (reports + host_reports), (events), (90 days), (issues not seen 30 days), (deleted customers' events + notification_log after one year).,. | A | `HUB/store/store.go:1606-1619` `HUB/store/telemetry.go:513-514` `HUB/store/deleted_customer_audit.go:27` `AR/05-hub-architecture.md:289-291` |
| 4 | The clean-up covers reports, events, app telemetry, log issues and log bundles. Thirteen tables have no delete statement anywhere; the file lists them. Most are small. The update reports of each box are the one that grows with time. | N | `EV/hub-delete-statements.txt` `HUB/store/store.go:1606` `HUB/store/store.go:2872` · class E4 · S37 |
| 5 | No. | A | `HUB/store/store.go:1606-1619` `HUB/store/telemetry.go:513-514` (the code path of question 3) |
| 6 | Hub log line per run. | A | `HUB/store/store.go:1606-1619` `HUB/store/telemetry.go:513-514` (the code path of question 3) |
| 7 | Each statement is independent; the next day repeats. | A | `HUB/store/store.go:1606-1619` `HUB/store/telemetry.go:513-514` (the code path of question 3) |
| 8 | Tests: `TestR901_DeletedCustomerAuditGoesAfterOneYear`. No test found by name for `Prune`, `PruneEvents` or `pruneAll`. | A | `HUB/store/deleted_customer_audit_test.go:11` |
**Hand step in a runbook?** no hand step
### EH23 — Old snapshots of the hub's database · Outside · NAMED
architecture: `AR/05-hub-architecture.md:606-624` · helper section: hub „24. Hub database snapshots (on the volume and on ep0)”
| # | Answer | Mark | Pointer |
|---|---|---|---|
| 1 | Old snapshots of the hub DB. The hub process; on ep0 a PBS prune job. | A | `E/hub/cmd/hub/main.go:970-981` |
| 2 | Snapshot files on the hub volume; backups in the `operator` namespace on ep0. | A | `HUB/dbsnap/dbsnap.go:25-27` `RB/RUNBOOK-hub-db-offsite-backup.md:77-78` (the code path of question 3) |
| 3 | Volume: newest 2 kept,. ep0: keep-daily 14, keep-weekly 8,. | A | `HUB/dbsnap/dbsnap.go:25-27` `RB/RUNBOOK-hub-db-offsite-backup.md:77-78` `AR/05-hub-architecture.md:606-624` |
| 4 | A deleted household's rows stay in these snapshots for up to 8 weeks. The retention bounds it. | A | `AR/05-hub-architecture.md:606-624` |
| 5 | This is the undo path for endings 1–3. | A | `HUB/dbsnap/dbsnap.go:25-27` `RB/RUNBOOK-hub-db-offsite-backup.md:77-78` (the code path of question 3) |
| 6 | Not applicable. | A | `HUB/dbsnap/dbsnap.go:25-27` `RB/RUNBOOK-hub-db-offsite-backup.md:77-78` (the code path of question 3) |
| 7 | Not applicable. | A | `HUB/dbsnap/dbsnap.go:25-27` `RB/RUNBOOK-hub-db-offsite-backup.md:77-78` (the code path of question 3) |
| 8 | Test: (KeepsNewestTwo). Runbook:. | A | `HUB/dbsnap/dbsnap_test.go:116` `RB/RUNBOOK-hub-db-offsite-backup.md` |
**Hand step in a runbook?** no hand step