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:
2026-06-08 18:29:05 +02:00
parent ab77fa3544
commit e68a7af4d3
7 changed files with 182 additions and 67 deletions
+2 -2
View File
@@ -26,7 +26,7 @@ import (
// version is the agent version. Overridable at build time with
// -ldflags "-X main.version=<v>"; defaults to the in-repo CHANGELOG version.
var version = "0.3.0"
var version = "0.3.1"
func main() {
var (
@@ -326,7 +326,7 @@ func (f *selftestFlag) Set(v string) error {
case "hub":
f.mode = "hub"
default:
return fmt.Errorf("invalid --selftest value %q (want read|task)", v)
return fmt.Errorf("invalid --selftest value %q (want read|task|hub)", v)
}
return nil
}