Repository navigation
fix(emails): keep Category obsolete and refuse it before any request - #416
Conversation
This reverts commit b083162 (#378). Code-sent emails are staying strictly transactional, so message category support on code sends is being reverted. The recent release shipped shortly before this decision while the server feature flag was disabled. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
posthog-dotnet Compliance ReportDate: 2026-12-02T13:29:09.071031+00:00 ✅ All Tests Passed!47/47 tests passed Capture Tests✅ 30/30 tests passed View Details
Feature_Flags Tests✅ 17/17 tests passed View Details
|
SDK performance: posthog-dotnetBenchmarks completed. No changes flagged for review. Flags require at least a 5% change in the median and all six pairs agreeing on direction. This is a noise filter, not proof of a performance change or a CI gate. View all results
Values are medians of paired measurements. Not flagged does not mean unchanged. Unavailable means a measurement could not be provided, not zero. Estimated allocation measurements retain their instrumentation uncertainty. RSS measures the whole process, not just SDK allocations; observed peaks are sampled checkpoints. Paired ranges in the diagnostics describe variability, not confidence intervals. Compared 108 metric rows; 108 rows shown in all results. Omitted or shortened data remain in |
Code-sent emails are transactional only. Keep SendCodeEmailOptions.Category in the public API, marked [Obsolete], so code built against 2.31 still compiles and loads. A send that sets it throws an EmailException with the code invalid_form and the field category before any request, pointing marketing email to a PostHog workflow. The SDK never sends a category, and a null Category sends exactly as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A categorized send with another invalid option now still gets the invalid_form refusal with workflow advice, and no file is uploaded. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PR overviewNo security issues were found in this pull request. Reviews
|
There was a problem hiding this comment.
Approved.
The public-contract and write-path changes have independent assurance through the author's trusted STRONG familiarity, with focused regression tests. No unresolved substantive concerns or other refusal grounds are present.
- Author wrote 100% of the modified lines and has 4 merged PRs in these paths (familiarity STRONG).
Gate mechanics and policy version
| Gate | Result | |
|---|---|---|
| prerequisites | ✓ | all clear |
| deny-list | ✓ | no deny categories matched |
| every_file_attested | ✓ | not a bot PR |
| size | ✓ | 54L, 3F substantive, 111L/5F incl. size-exempt files — within ceiling |
| tier | ✓ | T1-agent / T1d-complex (111L, 5F, cross-cutting, fix) |
| stamphog 2.11.0 | .stamphog/policy.yml @ 6c61df3 · reviewed head 6c61df3 |

💡 Motivation and Context
SendCodeEmailOptions.Category(feat(emails): add Category to code sends #378).Changes
Categorystays, marked[Obsolete]with a pointer to workflows. Built code loads; source gets warning CS0618, an error under warnings-as-errors.EmailExceptionwith codeinvalid_formand fieldcategorybefore any other check or request. ItsFixpoints marketing email to a PostHog workflow.category; a nullCategorysends as before.patchchangeset records it.Rejected: removing
Category, because it breaks source and binary compatibility.No picture: one guarded option.
Read yourself: the refusal, L757–766: does any set
Categorystop before the request?Merge risk: medium
Alignment: good ✅
Impact: medium⚠️
Verification: good ✅
Categorysends the same body asmain(step 4: exact-body test)Rollback cost: low ✅
Error detection: N/A ✅
Tier: critical (f: merge publishes a PostHog NuGet patch release)
Rollout
💚 How did you test it?
What was proven, and what not
Categorysends the exact body without it; a set one, empty, with an emptyToor a file, throws with workflow guidance and makes no request.Tocase red.categorynever reaches the wire.📝 Checklist
If releasing new changes
pnpm changesetto generate a changeset file🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Claude Code (
claude-opus-5-5) wrote this. A first pure revert was dropped because it breaks callers in a patch.Category[Obsolete], never send it, refuse a set value locally with workflow guidance;patch🤖 Generated with Claude Code
How did you test this code?
6f5b84ato6c61df36c61df3End table: no gate at HEAD yet. Run hedge proof gate, then hedge proof receipt.
Not checked: none recorded
Full receipt: https://artifacts.posthog.com/a/4fag1SunsULAtUoN5K5M3R