Repository navigation
fix(workflows): keep held sends the email queue delays past the hold - #128093
Conversation
A held send that claimed a frequency cap slot before its deadline could be dropped if the email queue delayed it past the deadline. The expired-hold check now skips email queue continuations, which already passed the cap. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Generated-By: PostHog Desktop Task-Id: 436ae568-8289-4257-b029-99ab5ab69aac
|
😎 Merged successfully - details. |
|
Risk: No findings This PR stops the workflows email pipeline from dropping a held marketing send when the email queue delays it past its frequency-cap hold deadline: the expired-hold check now ignores continuations (invocations with hogFunctionState), so the send re-runs the atomic, per-visit idempotent frequency-cap check instead of being skipped. I traced the check, the Redis Lua slot script, and the action-state lifecycle and found no cap bypass, double-claim, or stale-state path. Sentinel reviewed |
🤖 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. |
There was a problem hiding this comment.
Approved.
The messaging write-path change has owning-team and STRONG-familiarity authorship assurance, with a targeted regression test. No substantive review concerns or other refusal grounds are present.
- Author wrote 100% of the modified lines and has 5 merged PRs in these paths (familiarity STRONG).
Gate mechanics and policy version
| Gate | Result | |
|---|---|---|
| prerequisites | ✓ | all clear |
| deny-list | ✓ | no deny categories matched |
| size | ✓ | 9L, 1F substantive, 30L/2F incl. docs/generated/snapshots — within ceiling |
| tier | ✓ | T1-agent / T1b-small (30L, 2F, single-area, fix) |
| stamphog 2.7.0 | .stamphog/policy.yml @ 8539886 · reviewed head 8539886 |
|
/trunk merge |
Deploy status
This table shows the |
Problem
Changes
How did you test this code?
Test rationale: A new handler test runs a continuation with a past deadline. It fails if the check skips the send again.
Release status
Docs update
🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Agent: Claude Code, claude-opus-5-5
Skills:
/writing-tests,/writing-pr-descriptionsMore context for AI agents
frequencyCapHoldExpiredinhog_function.ts.Created with PostHog Desktop from a PostHog Desktop task
🤖 Generated with Claude Code