Skip to content

Don't mark emails as read on failure — retry instead (#579)#580

Merged
claude-ERA merged 1 commit intomainfrom
fix/no-mark-read-on-failure
Mar 1, 2026
Merged

Don't mark emails as read on failure — retry instead (#579)#580
claude-ERA merged 1 commit intomainfrom
fix/no-mark-read-on-failure

Conversation

@jonschull
Copy link
Owner

Summary

The map email cron marked emails as read even when processing failed. This destroyed the retry opportunity and made failures invisible — the exact silent failure pattern from today's Phase 5 incident.

Fix: Only mark as read on success or partial. Failed emails stay unread and get retried on the next cron run (every 5 min).

Test plan

  • Syntax check passes
  • Deploy, verify failed emails stay unread (testable by temporarily breaking something, or just by reading the code)

🤖 Generated with Claude Code

The map email cron was marking emails as read regardless of whether
processing succeeded or failed. This meant failures were silent —
the email disappeared from the unread queue and nobody knew.

Now only marks as read on success/partial. Failed emails stay unread
and get retried on the next cron run (every 5 min).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jonschull jonschull added the auto-merge Non-strategy change: auto-merge after review PASS label Mar 1, 2026
@claude-ERA claude-ERA merged commit 29d0ed3 into main Mar 1, 2026
1 check passed
@claude-ERA claude-ERA deleted the fix/no-mark-read-on-failure branch March 1, 2026 23:11
@claude-ERA
Copy link
Collaborator

Auto-merged

PR #580 merged and deployed.

Smoke test: WARNING — see output

Verify: https://era-website.onrender.com

Test output
Traceback (most recent call last):
  File "/Users/admin/era2c/era2/website/tests/smoke_test.py", line 12, in <module>
    from playwright.sync_api import sync_playwright
ModuleNotFoundError: No module named 'playwright'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-merge Non-strategy change: auto-merge after review PASS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants