返回 DeepSeek-Reasonix
final_rejection_test.go
根目录 / internal / agent / final_rejection_test.go
1 package agent
2
3 import (
4 "reasonix/internal/event"
5 "reasonix/internal/evidence"
6 "reasonix/internal/tool"
7 "reflect"
8 "testing"
9 )
10
11 func TestPlanAcceptanceIsNotAHostCompletionCondition(t *testing.T) {
12 a := New(nil, tool.NewRegistry(), NewSession(""), Options{}, event.Discard)
13 plan := criterionPlan()
14 a.SetPlanContract(&plan)
15 a.task.ledger.Record(evidence.Receipt{ToolName: "bash", Command: "go test ./...", Success: false})
16 before := a.task.ledger.Receipts()
17 if !a.ReadinessResult().Ready || !reflect.DeepEqual(before, a.task.ledger.Receipts()) {
18 t.Fatal("acceptance text enforced or changed facts")
19 }
20 }
21
21 lines GO