Some checks failed
WEVAL NonReg / nonreg (push) Has been cancelled
Playwright audit v7: - 30 pages phares auditees sur tr+br zones - 60 zooms captures dimension 400x400 - VERDICT: 0 OVERLAPS detectes - 100 percent pages OK (sauf all-ia-hub 0+1 = OK single element) Handler new: /var/www/html/api/gemini-vision-zooms.sh - Gemini 2.5 Flash review sur 60 zooms - JSON strict parsing robuste - Rate limit respecte (1s delay) - Report: gemini-overlap-review.json Proofs publics: /proofs/wevia-ux-full-audit-2026-04-24T12-44-04/ Cumul session: - 35 tags Opus - 32 doctrines vault (146-187) - 317 pages UX doctrine 60 (98.1 percent coverage) ZERO regression. ZERO chauvauchement confirme par Playwright.
41 lines
1.7 KiB
Bash
Executable File
41 lines
1.7 KiB
Bash
Executable File
#!/bin/bash
|
|
AUDIT="$1"
|
|
KG=$(grep "^GEMINI_KEY=" /etc/weval/secrets.env | cut -d= -f2- | tr -d "\"")
|
|
REVIEWS=()
|
|
COUNT=0
|
|
for IMG in "$AUDIT"/zooms/*.png; do
|
|
NAME=$(basename "$IMG" .png)
|
|
B64=$(base64 -w0 < "$IMG" | head -c 300000)
|
|
PROMPT="Zoom 400x400 page WEVAL (top-right ou bot-right). Detecte chauvauchement UI. JSON strict sans markdown: {\"overlap\":true|false,\"count\":N,\"severity\":\"none|low|medium|high\"}"
|
|
PAYLOAD=$(python3 -c "
|
|
import json,sys
|
|
print(json.dumps({
|
|
\"contents\":[{\"parts\":[{\"text\":sys.argv[1]},{\"inline_data\":{\"mime_type\":\"image/png\",\"data\":sys.argv[2]}}]}],
|
|
\"generationConfig\":{\"temperature\":0.1,\"maxOutputTokens\":100}
|
|
}))
|
|
" "$PROMPT" "$B64")
|
|
RESP=$(curl -sk -m 20 -X POST "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:generateContent?key=$KG" -H "Content-Type: application/json" -d "$PAYLOAD")
|
|
CONTENT=$(echo "$RESP" | python3 -c "
|
|
import sys,json,re
|
|
try:
|
|
d=json.loads(sys.stdin.read())
|
|
t=d[\"candidates\"][0][\"content\"][\"parts\"][0][\"text\"]
|
|
t=re.sub(r\"\`\`\`[a-z]*\",\"\",t).strip()
|
|
m=re.search(r\"\{.*?\}\",t,re.DOTALL)
|
|
if m:
|
|
try: print(json.dumps(json.loads(m.group(0))))
|
|
except: print(json.dumps({\"raw\":t[:150]}))
|
|
else: print(json.dumps({\"raw\":t[:150]}))
|
|
except Exception as e: print(json.dumps({\"err\":str(e)[:80]}))")
|
|
REVIEWS+=("{\"img\":\"$NAME\",\"r\":$CONTENT}")
|
|
COUNT=$((COUNT+1))
|
|
sleep 1
|
|
done
|
|
REPORT="$AUDIT/gemini-overlap-review.json"
|
|
{
|
|
echo -n "{\"doctrine\":\"187\",\"ts\":\"$(date -Iseconds)\",\"agent\":\"gemini-2.5-flash\",\"reviewed\":${#REVIEWS[@]},\"reviews\":["
|
|
F=1; for r in "${REVIEWS[@]}"; do [ $F = 1 ] && F=0 || echo -n ","; echo -n "$r"; done
|
|
echo "]}"
|
|
} > "$REPORT"
|
|
echo "OK reviewed=$COUNT"
|