fix(agent): slice-3 follow-ups — keep run-status on config fail, selftest usage, contract golden (v0.3.1)
- collect: a per-guest GuestConfig failure preserves the ListLXC run-status (only spec dropped); empty status normalized to "unknown". Test asserts preserved "running" + nil spec. - main: --selftest usage error now reads (want read|task|hub). - contract: testdata/host-report.golden.json + TestHostReport_ContractMatchesGolden (field-name key-set check vs golden; byte-identical with the hub copy). - version 0.3.0 -> 0.3.1. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -3,6 +3,23 @@
|
||||
All notable changes to **felhom-agent** are recorded here. Update on every code
|
||||
change that gets pushed.
|
||||
|
||||
## v0.3.1 — slice-3 validation follow-ups (2026-06-08)
|
||||
|
||||
### Changed
|
||||
- **Collector keeps the known run-status on a `GuestConfig` failure** (`internal/hub/collect.go`):
|
||||
previously a per-guest config-read error forced `status="unknown"`; now the run-status from
|
||||
`ListLXC` is preserved (only the `spec` is dropped). An empty status is still normalized to
|
||||
`unknown` (wire value is always `running|stopped|unknown`). Test renamed to
|
||||
`TestCollect_GuestConfigFailureKeepsStatusOmitsSpec` and asserts the preserved `running` + nil spec.
|
||||
- **`--selftest` usage** error string now reads `(want read|task|hub)`.
|
||||
|
||||
### Added
|
||||
- **Cross-repo contract fixture** `internal/hub/testdata/host-report.golden.json` +
|
||||
`TestHostReport_ContractMatchesGolden` — compares the marshaled `HostReport` field-name sets
|
||||
(top level + `host` + `guests[0]`) against the golden, failing on any json-tag drift. The file is
|
||||
**kept byte-identical** with felhom-hub's copy (duplicated contract until a shared types module;
|
||||
revisit when slices 5/6 populate the empty collections). Version → 0.3.1.
|
||||
|
||||
## v0.3.0 — hub client + host-report + first daemon loop (slice 3) (2026-06-08)
|
||||
|
||||
The agent's first daemon: a periodic read-only host-report POSTed to the hub (the
|
||||
|
||||
Reference in New Issue
Block a user