Across the sources, the central problem is that scheduled and CI-based notification checks often fail (or pass incorrectly) because the workflow lacks a single, shared identity for a given run. When multiple retries, workers, parallel jobs, or shared inboxes are involved, tests may only verify that “some email arrived,” or they may search by subject text without correlating to the specific execution. As a result, stale messages, duplicates, wrong-environment templates, or misrouted recipients can slip through while logs still look mostly normal.

The proposed fix is to treat email as part of a run’s contract, not a side effect. Each workflow generates a unique run ID at the start, uses it to derive a run-scoped inbox/alias, passes the run ID into the API payload or job metadata, and logs it everywhere relevant. Assertions then check for exactly one message (or an explicitly allowed count), validate recipient/alias and subject intent, and verify key links or tokens reflect the expected environment and workflow scenario. Evidence logged per run—such as message count, extracted link host, and provider message IDs when available—helps triage delivery vs. rendering vs. harness issues. The approach is implemented in CI (e.g., GitHub Actions) and suggested for cron/queue automation, often with short polling and timeouts.