Repository navigation
feat(cdp): drop the email attachments side table - #131643
Conversation
Nothing reads or writes cyclotron_email_attachments since the inline attachments path left Node. Email attachments move to object storage. Refs PostHog/michaelr-context#74 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🤖 CI report✅ Trunk lane — non-backend laneThis PR is assigned to the non-backend lane. It does not run backend Python tests and may merge in parallel with PRs in other lanes. |
|
Risk: No findings A single sqlx migration drops the now-unused Sentinel reviewed |
PR overviewNo security issues were found in this pull request. Reviews
|
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 can't approve this pull request automatically. The deny-list gate refused it because the added file rust/cyclotron-node-migrations/20261109000001_drop_email_attachments.sql is a database migration, and the tier gate also classified the change as T2-never, a category that always needs a human reviewer. The size gate passed, so the size isn't the issue.
Next, ask a human reviewer to look at it, ideally someone who owns the cyclotron database. The merge-gate conditions in the description (the dependent change deployed in both regions and zero rows confirmed) are worth restating in that request.
- posthog[bot] reviewed the current head.
Gate mechanics and policy version
| Gate | Result | |
|---|---|---|
| prerequisites | ✓ | all clear |
| deny-list | ✗ | matches: migrations |
| size | ✓ | 1L, 1F substantive — within ceiling |
| tier | ✗ | classified as T2-never: T2-never (1L, 1F, single-area, feat) |
| stamphog 2.7.0 | .stamphog/policy.yml @ unknown · reviewed head 19d4e1d |
|
/trunk merge |
|
😎 Merged successfully - details. |
|
/trunk merge |
Merge gate: merge only after #131567 is deployed in both regions, and
cyclotron_email_attachmentshas zero rows in both regions on the day it merges. The query is in the ticket's proof comment. The drop deletes data, so it can't be undone.Problem
The side table
cyclotron_email_attachmentsheld the file bytes of transactional email in the cyclotron job database.Email attachments are moving to object storage, and #131567 removed every reader and writer of the table.
The empty table stays in the shared queue database until something drops it.
Refs PostHog/michaelr-context#74
Caution
🔴 Merge risk: high · one-way door: the table and any rows in it are deleted
Rollout
sqlx-migratedeploy for cyclotron-node, and CDP janitor errors.Changes
cyclotron_email_attachments. Its primary key and two indexes go with it.master.How did you test this code?
All runs were on a dev stack at this PR's head. The evidence and the merge-day query are in the ticket's proof comment.
master's migrations leave the table and its three indexes in place. This head's migrations remove them. A second run is a no-op, andcyclotron_jobsis untouched.attachmentsis still refused withfield_not_accepted.masterand this head differ only by the table, its key and its indexes. Three send scenarios give the same results with the table present and with it dropped.Test rationale: none added. A test that asserts a table is gone guards nothing once the migration has run. The migration runner and the schema dumps above prove the drop.
Release status
Docs update
🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Agent: Claude Code, Claude Opus 5.5. Reviews: GPT-6.1 Sol.
Skills:
/writing-pr-descriptions,/writing-tests,/writing-code-commentsInvolvement: design pass, cross-model review, PostHog Review, qa-swarm; live proofs captured.
More context for AI agents
.down.sql: this folder has none, and the fix is forwardrust/cyclotron-node-migrations/20261109000001_drop_email_attachments.sql🤖 Generated with Claude Code