返回 DeepSeek-Reasonix
review_skill_budget_test.go
根目录 / internal / boot / review_skill_budget_test.go
1 package boot
2
3 import (
4 "context"
5 "testing"
6
7 "reasonix/internal/agent"
8 "reasonix/internal/provider"
9 )
10
11 // A review skill runs on the step budget its runner resolved from the parent;
12 // the review contract bounds each response, not how many files it may read.
13 func TestReviewSkillKeepsRunnerStepBudget(t *testing.T) {
14 for _, steps := range []int{0, 20} {
15 var gotSteps int
16 factory := func(_ context.Context, s int, _ *provider.Pricing, _ int, _ int) agent.Options {
17 gotSteps = s
18 return agent.Options{MaxSteps: s}
19 }
20 _, opts := reviewSubagentSkillOptions(context.Background(), "review", "review the change", steps, nil, 0, 1, factory)
21 if gotSteps != steps {
22 t.Fatalf("runner steps %d reached the child as %d", steps, gotSteps)
23 }
24 if opts.MaxOutputTokens != 2048 {
25 t.Fatalf("review output cap = %d, want 2048", opts.MaxOutputTokens)
26 }
27 }
28 }
29
29 lines GO