Skip to content

SPIKE: automated email analytics incremental#29080

Draft
cmraible wants to merge 44 commits into
mainfrom
spike-automated-email-analytics-incremental
Draft

SPIKE: automated email analytics incremental#29080
cmraible wants to merge 44 commits into
mainfrom
spike-automated-email-analytics-incremental

Conversation

@cmraible

@cmraible cmraible commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

This is a spike; PR created to review and discuss the changes more easily, but we'll be breaking this down into a number of smaller PRs before merging.

cmraible added 30 commits July 2, 2026 14:17
Documented the proposed separate automation analytics pipeline so the architecture can be reviewed before implementation.
no ref

Captured the resolved architecture decisions for the automation analytics spike, including the separate pipeline, incremental aggregation model, and shared terminology before implementation starts.
no ref

Prepared a concrete red/green implementation plan and spike notes template so the build can proceed in small, reviewable commits.
no ref

Documented the lead-agent workflow for running the implementation spike with sequential implementation and validation subagents.
no ref

Extracted shared fetch orchestration so newsletter behavior stays intact while automation can add an independent pipeline later.
no ref

This prepares automated email analytics to resolve Mailgun delivered and opened events against automated email recipient rows.
no ref

Validated that the welcome email automation poll persists Mailgun message ids on tracked recipient rows.
no ref

Track automation sends only after a Mailgun message id has been recorded so sent counts remain traceable during the analytics spike.
no ref

Covered the automation action revision sent count write in the repository test fixture.
cmraible added 14 commits July 3, 2026 12:58
no ref

This proves the DB-backed automation processor updates recipient state and automation aggregates without touching newsletter member counters.
no ref

Rerunning the same provider batch proves automation analytics counters are guarded by recipient state transitions.
no ref

The automation analytics adapter now proves cursor reads and writes stay on automation job rows instead of newsletter job rows.
no ref

Automation completion logs now include no-op counts when pipeline results expose them.
no ref

Keep the final spike cleanup focused on removing unused runner adapter API and recording the aggregate flush production follow-up.
@github-actions github-actions Bot added the migration [pull request] Includes migration for review label Jul 3, 2026
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

It looks like this PR contains a migration 👀
Here's the checklist for reviewing migrations:

General requirements

  • ⚠️ Tested performance on staging database servers, as performance on local machines is not comparable to a production environment
  • Satisfies idempotency requirement (both up() and down())
  • Does not reference models
  • Filename is in the correct format (and correctly ordered)
  • Targets the next minor version
  • All code paths have appropriate log messages
  • Uses the correct utils
  • Contains a minimal changeset
  • Does not mix DDL/DML operations
  • Tested in MySQL and SQLite

Schema changes

  • Both schema change and related migration have been implemented
  • For index changes: has been performance tested for large tables
  • For new tables/columns: fields use the appropriate predefined field lengths
  • For new tables/columns: field names follow the appropriate conventions
  • Does not drop a non-alpha table outside of a major version

Data changes

  • Mass updates/inserts are batched appropriately
  • Does not loop over large tables/datasets
  • Defends against missing or invalid data
  • For settings updates: follows the appropriate guidelines

@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: b2aa03ec-b809-4b25-99ae-609d93ab8536

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch spike-automated-email-analytics-incremental

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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

Labels

migration [pull request] Includes migration for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant