Repository navigation
Conversation
A developer who scheduled emails can page through the ones that still wait, in send-time order, through a cdp-api route on the team-only token of the cancel and reschedule routes. A partial index over the unclaimed email jobs serves the list. The janitor counts the waiting sends across teams once a minute into cdp_transactional_email_scheduled_waiting. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nds/n5-list-scheduled
🤖 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.
|
| File | Comment lines | Added lines |
|---|---|---|
nodejs/src/cdp/services/cyclotron-v2/cyclotron-v2.test.ts |
5 | 105 |
nodejs/src/cdp/services/cyclotron-v2/janitor.ts |
3 | 33 |
nodejs/src/cdp/services/cyclotron-v2/manager.ts |
3 | 46 |
nodejs/src/cdp/services/hogflows/transactional-email.ts |
1 | 26 |
nodejs/src/cdp/services/hogflows/transactional-sends.ts |
1 | 23 |
nodejs/src/common/api/middleware/internal-api-auth.ts |
1 | 2 |
This check does not block merging. It updates on every push and clears when the share drops.
There was a problem hiding this comment.
PostHog Review · Standard · reviewed 310805e: 2 Should fix.
This is the only automatic review while this pull request is a draft. Comment @posthog review to review new changes sooner. Otherwise, a review of the new changes runs when you mark it ready for review.
See this review and its findings in PostHog Review. Comment @posthog review --deep for a Deep review. A Deep review takes longer and looks deeper than a Standard review.
…nds/n5-list-scheduled
The query schema decodes the cursor, so a malformed or out-of-range cursor answers 400 from one branch. A manager test row holds content that Postgres json rejects, so a later SQL read of the recipient fails. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nds/n5-list-scheduled # Conflicts: # nodejs/src/cdp/cdp-api.serial.test.ts
A count that outlasts the one-minute tick no longer starts a second one on the janitor's pool. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
/depot retry |
Both Depot backend runs for b3a0542 were cancelled by the superseded-run job, and /depot retry was cancelled the same way. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Risk: No findings This PR adds a team-scoped, JWT-protected GET endpoint listing waiting scheduled transactional emails with opaque keyset pagination, plus a janitor gauge counting waiting sends across teams once a minute. The auth path (audience- and team-pinned HS256 JWT, fail-closed on missing secret), the parameterized SQL, and the validated cursor/limit inputs all check out; I found no new vulnerabilities. Sentinel reviewed |
Problem
Merge first: #129035 (the index, deploys first), #128929, #128881, #128871, then #128868.
Landing: queue this PR with
/trunk mergeonly after #129035 has landed and its index migration is applied in US and EU. A reader of a new index lands after the migration is live, not in the same queue run.Changes
id,to,scheduled_atandcreated_at.cdp_transactional_email_scheduled_waitingonce a minute, one count at a time.How did you test this code?
jsonrejects.Live run and cross-version results at e54e397
limit=1nextis null. A send-now is not listed.401.Release status
Docs update
🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Agent: Claude Code, Claude Opus 5.5
Skills:
/writing-pr-descriptions,/writing-tests,/writing-code-commentsMore context for AI agents
jsonoperators fail on a null character or a lone surrogate anywhere in the state. The cursor is base64url JSON of the last row's(scheduled, id); the first page runs the same keyset query from the epoch. The list fetches one extra row to know whether a next page exists.tocomes from the job state's event properties. The count is a function the janitor calls with its own pool, because the janitor has no manager. The gauge keeps its last value when a count fails. The CI report's comment density (4%) is why-comments only.listUnclaimed, andUNCLAIMED_EMAILinmanager.ts, which must match the predicate of the index in feat(cdp): index email jobs that wait for their send time #129035.🤖 Generated with Claude Code