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 <noreply@anthropic.com>
This commit is contained in:
@@ -110,6 +110,34 @@ try:
|
|||||||
print((json.load(sys.stdin).get("diff") or "")[:20000])
|
print((json.load(sys.stdin).get("diff") or "")[:20000])
|
||||||
except Exception:
|
except Exception:
|
||||||
pass' || true)"
|
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}
|
EVID="KARTE ${repo}:${branch}
|
||||||
COMMIT: ${subject}
|
COMMIT: ${subject}
|
||||||
UMFANG: ${stat}
|
UMFANG: ${stat}
|
||||||
|
|||||||
Reference in New Issue
Block a user