From fc591da024ff7725c1f6ba570189571d6f7bd89e Mon Sep 17 00:00:00 2001 From: Hitonabi Date: Sun, 12 Jul 2026 20:12:08 +0200 Subject: [PATCH] Karten-Gutachter: leerer Diff => mechanisch UNKLAR (ohne Richter) Erstlauf-Befund 12.07.: Karte mit 0 Dateien bekam ANNEHMEN - ein LLM kann einen leeren Vorschlag nicht pruefen. Jetzt deterministische Regel vor dem Richter. Co-Authored-By: Claude Fable 5 --- deploy/karten-gutachter.sh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/deploy/karten-gutachter.sh b/deploy/karten-gutachter.sh index 9ddd934..fc95f43 100644 --- a/deploy/karten-gutachter.sh +++ b/deploy/karten-gutachter.sh @@ -110,6 +110,34 @@ try: print((json.load(sys.stdin).get("diff") or "")[:20000]) except Exception: pass' || true)" + # Leerer Diff = deterministisch UNKLAR, OHNE Richter (Erstlauf 12.07.: eine Karte mit + # 0 Dateien bekam trotzdem ANNEHMEN — ein LLM kann einen leeren Vorschlag nicht pruefen). + if [ -z "${DIFF//[[:space:]]/}" ]; then + python3 - "$OUT" "$repo" "$branch" "$cts" <<'PY' +import json, os, sys, time +out_path = sys.argv[1] +try: + data = json.load(open(out_path, encoding="utf-8")) + if not isinstance(data, dict): + data = {} +except Exception: + data = {} +data["{}:{}".format(sys.argv[2], sys.argv[3])] = { + "empfehlung": "UNKLAR", + "satz": "Der Vorschlag hat einen LEEREN Diff (0 geaenderte Dateien gegen main) — da gibt es nichts zu pruefen; technisch verdaechtig, im Zweifel ablehnen.", + "richter": "mechanische Regel (leerer Diff)", + "commit_ts": int(sys.argv[4]) if sys.argv[4].isdigit() else None, + "ts": int(time.time())} +tmp = out_path + ".tmp" +with open(tmp, "w", encoding="utf-8") as f: + json.dump(data, f, ensure_ascii=False) +os.replace(tmp, out_path) +PY + N=$((N + 1)) + echo "Karte ${branch}: Empfehlung UNKLAR — leerer Diff (mechanische Regel, kein Richter noetig)." + briefkasten "Karten-Gutachter" "Karte '${branch}' (${repo}): Empfehlung UNKLAR — der Diff ist leer (0 Dateien), technisch verdaechtig." + continue + fi EVID="KARTE ${repo}:${branch} COMMIT: ${subject} UMFANG: ${stat}