feat(parcels): typed AnalyzeResponse + run-history endpoints — EPIC #961 (#992,#994) #1082
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#1082
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "feat/analyze-response-contract-961"
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?
Что
Завершает EPIC #961 (контракт API результата + версионирование).
Closes #992, Closes #994.
#992 — типизированный AnalyzeResponse + response_model
POST /{cad}/analyzeтеперь имеетresponse_model=AnalyzeResponse(был untypeddict[str,Any]).model_config = ConfigDict(extra="allow")→ любой ключresult_payload, не описанный в модели, ПРОХОДИТ в ответ (нет тихого drop, который сломал бы фронт). ~90 known-полей задокументированы для OpenAPI/codegen.result_payloadи ассертитset(payload) ⊆ set(response)(нет drop); 202-путь возвращает stub (не 500). HTTPException (400/404/503) минуют response_model.#994 — история прогонов (read)
GET /{cad}/runs→ лёгкий список (безresult-blob), пусто → 200{runs:[]}(не 404).GET /runs/{run_id}→ полный ран (incl.result), 404 graceful.list_runs_for/get_run(psycopg v3CAST(:x AS type), base-таблица не view). Роуты зарегистрированы ДО/{parcel_id}→/runs/{id}не затеняется.Качество
code-reviewer: ✅ APPROVE — no key-drops (доказано тестом против реального payload + extra="allow"), nested-drop риск оценён (none), 202 safe, route-ordering ок, psycopg v3 чисто.Финальный гейт (мой, перед объявлением done)
Сверю live-prod
/analyzekey-set ДО/ПОСЛЕ деплоя (baseline = 65 top-level ключей) — если хоть один пропал, откатываю. (response_model на core-эндпоинте = высокий blast-radius.)