fix(tradein): confidence_explanation no longer contradicts counters (#695) #738

Merged
bot-reviewer merged 1 commit from fix/695-explanation-counts into main 2026-05-30 15:10:31 +00:00

1 commit

Author SHA1 Message Date
e6e2a2cdc4 fix(tradein): confidence_explanation no longer contradicts counters (#695)
When the same-building/micro-radius anchor built the headline, the explanation
CONCATENATED three fragments describing different populations: the radius base
text («Найдено N аналогов из M разных адресов»), the analog_tier note, and the
anchor sentence («построено по anchor['n'] аналогам из того же дома»). Result:
contradictory counts (n_analogs≠anchor['n'], e.g. «4 … по 5») and tiers
(«разных адресов» vs «того же дома»).

Fix: when the anchor fires, the anchor sentence becomes authoritative — replace
the explanation with it (+ repair_note, which is orthogonal) instead of
appending to the radius base + tier_note. Radius path unchanged.

Refs #695
2026-05-30 18:07:44 +03:00