Skip to content

feat(messaging): send each email once per idempotency key on send/email - #557

Closed
Silthus wants to merge 8 commits into
feat/email-send-admission-checksfrom
feat/email-send-route-idempotency
Closed

Silthus wants to merge 8 commits into
feat/email-send-admission-checksfrom
feat/email-send-route-idempotency

Conversation

@Silthus

@Silthus Silthus commented Oct 23, 2026 •

Copy link
Copy Markdown
Owner

Moved here from #121867, closed on 2026-10-25 so this fork stack is the only copy. It opens upstream again after review.

Problem

  • A caller of POST /api/projects/@current/messaging/send/email/ cannot retry safely. The route reads no Idempotency-Key, so a retry after a timeout can send the email twice. Contract #120921 promises the key on both send routes.
  • Map: Silthus/posthog#461, slice 06 of strand Silthus/posthog#535.

Impact

Pays into Grow Workflows through billed workflows_emails actions per paying org (not measured yet as a monthly count). In scope: Messaging, email API sends. Expected move: small, up: a caller can retry a send without sending it twice, which the API needs to replace another email provider. Run cost: n/a, the key check already runs on the template route.

Merge Danger

Warning

🟡 Merge risk: medium · two-way door: no migration, and a revert stops the route from sending keys (merge-risk rubric)

  • The fingerprint and the moved active check change public retry semantics at a real-email boundary. A wrong fingerprint would replay a different send, or refuse a real retry with 422.
  • The workers now reload a saved workflow after commit, for every workflow. Before, a reload inside the transaction cached the old row, so a pause did not stop new sends until the cache refreshed.
  • What limits it: the flag gates the route, the tests change the recipient, the content, the route and the named sender, and the template route keeps the fingerprint it has today.

Changes

Kind Files Lines
Production 10 +128 −50
Tests 6 +134 −44
Generated types and snapshots 3 +12 −3
Total (this layer) 19 +274 −97

What a caller now sees

  • send/email/ reads the Idempotency-Key header, on both the template form and the rendered-content form.
  • A retry with the same key and the same request returns the first 202, with the same message_id and replayed: true. No second email goes out.
  • The same key with another request answers 422 idempotency_key_reused. Another request means another recipient, other data, other rendered content, sender, reply-to or capture choice, or the other send route.
  • The same key while the first request is still in progress answers 409 idempotency_key_in_flight.
  • A retry replays after its workflow was paused, and after the project's default sender changed when the caller named no sender. A workflow that isn't active answers 400 transactional_email_paused after the key lookup.
  • A deleted template, a local template whose content changed, or a project with no default sender still answers 404, 409 or 400 on a retry.

How it works

  • Django passes the key and route: "send_email" to cdp-api. The template route (messaging_templates/{id}/send/) sends no route.
  • cdp-api binds each key to transactionalSendFingerprint: the workflow, to, distinct_id and variables, plus the whole send and the route when either is present. A sender Django chose as the default (from.isDefault) is left out.
  • cdp-api checks that the workflow is active after the key lookup. Django checks only that it exists.
  • A workflow save publishes its reload to the workers after commit, as a delete already does. So a pause stops new sends once the reload arrives. A failed publish does not fail the committed save or skip the later after-commit steps.
  • A template-route send has neither, so it keeps the fingerprint it has on master. A retry across the deploy still matches the key it reserved.
  • The reserve, replay and release are the store master already has (scope transactional-email). Slice 05 of the map needs no PR of its own for that reason.

Mechanical: IDEMPOTENCY_KEY_PARAMETER moved to the shared module, so both routes document the header; the regenerated OpenAPI types and MCP tool schema.

How did you test this code?

Test rationale: each case below failed before its fix and passes after it.

Test seams:

  • cdp-api's send route with the queue faked: a key reused with another recipient, other code content, or on the other route answers 422 idempotency_key_reused and queues once.
  • Both Django send routes at the HTTP boundary, with cdp-api faked at its HTTP client: each way of naming the email (URL id, template.key, template.id, template_key) passes the key, reports a replay, and sends route only from send/email/.
  • The workflow model's save: a pause publishes no reload before commit.

Local gate at the stack top 987b927630e, which holds this head unchanged, all green: cdp-api serial 288, CDP jest 3690 (1 skipped), pytest 1764, MCP 5035, repo-wide mypy, nodejs tsc, and the rest of the gate. The pre-push preflight ran in strict mode with 0 failures.

Cross-version: owed, because the cdp-api request gains route and the key's fingerprint changes. Checked with this layer's base and head side by side, before the review fixes. The fixes did not touch the fingerprint, and the run did not repeat at this head:

Producer Consumer Result
New Django, route: "send_email" Old cdp-api Parses. The schema drops route, so the key is bound as on master. Until cdp-api deploys, a key reused on the other route replays instead of answering 422.
Old Django, no route New cdp-api Parses. A template-route fingerprint equals master's, so a key reserved before the deploy still matches. Old Django sends no key from send/email/.
New Django, from.isDefault Older cdp-api from this stack Parses. The schema drops isDefault, so the default sender stays in the fingerprint. An inactive workflow answers 503 instead of 400. Nothing is sent.
Django from this stack without isDefault New cdp-api Parses. The fingerprint keeps the sender, so a retry through new Django answers 422, not a replay. The flag stays off until both sides deploy, so no such key exists.
Cross-version run output
base cdp-api fingerprint, template route   760a7d467338675ced1b496a2d3757d2e4e8617c1f6e22211d02e259fe4aa307
HEAD cdp-api fingerprint, template route   760a7d467338675ced1b496a2d3757d2e4e8617c1f6e22211d02e259fe4aa307 EQUAL
HEAD cdp-api fingerprint, send/email route 2fd6a14aa7deb8f420f93296c4311f9a0f693f8934499c1d19df20bf4b5efb06 DIFFERENT
base cdp-api parses a HEAD Django payload with route: true | route kept: false
HEAD cdp-api parses a base Django payload without route: true

Live run at 987b927630e (Django, cdp-api and the email worker on a migrated clone of the local test database, delivering to maildev):

Case Request Answer
03 A code send with an Idempotency-Key, sent twice Both 202 with the same message_id; the second says replayed: true. Maildev held 1 email.
04 The same key with another cc 422 idempotency_key_reused, with docs_url. Still 1 email.

Gaps:

Release status

  • This change is behind a feature flag and is not available to users

Docs update

None. The transactional email API docs page is written after the stack lands.

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

Agent: Claude Code, Claude Opus 5.5 (claude-opus-5-5)

Question Answer Who Where
Which code does a reused key answer? idempotency_key_reused, the name master already answers, over the contract's earlier invalid_idempotent_request 👤 Human pending approval
Does the idempotent enqueue need its own PR? No: master's cdp-api already reserves, replays and releases through the shared store 🤖 Agent pending approval
Is the route part of the fingerprint? Yes, so a key reused on the other route answers 422 🤖 Agent pending approval
Does a template-route key keep its fingerprint? Yes, over adding the new parts everywhere, so a retry across the deploy matches 🤖 Agent pending approval
Which retries replay after something changed? A paused workflow and a changed default sender; a deleted or changed template still refuses ("Fix common cases") 👤 Human pending approval

Open: should a reused key with a changed template.hash replay or answer 422? It replays today, because the fingerprint does not include the template version. Neither answer sends twice (➡️ keep the replay, and say in the Idempotency-Key help that the key binds the recipient, data and send choices, not the template version).

Open: the rollout decision on #121272: keep the deploy order plus the flag, or give code sends their own cdp-api path (➡️ the current plan is the deploy order plus the flag).

Review (GPT-6.1 Sol, round 1 over the whole stack, then a final read of the fixes):

Finding Response
Replay depends on template, workflow and sender checks that can change Fixed in part, as Michael chose: a paused workflow and a changed default sender replay. Tests: replay after a pause, a changed default sender replays, a changed named sender answers 422.
Final read: a default-sender key fingerprints differently across a mixed deploy Rejected, recorded as a rollout precondition. Only pods from this stack can mix, and the flag stays off until this layer has deployed on both sides. The worst case is a refused retry, never a second send.

The stack's QA swarm then reviewed this layer. Round 1 moved the workflow reload after commit and raised this grade to medium. Round 2 made that reload robust to a failed publish and fixed two comments. Final read 1 and the rebase check in final read 3 found nothing. Follow-up: the MCP tool workflows-send-email cannot send an Idempotency-Key yet.

  • Rollout precondition: the workflows-transactional-email-api flag stays off until tracking code v3 minting is on and every stack PR, this one included, has deployed on Django, cdp-api, the hogflow worker and the email worker.

