返回 DeepSeek-Reasonix
fact_driven_route_test.go
根目录 / internal / control / fact_driven_route_test.go
1 package control
2
3 import "testing"
4
5 func TestFactDrivenPlannerIsExplicitOnly(t *testing.T) {
6 if TaskWarrantsPlanner("解释 OAuth token") || TaskWarrantsPlanner("复杂重构认证迁移") {
7 t.Fatal("ordinary wording must stay executor-only")
8 }
9 if !TaskWarrantsPlanner("先规划再执行认证迁移") {
10 t.Fatal("explicit plan-then-execute must call planner")
11 }
12 }
13
14 func TestFactDrivenConstraintsIgnoreComplexityWords(t *testing.T) {
15 // ParseConstraints lives in runtimepolicy; this covers the controller path
16 // that must not auto-plan on complexity words.
17 if TaskWarrantsPlanner("复杂重构认证迁移 OAuth token database") {
18 t.Fatal("complexity words must not invoke the planner")
19 }
20 }
21
21 lines GO