gendesign/backend/app
Light1YT 72eae3bc9b
All checks were successful
Deploy / changes (push) Successful in 5s
Deploy / build-frontend (push) Has been skipped
Deploy / build-backend (push) Successful in 1m35s
Deploy / build-worker (push) Successful in 2m31s
Deploy / deploy (push) Successful in 1m42s
feat(parcels): persist analysis runs + real last_analysis_date (#994)
Persist each successful POST /analyze into analysis_runs (migration 127):
best-effort SAVEPOINT-wrapped INSERT in a thin analysis_runs repository, then
explicit db.commit() (get_db has no commit-on-success; SAVEPOINT RELEASE alone
does not persist — without the commit the row rolls back on request teardown,
a silent no-op caught in code review). A persist failure never breaks the
response or poisons the session. Result serialized via jsonable_encoder→
json.dumps (handles embedded Pydantic models/dates); confidence/status
normalized to satisfy the 127 CHECK constraints (unknown→NULL/'complete').

Populate by-bbox last_analysis_date from v_analysis_runs_latest via a single
batch query (no N+1), replacing the #307 placeholder. The read is best-effort
wrapped too — a view-missing deploy window or future drift must not 500 the
map (falls back to last_analysis_date=None).

Additive only — analyze response shape unchanged. Tests: by-bbox suite patches
latest_run_dates (mock-db returns same rows for any query) + new test asserts
ISO last_analysis_date from a latest run. Analyze mock-suite unaffected
(graceful side_effect overflow + best-effort persist absorb the extra INSERT).
Incidental: ruff-format fixed one pre-existing f-string spacing (line ~2391)
the format hook flags on touch.

Closes #994. Refs #961.
2026-06-03 17:36:01 +05:00
..
api feat(parcels): persist analysis runs + real last_analysis_date (#994) 2026-06-03 17:36:01 +05:00
core feat(rbac): role-based access control via X-Authenticated-User middleware (#585) 2026-05-26 06:18:40 +00:00
models feat(jobs): centralized job_settings API + DB-driven beat schedule 2026-05-11 15:38:13 +03:00
observability feat(backend): sentry-sdk init для FastAPI + Celery (#204 backend) (#207) 2026-05-16 15:09:16 +00:00
schemas feat(forecasting): class/commercial/USP §10.2/10.4/10.5 + §16 (#983, 953-B) (#1015) 2026-06-03 07:52:24 +00:00
scrapers Merge pull request 'feat(#263 sub-A): cad_* overlay schemas + cadastre territorial_zones (ПЗЗ)' (#265) from feat/263-sub-a-cad-nspd-overlay-schemas-and-pzz into main 2026-05-17 07:50:08 +00:00
services feat(parcels): persist analysis runs + real last_analysis_date (#994) 2026-06-03 17:36:01 +05:00
templates feat(sf-b7): GET /parcels/{cad}/snapshot.pdf — 1-page WeasyPrint export (#334) 2026-05-17 21:11:03 +00:00
workers feat(workers): supply-layers refresh task + weekly beat (#950 Step 5) (#1005) 2026-06-02 20:47:05 +00:00
__init__.py init 2026-04-25 13:45:19 +03:00
main.py feat(health): expose app version in GET /health (#717) (#719) 2026-05-30 12:15:06 +00:00