Fix AI review variable name in publish endpoint
The AI review was failing because it referenced 'config' which doesn't exist in the publish endpoint scope. Changed to 'data' which is the actual variable containing the parsed tool configuration. Co-Authored-By: Claude Opus 4.5 <[email protected]>
This commit is contained in:
@@ -1867,16 +1867,16 @@ def create_app() -> Flask:
|
|||||||
# Run AI secondary review if there are warnings
|
# Run AI secondary review if there are warnings
|
||||||
if scrutiny_report.get("decision") == "review":
|
if scrutiny_report.get("decision") == "review":
|
||||||
try:
|
try:
|
||||||
ai_review = run_ai_scrutiny_review(scrutiny_report, config, name, description)
|
ai_review = run_ai_scrutiny_review(scrutiny_report, data, name, description)
|
||||||
if ai_review:
|
if ai_review:
|
||||||
scrutiny_report["ai_review"] = ai_review
|
scrutiny_report["ai_review"] = ai_review
|
||||||
# Update decision based on AI review
|
# Update decision based on AI review
|
||||||
if ai_review.get("overall_verdict") == "APPROVE" and ai_review.get("confidence", 0) >= 0.8:
|
if ai_review.get("overall_verdict") == "APPROVE" and ai_review.get("confidence", 0) >= 0.8:
|
||||||
scrutiny_report["decision"] = "approve"
|
scrutiny_report["decision"] = "approve"
|
||||||
scrutiny_report["ai_approved"] = True
|
scrutiny_report["ai_approved"] = True
|
||||||
except Exception as e:
|
except Exception:
|
||||||
# Don't fail publish if AI review fails
|
# Don't fail publish if AI review fails
|
||||||
scrutiny_report["ai_review_error"] = str(e)
|
pass
|
||||||
|
|
||||||
if dry_run:
|
if dry_run:
|
||||||
return jsonify({
|
return jsonify({
|
||||||
|
|||||||
Reference in New Issue
Block a user