Involvement: strand conductor relays answered, one choice from Michael on replay scope, no grilling rounds. Reviews: GPT-6.1 Sol round 1 over the whole stack and a final read of the fixes. Stack QA swarm: design pass (GPT-6.1 Sol high); round 1 (review and team lanes GPT-6.1 Sol high, fresh eyes Claude Opus 5.5 high); round 2 on the fixes (review lane GPT-6.1 Sol high, fresh eyes Claude Opus 5.5 high); final read 1 and final read 3 over the rebase (GPT-6.1 Sol high, clean); fixers Claude Opus 5.5 high; live run at the stack top.

  • Skills invoked: /tdd, /improving-drf-endpoints, /writing-tests, /writing-code-comments, /writing-pr-descriptions.
  • No duplicate: no open PR adds the idempotency key to send/email/.
  • Public artifact: all fixtures are invented and use example.com domains.

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

🤖 CI report

✅ Complexity (TypeScript) — clean

Cyclomatic complexity above the limit in changed typescript files (10 for production files, 15 for test files). Warn only: worth simplifying when you next touch these functions.

🚨 Comment density — 9% of added code lines are comments (21 of 247)

This section warns when comments are more than 3% of the code lines a PR adds, and alerts above 6%. Before agent-assisted PRs, the typical share was about 2%. Only full-line comments count. Docstrings, generated files, snapshots, migrations, and workflow files are left out.

Comments that restate the code, record how the change came about, or narrate the next line add noise for the next reader. Keep the comments that explain a reason the code cannot show, and remove the rest. See .agents/skills/writing-code-comments/SKILL.md for the house rules.

Files with the most added comment lines:

File Comment lines Added lines
nodejs/src/cdp/services/hogflows/transactional-email.ts 8 25
products/workflows/backend/models/hog_flow/hog_flow.py 4 8
products/messaging/backend/services/transactional_email.py 3 26
products/messaging/backend/tests/api/test_transactional_email.py 2 29
products/workflows/backend/services/workflow_email_health.py 2 2
nodejs/src/cdp/cdp-api.ts 1 10
products/workflows/backend/test/test_hog_flow.py 1 33

This check does not block merging. It updates on every push and clears when the share drops.

✅ Bundle size — no change

Uncompressed size of every built .js bundle, compared against the base branch.

Total: 76.03 MiB · no change

No file changed by more than 1000 B.

Posted automatically by build-bundle-size-report · uncompressed bytes from dist-report

⚠️ Eager graph — 2 over budget

How much code each root ships on the eager path — downloaded and parsed before the surface is interactive. Measured from the esbuild output chunks (post-tree-shake, static imports only); lazy import() / React.lazy chunks are not counted.

Root Eager (shipped) Δ vs base Budget
entry (logged-out pages, app bootstrap)
src/index.tsx
1.01 MiB · 24 files no change █████████░ 88.6% of 1.14 MiB
logged-out boot: index + App + bootApp (preloaded by every page, including /login)
src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
2.94 MiB · 620 files no change ██████████ 96.9% of 3.03 MiB
🟡 authenticated shell (every logged-in page)
src/scenes/AuthenticatedShell.tsx
7.65 MiB · 2,633 files no change ██████████ 102.1% of 7.50 MiB
dashboard scene
src/scenes/dashboard/Dashboard.tsx
9.68 MiB · 3,703 files no change ██████████ 96.7% of 10.01 MiB
🟡 today home path
src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/today/TodayHome.tsx
8.06 MiB · 2,977 files no change ██████████ 104.1% of 7.74 MiB
AI-first home path
src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/ai-first/AiFirstHomepage.tsx
7.90 MiB · 2,706 files no change █████████░ 88.1% of 8.96 MiB
events scene
src/scenes/activity/explore/EventsScene.tsx
9.15 MiB · 3,495 files no change ██████████ 95.4% of 9.59 MiB
web analytics scene
src/scenes/web-analytics/WebAnalyticsScene.tsx
10.01 MiB · 3,713 files no change █████████░ 92.4% of 10.83 MiB
replay detail scene
src/scenes/session-recordings/detail/SessionRecordingDetail.tsx
8.22 MiB · 3,075 files no change █████████░ 86.8% of 9.47 MiB

