Update app.py
Browse files
app.py
CHANGED
|
@@ -751,11 +751,15 @@ def transform_arf_output_for_ui(raw_result: dict, scenario_name: str) -> dict:
|
|
| 751 |
elif "similar_incidents" in recall_data:
|
| 752 |
similar_incidents = recall_data["similar_incidents"]
|
| 753 |
|
| 754 |
-
# DOCTRINALLY PURE: healing intent
|
| 755 |
healing_intent_created = False
|
| 756 |
if isinstance(decision_data, dict):
|
| 757 |
-
#
|
| 758 |
-
healing_intent_created = bool(
|
|
|
|
|
|
|
|
|
|
|
|
|
| 759 |
|
| 760 |
# Rule: recommended_action = pass through existing decision action text
|
| 761 |
recommended_action = "No actionable intelligence found" # VISIBLY CONSERVATIVE
|
|
@@ -832,7 +836,7 @@ def transform_arf_output_for_ui(raw_result: dict, scenario_name: str) -> dict:
|
|
| 832 |
result["_original_oss_analysis"] = raw_result.get("oss_analysis")
|
| 833 |
|
| 834 |
return result
|
| 835 |
-
|
| 836 |
# ===========================================
|
| 837 |
# UPDATED: run_true_arf_analysis() - DOCTRINALLY PURE
|
| 838 |
# ===========================================
|
|
|
|
| 751 |
elif "similar_incidents" in recall_data:
|
| 752 |
similar_incidents = recall_data["similar_incidents"]
|
| 753 |
|
| 754 |
+
# DOCTRINALLY PURE: healing intent exists when OSS provides action or explicit flag
|
| 755 |
healing_intent_created = False
|
| 756 |
if isinstance(decision_data, dict):
|
| 757 |
+
# Healing intent is created if OSS provides explicit flag OR action/recommended_action
|
| 758 |
+
healing_intent_created = bool(
|
| 759 |
+
decision_data.get("healing_intent_created", False)
|
| 760 |
+
or decision_data.get("action")
|
| 761 |
+
or decision_data.get("recommended_action")
|
| 762 |
+
)
|
| 763 |
|
| 764 |
# Rule: recommended_action = pass through existing decision action text
|
| 765 |
recommended_action = "No actionable intelligence found" # VISIBLY CONSERVATIVE
|
|
|
|
| 836 |
result["_original_oss_analysis"] = raw_result.get("oss_analysis")
|
| 837 |
|
| 838 |
return result
|
| 839 |
+
|
| 840 |
# ===========================================
|
| 841 |
# UPDATED: run_true_arf_analysis() - DOCTRINALLY PURE
|
| 842 |
# ===========================================
|