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
This commit is contained in:
2026-11-02 12:29:56 +01:00
parent 04379702e5
commit 0ef81d85b3
2 changed files with 13 additions and 1 deletions
@@ -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))
}
}
@@ -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.