Repository navigation
feat(messaging): add scheduled_at to email_status_events - #129915
Conversation
A scheduled send records the time it is due, so the list of waiting sends can read it from ClickHouse instead of the job queue. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
😎 Merged successfully - details. |
🤖 CI report
|
Master took ClickHouse migrations 0369 to 0374, so the email_status_events scheduled_at migration moves to 0375 and max_migration.txt follows it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Risk: No findings The change since the last review is a merge of master: the email_status_events migration was renumbered 0376→0380 (byte-identical), max_migration.txt updated with no numbering collision (master owns 0375–0379), and the HCL layers/goldens/snapshots were regenerated. All PR-owned email_status_events scheduled_at definitions survived the regeneration consistently across every environment; the remaining hunks are master's own channel_type/metrics4/query-log changes passing through the merge. No security-relevant surface in the PR-authored delta. Sentinel reviewed |
Renumber the email status scheduled_at ClickHouse migration to 0376, after master's 0375_person_group_membership_activity.
Renumber the email_status_events scheduled_at migration to 0380. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
/trunk merge |
There was a problem hiding this comment.
Not approved yet — waiting on the conditions below.
Re-add the stamphog label to request another review once you have addressed this.
StampHog refused this pull request at two gates. The deny-list gate flagged it for matching migrations, because it adds posthog/clickhouse/migrations/0380_email_status_events_scheduled_at.py and bumps max_migration.txt. The tier gate classified it as T2-never (202 lines, 26 files, two areas, feat), so it can't be handled automatically however small the column change is.
The size and prerequisites gates passed, so size isn't the issue and splitting wouldn't clear the refusal. The author should ask a human reviewer, preferably someone familiar with ClickHouse migrations, to review it. The migration's statement order and the Kafka table recreation are what that reviewer should read most closely.
Gate mechanics and policy version
| Gate | Result | |
|---|---|---|
| prerequisites | ✓ | all clear |
| deny-list | ✗ | matches: migrations |
| size | ✓ | 184L, 24F substantive, 202L/26F incl. docs/generated/snapshots — within ceiling |
| tier | ✗ | classified as T2-never: T2-never (202L, 26F, two-areas, feat) |
| stamphog 2.8.0 | .stamphog/policy.yml @ unknown · reviewed head 0677612 |
Deploy status
This table shows the |
Note
Just needs a stamp. Adds a
scheduled_atcolumn toemail_status_eventsin ClickHouse. StampHog can't approve it: it's a ClickHouse migration.Problem
email_status_eventskeeps the recipient (feat(workflows): keep every transactional email status #127744, feat(workflows): record recipient, domain, opens and clicks per email #127745) but has no due time.Warning
Let this migration finish in US and EU before the stack that writes
scheduled_atmerges. An earlier row loses the time.Changes
email_status_eventsgets a nullablescheduled_at. Nothing writes or reads it yet.email_statusis untouched. The rest is regenerated HCL and snapshots.How did you test this code?
metrics4tables from the logs cluster.Scratch pipeline run
Rows 1 and 2 went in before the migration, 3 after the view was dropped, 4 after the Kafka table was dropped, and 5 and 6 after the migration.
scheduled_atsentscheduled_atstoredAll six offsets landed once. The storage table's columns end
sending_domain, scheduled_at, _timestamp, matching the golden.Test rationale: no new test;
test_schema.pysnapshots the column.Release status
Docs update
🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Agent: Claude Code, Claude Opus 5.5
Skills:
/clickhouse-migrations,/writing-pr-descriptions,/writing-tests,/writing-code-commentsMore context for AI agents
email_status_events, notemail_status, because that table already holds the recipient and its feed can change without pausing the status feed.0369_email_status_events_scheduled_at.py.🤖 Generated with Claude Code