Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Use prompt-file delivery for resumed Claude Code and Qoder turns when the
prompt exceeds the inline limit or the target is Windows, preserving prompt
delivery metadata and failing before execution if the file cannot be uploaded.
- Include gate and turn failure details in JUnit output when grading data is
absent. Omit skipped assertions from the list of failed assertions.
- Read workspace file expectations and rule-based checks through the runtime
when it exposes `Exists` and `ReadFile` accessors. Docker and OpenSandbox
cases now grade the actual sandbox workspace instead of host paths, while
Expand Down
5 changes: 1 addition & 4 deletions internal/report/junit.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,6 @@ func buildJudgeSkillProperties(cr CaseResult) *junitProperties {
// Turn-scoped assertions already include turn numbers in their text field,
// making CI failure output directly actionable.
func buildFailureBody(cr CaseResult) string {
if cr.Grading == nil && len(cr.JudgeResults) == 0 {
return ""
}
var lines []string
if cr.Gates != nil {
for _, failure := range cr.Gates.Failures {
Expand All @@ -212,7 +209,7 @@ func buildFailureBody(cr CaseResult) string {
}
if cr.Grading != nil {
for _, ar := range cr.Grading.AssertionResults {
if !ar.Passed {
if !ar.Passed && !ar.Skipped {
lines = append(lines, fmt.Sprintf("- %s: %s", ar.Text, ar.Evidence))
}
}
Expand Down
20 changes: 20 additions & 0 deletions internal/report/reporter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,26 @@ func TestJUnitReporter_Write(t *testing.T) {
}
}

func TestJUnitFailureEvidence(t *testing.T) {
cr := CaseResult{CaseID: "example", Status: judge.StatusFail, Gates: &judge.ExpectResult{
Failures: []judge.ExpectFailure{{Rule: "exit_code", Detail: "expected 0"}},
}}
cr.TurnResults = []CaseTurnResult{{TurnNumber: 2, Status: "failed", Reason: "post-condition failed"}}
reporter := JUnitReporter{}
body := reporter.buildTestSuite(Input{CaseResults: []CaseResult{cr}}).Suites[0].TestCases[0].Failure.Body
if !strings.Contains(body, "expected 0") || !strings.Contains(body, "post-condition failed") {
t.Errorf("missing gate or turn failure in %q", body)
}
cr.Grading = judge.NewResult([]judge.AssertionResult{
{Text: "independent failure", Evidence: "missing output"},
{Text: "not evaluated", Skipped: true},
}, 1, 1)
body = reporter.buildTestSuite(Input{CaseResults: []CaseResult{cr}}).Suites[0].TestCases[0].Failure.Body
if !strings.Contains(body, "independent failure") || strings.Contains(body, "not evaluated") {
t.Errorf("unexpected failed assertions in %q", body)
}
}

func TestJUnitReporter_FailureDetails(t *testing.T) {
dir := t.TempDir()
path := filepath.Join(dir, "result.xml")
Expand Down
Loading