The node seat's acts reads one act by its id (issue 774, ADR 0563 §9)

This commit is contained in:
2026-10-28 21:54:04 +01:00
parent 2323ba19db
commit 50de0a5a71
2 changed files with 5 additions and 1 deletions
+1 -1
View File
@@ -42,7 +42,7 @@ func EngineVerbs() []Verb {
{Name: "acts", Description: "Every act this machine's engine was asked through this seat (novox/hq ADR 0563 §9): " +
"each hand-over, access act and setuid search, open, done or refused, with who asked, the ask and the " +
"operator's warrant. Read-only.",
Input: schema(map[string]string{"limit": "at most this many, newest"}, nil)},
Input: schema(map[string]string{"limit": "at most this many, newest", "id": "one act, by its id"}, nil)},
}
}
+4
View File
@@ -73,6 +73,10 @@ func TestTheSeatsAreAClosedSetAndEachNamesItsDecision(t *testing.T) {
for _, v := range engine.Serves {
verbs = append(verbs, v.Name)
}
// acts reads one act by its id too (ADR 0563 §9: the seat's tools are its command line).
if props, _ := engine.Serves[len(engine.Serves)-1].Input["properties"].(map[string]any); props["id"] == nil {
t.Errorf("acts takes no id: %v", engine.Serves[len(engine.Serves)-1].Input)
}
if strings.Join(verbs, ",") != "hand-over,access-act,judge-directories,setuid-search,root-free,acts" ||
strings.Join(engine.Emits, ",") != "asked,done,refused" {
t.Errorf("node-engine serves %v and emits %v", verbs, engine.Emits)