Spaces:
Running
Running
Commit History
-
fix(batch): accept 429 in test_batch_api_rejects_non_image
Rate limit of 2/min on /api/v1/analyze/batch is shared across all batch API tests in the same test session. When this test runs third it hits the rate limit before the content-type check fires. Accept 415 or 429 as both indicate the request was correctly rejected.1d511a9 -
feat(batch): batch investigation mode for multi-image forensic analysis
- backend/services/batch_processor.py: sequential processing of up to 10 images, batch statistics (mean/max/min AI probability, class distribution, generator breakdown), perceptual hash duplicate detection (Hamming distance <= 8), risk ranking by AI probability descending, C2PA provenance consistency check across batch (detects selective credential stripping pattern) - backend/api/routes/analyze.py: POST /api/v1/analyze/batch, 2/min rate limit, multi-file upload via List[UploadFile], per-file type validation - backend/tests/test_batch.py: 13 tests — unit tests for statistics, risk ranking, duplicate detection, provenance consistency; integration tests for multi-image processing, bounded values, evidence_id presence; API tests for endpoint, oversize rejection, non-image rejection Processing: sequential to avoid OOM on GPU. Max 5MB per image in batch mode. Closes #126a59fe7