bots-garden/mini-mepublic Fork
⑂ v1.0.2
Commits
⬇ Clone ▾
git clone https://git.rickub.com/bots-garden/mini-me.git
git clone ssh://git@rickub.com/bots-garden/mini-me.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Download ZIP
🛟 Updated. dfcd2ed · on v1.0.2 · k33g · 5d ago
struggle_wiring_test.go · 21 lines · 591 BGo Blame HistoryRaw
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
package main

import (
	"testing"

	"mm/internal/detector"
	"mm/internal/ui"
)

func TestLoopStruggleWarnsThenStops(t *testing.T) {
	cases := map[detector.Loop]ui.Struggle{
		{Tool: "bash", Repeats: 4}:                   {Label: "loop: bash ×4"},
		{Tool: "edit_file", Repeats: 6, Stuck: true}: {Severe: true, Label: "stuck: edit_file ×6"},
		{Tool: "bash", Repeats: 3, Failing: true}:    {Label: "failing: 3 tool calls in a row"},
	}
	for loop, want := range cases {
		if got := loopStruggle(loop); got != want {
			t.Errorf("loopStruggle(%+v) = %+v, want %+v", loop, got, want)
		}
	}
}