""" Debug script — Day 4 Written as a real .py file specifically to avoid PowerShell's `-c` inline quoting hazards: a literal $ inside a double-quoted PowerShell string triggers variable interpolation and silently mangles the text (this is what happened to "$50" in an earlier -c command). Running from a file sidesteps the shell entirely. Prints the FULL returned dict (not just final_verdict) plus its type, with verbose=True so any suppressed retry/backoff messages become visible -- verbose was False in the run that returned None, which would have silently hidden a 503/429 retry cycle if one happened. """ import asyncio import json import sys from pathlib import Path sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) from dotenv import load_dotenv load_dotenv() from agents.orchestrator import run_pipeline SAMPLE = ( "URGENT: Your account will be suspended in 24 hours! Click " "http://secure-paypa1-verify.com/login now and verify your " "identity or send a $50 gift card to avoid suspension." ) async def main(): r = await run_pipeline(text=SAMPLE, verbose=True) print("\n=== raw return value ===") print(f"type(r) = {type(r)}") print(json.dumps(r, indent=2, default=str)) if __name__ == "__main__": asyncio.run(main())