fix: коэффициенты как статистика применения, а не свойство расценки

Аудит вскрыл: дедуп брал коэф из одного репрезентативного вхождения, но 6.5%
расценок (97) применялись И с коэф, И без (01-02-061-01: 3 раза с, 851 без).
Хранить один коэф на расценку — вводит в заблуждение («всегда демонтаж»).
Теперь ресурсы = БАЗОВЫЕ нормы ГЭСН (свойство расценки), а коэф вынесен в
coef_applications: with/without + частоты [обоснование, target, factor] по ВСЕМ
вхождениям. Также проверено измерением: ОСР (279) = свод без расценок (0 позиций,
корректно), тихих потерь нет (10270=10270), непокрытые теги — только производные/ID.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
anor
2026-06-09 01:47:15 +10:00
co-authored by Claude Opus 4.8
parent ae157bc309
commit dc4526c62c
4 changed files with 43 additions and 8 deletions
+1 -1
View File
@@ -130,7 +130,7 @@ def find_in_real_estimates(query: str, top_k: int = 5) -> list[dict]:
keys = ("code", "name", "unit", "prefix", "kind", "freq", "norm_sets", "regions",
"qty", "comment", "unit_cost_cur", "cost_structure", "labor_ch",
"machinist_ch", "price_base", "price_cur", "overhead", "profit",
"coefficients", "resources", "examples")
"coef_applications", "resources", "examples")
return [{k: it.get(k) for k in keys} for _, _, it in results[:top_k]]