Spaces:
Running
Running
Commit History
-
refactor(logging): standardize all remaining files onto setup_logger()β
18 files (17, once adversarial_tester.py β missed by the original audit's grep β is included) called bare logging.getLogger(__name__) instead of the project's own core/logger.py::setup_logger(). Since nothing in the running app calls logging.basicConfig(), those loggers defaulted to effective level WARNING with no handler of their own: .info()/.debug() calls were silently discarded, and .warning()/.error() calls surfaced unformatted via Python's 'last resort' handler instead of the intended stdout stream β meaning 17-18 modules' operational logs were effectively invisible. Fix: from backend.core.logger import setup_logger; logger = setup_logger(name), matching every other module in the codebase. Mechanical, behavior-neutral outside of logging output itself. Verified repo-wide after this commit: the only remaining logging.getLogger() call anywhere in backend/ is setup_logger()'s own internal implementation in core/logger.py, as expected.fcea3b7
-
fix(batch): fix uncertain_count negative values with exclusive classification
ffbf0eb
-
fix(cleanup): final pyflakes cleanup across 4 filesβ
image_type_classifier.py: remove unused arr_hsv, hsv_img, colorsys import report_exporter.py: remove unused struct, datetime; fix dead y variable and add() function; fix bare f-string buf.write(f'0 6\n') batch_processor.py: remove unused hashlib, BytesIO imports analyze.py: remove unused 'import time as _time' inside metrics recorderb39683a
-
Merge branch 'main' into fix/update-gitignore
dff083f -
Potential fix for pull request finding 'CodeQL / Information exposure through an exception'β
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>64f1ec2
-
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