Harness Intelligence Wiki
ReferenceTech DebtApiReports

AI Invalid Verdict Schema

AI Invalid Verdict Schema

Initial Debt

Codex review found that the AI metadata schema required title and body even when the model returned valid: false.

Why It Matters

An invalid AI verdict could fail schema decoding before the rejection branch ran, causing finalizeReport to fall back to local metadata and accept a report the model rejected.

Resolution

apps/api/src/reports.ts now allows invalid verdicts to omit metadata and preserves explicit valid: false rejections.

Validation

  • apps/api/src/reports.test.ts verifies { valid: false, reason } rejects without requiring generated title/body.

Closeout

Resolved in PR #24 follow-up after Codex review.

On this page