mavend: centralize action validation boundary (slice 4)

This commit is contained in:
2026-09-06 12:53:54 +04:00
parent 6a402bf556
commit 356766bce1
32 changed files with 2061 additions and 178 deletions
+3 -3
View File
@@ -91,7 +91,7 @@ func TestNexusIsAskedForTheNameHeSaid(t *testing.T) {
Intent: router.IntentAct,
Slots: router.Slots{Text: "перезагрузить музик индексер", Fn: "restart", HasFn: true},
}
h.handleHexisAct(ctx, dec)
h.handleHexisAct(ctx, dec, routeCandidate("restart"))
reqs := nexus.Requests()
if len(reqs) == 0 {
@@ -226,7 +226,7 @@ func TestTwoResolvedNamesAsk(t *testing.T) {
Intent: router.IntentAct,
Slots: router.Slots{Text: "перезагрузить нгинкс", Fn: "restart", HasFn: true},
}
reply := h.handleHexisAct(ctx, dec)
reply := h.handleHexisAct(ctx, dec, routeCandidate("restart"))
if !strings.Contains(reply, "nginx") || !strings.Contains(reply, "Muzick indexer") {
t.Fatalf("reply = %q, want both names she found", reply)
}
@@ -251,7 +251,7 @@ func TestTheNameNexusKnowsWins(t *testing.T) {
Intent: router.IntentAct,
Slots: router.Slots{Text: "перезагрузить нгинкс", Fn: "restart", HasFn: true},
}
reply := h.handleHexisAct(ctx, dec)
reply := h.handleHexisAct(ctx, dec, routeCandidate("restart"))
if reply == "" {
t.Fatal("the resolvable name must carry the act")
}