feat(agents): человекочитаемые вердикты аналитика, ревьюера, dev и постмортема в панель «Логи»
Some checks failed
CI / test (push) Failing after 1m55s
CI / build-and-package (amd64, linux) (push) Failing after 1m7s
CI / build-and-package (amd64, windows) (push) Successful in 29s

This commit is contained in:
ki.sagidullin
2026-08-24 10:33:45 +05:00
parent c9ab753c1e
commit 94521488b6
6 changed files with 196 additions and 5 deletions

View File

@@ -1090,3 +1090,46 @@ func TestRenderPostMortemPrompt(t *testing.T) {
}
}
}
// TestFormatReviewVerdict — человекочитаемое описание вердикта ревьюера.
func TestFormatReviewVerdict(t *testing.T) {
tests := []struct {
name string
v *reviewVerdict
want []string
}{
{
name: "passed with everything",
v: &reviewVerdict{
Passed: true,
CriticalIssues: []string{"bug A"},
SolidViolations: []string{"v1", "v2"},
Comments: []string{"comment"},
},
want: []string{"passed=yes", "critical=[bug A]", "solid=[v1 | v2]", "comments=[comment]"},
},
{
name: "failed with critical only",
v: &reviewVerdict{
Passed: false,
CriticalIssues: []string{"bug A", "bug B"},
},
want: []string{"passed=no", "critical=[bug A | bug B]"},
},
{
name: "empty verdict",
v: &reviewVerdict{},
want: []string{"passed=no"},
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
got := formatReviewVerdict(tt.v)
for _, w := range tt.want {
if !strings.Contains(got, w) {
t.Errorf("formatReviewVerdict = %q, want contain %q", got, w)
}
}
})
}
}