""" One-off: send a correction/retraction note for the 18 June LGR report. Internal only. Recipients passed as "Name:email" args. """ from __future__ import annotations import sys from pathlib import Path REPO_ROOT = Path(__file__).resolve().parent.parent sys.path.insert(0, str(REPO_ROOT)) try: from dotenv import load_dotenv load_dotenv(REPO_ROOT / ".env", override=False) except ImportError: pass import mailer import weekly_digest DRY_RUN = "--dry-run" in sys.argv SUBJECT = "Correction — LGR report (18 June): decision dates were wrong" def _html(name: str) -> str: try: fb = weekly_digest._feedback_prompt_html(recipient_name=name) except Exception: fb = "" return f"""

⚠️ Correction — LGR report (18 June)

Hi {name},

Please disregard the decision-timing claims in the LGR landscape report I sent earlier today. It stated that several counties — including Oxfordshire — had ministerial decisions in March 2026. That is incorrect. No LGR decisions have been made yet.

The verified position (Oxfordshire County Council / GOV.UK):

More broadly: please treat the specific named contacts, notice numbers and unitary counts in that report as unverified until checked against source. The warm-route mapping (Sandy Walkington, Peter Shakespear) and the overall opportunity framing stand; the dated specifics do not.

We're reworking the report generator so every claim is tied to a citable source before it goes out. Apologies for the error.

Best,
Curium Lead Intelligence

{fb}
""" def main() -> int: recipients = [] for arg in sys.argv[1:]: if arg.startswith("--") or ":" not in arg: continue name, email = arg.split(":", 1) recipients.append((name.strip(), email.strip())) if not recipients: print("No recipients. Pass 'Name:email' args.") return 1 sent = [] for name, email in recipients: if DRY_RUN: print(f" [dry-run] correction → {name} <{email}>") sent.append(name) continue r = mailer.send(to_email=email, subject=SUBJECT, html=_html(name)) if r.get("success"): print(f" ✓ {name} → {email}") sent.append(name) else: print(f" ✗ {name} → {r.get('message')}") print(f"\nSent to: {sent}") return 0 if __name__ == "__main__": raise SystemExit(main())