gendesign/backend/app/api/v1
Light1YT bd1adc1f59
All checks were successful
CI / changes (pull_request) Successful in 7s
CI / frontend-tests (pull_request) Has been skipped
CI / openapi-codegen-check (pull_request) Successful in 1m53s
CI / backend-tests (pull_request) Successful in 12m5s
feat(freshness): zero-output check + kn_flats source (#1945)
The data-freshness monitor classified by run RECENCY only, so the domrf_kn
FLATS loader running status=done but extracting 0 flats for ~5 weeks went
undetected — and the kn source watched objects_count (healthy ~1548), not
flats_count (the broken =0 metric).

Add an opt-in zero-output check: an otherwise-fresh run-ledger source (recent
success, would-be fresh by age) that produced 0 work-rows in the 7d window is
downgraded to status="failed" (so scrape_freshness_check alerts), with an
additive "reason". Guards: alert_on_zero_output flag, run-ledger only
(timestamp_col is None), status=="ok" (age-stale/failed already covered), and
upd_7d==0 (SUM of the source's own work_col over done-runs).

Registry: new kn_flats source (kn_scrape_runs, work_col=flats_count, critical,
flag on) — watches the column that was broken; existing kn (objects_count)
unchanged. Flag also enabled on objective (rows_lots, critical). nspd/nspd_geo/
cadastre left unflagged (legitimate-0 / data-table).

JSON additive only (new nullable "reason" key; endpoint is dict[str,Any], no
frontend consumer / no codegen needed). 4 new tests (downgrade, no-false-
positive, age-precedence, registry). code-reviewer APPROVE.

Would have caught #1945 within ~8-14d instead of 5 weeks.
2026-06-27 11:52:29 +05:00
..
__init__.py init 2026-04-25 13:45:19 +03:00
admin_cadastre.py refactor(security): убрать X-Admin-Token (Caddy basic_auth достаточен) (#437) 2026-05-23 10:41:22 +00:00
admin_etl.py refactor(security): убрать X-Admin-Token (Caddy basic_auth достаточен) (#437) 2026-05-23 10:41:22 +00:00
admin_jobs.py refactor(security): убрать X-Admin-Token (Caddy basic_auth достаточен) (#437) 2026-05-23 10:41:22 +00:00
admin_leads.py fix(leads): replace ::interval cast with make_interval (psycopg v3 trap) (#1383 follow-up) 2026-06-17 21:22:53 +03:00
admin_scrape.py feat(freshness): zero-output check + kn_flats source (#1945) 2026-06-27 11:52:29 +05:00
admin_weight_profiles.py refactor(security): убрать X-Admin-Token (Caddy basic_auth достаточен) (#437) 2026-05-23 10:41:22 +00:00
analytics.py feat(analytics): velocity-anomaly alerts (#17) + ARN ДДУ price indicator (#99) 2026-06-13 22:04:49 +05:00
chat.py fix(backend): экранировать Excel formula-injection (#1244) + увести chat-чтение с event loop (#1245) 2026-06-13 18:10:21 +05:00
concepts.py feat(generative): calibrate finmodel sale price from Objective market data (epic #1881 PR-2) 2026-06-23 21:10:25 +05:00
custom_pois.py feat(#254): user_custom_pois — backend schema + CRUD + scoring integration 2026-05-17 09:34:33 +03:00
insights.py feat(insights): manual-entry Insight entity CRUD + §19 audit (#948 part A) 2026-06-08 12:41:39 +05:00
landing.py feat(sf-fe-a12): Landing redesign + PilotCTA с real B3/B4 data (v2 rebased) (#367) 2026-05-18 05:16:57 +00:00
locations.py feat(location): district-level Location entity + indices (#948 part B) 2026-06-08 13:28:19 +05:00
market.py feat(analytics): velocity-anomaly alerts (#17) + ARN ДДУ price indicator (#99) 2026-06-13 22:04:49 +05:00
me.py feat(rbac): role-based access control via X-Authenticated-User middleware (#585) 2026-05-26 06:18:40 +00:00
own_projects.py feat(site-finder): own-portfolio data source for §25.3 cannibalization (#1169 PR1) 2026-06-08 16:21:53 +05:00
parcels.py feat(analyze): per-category OSRM routing (foot vs driving) (#39 A3) 2026-06-27 04:30:25 +05:00
photos.py fix(week-review): backend-аудит v2 — 82 фиксов (#1660) 2026-06-17 17:13:38 +00:00
pilot.py fix(pilot): drop pydantic EmailStr — email-validator dep missing → backend startup crash (#337) 2026-05-17 21:32:23 +00:00
ping.py feat(backend): add /api/v1/ping liveness endpoint (#634) 2026-05-29 15:53:29 +00:00
trade_in.py fix(week-review): backend-аудит v2 — 82 фиксов (#1660) 2026-06-17 17:13:38 +00:00
users.py feat(sf-b2): GET /users/me/recent-parcels — stub endpoint (auth TODO) (#329) 2026-05-17 21:04:16 +00:00