🟢 node_modules/monaco-editor/ stays out of src/index.tsx
🟢 src/lib/components/ActivityLog/describers stays out of src/index.tsx
🟢 node_modules/@posthog/brand/dist/generated/hoggies/svg/ stays out of src/index.tsx
🟢 node_modules/@posthog/brand/dist/generated/hoggies/components/ stays out of src/index.tsx
🟢 node_modules/monaco-editor/ stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 src/layout/navigation-3000/navigationLogic.tsx stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 src/scenes/dashboard/dashboardLogic.tsx stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 src/lib/lemon-ui/LemonMarkdown/ stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 src/lib/components/RichContentEditor/ stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 src/lib/components/CodeSnippet/ stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 src/taxonomy/core-filter-definitions-by-group.json stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 node_modules/zod/ stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 src/scenes/billing/billingLogic.tsx stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 src/lib/components/ProductEmptyState/productSetupPreloadLogic.ts stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 node_modules/monaco-editor/ stays out of src/scenes/AuthenticatedShell.tsx
🟢 src/lib/components/ActivityLog/describers stays out of src/scenes/AuthenticatedShell.tsx
🟢 products/dashboards/frontend/widgets/previews/ stays out of src/scenes/AuthenticatedShell.tsx
🟢 src/scenes/session-recordings/player/sessionRecordingPlayerLogic.ts stays out of src/scenes/AuthenticatedShell.tsx
🟢 products/wizard/frontend/runs/WizardRunDetailsDrawer.tsx stays out of src/scenes/AuthenticatedShell.tsx
🟢 zod/v4/locales/de.js stays out of src/scenes/AuthenticatedShell.tsx
🟢 node_modules/@posthog/brand/dist/generated/hoggies/svg/ stays out of src/scenes/AuthenticatedShell.tsx
🟢 node_modules/@posthog/brand/dist/generated/hoggies/components/ stays out of src/scenes/AuthenticatedShell.tsx
🟢 src/scenes/session-recordings/playlist/SessionRecordingsPlaylist.tsx stays out of src/scenes/dashboard/Dashboard.tsx
🟢 src/scenes/web-analytics/tiles/WebAnalyticsTile.tsx stays out of src/scenes/dashboard/Dashboard.tsx
🟢 src/queries/validators.js stays out of src/scenes/dashboard/Dashboard.tsx
🟢 src/scenes/project-homepage/ai-first/AiFirstHomepage.tsx stays out of src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/today/TodayHome.tsx
🟢 src/scenes/project-homepage/today/TodayReportPage.tsx stays out of src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/today/TodayHome.tsx
🟢 src/queries/Query/Query.tsx stays out of src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/today/TodayHome.tsx
🟢 products/posthog_ai/frontend/components/tool/widgets/VisualizationWidget.tsx stays out of src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/ai-first/AiFirstHomepage.tsx
🟢 products/posthog_ai/frontend/components/tool/widgets/RecordingsWidget.tsx stays out of src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/ai-first/AiFirstHomepage.tsx
🟢 src/queries/Query/Query.tsx stays out of src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/ai-first/AiFirstHomepage.tsx
🟢 products/posthog_ai/frontend/api/primitives.ts stays out of src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/ai-first/AiFirstHomepage.tsx
🟢 src/scenes/notebooks/Notebook/notebookLogic.ts stays out of src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/ai-first/AiFirstHomepage.tsx
🟢 src/scenes/session-recordings/playlist/SessionRecordingsPlaylist.tsx stays out of src/scenes/activity/explore/EventsScene.tsx
🟢 src/scenes/web-analytics/tiles/WebAnalyticsTile.tsx stays out of src/scenes/activity/explore/EventsScene.tsx
🟢 src/queries/validators.js stays out of src/scenes/activity/explore/EventsScene.tsx
🟢 src/scenes/web-analytics/LiveMetricsDashboard/LiveWebAnalyticsMetrics.tsx stays out of src/scenes/web-analytics/WebAnalyticsScene.tsx
🟢 products/product_analytics/frontend/insights/trends/WorldMap/countryVectors.tsx stays out of src/scenes/web-analytics/WebAnalyticsScene.tsx
🟢 src/scenes/settings/SettingsMap.tsx stays out of src/scenes/session-recordings/detail/SessionRecordingDetail.tsx
🟢 @jspm/core/nodelibs/browser/fs stays out of src/scenes/session-recordings/detail/SessionRecordingDetail.tsx

