fix(phase_e+f): mail-send unreachable + cookie_coherence im html_blocks
KRITISCH: Mein vorheriger B19-Edit hatte send_email() versehentlich
in den _build_cookie_csv_extra-Helper geschoben (NACH dem return {}).
Mail wurde nie versendet (email_status=skipped war Folge — state[
"email_result"] nie gesetzt).
Fix:
- send_email + state["email_result"]/site_name/domain/doc_count
zurück in run_phase_e (BMW4 hat 1520 findings produziert aber
keine Mail verschickt).
- _build_cookie_csv_extra ist jetzt eine echte Modul-Funktion
NACH run_phase_e.
Plus: phase_f_persist.response.html_blocks um "cookie_coherence"
ergänzt (B19-HTML-Block fehlte im API-Schema).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -83,6 +83,18 @@ def run_phase_e(state: dict) -> None:
|
||||
except Exception as e:
|
||||
logger.warning("audit-walk-zip build failed: %s", e)
|
||||
|
||||
email_result = send_email(
|
||||
recipient=req.recipient,
|
||||
subject=f"[COMPLIANCE-CHECK] {site_name} — {doc_count} Dokumente geprueft",
|
||||
body_html=full_html,
|
||||
attachments=evidence_attachments or None,
|
||||
)
|
||||
|
||||
state["email_result"] = email_result
|
||||
state["site_name"] = site_name
|
||||
state["domain"] = domain
|
||||
state["doc_count"] = doc_count
|
||||
|
||||
|
||||
def _build_cookie_csv_extra(state: dict, check_id: str) -> dict[str, bytes]:
|
||||
"""B19 Step 4: cookies-full.csv ins Walk-ZIP. Returns {filename: bytes}."""
|
||||
@@ -96,15 +108,3 @@ def _build_cookie_csv_extra(state: dict, check_id: str) -> dict[str, bytes]:
|
||||
except Exception as e:
|
||||
logger.warning("cookie-csv build failed: %s", e)
|
||||
return {}
|
||||
|
||||
email_result = send_email(
|
||||
recipient=req.recipient,
|
||||
subject=f"[COMPLIANCE-CHECK] {site_name} — {doc_count} Dokumente geprueft",
|
||||
body_html=full_html,
|
||||
attachments=evidence_attachments or None,
|
||||
)
|
||||
|
||||
state["email_result"] = email_result
|
||||
state["site_name"] = site_name
|
||||
state["domain"] = domain
|
||||
state["doc_count"] = doc_count
|
||||
|
||||
@@ -89,6 +89,7 @@ def run_phase_f(state: dict) -> None:
|
||||
"vendor_consistency": state.get("vendor_consistency_html", ""),
|
||||
"ai_act": state.get("ai_act_html", ""),
|
||||
"impressum_agent": state.get("impressum_agent_html", ""),
|
||||
"cookie_coherence": state.get("cookie_coherence_html", ""),
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user