MCPcopy Create free account
hub / github.com/JordanCoin/codemap / TestClassifyIntent_Confidence

Function TestClassifyIntent_Confidence

cmd/intent_test.go:44–56  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

42}
43
44func TestClassifyIntent_Confidence(t *testing.T) {
45 // Pure refactor prompt should have high confidence
46 intent := classifyIntent("refactor the scanner to split it into modules", nil, nil, config.ProjectConfig{})
47 if intent.Confidence < 0.5 {
48 t.Errorf("expected high confidence for pure refactor, got %f", intent.Confidence)
49 }
50
51 // Mixed prompt should have lower confidence
52 mixed := classifyIntent("fix the bug and refactor the handler", nil, nil, config.ProjectConfig{})
53 if mixed.Confidence >= 1.0 {
54 t.Errorf("expected lower confidence for mixed intent, got %f", mixed.Confidence)
55 }
56}
57
58func TestClassifyIntent_TieBreaking(t *testing.T) {
59 // "failing test" matches both bugfix ("failing") and test ("test") —

Callers

nothing calls this directly

Calls 1

classifyIntentFunction · 0.85

Tested by

no test coverage detected