Largest files eagerly shipped from src/index.tsx
Size File
126.8 KiB ../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js
24.6 KiB ../node_modules/.pnpm/buffer@6.0.3/node_modules/buffer/index.js
6.3 KiB ../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react.production.min.js
4.5 KiB ../node_modules/.pnpm/@jspm+core@2.1.0/node_modules/@jspm/core/nodelibs/browser/process.js
3.9 KiB ../node_modules/.pnpm/scheduler@0.23.2/node_modules/scheduler/cjs/scheduler.production.min.js
1.4 KiB ../node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/index.js
1.4 KiB src/index.tsx
1.3 KiB src/RootErrorBoundary.tsx
1.3 KiB src/lib/utils/bootTiming.ts
912 B ../node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/index.js
Largest files eagerly shipped from src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
Size File
321.9 KiB ../node_modules/.pnpm/posthog-js@1.438.18_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/module.mjs
220.9 KiB ../node_modules/.pnpm/@posthog+icons@0.38.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js
126.8 KiB ../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js
106.3 KiB src/products.tsx
98.9 KiB src/lib/api.ts
69.4 KiB src/lib/lemon-ui/icons/icons.tsx
38.7 KiB ../node_modules/.pnpm/@dnd-kit+core@6.0.8_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@dnd-kit/core/dist/core.esm.js
33.9 KiB ../node_modules/.pnpm/kea@4.0.0-pre.6_patch_hash=139b8d1f1304f9d9da452a9a1244c94ea679dbcb85687d8999563146879fb6f5_react@18.3.1/node_modules/kea/lib/index.cjs.js
29.4 KiB src/scenes/scenes.ts
26.9 KiB src/lib/constants.tsx
Largest files eagerly shipped from src/scenes/AuthenticatedShell.tsx
Size File
321.9 KiB ../node_modules/.pnpm/posthog-js@1.438.18_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/module.mjs
286.8 KiB src/taxonomy/core-filter-definitions-by-group.json
238.5 KiB ../packages/quill/packages/quill/dist/index.js
220.9 KiB ../node_modules/.pnpm/@posthog+icons@0.38.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js
153.7 KiB ../node_modules/.pnpm/re2js@0.4.1/node_modules/re2js/build/index.esm.js
143.2 KiB ../packages/quill/packages/primitives/dist/index.js
126.8 KiB ../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js
106.3 KiB src/products.tsx
98.9 KiB src/lib/api.ts
93.3 KiB ../node_modules/.pnpm/prosemirror-view@1.40.1/node_modules/prosemirror-view/dist/index.js
Largest files eagerly shipped from src/scenes/dashboard/Dashboard.tsx
Size File
321.9 KiB ../node_modules/.pnpm/posthog-js@1.438.18_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/module.mjs
286.8 KiB src/taxonomy/core-filter-definitions-by-group.json
238.5 KiB ../packages/quill/packages/quill/dist/index.js
220.9 KiB ../node_modules/.pnpm/@posthog+icons@0.38.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js
153.7 KiB ../node_modules/.pnpm/re2js@0.4.1/node_modules/re2js/build/index.esm.js
143.2 KiB ../packages/quill/packages/primitives/dist/index.js
126.8 KiB ../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js
106.3 KiB src/products.tsx
98.9 KiB src/lib/api.ts
93.3 KiB ../node_modules/.pnpm/prosemirror-view@1.40.1/node_modules/prosemirror-view/dist/index.js
Largest files eagerly shipped from src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/today/TodayHome.tsx
Size File
321.9 KiB ../node_modules/.pnpm/posthog-js@1.438.18_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/module.mjs
286.8 KiB src/taxonomy/core-filter-definitions-by-group.json
238.5 KiB ../packages/quill/packages/quill/dist/index.js
220.9 KiB ../node_modules/.pnpm/@posthog+icons@0.38.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js
153.7 KiB ../node_modules/.pnpm/re2js@0.4.1/node_modules/re2js/build/index.esm.js
143.2 KiB ../packages/quill/packages/primitives/dist/index.js
126.8 KiB ../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js
106.3 KiB src/products.tsx
98.9 KiB src/lib/api.ts
93.3 KiB ../node_modules/.pnpm/prosemirror-view@1.40.1/node_modules/prosemirror-view/dist/index.js
Largest files eagerly shipped from src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/ai-first/AiFirstHomepage.tsx
Size File
321.9 KiB ../node_modules/.pnpm/posthog-js@1.438.18_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/module.mjs
286.8 KiB src/taxonomy/core-filter-definitions-by-group.json
238.5 KiB ../packages/quill/packages/quill/dist/index.js
220.9 KiB ../node_modules/.pnpm/@posthog+icons@0.38.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js
153.7 KiB ../node_modules/.pnpm/re2js@0.4.1/node_modules/re2js/build/index.esm.js
143.2 KiB ../packages/quill/packages/primitives/dist/index.js
126.8 KiB ../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js
106.3 KiB src/products.tsx
98.9 KiB src/lib/api.ts
93.3 KiB ../node_modules/.pnpm/prosemirror-view@1.40.1/node_modules/prosemirror-view/dist/index.js
Largest files eagerly shipped from src/scenes/activity/explore/EventsScene.tsx
Size File
321.9 KiB ../node_modules/.pnpm/posthog-js@1.438.18_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/module.mjs
286.8 KiB src/taxonomy/core-filter-definitions-by-group.json
238.5 KiB ../packages/quill/packages/quill/dist/index.js
220.9 KiB ../node_modules/.pnpm/@posthog+icons@0.38.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js
153.7 KiB ../node_modules/.pnpm/re2js@0.4.1/node_modules/re2js/build/index.esm.js
143.2 KiB ../packages/quill/packages/primitives/dist/index.js
126.8 KiB ../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js
106.3 KiB src/products.tsx
98.9 KiB src/lib/api.ts
93.3 KiB ../node_modules/.pnpm/prosemirror-view@1.40.1/node_modules/prosemirror-view/dist/index.js
Largest files eagerly shipped from src/scenes/web-analytics/WebAnalyticsScene.tsx
Size File
321.9 KiB ../node_modules/.pnpm/posthog-js@1.438.18_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/module.mjs
286.8 KiB src/taxonomy/core-filter-definitions-by-group.json
238.5 KiB ../packages/quill/packages/quill/dist/index.js
220.9 KiB ../node_modules/.pnpm/@posthog+icons@0.38.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js
183.2 KiB src/queries/validators.js
153.7 KiB ../node_modules/.pnpm/re2js@0.4.1/node_modules/re2js/build/index.esm.js
143.2 KiB ../packages/quill/packages/primitives/dist/index.js
126.8 KiB ../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js
106.3 KiB src/products.tsx
98.9 KiB src/lib/api.ts
Largest files eagerly shipped from src/scenes/session-recordings/detail/SessionRecordingDetail.tsx
Size File
321.9 KiB ../node_modules/.pnpm/posthog-js@1.438.18_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/module.mjs
316.1 KiB ../node_modules/.pnpm/posthog-js@1.438.18_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/rrweb.js
286.8 KiB src/taxonomy/core-filter-definitions-by-group.json
238.5 KiB ../packages/quill/packages/quill/dist/index.js
220.9 KiB ../node_modules/.pnpm/@posthog+icons@0.38.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js
153.7 KiB ../node_modules/.pnpm/re2js@0.4.1/node_modules/re2js/build/index.esm.js
126.8 KiB ../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js
106.3 KiB src/products.tsx
98.9 KiB src/lib/api.ts
93.3 KiB ../node_modules/.pnpm/prosemirror-view@1.40.1/node_modules/prosemirror-view/dist/index.js

