Skip to content

chore(cdp): drop moved-run replay tests that repeat script tests - #135951

Open
Silthus wants to merge 1 commit into
masterfrom
chore/trim-134438-replay-window-tests
Open

Silthus wants to merge 1 commit into
masterfrom
chore/trim-134438-replay-window-tests

Conversation

@Silthus

@Silthus Silthus commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Problem

  • Engineers on transactional email idempotency maintain 77 test lines that repeat other tests.
  • #134438 added them. A review of merged PRs graded its tests as beyond need.

Changes

  • Deletes the four "replays a moved run past 24 hours" cases. Test-only.
  • Their script branches keep a test each: "keeps the longer replay window…", "records the run when the queue write outlasts the pending hold", and the CDP API reschedule replay cases.
  • All production code of fix(cdp): keep the idempotency key of a rescheduled send #134438 stays: it guards duplicate sends.

Note

🔵 Merge risk: low · two-way door

  • No traffic changes: the diff deletes test code only.
  • Switch-off: none needed; no runtime path changes.
  • Tier: critical (a: test file under nodejs/src/cdp/services/hogflows/)

How did you test this code?

Test rationale: no new test; the remaining cases in idempotency-keys.test.ts pass.

Proof What ran Result Commit
Review 3-lens panel (claude-opus-5-5, gpt-6.1-sol), round 1 0 findings: 0 fixed, 0 rejected, 0 other 7dc24a0
Proof judge an independent model reads the evidence against the diff ✅ passed at 7dc24a0

Not checked: the CDP API serial suite, which the deletion does not touch
Full receipt (PostHog team): https://artifacts.posthog.com/a/rAGePyfSklAEzFDHWftsZ1

Release status

  • No feature flag controls this change

Docs update

  • None.

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

Agent: Claude Code, Claude Opus 5.5

Skills: /full-stop, /impact, /writing-pr-descriptions, /pr-description, /merge-risk, /qa-swarm

Security review: not needed

More context for AI agents
  • Decisions: cut only test code; the production idempotency handling is an always-build class (duplicate sends) and stays.
  • Decisions: the CDP API serial reschedule rows stay; each row is the only guard of its case (uppercase id, scheduled send, window bounds).
  • Read closely: nodejs/src/cdp/services/hogflows/idempotency-keys.test.ts

No load-bearing decisions.

🤖 Generated with Claude Code

…ript tests

The four "replays a moved run past 24 hours" cases drive replayUntilDayAfter
through MARK_QUEUED_SCRIPT branches that dedicated tests already cover: the
longer window kept on a second write, the absent key written, and the
end-to-end replay of a moved send in the CDP API suite.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Silthus Silthus self-assigned this Nov 14, 2026
@trunk-io

trunk-io Bot commented Nov 14, 2026

Copy link
Copy Markdown

Merging to master in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

🤖 CI report

✅ Trunk lane — non-backend lane

This 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) — clean

New 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) — clean

New 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.

@posthog posthog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PostHog Review · Standard · reviewed 7dc24a0: no findings.

@Silthus
Silthus marked this pull request as ready for review November 14, 2026 09:57
@stamphog
stamphog Bot requested a review from a team November 14, 2026 09:57
@parameterai

parameterai Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Risk: No findings

This PR deletes four redundant "replays a moved run past 24 hours" test cases from the HogFlows idempotency-key test file; it is a test-only change with no production, config, or routing edits. The production duplicate-send guard from #134438 is untouched, so there is no security-relevant surface change to review.

Sentinel reviewed 7dc24a0 · Review settings

@veria-ai

veria-ai Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

PR overview

No security issues were found in this pull request.

Reviews

@stamphog stamphog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved.

The diff only removes tests and leaves production behavior unchanged; related replay-window and delayed-write coverage remains. No unresolved review concerns or other refusal grounds are present.

  • PostHog Review (Standard) reviewed the current head: no findings.
  • posthog[bot] reviewed the current head.
Gate mechanics and policy version
Gate Result
prerequisites ✓ all clear
deny-list ✓ no deny categories matched
size ✓ 0L, 0F substantive, 77L/1F incl. docs/generated/snapshots — within ceiling
tier ✓ T0 auto-approve: T0-deterministic (77L, 1F, single-area, chore)
stamphog 2.8.0 .stamphog/policy.yml @ 7dc24a0 · reviewed head 7dc24a0

This branch has not been deployed

No deployments
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