feat(db): analysis_runs versioned store + latest-view §22 (#993) #1027
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#1027
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "feat/993-analysis-runs-table"
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?
#961 EPIC 17 (961-C2):
analysis_runsversioned store + latest-view (ТЗ §22). Миграция 127 — durable, версионируемый, ПЕРЕ-открываемый store анализ-ранов: 1 строка = 1 завершённый анализ участка (frozenresultjsonb =SiteFinderReport.as_dict()#987,schema_versionдля версионированного re-open). Append-mostly (история — не затираем прошлые раны → TABLE, не MV).Заменяет заглушку
last_analysis_date=None(parcels.py:1026,1092) →v_analysis_runs_latest(DISTINCT ON cad_num, max created_at, детерминир. id-DESC tiebreak, зеркало м.125).created_by=X-Authenticated-User, nullable, без FK (нет таблицы users; прецедент м.90/119). result/params/segment JSONB; district/confidence/status денормализованы; CHECK на status+confidence. Idempotent.Dry-run vs прод-каталог: DDL применяется чисто в rolled-back txn; DISTINCT ON latest-wins подтверждён. Фундамент для #994 (persist) + #992 (контракт).
Closes #993. Refs #961.