Posted automatically by check-eager-graph · sizes are eager output bytes (shipped, post-tree-shake) from the esbuild metafile · part of PostHog#32479

✅ Toolbar bundle — eager 2.29 MiB within budget

What the toolbar ships to customer pages, measured from the esbuild output (minified, post-tree-shake). The eager set is the entry plus everything statically imported from it — fetched before any feature runs; deferred chunks load lazily. The eager guardrail is 5.72 MiB. Each output file must also stay below 10 MB, where CloudFront stops compressing it. The module boundary is enforced separately by check-toolbar-graph.

Metric Size Δ vs base Budget
Eager (shipped)
entry + static imports
2.29 MiB · 18 files no change ████░░░░░░ 39.9% of 5.72 MiB
Deferred (lazy) 2.11 MiB · 40 files no change n/a — loads on demand
Loader dist/toolbar.js 1.2 KiB no change █░░░░░░░░░ 6.0% of 19.5 KiB
Largest eagerly-shipped chunks
Size File
899.4 KiB dist/toolbar/toolbar-app-REMKF2SV.css
691.4 KiB dist/toolbar/chunk-chunk-DDSP4M6B.js
260.7 KiB dist/toolbar/chunk-chunk-HRRIOF34.js
131.8 KiB dist/toolbar/chunk-chunk-FDH2IBXT.js
130.4 KiB dist/toolbar/chunk-chunk-IT6XUU73.js
74.8 KiB dist/toolbar/toolbar-app-YPZZ2PIS.js
69.0 KiB dist/toolbar/chunk-chunk-TSAL54PB.js
35.6 KiB dist/toolbar/chunk-chunk-CGDYYVIR.js
21.7 KiB dist/toolbar/chunk-chunk-PM4VBMO5.js
6.8 KiB dist/toolbar/chunk-chunk-DV7IWQNF.js

