@@ -80,7 +80,7 @@ func TestHasRepeatedToolCalls(t *testing.T) {
80 t.Run("exact repeat at threshold not detected", func(t *testing.T) {
80 t.Run("exact repeat at threshold not detected", func(t *testing.T) {
81 // maxRepeats=5 means > 5 is needed, so exactly 5 should return false
81 // maxRepeats=5 means > 5 is needed, so exactly 5 should return false
82 steps := make([]fantasy.StepResult, 10)
82 steps := make([]fantasy.StepResult, 10)
83− for i := 0; i < 5; i++ {
83+ for i := range 5 {
84 steps[i] = makeToolStep("read", `{"file":"a.go"}`, "content")
84 steps[i] = makeToolStep("read", `{"file":"a.go"}`, "content")
86 for i := 5; i < 10; i++ {
86 for i := 5; i < 10; i++ {
@@ -95,7 +95,7 @@ func TestHasRepeatedToolCalls(t *testing.T) {
95 t.Run("loop detected", func(t *testing.T) {
95 t.Run("loop detected", func(t *testing.T) {
96 // 6 identical steps in a window of 10 with maxRepeats=5 → detected
96 // 6 identical steps in a window of 10 with maxRepeats=5 → detected
97 steps := make([]fantasy.StepResult, 10)
97 steps := make([]fantasy.StepResult, 10)
98− for i := 0; i < 6; i++ {
98+ for i := range 6 {
99 steps[i] = makeToolStep("read", `{"file":"a.go"}`, "content")
99 steps[i] = makeToolStep("read", `{"file":"a.go"}`, "content")
101 for i := 6; i < 10; i++ {
101 for i := 6; i < 10; i++ {
@@ -110,7 +110,7 @@ func TestHasRepeatedToolCalls(t *testing.T) {
110 t.Run("steps without tool calls are skipped", func(t *testing.T) {
110 t.Run("steps without tool calls are skipped", func(t *testing.T) {
111 // Mix of tool steps and empty steps — empty ones should not affect counts
111 // Mix of tool steps and empty steps — empty ones should not affect counts
112 steps := make([]fantasy.StepResult, 10)
112 steps := make([]fantasy.StepResult, 10)
113− for i := 0; i < 4; i++ {
113+ for i := range 4 {
114 steps[i] = makeToolStep("read", `{"file":"a.go"}`, "content")
114 steps[i] = makeToolStep("read", `{"file":"a.go"}`, "content")
116 for i := 4; i < 8; i++ {
116 for i := 4; i < 8; i++ {