fix(exec): expand validPhases and remove schema enum constraint for phase

This commit is contained in:
Mathias Bergqvist
2026-04-19 09:42:03 +02:00
parent cbef2da8de
commit 858a9ba1a1
2 changed files with 15 additions and 3 deletions

View File

@@ -69,3 +69,11 @@ func TestResultValidation(t *testing.T) {
})
}
}
func TestValidateAcceptsAllPhases(t *testing.T) {
phases := []string{"red", "green", "refactor", "retrospective", "review", "debug", "spec", "trainer"}
for _, phase := range phases {
r := exec.Result{Status: "pass", Phase: phase, Skill: "test", ModelUsed: "self", Message: "ok"}
assert.NoError(t, r.Validate(), "phase %q should be valid", phase)
}
}