gendesign/backend/tests/api/v1
Light1YT fceaaf9a2c
All checks were successful
CI / changes (push) Successful in 6s
CI / frontend-tests (push) Has been skipped
CI / changes (pull_request) Successful in 5s
CI / frontend-tests (pull_request) Has been skipped
Deploy / changes (push) Successful in 5s
Deploy / build-frontend (push) Has been skipped
Deploy / build-backend (push) Successful in 2m41s
CI / backend-tests (push) Successful in 6m24s
CI / backend-tests (pull_request) Successful in 6m23s
Deploy / build-worker (push) Successful in 3m26s
Deploy / deploy (push) Successful in 1m12s
feat(chat): LLM tool-loop + §19 redaction wiring for #957 (Step 2+3)
Add the LLM prose-composition path for the parcel-forecast chat, layered
over the deterministic Step-1 fallback which stays the safety net.

- chat/tools.py: 5 read-only section tools (exec_summary, product_recommendation,
  forecast, risks, scenarios) — pure slices of the loaded report dict, no DB/
  recompute, graceful on missing sections. market_now (raw analyze blob) and meta
  are deliberately NOT exposed -> highest-PII data cannot reach the LLM.
- chat/safe_payload.py: the §19 gate — single place that builds the outbound
  SafePayload from a section-aggregate allowlist; honors is_confidential hard-block.
- chat/orchestrator.py: manual tool-call loop with call-cap/termination, real
  grounded_in provenance; any LLMResult.ok=False (disabled/timeout/rate_limited/
  redaction_refused/call_cap/provider_error/empty) degrades to the deterministic answer.
- llm/prompts.py: versioned chat_system@v1 — answer only from sections, never
  fabricate numbers, advisory tone, decline out-of-scope.
- api/v1/chat.py: branch on settings.llm_enabled; sync complete bridged via
  run_in_threadpool. Default-off -> deterministic path, no provider built.
- Tests: fake provider only (no network), planted-secret redaction-boundary +
  per-reason fallback + call-cap + numbers-from-report coverage.

Refs #957
2026-06-08 17:45:01 +05:00
..
__init__.py feat(cadastre): bulk_harvest worker + grid-walker + admin API (#168 PR3/5) (#171) 2026-05-15 13:31:32 +03:00
test_admin_cadastre.py test(suite): re-align drifted tests with current code (CI-rehab 2/3) 2026-06-03 19:05:43 +05:00
test_admin_ekburg_permits.py test(suite): re-align drifted tests with current code (CI-rehab 2/3) 2026-06-03 19:05:43 +05:00
test_analyze_competitors_status.py fix(sf-02): добавить site_status/ready_dt в /analyze competitors + sort строящиеся first 2026-05-17 13:29:59 +03:00
test_analyze_inline_weights.py feat(sf): включить enable_ird_analyze + latency-hardening (#1115) 2026-06-07 10:00:48 +00:00
test_analyze_market_price.py feat(sf): включить enable_ird_analyze + latency-hardening (#1115) 2026-06-07 10:00:48 +00:00
test_analyze_parcel_meta.py feat(sf): включить enable_ird_analyze + latency-hardening (#1115) 2026-06-07 10:00:48 +00:00
test_analyze_recent_permits.py feat(sf): включить enable_ird_analyze + latency-hardening (#1115) 2026-06-07 10:00:48 +00:00
test_chat.py feat(chat): LLM tool-loop + §19 redaction wiring for #957 (Step 2+3) 2026-06-08 17:45:01 +05:00
test_custom_pois.py test(suite): re-align drifted tests with current code (CI-rehab 2/3) 2026-06-03 19:05:43 +05:00
test_insights.py feat(insights): manual-entry Insight entity CRUD + §19 audit (#948 part A) 2026-06-08 12:41:39 +05:00
test_locations.py feat(location): district-level Location entity + indices (#948 part B) 2026-06-08 13:28:19 +05:00
test_own_projects.py feat(site-finder): own-portfolio data source for §25.3 cannibalization (#1169 PR1) 2026-06-08 16:21:53 +05:00
test_parcel_best_layouts.py test(suite): re-align drifted tests with current code (CI-rehab 2/3) 2026-06-03 19:05:43 +05:00
test_parcel_by_bbox.py fix(analyze): district KeyError 500 in #994 persist + revive by-bbox tests 2026-06-03 18:04:37 +05:00
test_parcel_competitors.py fix(competitors): size-weight avg velocity by flats_total (#949 audit, option B) 2026-06-04 14:05:20 +05:00
test_parcel_connection_points.py feat(parcels): connection-points endpoint (Forgejo #115 Phase 1 backend) (#190) 2026-05-16 05:58:27 +00:00
test_parcels_forecast.py feat(export): add PPTX presentation export of §22 forecast report (#959) 2026-06-07 14:09:35 +05:00
test_run_history_and_response_contract.py feat(parcels): typed AnalyzeResponse + run-history read endpoints (#961) 2026-06-06 18:13:34 +00:00