The orphan thin check runs only after a failed snapshot backup (R-1012 follow-up, unreleased)
gates / gates (push) Successful in 48s
gates / gates (push) Successful in 48s
v0.159.0/v0.159.1 ran the check before every snapshot-mode whole-guest backup, which takes a metadata snapshot of the live pool. Now explainFailure (vzdump start or task failure) is its only caller; the finding is still appended to the failed backup's error. Tests: failure = 1 call, success = 0 calls; red-proved against the v0.159.1 runner.go (2 calls / calls=1). Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
This commit is contained in:
1 parent
eb38d78945
commit
6545cccff7
5 files changed
+69
-36
No files matched your search
@@ -1,22 +1,41 @@
|
||||
# REPORT — agent 0.159.1: forget a gone decommissioned drive (R-1124), name an orphan thin device (R-1012), Go 1.27.2 (2026-10-17)
|
||||
# REPORT — the orphan thin check runs only after a failed backup (unreleased) (2026-10-17, night)
|
||||
|
||||
Written in ASD-STE100 Simplified Technical English. Session report: felhom.eu `REPORT-agent-allowlist-rotation-2026-10-17.md`.
|
||||
Evidence: felhom.eu `documentation/audits/agent-allowlist-rotation-2026-10-17/P1/`.
|
||||
Written in ASD-STE100 Simplified Technical English. Architecture read: felhom.eu `documentation/architecture/03-host-agent.md`
|
||||
(the `FELHOM_THINCHECK` row), `runbooks/whole-guest-backup-orphan-thin.md`, R-1012's closing note.
|
||||
|
||||
- **Released:** v0.159.0 (superseded — do not vouch) and **v0.159.1** (sha256 `de8f6ad9…aff9`, bundle `2af3d27d…7cd6`).
|
||||
Step bundle `0.159.0-step1` (`1d65edb3…d6cf`) for a box on the v0.158.1 bundle (the new bundle adds `felhom-thin-check`).
|
||||
- **R-1124:** `ForgetRetiredDrives` (start + 20-s tick) disables and removes, through the new root verb
|
||||
`felhom-priv-apply unit-forget`, the unit of a DECOMMISSIONED drive that is absent and unmounted. A present one keeps its
|
||||
unit (one-click re-enroll). v0.159.1: the signed decommission also prunes the guest-bind record.
|
||||
- **R-1012:** read-only root helper `felhom-thin-check <vg> <pool>`; `internal/thincheck` (two reads, fails open);
|
||||
`BackupRunner.SetThinCheck` appends the plain-word finding to a failed snapshot backup's error. Never removes.
|
||||
- **Proof on demo-hp:** loop-backed test drive forgotten 8 s after the unplug; on 0.159.1 the bind-record warning stopped
|
||||
(0 lines, control 3); scratch thin pool: a made orphan listed, a foreign metadata snapshot refused; `pve/data` read and
|
||||
released; a 9201 whole-guest backup ran the check first and finished green. All red-proofs in P1.
|
||||
- **Delivery:** demo-hp done (0.159.1 + bundle, 75/75). Tester 1 and demo-felhom: by signed jobs on the operator's yes.
|
||||
**The vouch is the operator's.**
|
||||
## In plain words
|
||||
|
||||
## Observations
|
||||
- Before tonight the agent looked for an orphan thin device before **every** whole-guest backup. To look, it takes a
|
||||
short metadata snapshot of the live disk pool. Now it looks **only when the backup's snapshot step has failed** — the
|
||||
only moment somebody needs the answer. The operator's failure mail still names the orphan, in the same words.
|
||||
- **Not released. Not vouched.** The next agent release that the operator vouches carries it. Nothing was copied to a
|
||||
box.
|
||||
|
||||
1. The operator-signed decommission did not prune the guest-bind record (the self-serve one did). NOT-A-FINDING: fixed in this session in v0.159.1 (the size rule), test red-proved.
|
||||
2. A loop device reads as role „system", so the self-serve decommission refuses it. NOT-A-FINDING: correct (fail safe to protected); the live proof used the operator-signed path.
|
||||
## What changed
|
||||
|
||||
- `internal/backup/runner.go`: the pre-run check (and its WARN line) is gone; `explainFailure` (after a vzdump start
|
||||
failure or a task failure, snapshot mode only) is now the only caller. Comments say so.
|
||||
- `internal/capability/manifest.go`: the `thin-orphan-check` text says „after a failed whole-guest backup".
|
||||
- `internal/backup/r1012_thincheck_test.go`: failure → exactly ONE call and the finding in the error; success → ZERO
|
||||
calls and a clean record; stop mode → zero calls; unwired → error unchanged.
|
||||
|
||||
## Red-proof
|
||||
|
||||
The new tests, run against the v0.159.1 `runner.go` (`git show HEAD:…`), then the fix restored:
|
||||
|
||||
| test | failed with |
|
||||
|---|---|
|
||||
| `TestBackup_SnapshotFailure_NamesTheOrphan/{task_fails,start_fails}` | `thin check ran 2 times, want 1 (after the failure only)` |
|
||||
| `TestBackup_ThinCheck_SilentWhenNotApplicable` | `success: … Success:true … calls=1 (want no check on a successful backup, clean record)` |
|
||||
|
||||
Restored → both PASS; `git diff` on `runner.go` = the fix only.
|
||||
|
||||
## Gates
|
||||
|
||||
`go build ./... && go vet ./... && go test ./...` and `python3 scripts/agent_gates.py` — results in the session report.
|
||||
|
||||
## Not live-validated
|
||||
|
||||
No agent was built or delivered (no release tonight). The changed path is the failure path; the next release's live
|
||||
proof should make one snapshot backup succeed (helper NOT called: no `felhom-thin-check` line in the agent journal
|
||||
and none in the sudo log for that run) and one fail (the finding in the failure text).
|
||||
Reference in new issue
Block a user