From 9029286d4c668559675a4a1a45ce05b8ea5b6f58 Mon Sep 17 00:00:00 2001 From: rob Date: Fri, 16 Jan 2026 17:00:50 -0400 Subject: [PATCH] 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 --- src/cmdforge/registry/app.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cmdforge/registry/app.py b/src/cmdforge/registry/app.py index ce07a4d..f17888f 100644 --- a/src/cmdforge/registry/app.py +++ b/src/cmdforge/registry/app.py @@ -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({