hub v0.7.2: ingest agent storage_targets (slice 5 Phase A)
Accept + persist the now-populated host-report storage_targets. Minimal — the authoritative storage manifest is hub-owned (slice 10); this mirrors what the agent observes. - hostReportPayload.StorageTargets: full mirror of the agent's hub.StorageTarget wire contract; persisted verbatim in report_json (no schema change); count + WARN on disconnected targets. - shared host-report golden updated with two populated targets; byte-identical with felhom-agent's copy. - TestHostStorageTarget_GoldenContract: hub half of the bidirectional key-set test. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,29 @@
|
||||
# Felhom Hub — Changelog
|
||||
|
||||
## 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).
|
||||
This is the hub half: accept + persist them. Minimal by design — the rich, authoritative
|
||||
storage manifest (desired class/role/policy/creds) is hub-owned and lands at slice 10; this
|
||||
slice only mirrors what the agent observes.
|
||||
|
||||
### Added
|
||||
- **`hostReportPayload.StorageTargets`** (`internal/api/handler.go`) — a full mirror of the
|
||||
agent's `hub.StorageTarget` wire contract (name/type/durable_id/state/reachable/usage/
|
||||
content/mount/class_hint/role/`thin_pool`/`smart`). The targets are persisted verbatim in
|
||||
the existing `report_json` row (no schema change); the handler counts them and logs a
|
||||
`[WARN]` when any are `disconnected` (the storage analog of host-down visibility).
|
||||
- **`testdata/host-report.golden.json`** — updated to carry two populated `storage_targets`
|
||||
(an lvmthin with `thin_pool`, a usb), kept **byte-identical** with felhom-agent's copy.
|
||||
- **`TestHostStorageTarget_GoldenContract`** — the hub half of the bidirectional key-set test:
|
||||
round-trips the golden's `storage_targets[0]` through the mirror struct and asserts the key
|
||||
set matches exactly (no missing/extra fields vs the agent). `TestHostReport_GoldenContract`
|
||||
also now asserts the targets are persisted + parse back.
|
||||
|
||||
### Notes
|
||||
- Backward-compatible: an older agent that sends `storage_targets: []` (or omits it) is
|
||||
accepted unchanged. The legacy controller report path is untouched (frozen until slice 10).
|
||||
|
||||
## Repo docs — no hub version change (2026-06-08)
|
||||
|
||||
### Changed
|
||||
|
||||
Reference in New Issue
Block a user