#1871 P1 (Ghost-anchor) trust defect: when the same-building anchor
replaces the headline estimate, the code sets confidence = anchor["confidence"]
and overwrites n_analogs = anchor["n"] (>0). With ZERO radius analogs
(listings_clean == []) this yielded confidence='high'/'medium' on an
estimate built only on same-building comps (sometimes a single
yandex_valuation, e.g. median 38.4M) with no comparable nearby listings.
The defensive guard _enforce_zero_analog_low only fires on n_analogs == 0,
but n_analogs was already overwritten to anchor["n"] (>0) — so it never
caught this path. UI rendered "Высокая · 0 объектов" = fabricated confidence.
Fix: inline guard inside the `if anchor is not None:` block, right after
n_analogs = anchor["n"]. When listings_clean is empty and confidence != 'low',
downgrade to 'low', log a warning, and append an honest caveat to explanation.
Sits before _enforce_zero_analog_low and before the result is finalized, so the
downgraded confidence + caveat propagate to the response.
Test: tests/test_estimator_ghost_anchor_radius_empty_1871.py exercises the
full estimate path (via the test_same_building_anchor harness) with a
tight-spread anchor (n=5, would be 'high') and empty radius → asserts
confidence='low' + caveat present; plus a control that a non-empty radius is
not downgraded.