From 9f6753de0fd8ae087459f991080170ee434d5cdc Mon Sep 17 00:00:00 2001 From: kisfenyo Date: Tue, 9 Jun 2026 19:41:08 +0200 Subject: [PATCH] restore-test wire contract: warnings + warnings_recognized in host-report golden (Phase B) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds the two new RestoreTest wire keys to the shared host-report golden and exercises them in the bidirectional key-set contract test. Kept byte-identical with felhom-hub's copy (sha256 e6999d77...). Testdata/tests only — the v0.7.0 binary is unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) --- internal/hub/contract_test.go | 4 ++++ internal/hub/testdata/host-report.golden.json | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/internal/hub/contract_test.go b/internal/hub/contract_test.go index 108d8ea..11e8c7f 100644 --- a/internal/hub/contract_test.go +++ b/internal/hub/contract_test.go @@ -57,6 +57,10 @@ func TestHostReport_ContractMatchesGolden(t *testing.T) { { SourceArchive: "local:backup/x.tar.zst", SourceTier: "local", ScratchVMID: 990000, Pass: true, Verified: "boot+running", TestedAt: "2026-06-09T11:05:00Z", DurationSeconds: 1, + // slice-7 (v0.7.0): warnings + warnings_recognized must appear in the marshaled + // shape so the bidirectional key-set guard exercises the new wire keys. + Warnings: []string{"WARN: Systemd 257 detected. You may need to enable nesting."}, + WarningsRecognized: true, }, }, PBSSnapshots: []PBSSnapshot{ diff --git a/internal/hub/testdata/host-report.golden.json b/internal/hub/testdata/host-report.golden.json index 5f66eb9..695f894 100644 --- a/internal/hub/testdata/host-report.golden.json +++ b/internal/hub/testdata/host-report.golden.json @@ -108,7 +108,11 @@ "pass": true, "verified": "boot+running", "tested_at": "2026-06-09T11:05:00Z", - "duration_seconds": 38.2 + "duration_seconds": 38.2, + "warnings": [ + "WARN: Systemd 257 detected. You may need to enable nesting." + ], + "warnings_recognized": true } ], "pbs_snapshots": [