Repository navigation
feat(cdp): label email queue waits that the team sending cap delayed - #126304
Conversation
A send that the team sending cap reschedules now carries `teamCapped` in its queue metadata. The email queue persists that metadata across the reschedule, and `cdp_email_queue_to_send_ms` reports it as the `team_capped` label. The transactional email slow alert in PostHog/charts can then leave out a wait that the cap causes on purpose. Generated-By: PostHog Desktop Task-Id: eaee842b-1d54-46ae-8701-cd396156b16c
|
😎 Merged successfully - details. |
🤖 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. ✅ Duplication (Python) — cleanNew Python code duplication introduced by this branch. Fails at 70+ tokens in app code, or 150+ tokens when both copies live in test files. Advisory while the gate proves itself: extract a shared helper instead of copying. ✅ Duplication (TypeScript) — cleanNew TypeScript code duplication introduced by this branch. Fails at 70+ tokens in app code, or 150+ tokens when both copies live in test files. Advisory while the gate proves itself: extract a shared helper instead of copying. |
HostHog preview —
|
|
Risk: No findings This change adds a Sentinel reviewed |
There was a problem hiding this comment.
Approved.
The queue-metadata change has owning-team and STRONG-familiarity assurance, with targeted tests added. No unresolved substantive review concerns or other refusal grounds were found.
- Author wrote 100% of the modified lines and has 7 merged PRs in these paths (familiarity STRONG).
Gate mechanics and policy version
| Gate | Result | |
|---|---|---|
| prerequisites | ✓ | all clear |
| deny-list | ✓ | no deny categories matched |
| size | ✓ | 10L, 1F substantive, 34L/2F incl. docs/generated/snapshots — within ceiling |
| tier | ✓ | T1-agent / T1b-small (34L, 2F, single-area, feat) |
| stamphog 2.6.1 | .stamphog/policy.yml @ 849cb20 · reviewed head 849cb20 |
Problem
Changes
cdp_email_queue_to_send_msgets ateam_cappedlabel,truewhen the team sending cap delayed the send.teamCappedin the job's queue metadata, which survives the reschedule.team_capped!="true", so deploy order does not matter.How did you test this code?
Test rationale: One capped row in the queue-to-send
test.each, and one assertion in the cap reschedule test. They fail if the flag stops reaching the label.Release status
Docs update
🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Agent: Claude Code, Claude Opus 5.5
Skills:
/writing-tests,/writing-code-comments,/writing-pr-descriptionsMore context for AI agents
queueMetadatawrite in the cap branch ofemail.service.ts.Created with PostHog Desktop from a PostHog Desktop task
🤖 Generated with Claude Code