Problem
POST /api/runs checks that results is an array, but accepts an empty array. The run is stored with total: 0, and the response reports shouldFail: false. A broken CI producer can therefore submit no evaluation cases and still get a passing gate.
Relevant code: app/api/runs/route.ts.
Expected behavior
An empty results array should return HTTP 400 with a clear validation error and should not create a suite or run.
Acceptance criteria
- Reject
results: [] before any database write.
- Keep non-empty payload behavior unchanged.
- Add a regression test for the empty-array case.
- Document the requirement in the informational
GET /api/runs response if needed.
Problem
POST /api/runschecks thatresultsis an array, but accepts an empty array. The run is stored withtotal: 0, and the response reportsshouldFail: false. A broken CI producer can therefore submit no evaluation cases and still get a passing gate.Relevant code:
app/api/runs/route.ts.Expected behavior
An empty
resultsarray should return HTTP 400 with a clear validation error and should not create a suite or run.Acceptance criteria
results: []before any database write.GET /api/runsresponse if needed.