fix: code review critical and high issues
...
- tenacity+structlog: replace before_sleep_log with structlog-compatible lambda
to prevent TypeError on retry
- NormalizedProperty: filter AI response dict by allowed dataclass fields before
unpacking to avoid TypeError on unknown keys
- property_pipeline: remove duplicate update_status(failed) from _stage_normalize
- security: add URL validator (SSRF protection) for ImageDownloader and archive-check
- ai prompts: replace raw <user_data> tags with JSON-serialized payload
to mitigate prompt injection
- queue_worker: wrap _process_one in try/except so DB errors don't kill the loop
- image processing: parallelize with asyncio.gather + Semaphore(3)
- ai services: unify OllamaFatalError handling — all propagate instead of swallow
- router_properties: catch only pydantic.ValidationError/ValueError in ingest,
let infrastructure errors return 500
Co-Authored-By: Claude <noreply@anthropic.com>
Eugene Sukhodolskiy
committed
1 day ago