Skip to content

Build strand: the code-content send API (Resend parity) #535

Open

Description

@Silthus

Map: Map: send code-managed email templates with one PostHog call
Spec: Spec: Resend parity, section "Slicing: builders per strand"
Contract: PostHog/posthog#120921
Repository: PostHog/posthog
Lane: one build lane, Opus 5.5 high, its own worktree, wall-time cap 12 h (waiting on other strands excluded). Prompt: lanes/send-api.md
Blocked by (strands): none
Waits on (Harley): PostHog#120446, PostHog#120392 and PostHog#120510 merged, before slice 05

Slices, in order

Done when

  • Every slice has its draft PR with its red/green test and owed proofs.
  • One GPT-6.1 Sol high review of the strand's whole diff, findings fixed or rejected with a reason.
  • The lane's handoff, with its measurements, reached the map conductor.

Activity

  1. Silthus commented on Oct 21, 2026

    @Silthus
    OwnerAuthor

    Dispatched as the strand lane (builders-per-strand trial): Claude Opus 5.5, high, new worktree from spec/code-managed-templates, 12 h building cap. Slices in the order of this issue's checklist.

  2. self-assigned this
    on Oct 21, 2026
  3. Silthus commented on Oct 21, 2026

    @Silthus
    OwnerAuthor

    Claimed by the send-api lane (Opus 5.5, high). Starting with slice 01 on the restacked PostHog#120628.

  4. Silthus commented on Oct 21, 2026

    @Silthus
    OwnerAuthor

    Parked after slice 04, before slice 07.

    Slice 04 is up as draft PostHog#121272: the send route's code form, the fixed slot in the worker, and the v3 tracking reader. Its proofs are on the PR: tests, the cross-version run, and a live run that landed every email in maildev.

    The stack is now four layers: PostHog#118924 → PostHog#121083 → PostHog#121084 → PostHog#121272. Slice 07 would make it five.

    The question: PostHog#118924 conflicts with master (messaging migration number, template model and services, the template library frontend; about ten files), and every layer above inherits the conflict. How do you want to unblock the stack?

    1. I rebase the whole stack onto master (recommended). I force-push all four branches, spec/code-managed-templates included, rerun the gates, and you then review and merge feat(messaging): upload, send and lock code-managed email templates PostHog/posthog#118924, refactor(cdp): move the email send checks into one send policy PostHog/posthog#121083 and refactor(messaging): send transactional email through one command and a typed outcome PostHog/posthog#121084. After they land, I restack feat(messaging): send email rendered by the caller's code by key PostHog/posthog#121272 on master and go on with 07.
    2. You rebase feat(messaging): upload, send and lock code-managed email templates PostHog/posthog#118924 yourself. I restack the three layers above it once you say it's done.
    3. Stack 07 on top anyway, and accept five layers until the base lands.

    Also open on PostHog#121272, decided by me and listed in its Decisions table: v3 tracking codes ship with minting off, to close a cross-version bug where an old parser files a bounce under the wrong team. Turning minting on is a one-line follow-up after the deploy.

    Slice 05 is unblocked (the idempotency store is on master), so 07, 05, 06 and 08 follow once the base is settled.

  5. Silthus commented on Oct 21, 2026

    @Silthus
    OwnerAuthor

    Unparked: the stack is rebased onto master (option 1).

    All four branches are force-pushed onto master at e23fa706bd0:

    PR Head
    PostHog#118924 756474ff699
    PostHog#121083 619d7421be0
    PostHog#121084 7f44351eeab
    PostHog#121272 5eb8d2ca083

    master moved again while the first rebase ran its gates: template tags (PostHog#120931) conflicted with the base, so the base was rebased a second time. The gates pass on every layer, and each of the three lower PRs has a GPT-6.1 Sol final read with every finding fixed. PostHog#118769 is superseded: PostHog#118924 carries its migration as 0009 and 0010.

    Decisions made during the rebase:

    • 🤖 How does the rebase meet master's drafts? An upload clears a draft, and the lock refuses a draft save, so a code-managed template never holds one.
    • 🤖 Does the code-managed lock refuse the sensitive setting? No. A PATCH of only sensitive passes, because the setting protects what PostHog keeps about each email and is not part of the uploaded file.
    • 🤖 Does the code-managed lock refuse tags? No. A PATCH of only tags passes, because tags organize the library and are not part of the uploaded file.
    • 🤖 Where does feat(messaging): send email rendered by the caller's code by key PostHog/posthog#121272 refuse the code key origin on create? In a validator on the one origin_product enum. A separate create-only enum clashed with master's broadcast wizard types.

    Next: PostHog#118924, PostHog#121083 and PostHog#121084 wait for review. After they land, I restack PostHog#121272 on master and go on with slices 07, 05, 06 and 08.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions