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 <noreply@anthropic.com>
This commit is contained in:
parent
12ae870b3c
commit
9029286d4c
|
|
@ -1867,16 +1867,16 @@ def create_app() -> Flask:
|
|||
# Run AI secondary review if there are warnings
|
||||
if scrutiny_report.get("decision") == "review":
|
||||
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:
|
||||
scrutiny_report["ai_review"] = ai_review
|
||||
# Update decision based on AI review
|
||||
if ai_review.get("overall_verdict") == "APPROVE" and ai_review.get("confidence", 0) >= 0.8:
|
||||
scrutiny_report["decision"] = "approve"
|
||||
scrutiny_report["ai_approved"] = True
|
||||
except Exception as e:
|
||||
except Exception:
|
||||
# Don't fail publish if AI review fails
|
||||
scrutiny_report["ai_review_error"] = str(e)
|
||||
pass
|
||||
|
||||
if dry_run:
|
||||
return jsonify({
|
||||
|
|
|
|||
Loading…
Reference in New Issue