Posted automatically by check-toolbar-size · sizes are toolbar output bytes (shipped, post-tree-shake) from the esbuild metafile

✅ Dist folder size — 🔺 +246 B (+0.0%)

Total size of the built frontend/dist folder (all assets), compared against the base branch.

Total: 1020.76 MiB · 🔺 +246 B (+0.0%)

ℹ️ MCP UI apps size — 34 app(s), 27964.5 KB JS

Built size of each MCP UI app (main.js + styles.css).

App JS CSS
debug 844.2 KB 209.0 KB
action 767.6 KB 209.0 KB
action-list 835.3 KB 209.0 KB
cohort 766.6 KB 209.0 KB
cohort-list 834.2 KB 209.0 KB
email-template 766.5 KB 209.0 KB
error-details 771.5 KB 209.0 KB
error-issue 768.0 KB 209.0 KB
error-issue-list 835.8 KB 209.0 KB
experiment 832.4 KB 209.0 KB
experiment-list 836.0 KB 209.0 KB
experiment-results 834.9 KB 209.0 KB
feature-flag 834.6 KB 209.0 KB
feature-flag-list 838.4 KB 209.0 KB
feature-flag-testing 769.9 KB 209.0 KB
inline-scan 767.1 KB 209.0 KB
insight-actors 833.7 KB 209.0 KB
llm-costs 831.0 KB 209.0 KB
session-recording 768.9 KB 209.0 KB
survey 768.2 KB 209.0 KB
survey-global-stats 831.1 KB 209.0 KB
survey-list 835.9 KB 209.0 KB
survey-stats 831.0 KB 209.0 KB
trace-span 767.0 KB 209.0 KB
trace-span-list 835.1 KB 209.0 KB
vision-observation-list 834.3 KB 209.0 KB
workflow 767.0 KB 209.0 KB
workflow-list 834.6 KB 209.0 KB
workflow-setup-status 766.7 KB 209.0 KB
query-results 1086.5 KB 209.0 KB
render-ui 1161.5 KB 209.0 KB
visual-review-snapshots 771.5 KB 209.0 KB
workflow-data-suggestions 769.3 KB 209.0 KB
workflow-sending-rules 768.0 KB 209.0 KB

@Silthus
Silthus force-pushed the feat/email-send-admission-checks branch from 1af2c08 to 5cec76f Compare October 23, 2026 21:24
@Silthus
Silthus force-pushed the feat/email-send-route-idempotency branch from 9a2b0e1 to 0398172 Compare October 23, 2026 21:24
Silthus and others added 8 commits October 23, 2026 23:02
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…der changes

cdp-api checks that the workflow is active after it looks up the idempotency key, and answers
transactional_email_paused with why and fix. Django keeps only the check that the workflow exists.
The fingerprint leaves out the project's default sender, which the caller didn't name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A worker that reloads inside the save's transaction caches the old row,
so a pause did not stop new transactional sends until the cache aged out.
The post_save publish now waits for commit, as the delete publish does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…h fails

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant