Files
Alexandru MacocianandCopilot 57bab6746f Run diagnosis through sherlock with a verdict contract
Invoke the Copilot agent via sherlock so gitea/grafana/gssh MCPs are
authenticated with the jarvis identity. Rework the prompt to defer to the
Charlie AGENTS.md, skills, and TSGs, and require Verdict + Confidence
sections. Add ParseVerdict/ParseConfidence and their tests.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5749c447-6ecd-46bd-946d-21b4d101d084
2026-07-30 17:25:28 +02:00

36 lines
992 B
Go

package diagnose
import "testing"
func TestParseVerdict(t *testing.T) {
cases := map[string]string{
"- **Verdict**: `act`\n- more": "act",
"**Verdict:** watch": "watch",
"Verdict: IGNORE": "ignore",
"- Verdict — act": "",
"no verdict here": "",
"**Verdict**: maybe": "",
"prose then\n**Verdict**: `watch`\n": "watch",
}
for in, want := range cases {
if got := ParseVerdict(in); got != want {
t.Errorf("ParseVerdict(%q) = %q, want %q", in, got, want)
}
}
}
func TestParseConfidence(t *testing.T) {
cases := map[string]string{
"- **Confidence**: `high`": "high",
"**Confidence:** Medium": "medium",
"Confidence: low": "low",
"no confidence": "",
"**Confidence**: certainly": "",
}
for in, want := range cases {
if got := ParseConfidence(in); got != want {
t.Errorf("ParseConfidence(%q) = %q, want %q", in, got, want)
}
}
}