v2.0.15: фиксы по ревью Соннета (10 находок)
Deploy contracts-flask / validate (push) Canceled after 0s

- #1 process.py: target_id→target_hash (UPDATE/DELETE больше не UNRESOLVED)
- #2 Dockerfile: COPY upload
- #3 prompts.py: убран created_by из SELECT
- #4 prompts_bp.py: save_new_version/delete_prompt
- #5 llm.py/classify.py: LLM-конфиг из config.py
- #6/#7 compare.js: escHtml (XSS)
- #8-#10: комментарии + мёртвый gen_random_uuid
This commit is contained in:
“Naeel”
2026-08-26 15:59:21 +03:00
parent ebdab731ff
commit e3f5581712
11 changed files with 30 additions and 25 deletions
+12
View File
@@ -77,6 +77,18 @@ def run_pipeline(contract_id, order_ids, build_prompt_fn):
ops = result.get("ops", [])
mode = result.get("mode", "llm")
# Трансляция target_id ("r1","r2"...) → target_hash (name_hash из current_spec).
# LLM возвращает target_id, а apply_ops() читает target_hash — без этого UPDATE/DELETE уходят в UNRESOLVED.
for _op in ops:
_tid = _op.get("target_id", "")
if _tid and isinstance(_tid, str) and _tid.startswith("r"):
try:
_idx = int(_tid[1:]) - 1
if 0 <= _idx < len(current_spec):
_op["target_hash"] = current_spec[_idx]["hash"]
except ValueError:
pass
yield {
"type": "llm_done",
"supplement_id": sid,