feat(freshness): zero-output check + kn_flats source — catch "ran but produced nothing" (#1945) #1947
No reviewers
Labels
No labels
admin
analytics
auth
automation
bug
business
chore
ci
compliance
data
data-moat
docs
duplicate
dx
enhancement
Fable 5 ревью
feedback/max
generative
GG-форсайт
needs-discussion
needs-human
observability
pause-bots
performance
priority/p0
priority/p1
priority/p2
priority/p3
scope/backend
scope/db
scope/devops
scope/frontend
scope/qa
scrapers
security
site-finder
stage/1
stage/2
status/blocked
status/done
status/needs-analysis
status/needs-fix
status/qa
status/ready
status/review
status/wip
tech-debt
tradein
ux
week ревью 1
wontfix
вторичка
ИРД
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lekss361/gendesign#1947
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "feat/freshness-zero-output-check"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Зачем
Превентивно к #1945: domrf_kn FLATS loader работал
status=done, но извлекал 0 flats ~5 недель — и монитор не алёртил, потому что (а) классифицировал по recency прогона, не по выхлопу, и (б)kn-источник смотрелobjects_count(здоров ~1548), а неflats_count(сломан =0). «Прогнался успешно, но ничего не произвёл» проскакивал тихо.Что
Opt-in zero-output check: otherwise-fresh run-ledger источник (свежий success по возрасту), который произвёл 0 work-rows за 7d-окно, понижается до
status="failed"→scrape_freshness_checkшлёт GlitchTip-алёрт. Аддитивное полеreason.Гарды (все 4):
alert_on_zero_outputфлаг · run-ledger only (timestamp_col is None) ·status=="ok"(age-stale/failed уже покрыт возрастом, не дублируем) ·upd_7d==0(SUM собственногоwork_colисточника по done-прогонам).Реестр: новый
kn_flats(kn_scrape_runs,work_col=flats_count, critical, флаг ON) — смотрит ИМЕННО сломанную колонку; существующийkn(objects_count) не тронут. Флаг также наobjective(rows_lots, critical). nspd/nspd_geo/cadastre — без флага (легитимные 0 / data-table).Безопасность
reason+ полеalert_on_zero_output(default False). Эндпоинтdict[str,Any](permissive), фронт его не консьюмит типизированно → codegen не нужен. Существующие ключи/shape целы.status=="ok"+last_success is None→failedраньше → no-successful-runs не проскочит как ложный ok.Поймал бы #1945 за ~8-14 дней вместо 5 недель. Migration не нужна (чистый код).