Finance statement extraction hardening
AI-assisted statement extraction now fails closed on unrecognized response shapes, rejects over-large input with a typed error, and keeps review-gated safeguards explicit.
Finance statement extraction received a hardening pass focused on preventing silent row loss and keeping review-gated imports honest.
Highlights:
- Fail-closed parsing. Unrecognized AI response shapes now fail as extraction errors instead of being treated as an empty result.
- Clear size handling. Over-large statement input now returns a typed "too large" failure so the user can split the statement instead of getting a partial extraction.
- Review-gated invariant. Extraction remains a proposal step: it returns candidate rows for human review instead of writing finance data directly.
- Tenant filter guardrails. The related route checks now pin explicit project filtering where service-role reads are intentionally used.
- finance
- ai
- security