Task
1. Re-validate edited JSON before approving.
2. Auto-normalize derived fields like missingEvidence.
3. Store correctedJson after approval.
4. Store correctedValidationJson after approval.
5. Show correctedJson + correctedValidationJson in UI after approval.
6. Keep original AI extractedJson / validationJson unchanged for audit history.
7. Make approval/rejection/request-more-info state changes clear in backend and frontend.
Edit and Approval Endpoint Goal
- correctedJson is schema-validated.
- correctedJson is rule-validated.
- approval is blocked if FIR/policyNumber/required evidence is still missing.
- missingEvidence is normalized automatically.
- ReviewTask becomes EDITED_AND_APPROVED.
- ExtractionRun.extractedJson remains unchanged.
- ExtractionRun.validationJson remains unchanged.
approve as-is should not blindly approve broken AI JSON. It should only approve when the current extracted JSON has no blocking validation issues.
APPROVE_AS_IS
- Backend verifies the JSON again . If it still has
missing_fields, conflicts, requiredEvidence you can’t approve it.

REQUEST MORE INFO


REJECT


EDIT AND APPROVE


BACKEND RE VALIDATION

AUDIT EVIDENCE