Skip to content

Reject empty evaluation runs before database access - #4

Open
vsolano9 wants to merge 1 commit into
AgentPostmortem:mainfrom
vsolano9:fix-3-reject-empty-results
Open

Reject empty evaluation runs before database access#4
vsolano9 wants to merge 1 commit into
AgentPostmortem:mainfrom
vsolano9:fix-3-reject-empty-results

Conversation

@vsolano9

Copy link
Copy Markdown

What & why

An empty evaluation currently reaches the database and can be stored as a zero-case passing run. This rejects results: [] at the request boundary so a broken CI producer cannot report a false-green gate.

Closes #3

Changes

  • return HTTP 400 for an empty results array before initializing Supabase
  • expose the non-empty constraint in the informational GET /api/runs response
  • add a request-level Node test that starts the real Next route without database credentials and proves the guard runs before database access

Validation

  • npm test — pass; repeated successfully 20 consecutive times
  • npx tsc --noEmit — pass
  • npm run build — pass
  • git diff --check — pass
  • npm ci — pre-existing failure: the committed lockfile no longer satisfies the ranged versions in package.json
  • npm run lint — pre-existing failure: next lint is no longer a supported Next.js command

Checklist

  • Focused change with a clear description
  • Ran format / lint / tests (tests and typecheck pass; repository lint command is broken as noted above)
  • Updated docs or CHANGELOG if relevant
  • Linked the related issue

Reject zero-case CI submissions before any database access and document the constraint in the informational endpoint. Add a request-level regression test that runs without database credentials.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reject empty result arrays so an empty eval run cannot pass CI

1 participant