wrongmove/api
Viktor Barzin f833309297
Refactor backend for cleaner error handling, DRY, and type safety
- Extract rate limiter DRY: consolidate 3 duplicated check/respond paths
  into _check_counter and _enforce_limit helpers, add proper type annotations
- Replace bare Exception raises with FloorplanDownloadError and
  RightmoveApiError; narrow catch clauses to specific exception types;
  fix Step base class to inherit from ABC
- Consolidate MAX_OCR_WORKERS into config/scraper_config.py; extract
  _find_tenure_value helper to deduplicate tenure parsing
- Extract _build_poi_distances_lookup from stream endpoint to reduce nesting
- Fix csv_exporter: optional decisions.json, NaN instead of -1 sentinels,
  guard against division by zero on missing square meters
- Fix notifications.py broken list[Surface]() constructor, database.py
  stale comments and missing type annotation, auth.py type:ignore,
  ui_exporter.py stale TODO
- Fix 3 pre-existing test failures: mock cache layer in streaming tests,
  bypass rate limiter for test isolation, fix cache invalidation test to
  account for two-pattern scan loop
2026-02-10 22:19:24 +00:00
..
app.py Refactor backend for cleaner error handling, DRY, and type safety 2026-02-10 22:19:24 +00:00
audit_middleware.py Add API rate limiting, metrics guard, and audit middleware 2026-02-08 00:45:43 +00:00
auth.py Refactor backend for cleaner error handling, DRY, and type safety 2026-02-10 22:19:24 +00:00
config.py Harden backend security: IDOR fix, error sanitization, rate limiter fallback, security headers 2026-02-08 19:42:30 +00:00
metrics.py Flatten repo structure: move crawler/ to root, remove vqa/ and immoweb/ 2026-02-07 23:01:20 +00:00
metrics_guard.py Add API rate limiting, metrics guard, and audit middleware 2026-02-08 00:45:43 +00:00
origin_validator.py Add API anti-abuse hardening: disable docs in prod, origin validator, exception handler 2026-02-08 20:06:46 +00:00
passkey_routes.py Harden backend security: IDOR fix, error sanitization, rate limiter fallback, security headers 2026-02-08 19:42:30 +00:00
poi_routes.py Harden backend security: IDOR fix, error sanitization, rate limiter fallback, security headers 2026-02-08 19:42:30 +00:00
rate_limit_config.py Reduce task polling frequency and raise rate limits to prevent 429s 2026-02-09 22:59:39 +00:00
rate_limiter.py Refactor backend for cleaner error handling, DRY, and type safety 2026-02-10 22:19:24 +00:00
security_headers.py Harden backend security: IDOR fix, error sanitization, rate limiter fallback, security headers 2026-02-08 19:42:30 +00:00
ws_routes.py Switch task progress to throttled event-driven updates 2026-02-10 21:24:33 +00:00