hub v0.7.3: ingest agent backups + restore_tests (slice 6 Phase A)

Accept + persist the now-populated host-report backups/restore_tests. Mirror structs in
hostReportPayload; persisted via report_json (no schema change); a FAILED restore-test is
logged prominently (loudest DR signal). Shared golden updated byte-identical with
felhom-agent; bidirectional key-set tests added. Build/deploy deferred (backward-compatible).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-09 13:56:18 +02:00
parent 0c6ec27054
commit 41f2d2b5da
5 changed files with 169 additions and 33 deletions
+23
View File
@@ -1,5 +1,28 @@
# Felhom Hub — Changelog
## v0.7.3 — ingest agent backups + restore_tests (slice 6 Phase A) (2026-06-09)
The agent's slice-6 work populates the host-report's `backups` + `restore_tests` (the
self-restore-test result). This is the hub half: accept + persist them. Minimal — the rich
backup policy (schedule/retention/target selection) is hub-manifest-owned and lands at
slice 10; this slice only mirrors what the agent reports.
### Added
- **`hostBackup` / `hostRestoreTest`** mirror structs in `hostReportPayload`
(`internal/api/handler.go`) — field-for-field with the agent's `hub.Backup` /
`hub.RestoreTest` wire contract. Persisted verbatim in `report_json` (no new columns —
slice-5 precedent).
- **A FAILED restore-test is logged prominently** (`[WARN]`, the loudest DR signal there is);
a failed backup is logged too. The `host-report` info line now counts backups + restore-tests.
- **`testdata/host-report.golden.json`** updated with a populated `backups[0]` /
`restore_tests[0]`, kept **byte-identical** with felhom-agent's copy.
- **`TestHostBackup_GoldenContract` / `TestHostRestoreTest_GoldenContract`** — the hub half of
the bidirectional key-set test (round-trip the golden through the mirror, assert exact keys).
### Notes
- Backward-compatible: an agent that omits/empties these is accepted unchanged. The legacy
controller report path is untouched (frozen until slice 10).
## v0.7.2 — ingest agent storage_targets (slice 5 Phase A) (2026-06-09)
The agent's slice-5 work populates the host-report's `storage_targets` (previously empty).