From 0ef81d85b35e12a68c3bdda6822e398e0e453bee Mon Sep 17 00:00:00 2001 From: jochen Date: Mon, 2 Nov 2026 12:23:02 +0100 Subject: [PATCH] Count nox's warrant acts for a vault verb as the operator's decisions nox records a hand act before each sensitive vault verb, with the verb's address as its verb and cause operator; two in a fortnight raised a false healer-wanted. mesh-healers reads those four verbs as decisions by design (issue 1126 review 2). Claude-Session: https://claude.ai/code/session_01NcbgfJ9Gum47zkFKWRaovL --- modules/mesh-healers/cmd/mesh-healers/healers_test.go | 8 +++++++- modules/mesh-healers/cmd/mesh-healers/wanted.go | 6 ++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/modules/mesh-healers/cmd/mesh-healers/healers_test.go b/modules/mesh-healers/cmd/mesh-healers/healers_test.go index 8af1a6af..fd8b6d70 100644 --- a/modules/mesh-healers/cmd/mesh-healers/healers_test.go +++ b/modules/mesh-healers/cmd/mesh-healers/healers_test.go @@ -3,6 +3,7 @@ package main import ( "encoding/json" "errors" + "fmt" "slices" "sort" "strings" @@ -364,6 +365,11 @@ func TestACauseRepairedByHandTwiceIsAHealerWanted(t *testing.T) { act("a6", "conditions silence", "operator-answer", time.Hour) act("a7", "hand-act record", "relogin", 20*24*time.Hour) act("a8", "hand-act record", "relogin", time.Hour) + // nox's acts warranting a sensitive vault verb are the operator's decisions, not repairs (issue 1126 review 2). + for i, verb := range []string{"mesh-vault.rotate", "mesh-vault.provisioner_retire_approve", "mesh-vault.provisioner_delete", + "mesh-vault.secret_vault_export"} { + act(fmt.Sprintf("n%d", i), verb, "operator", time.Hour) + } want := []string{"mesh.hand-acts.consumer-behind.healer-wanted"} if keys := w.store.keys(FindingsState); !slices.Equal(keys, want) { t.Fatalf("findings %v, want %v", keys, want) @@ -380,7 +386,7 @@ func TestACauseRepairedByHandTwiceIsAHealerWanted(t *testing.T) { if keys := w.store.keys(FindingsState); len(keys) != 0 { t.Errorf("past the fortnight the finding stays: %v", keys) } - if len(w.h.acts) != 8 { + if len(w.h.acts) != 12 { t.Errorf("an act heard twice or listed after it was heard is kept twice: %d acts", len(w.h.acts)) } } diff --git a/modules/mesh-healers/cmd/mesh-healers/wanted.go b/modules/mesh-healers/cmd/mesh-healers/wanted.go index 9d111b5c..2b83a20a 100644 --- a/modules/mesh-healers/cmd/mesh-healers/wanted.go +++ b/modules/mesh-healers/cmd/mesh-healers/wanted.go @@ -57,6 +57,12 @@ var decided = map[string][]string{ "secret accept": nil, "secret rotate": {"leaked-in-logs"}, "rotate": {"leaked-in-logs"}, + // The acts nox records to warrant a sensitive vault verb, the vault verb's address as its verb (issue 1126): the + // operator's decision, whatever its cause. + "mesh-vault.rotate": nil, + "mesh-vault.provisioner_retire_approve": nil, + "mesh-vault.provisioner_delete": nil, + "mesh-vault.secret_vault_export": nil, } // personsDecision is whether an act is a person's decision by design, by the verb that recorded it.