hub (unreleased): four silent failures tell the operator (R-1383, D78)
gates / gates (push) Successful in 2m9s

A hub daily check skipped while the hub was down; an operator mail that was never sent; a signed job a box did not
take; a signed job a box refused, and the guest-power watchdog's give-up (both from the agent). Operator-only.
No new table. Not deployed.

Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
This commit is contained in:
admin committed 2026-11-14 17:29:53 +01:00
1 parent 88e636445a
commit 1886030782
22 files changed
+1269 -2

No files matched your search

@@ -0,0 +1,30 @@
== MUTATION: the give-up is not listed (the journal line stays the only trace)
RED on the mutant, GREEN on the real file
--- FAIL: TestGuestPower_GiveUpIsReportedUntilTheGuestRuns (0.00s)
guestpower_test.go:271: give-up list = [], want guest 9201, 3 attempts, since 2026-11-14T02:30:00Z (the give-up's time, not a later tick's)
== MUTATION: a guest the watchdog still tries is listed as given up
RED on the mutant, GREEN on the real file
--- FAIL: TestGuestPower_GiveUpIsReportedUntilTheGuestRuns (0.00s)
guestpower_test.go:261: after 1 failed start(s) the watchdog still tries, but it reports a give-up: [{VMID:9201 Since:0001-01-01T00:00:00Z Attempts:1}]
== MUTATION: the give-up's time is not recorded
RED on the mutant, GREEN on the real file
--- FAIL: TestGuestPower_GiveUpIsReportedUntilTheGuestRuns (0.00s)
guestpower_test.go:271: give-up list = [{VMID:9201 Since:0001-01-01T00:00:00Z Attempts:3}], want guest 9201, 3 attempts, since 2026-11-14T02:30:00Z (the give-up's time, not a later tick's)
== MUTATION: an empty list is sent as a typed nil (the report would carry null)
RED on the mutant, GREEN on the real file
--- FAIL: TestGuestPower_GiveUpIsReportedUntilTheGuestRuns (0.00s)
guestpower_test.go:256: before any attempt the stanza is []localapi.GuestPowerGiveUp(nil), want an untyped nil (the report omits the field)
4 mutations, 0 not a red-proof
== MUTATION: the outcome is not sent
RED on the mutant, GREEN on the real file
--- FAIL: TestCompleteJob_OutcomeRidesTheQuery (0.00s)
client_sentat_test.go:74: requests = ["/api/v1/hosts/demo-host-01/jobs/j1?" "/api/v1/hosts/demo-host-01/jobs/j2?"], want ["/api/v1/hosts/demo-host-01/jobs/j1?" "/api/v1/hosts/demo-host-01/jobs/j2?op=agent_update&outcome=rejected&r
1 mutations, 0 not a red-proof
== MUTATION: main does not wire the give-up into the report
RED on the mutant, GREEN on the real file
--- FAIL: TestMainWiresPVETrust (0.01s)
pvetrust_wiring_test.go:64: main.go wires "guest-power give-up → report" 0 time(s), want at least 1 (the two-call ones: at start and after a bundle install)
1 mutations, 0 not a red-proof
@@ -0,0 +1,34 @@
== MUTATION: a refused job is cleared with no word (the old behaviour)
RED on the mutant, GREEN on the real file
--- FAIL: TestRunner_TellsTheHubHowEachJobEnded (0.00s)
outcome_test.go:70: job "forged": the hub was told {Outcome: Reason: Op:} (told=true), want {Outcome:rejected Reason:malformed Op:storage_wipe}
outcome_test.go:70: job "expired": the hub was told {Outcome: Reason: Op:} (told=true), want {Outcome:rejected Reason:expired Op:storage_wipe}
outcome_test.go:70: job "early": the hub was told {Outcome: Reason: Op:} (told=true), want {Outcome:rejected Reason:not_yet_valid Op:storage_wipe}
== MUTATION: a refused job is told as done
RED on the mutant, GREEN on the real file
--- FAIL: TestRunner_TellsTheHubHowEachJobEnded (0.00s)
outcome_test.go:70: job "early": the hub was told {Outcome:done Reason: Op:storage_wipe} (told=true), want {Outcome:rejected Reason:not_yet_valid Op:storage_wipe}
outcome_test.go:70: job "other-box": the hub was told {Outcome:done Reason: Op:storage_wipe} (told=true), want {Outcome:rejected Reason:target Op:storage_wipe}
outcome_test.go:70: job "forged": the hub was told {Outcome:done Reason: Op:storage_wipe} (told=true), want {Outcome:rejected Reason:malformed Op:storage_wipe}
== MUTATION: the runner never uses the outcome call
RED on the mutant, GREEN on the real file
--- FAIL: TestRunner_TellsTheHubHowEachJobEnded (0.00s)
outcome_test.go:70: job "early": the hub was told {Outcome: Reason: Op:} (told=false), want {Outcome:rejected Reason:not_yet_valid Op:storage_wipe}
outcome_test.go:70: job "other-box": the hub was told {Outcome: Reason: Op:} (told=false), want {Outcome:rejected Reason:target Op:storage_wipe}
outcome_test.go:70: job "forged": the hub was told {Outcome: Reason: Op:} (told=false), want {Outcome:rejected Reason:malformed Op:storage_wipe}
== MUTATION: the two clock reasons are swapped
RED on the mutant, GREEN on the real file
--- FAIL: TestRunner_TellsTheHubHowEachJobEnded (0.00s)
outcome_test.go:70: job "expired": the hub was told {Outcome:rejected Reason:not_yet_valid Op:storage_wipe} (told=true), want {Outcome:rejected Reason:expired Op:storage_wipe}
outcome_test.go:70: job "early": the hub was told {Outcome:rejected Reason:expired Op:storage_wipe} (told=true), want {Outcome:rejected Reason:not_yet_valid Op:storage_wipe}
== MUTATION: a failed run is told as done
RED on the mutant, GREEN on the real file
--- FAIL: TestRunner_TellsTheHubHowEachJobEnded (0.00s)
outcome_test.go:70: job "run-fails": the hub was told {Outcome:done Reason: Op:storage_wipe} (told=true), want {Outcome:failed Reason:execution_failed Op:storage_wipe}
== MUTATION: an unknown refusal sends the error's own text
RED on the mutant, GREEN on the real file
--- FAIL: TestReasonCode_ClosedList (0.00s)
outcome_test.go:92: reasonCode({Allowed:false Disposition: Reason:rejected Verified:<nil> Err:something new}) = "something new", not on ReasonCodes
outcome_test.go:96: an unknown refusal must be told as „other”, never as the error's own text
6 mutations, 0 not a red-proof
@@ -0,0 +1,40 @@
== MUTATION: a refused job is not told (executed or rejected look the same)
RED on the mutant, GREEN on the real file
--- FAIL: TestSignedJobOutcome_RefusedIsToldDoneIsNot (0.04s)
r1383_box_told_test.go:52: events=0, want ONE for the refused job
== MUTATION: a job that ran is told as refused
RED on the mutant, GREEN on the real file
--- FAIL: TestSignedJobOutcome_RefusedIsToldDoneIsNot (0.05s)
r1383_box_told_test.go:43: a job that ran, or an agent that says nothing, raised 2 event(s): [{ID:1 CustomerID:c1 EventType:signed_job_refused Severity:error Message:The signed job ran (agent_update) for h1 was REFUSED: the box ga
== MUTATION: a repeated DELETE is told twice
RED on the mutant, GREEN on the real file
--- FAIL: TestSignedJobOutcome_RefusedIsToldDoneIsNot (0.04s)
r1383_box_told_test.go:52: events=2, want ONE for the refused job
== MUTATION: the box's own reason text reaches the event
RED on the mutant, GREEN on the real file
--- FAIL: TestSignedJobOutcome_RefusedIsToldDoneIsNot (0.04s)
r1383_box_told_test.go:74: the failed run or the unknown words are not told as designed:
r1383_box_told_test.go:77: the box's own text reached an event:
== MUTATION: the op name is not checked
RED on the mutant, GREEN on the real file
--- FAIL: TestSignedJobOutcome_RefusedIsToldDoneIsNot (0.04s)
r1383_box_told_test.go:74: the failed run or the unknown words are not told as designed:
r1383_box_told_test.go:77: the box's own text reached an event:
== MUTATION: the give-up is told at every report
RED on the mutant, GREEN on the real file
--- FAIL: TestGuestPowerGaveUp_ToldOnceClearedOnlyByARunningGuest (0.05s)
r1383_box_told_test.go:113: two reports of the same give-up: gave_up=2 ok=0, want ONE alarm
== MUTATION: the give-up is never told
RED on the mutant, GREEN on the real file
--- FAIL: TestGuestPowerGaveUp_ToldOnceClearedOnlyByARunningGuest (0.04s)
r1383_box_told_test.go:113: two reports of the same give-up: gave_up=0 ok=0, want ONE alarm
== MUTATION: the entry vanishing clears the alarm (an agent restart reads as a recovery)
RED on the mutant, GREEN on the real file
--- FAIL: TestGuestPowerGaveUp_ToldOnceClearedOnlyByARunningGuest (0.05s)
r1383_box_told_test.go:121: the entry vanished while the guest is still stopped: gave_up=1 ok=1 — that is not a recovery
== MUTATION: the alarm never clears
RED on the mutant, GREEN on the real file
--- FAIL: TestGuestPowerGaveUp_ToldOnceClearedOnlyByARunningGuest (0.05s)
r1383_box_told_test.go:130: after the guest runs again: gave_up=1 ok=0, want one recovery
9 mutations, 0 not a red-proof
@@ -0,0 +1,48 @@
== MUTATION: the ledger never tells (the old behaviour: last run is forgotten at a restart)
RED on the mutant, GREEN on the real file
--- FAIL: TestDailyLedger_HubDownAtTheSlotIsTold (0.00s)
daily_ledger_test.go:59: events=0, want ONE for the slot the hub was down at: []
== MUTATION: a slot that ran is told as skipped
RED on the mutant, GREEN on the real file
--- FAIL: TestDailyLedger_HubDownAtTheSlotIsTold (0.00s)
daily_ledger_test.go:54: a slot that ran was told as skipped: [|hub_daily_job_skipped|warning|hub|The hub's daily check „deadline-check” did NOT run at 2026-11-10 05:00 CET: the hub was not running at that minute. It last ran at 2
== MUTATION: the same missed slot is told at every restart
RED on the mutant, GREEN on the real file
--- FAIL: TestDailyLedger_HubDownAtTheSlotIsTold (0.00s)
daily_ledger_test.go:73: the same missed slot was told 2 times
== MUTATION: the run is not recorded
RED on the mutant, GREEN on the real file
--- FAIL: TestDailyLedger_HubDownAtTheSlotIsTold (0.00s)
daily_ledger_test.go:54: a slot that ran was told as skipped: [|hub_daily_job_skipped|warning|hub|The hub's daily check „deadline-check” did NOT run at 2026-11-10 05:00 CET: the hub was not running at that minute. It last ran at 2
== MUTATION: every job is watched
RED on the mutant, GREEN on the real file
--- FAIL: TestDailyLedger_UnwatchedJobAndNilLedger (0.00s)
daily_ledger_test.go:95: an unwatched job: events=[] state=map[daily_last:prune:2026-11-09 03:00:00 +0100 CET]
== MUTATION: the slot is taken as now minus 24 h, not a wall-clock time
RED on the mutant, GREEN on the real file
--- FAIL: TestPrevDailySlot_HourChangeDays (0.00s)
daily_ledger_test.go:113: PrevDailySlot(2026-10-25T04:30:00+01:00) = 2026-10-24T06:00:00+02:00, want 2026-10-24T05:00:00+02:00
6 mutations, 0 not a red-proof
== MUTATION: the scheduler does not ask the ledger at its start
RED on the mutant, GREEN on the real file
--- FAIL: TestR1383_MainWiresTheSilentFailureChecks (0.00s)
r1383_wiring_test.go:74: scheduleDaily calls the ledger: Started 0, Ran 1 — want 1 and 1
== MUTATION: the scheduler does not record a run
RED on the mutant, GREEN on the real file
--- FAIL: TestR1383_MainWiresTheSilentFailureChecks (0.00s)
r1383_wiring_test.go:74: scheduleDaily calls the ledger: Started 1, Ran 0 — want 1 and 1
== MUTATION: the lost-mail scan is never started
RED on the mutant, GREEN on the real file
--- FAIL: TestR1383_MainWiresTheSilentFailureChecks (0.00s)
r1383_wiring_test.go:70: main.go: lost-mail scan — found 0 time(s), want 1
== MUTATION: the signed-job check is not on the sweep
RED on the mutant, GREEN on the real file
--- FAIL: TestR1383_MainWiresTheSilentFailureChecks (0.00s)
r1383_wiring_test.go:70: main.go: signed-job sweep — found 0 time(s), want 1
== MUTATION: the ledger watches a job name nobody runs
RED on the mutant, GREEN on the real file
--- FAIL: TestR1383_MainWiresTheSilentFailureChecks (0.00s)
r1383_wiring_test.go:70: main.go: watched "offsite-key-audit" — found 0 time(s), want 1
5 mutations, 0 not a red-proof
@@ -0,0 +1,38 @@
== MUTATION: the scan lists nothing
RED on the mutant, GREEN on the real file
--- FAIL: TestLostOperatorMail_ToldAtTheNextStart (0.04s)
lost_operator_mail_test.go:70: lost mails told = 0, want 1 (the one whose retries the restart ate; not the one that went out on a retry)
== MUTATION: the scan's time is not kept — a second start tells the same mail
RED on the mutant, GREEN on the real file
--- FAIL: TestLostOperatorMail_ToldAtTheNextStart (0.04s)
lost_operator_mail_test.go:89: a second start told 1 again (mails now 1)
== MUTATION: the summary is a row only, no mail
RED on the mutant, GREEN on the real file
--- FAIL: TestLostOperatorMail_ToldAtTheNextStart (0.04s)
lost_operator_mail_test.go:73: mails sent at the start = [], want ONE to the operator
== MUTATION: the summary leaves no row
RED on the mutant, GREEN on the real file
--- FAIL: TestLostOperatorMail_ToldAtTheNextStart (0.04s)
lost_operator_mail_test.go:85: event rows = [], want one operator_mail_lost row
4 mutations, 0 not a red-proof
== MUTATION: a mail that went out on a retry counts as lost (every failed row)
RED on the mutant, GREEN on the real file
--- FAIL: TestLostOperatorMail_ToldAtTheNextStart (0.05s)
lost_operator_mail_test.go:70: lost mails told = 2, want 1 (the one whose retries the restart ate; not the one that went out on a retry)
== MUTATION: a cooldown's suppressed row hides the failed mail
RED on the mutant, GREEN on the real file
--- FAIL: TestLostOperatorMail_ToldAtTheNextStart (0.04s)
lost_operator_mail_test.go:70: lost mails told = 0, want 1 (the one whose retries the restart ate; not the one that went out on a retry)
2 mutations, 0 not a red-proof
== MUTATION: the give-up leaves only the log line
RED on the mutant, GREEN on the real file
--- FAIL: TestLostOperatorMail_GiveUpLeavesARow (0.04s)
lost_operator_mail_test.go:106: after the retries gave up: event rows = [], want one that carries the lost mail's text
== MUTATION: the four cases' events reach the household
RED on the mutant, GREEN on the real file
--- FAIL: TestR1383_SilentFailureEventsAreOperatorOnly (0.00s)
lost_operator_mail_test.go:117: signed_job_refused must be operator-only
2 mutations, 0 not a red-proof
@@ -0,0 +1,14 @@
== MUTATION: a job that waits is never told
RED on the mutant, GREEN on the real file
--- FAIL: TestSignedJobWait_OldJobToldOnceFreshJobNot (0.00s)
signed_job_waits_test.go:35: events=0, want ONE (the old job, once): []
== MUTATION: a fresh job is told at once
RED on the mutant, GREEN on the real file
--- FAIL: TestSignedJobWait_OldJobToldOnceFreshJobNot (0.00s)
signed_job_waits_test.go:35: events=2, want ONE (the old job, once): [cust-of-h1|signed_job_not_taken|warning|The signed job old for h1 is still in the queue after 3h0m0s: the box did not take it. A box asks for its jobs every 15
== MUTATION: the job is told at every sweep
RED on the mutant, GREEN on the real file
--- FAIL: TestSignedJobWait_OldJobToldOnceFreshJobNot (0.00s)
signed_job_waits_test.go:35: events=2, want ONE (the old job, once): [cust-of-h1|signed_job_not_taken|warning|The signed job old for h1 is still in the queue after 3h0m0s: the box did not take it. A box asks for its jobs every 15
3 mutations, 0 not a red-proof