Enrich competitor_rows query with pricing from objective_lots via objective_complex_mapping JOIN backbone (domrf_obj_id → project_name). New fields in competitors[]: avg_price_per_m2_rub (81% coverage vs 0.3% from domrf_kn_flats), avg_area_pd, units_sold, units_available, lots_with_price. LEFT JOIN preserves competitors without mapping (fields = NULL), no regression on existing competitor count/order. Also fix test_velocity.py: update _sales_row mock with has_mapping field and VelocityResult constructor with velocity_data_available/velocity_source fields introduced in OBJ-2 (velocity.py had diverged from test mocks). All 33 velocity + gate_verdict tests pass. Closes #307 (OBJ-3 sub-task) |
||
|---|---|---|
| .. | ||
| v1 | ||
| __init__.py | ||