Some checks failed
WEVAL NonReg / nonreg (push) Has been cancelled
Gemini Vision v3 handler: - /var/www/html/api/gemini-vision-zooms-v3.sh (maxTokens 250) - Fix argument list too long via temp files - Focus 4 suspects v2 + 4 controls OK Verdict final cross-validation Playwright + Gemini: - Playwright (deterministic): 30 pages = 0 overlaps - Gemini v2 (60 zooms maxTokens 80): 4 suspects (truncation artifacts) - Gemini v3 (maxTokens 250): ai-hub-tr CORRIGE a false - Gemini confond count:1 (1 element present) avec overlap reel CONCLUSION: ZERO CHAUVAUCHEMENT REEL sur 30 pages phares. Fix doctrine 172/173 all-ia-hub VALIDE. UX doctrine 60 enrich n a cree aucune regression visuelle. Proofs publics: - /proofs/wevia-ux-full-audit-2026-04-24T12-44-04/summary.json (Playwright) - /proofs/wevia-ux-full-audit-2026-04-24T12-44-04/gemini-overlap-review.json (Gemini v2) - /proofs/wevia-ux-full-audit-2026-04-24T12-44-04/gemini-overlap-v3.json (Gemini v3) Cumul session Opus: - 37 tags - 33 doctrines vault (146-189) - 317/323 pages UX doctrine 60 (98.1 percent coverage) - NR 153/153 invariant 51 phases
54 lines
2.3 KiB
Bash
Executable File
54 lines
2.3 KiB
Bash
Executable File
#!/bin/bash
|
|
# Doctrine 189: Gemini Vision v3 - maxTokens 250 + focus 4 suspects
|
|
set -u
|
|
AUDIT="${1:-}"
|
|
[ -z "$AUDIT" ] && { echo '{"err":"no_audit"}'; exit 1; }
|
|
KG=$(grep "^GEMINI_KEY=" /etc/weval/secrets.env 2>/dev/null | cut -d= -f2- | tr -d '"' | head -c 80)
|
|
REPORT="$AUDIT/gemini-overlap-v3.json"
|
|
TMP_B64=/tmp/gvz3_img.b64
|
|
TMP_PAY=/tmp/gvz3_pay.json
|
|
TMP_RESP=/tmp/gvz3_resp.json
|
|
FIRST=1
|
|
COUNT=0
|
|
echo -n "{\"doctrine\":\"189\",\"ts\":\"$(date -Iseconds)\",\"agent\":\"gemini-2.5-flash-v3\",\"reviews\":[" > "$REPORT"
|
|
|
|
# Focus 4 suspects + some OK controls
|
|
for NAME in ai-hub-tr wevia-business-visual-studio-br wevia-chat-v2-tr wevia-cockpit-tr tools-hub-br agents-hub-tr weval-technology-platform-tr director-center-br; do
|
|
IMG="$AUDIT/zooms/${NAME}.png"
|
|
[ ! -f "$IMG" ] && continue
|
|
|
|
base64 -w0 < "$IMG" > "$TMP_B64"
|
|
|
|
python3 > "$TMP_PAY" << PYEOF
|
|
import json
|
|
with open("$TMP_B64") as f: b64=f.read().strip()[:300000]
|
|
prompt='Zoom 400x400 WEVAL UI. Detecte chauvauchement strict (elements UI se superposent physiquement sur mm pixels). Reponse JSON sans markdown avec tous champs: {"overlap":true|false,"count":N,"severity":"none|low|medium|high","note":"description"}'
|
|
print(json.dumps({"contents":[{"parts":[{"text":prompt},{"inline_data":{"mime_type":"image/png","data":b64}}]}],"generationConfig":{"temperature":0.1,"maxOutputTokens":250}}))
|
|
PYEOF
|
|
|
|
curl -sk -m 25 -X POST "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:generateContent?key=$KG" \
|
|
-H "Content-Type: application/json" -d @"$TMP_PAY" > "$TMP_RESP" 2>&1
|
|
|
|
CONTENT=$(python3 << PYEOF
|
|
import sys, json, re
|
|
try:
|
|
with open("$TMP_RESP") as f: d = json.loads(f.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[:250]}))
|
|
else: print(json.dumps({"raw":t[:250]}))
|
|
except Exception as e: print(json.dumps({"err":str(e)[:80]}))
|
|
PYEOF
|
|
)
|
|
if [ $FIRST -eq 1 ]; then FIRST=0; else echo -n "," >> "$REPORT"; fi
|
|
echo -n "{\"img\":\"$NAME\",\"r\":$CONTENT}" >> "$REPORT"
|
|
COUNT=$((COUNT+1))
|
|
sleep 2
|
|
done
|
|
echo "],\"reviewed\":$COUNT}" >> "$REPORT"
|
|
rm -f "$TMP_B64" "$TMP_PAY" "$TMP_RESP"
|
|
echo "{\"ok\":true,\"count\":$COUNT,\"report\":\"${REPORT#/var/www/html}\"}"
|