返回 DeepSeek-Reasonix
turn_tools_test.go
根目录 / internal / boot / turn_tools_test.go
1 package boot
2
3 import (
4 "slices"
5 "testing"
6
7 "reasonix/internal/tool"
8 )
9
10 func TestInteractiveAgentToolsEndNaturallyWithoutFinish(t *testing.T) {
11 reg := tool.NewRegistry()
12 registerInteractiveAgentTools(reg)
13
14 if _, ok := reg.Get("ask"); !ok {
15 t.Fatal("interactive registry is missing ask")
16 }
17 if _, ok := reg.Get("finish"); ok {
18 t.Fatal("interactive registry exposes finish; ordinary turns must end naturally")
19 }
20 if slices.Contains(HostControlToolNames(), "finish") || slices.Contains(UnifiedProviderToolNames(), "finish") {
21 t.Fatal("provider-visible allowlist still contains finish")
22 }
23 }
24
24 lines GO