feat(parcels): typed AnalyzeResponse + run-history endpoints — EPIC #961 (#992,#994) #1082

Merged
bot-backend merged 1 commit from feat/analyze-response-contract-961 into main 2026-06-06 18:13:35 +00:00

1 commit

Author SHA1 Message Date
edf44382f8 feat(parcels): typed AnalyzeResponse + run-history read endpoints (#961)
All checks were successful
CI / changes (push) Successful in 8s
CI / changes (pull_request) Successful in 7s
CI / backend-tests (push) Successful in 5m51s
CI / backend-tests (pull_request) Successful in 5m49s
#992: attach response_model=AnalyzeResponse to POST /{cad_num}/analyze. Model
uses extra="allow" so any result_payload key not explicitly modeled is preserved
in the 200 response (no silent drops that would break Site Finder), and ALL
fields are Optional so the #93 202 fetch-stub serializes without a 500.

#994: add GET /{cad_num}/runs (light summary list, empty 200 not 404) and
GET /runs/{run_id} (full row incl result, 404 if missing), backed by
list_runs_for/get_run in analysis_runs.repository (psycopg v3 CAST(:x AS type)).
Routes ordered before /{parcel_id} so /runs/{run_id} is not shadowed.

Closes #992. Closes #994. Refs #961.
2026-06-06 23:13:00 +05:00