Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

fix(cdp): restrict hog function reruns to cyclotron-executable types (#73090)

Daniel Marchuk300102ea0251
diff --git a/frontend/src/scenes/hog-functions/HogFunctionScene.tsx b/frontend/src/scenes/hog-functions/HogFunctionScene.tsx
index d46ce85f5524..d9ab4ef356f3 100644
--- a/frontend/src/scenes/hog-functions/HogFunctionScene.tsx
+++ b/frontend/src/scenes/hog-functions/HogFunctionScene.tsx
@@ -501,7 +501,7 @@ export function HogFunctionScene(): JSX.Element {
: {
label: 'Invocations',
key: 'invocations',
- content: <HogInvocations id={id} functionKind="hog_function" />,
+ content: <HogInvocations id={id} functionKind="hog_function" hogFunctionType={type} />,
},
supportsBackfills && featureFlags[FEATURE_FLAGS.BACKFILL_WORKFLOWS_DESTINATION]
diff --git a/frontend/src/scenes/hog-functions/invocations/HogInvocations.tsx b/frontend/src/scenes/hog-functions/invocations/HogInvocations.tsx
index c066324cb797..8d2ab593ba85 100644
--- a/frontend/src/scenes/hog-functions/invocations/HogInvocations.tsx
+++ b/frontend/src/scenes/hog-functions/invocations/HogInvocations.tsx
@@ -34,7 +34,7 @@ import { PersonDisplay } from 'scenes/persons/PersonDisplay'
import { urls } from 'scenes/urls'
import { escapeHogQLString, hogql } from '~/queries/utils'
-import { DateMappingOption, PersonType } from '~/types'
+import { DateMappingOption, HogFunctionTypeType, PersonType } from '~/types'
import { LogsViewer } from '../logs/LogsViewer'
import { LogsViewerLogicProps } from '../logs/logsViewerLogic'
@@ -49,6 +49,7 @@ import {
RunStatus,
dateClauseFor,
hogInvocationsLogic,
+ isRerunnableHogFunctionType,
isRerunWrapperKind,
} from './hogInvocationsLogic'
import { InvocationsSparkline } from './InvocationsSparkline'
@@ -226,6 +227,13 @@ export interface HogInvocationsProps extends HogInvocationsLogicProps {
* renders one scoped table per broadcast inside a collapsible panel.
*/
compact?: boolean
+ /**
+ * The hog function's type, for `functionKind === 'hog_function'`. Re-run is only offered
+ * for types a cyclotron worker executes (see `RERUNNABLE_HOG_FUNCTION_TYPES`); for others
+ * the re-run controls are disabled, matching the API's 400. Workflows (hog flows) leave
+ * this undefined.
+ */
+ hogFunctionType?: HogFunctionTypeType
}
/**
@@ -239,6 +247,7 @@ export function HogInvocations({
compact,
parentRunId,
defaultDateFrom,
+ hogFunctionType,
}: HogInvocationsProps): JSX.Element | null {
const logic = hogInvocationsLogic({ id, functionKind, parentRunId, defaultDateFrom })
const {
@@ -270,6 +279,14 @@ export function HogInvocations({
} = useActions(logic)
const [rerunModalOpen, setRerunModalOpen] = useState(false)
+ // Hog functions whose type a cyclotron worker can't execute can't be re-run — the API
+ // rejects it with a 400, so disable the controls here rather than letting a click fail.
+ // Hog flows always execute on cyclotron, so they leave `hogFunctionType` undefined.
+ const rerunUnsupportedReason: string | undefined =
+ functionKind === 'hog_function' && !isRerunnableHogFunctionType(hogFunctionType)
+ ? "Re-run isn't available for this function type"
+ : undefined
+
useEffect(() => {
refresh()
}, [refresh])
@@ -283,7 +300,10 @@ export function HogInvocations({
title: (
<LemonCheckbox
checked={selectAllState === 'all' ? true : selectAllState === 'some' ? 'indeterminate' : false}
- disabledReason={selectableIds.length === 0 ? 'Nothing selectable in this view' : undefined}
+ disabledReason={
+ rerunUnsupportedReason ??
+ (selectableIds.length === 0 ? 'Nothing selectable in this view' : undefined)
+ }
onChange={() => {
if (selectAllState === 'all' || selectAllState === 'some') {
clearSelected()
@@ -300,11 +320,12 @@ export function HogInvocations({
checked={Boolean(selectedIds[row.invocation_id])}
onChange={() => toggleSelected(row.invocation_id)}
disabledReason={
- isRerunWrapperKind(row.function_kind)
+ rerunUnsupportedReason ??
+ (isRerunWrapperKind(row.function_kind)
? "Can't re-run a re-run"
: row.status === 'running'
? "Can't rerun a run that's still in flight"
- : undefined
+ : undefined)
}
/>
),
@@ -455,7 +476,8 @@ export function HogInvocations({
size="xsmall"
type="secondary"
disabledReason={
- row.status === 'running' ? "Can't rerun a run that's still in flight" : undefined
+ rerunUnsupportedReason ??
+ (row.status === 'running' ? "Can't rerun a run that's still in flight" : undefined)
}
onClick={() => {
LemonDialog.open({
@@ -571,6 +593,7 @@ export function HogInvocations({
size="small"
type="primary"
icon={<IconRevert />}
+ disabledReason={rerunUnsupportedReason}
onClick={() => setRerunModalOpen(true)}
>
Re-run…
@@ -611,11 +634,12 @@ export function HogInvocations({
size="small"
type="primary"
disabledReason={
- rerunableSelectedIds.length === 0
+ rerunUnsupportedReason ??
+ (rerunableSelectedIds.length === 0
? 'Selected runs are all still in flight'
: selectedCount > HOG_INVOCATIONS_RERUN_MAX_COUNT
? `Selected ${selectedCount} > limit ${HOG_INVOCATIONS_RERUN_MAX_COUNT}`
- : undefined
+ : undefined)
}
onClick={() => {
LemonDialog.open({
diff --git a/frontend/src/scenes/hog-functions/invocations/hogInvocationsLogic.test.ts b/frontend/src/scenes/hog-functions/invocations/hogInvocationsLogic.test.ts
index c177e771a419..84c635729678 100644
--- a/frontend/src/scenes/hog-functions/invocations/hogInvocationsLogic.test.ts
+++ b/frontend/src/scenes/hog-functions/invocations/hogInvocationsLogic.test.ts
@@ -4,7 +4,12 @@ import { expectLogic } from 'kea-test-utils'
import { useMocks } from '~/mocks/jest'
import { initKeaTests } from '~/test/init'
-import { buildSearchClause, hogInvocationsLogic, parentClauseFor } from './hogInvocationsLogic'
+import {
+ buildSearchClause,
+ hogInvocationsLogic,
+ isRerunnableHogFunctionType,
+ parentClauseFor,
+} from './hogInvocationsLogic'
describe('hogInvocationsLogic', () => {
describe('buildSearchClause', () => {
@@ -53,6 +58,27 @@ describe('hogInvocationsLogic', () => {
})
})
+ describe('isRerunnableHogFunctionType', () => {
+ // Drives whether the invocations UI offers re-run. Only types a cyclotron worker
+ // executes are rerunnable; classifying a source_webhook (or any other type) as
+ // rerunnable would surface a button that enqueues an invocation nothing can drain.
+ it.each(['destination', 'internal_destination'] as const)('is true for rerunnable type %s', (type) => {
+ expect(isRerunnableHogFunctionType(type)).toBe(true)
+ })
+
+ it.each(['source_webhook', 'transformation', 'site_app', 'site_destination', 'source'] as const)(
+ 'is false for non-rerunnable type %s',
+ (type) => {
+ expect(isRerunnableHogFunctionType(type)).toBe(false)
+ }
+ )
+
+ it('is false when the type is unknown', () => {
+ expect(isRerunnableHogFunctionType(undefined)).toBe(false)
+ expect(isRerunnableHogFunctionType(null)).toBe(false)
+ })
+ })
+
describe('parentClauseFor', () => {
const base = { id: 'flow-1', functionKind: 'hog_flow' as const }
diff --git a/frontend/src/scenes/hog-functions/invocations/hogInvocationsLogic.tsx b/frontend/src/scenes/hog-functions/invocations/hogInvocationsLogic.tsx
index 192840f4b73d..a1a1d478170d 100644
--- a/frontend/src/scenes/hog-functions/invocations/hogInvocationsLogic.tsx
+++ b/frontend/src/scenes/hog-functions/invocations/hogInvocationsLogic.tsx
@@ -10,7 +10,7 @@ import { dateStringToDayJs } from 'lib/utils/dateFilters'
import { teamLogic } from 'scenes/teamLogic'
import { escapeHogQLString, hogql } from '~/queries/utils'
-import { LogEntryLevel, PersonType } from '~/types'
+import { HogFunctionTypeType, LogEntryLevel, PersonType } from '~/types'
import { hogFunctionsRerunCreate } from 'products/cdp/frontend/generated/api'
import type { HogInvocationRerunFilterStatusEnumApi } from 'products/cdp/frontend/generated/api.schemas'
@@ -31,6 +31,18 @@ export type RunRowKind = 'hog_function' | 'hog_flow' | 'hog_function_rerun' | 'h
export const isRerunWrapperKind = (kind: RunRowKind): boolean =>
kind === 'hog_function_rerun' || kind === 'hog_flow_rerun'
+/**
+ * Hog function types a cyclotron worker executes, so a re-run (which re-enqueues onto the
+ * cyclotron hog queue) can actually run. Other types run elsewhere — source webhooks inline
+ * in the cdp-api HTTP handler, transformations during ingestion, site_* as client-side JS —
+ * so a re-enqueued invocation would never drain and wedges the partition. Mirror of the
+ * backend `TYPES_THAT_CAN_RERUN` allowlist; the API rejects a re-run of a non-rerunnable type.
+ */
+export const RERUNNABLE_HOG_FUNCTION_TYPES: HogFunctionTypeType[] = ['destination', 'internal_destination']
+
+export const isRerunnableHogFunctionType = (type?: HogFunctionTypeType | null): boolean =>
+ !!type && RERUNNABLE_HOG_FUNCTION_TYPES.includes(type)
+
const rerunWrapperKindFor = (kind: HogInvocationsFunctionKind): RunRowKind =>
kind === 'hog_flow' ? 'hog_flow_rerun' : 'hog_function_rerun'
diff --git a/nodejs/src/cdp/rerun/rerun-paginator.routing.test.ts b/nodejs/src/cdp/rerun/rerun-paginator.routing.test.ts
index 862de0526723..42e039c3cc8a 100644
--- a/nodejs/src/cdp/rerun/rerun-paginator.routing.test.ts
+++ b/nodejs/src/cdp/rerun/rerun-paginator.routing.test.ts
@@ -140,7 +140,7 @@ describe('RerunPaginatorService queue routing', () => {
expect(next.progress.last_error).toBeUndefined()
})
- const rehydrate = (type: string, headers: Record<string, string>) => {
+ const rehydrate = (type: string) => {
const hogFunctionManager = {
getHogFunction: jest.fn().mockResolvedValue({ id: 'fn-1', team_id: 1, type }),
} as unknown as HogFunctionManagerService
@@ -159,29 +159,24 @@ describe('RerunPaginatorService queue routing', () => {
attempts: 0,
last_scheduled_at: '2026-01-01 00:00:00',
first_scheduled_at: '2026-01-01 00:00:00',
- invocation_globals: JSON.stringify({
- event: { uuid: 'e1' },
- request: { method: 'POST', headers, query: {}, body: {}, stringBody: '' },
- }),
+ invocation_globals: JSON.stringify({ event: { uuid: 'e1' } }),
}
return (webhookPaginator as any).rehydrateInvocation(1, 'hog_function', 'fn-1', row)
}
- it('strips request.headers from rehydrated globals for source-webhook functions', async () => {
- const invocation = await rehydrate('source_webhook', {
- authorization: 'secret',
- 'content-type': 'application/json',
- })
- expect(invocation.state.globals.request.headers).toEqual({})
- })
-
- it('strips request.headers for warehouse-source-webhook functions too', async () => {
- const invocation = await rehydrate('warehouse_source_webhook', { 'x-api-key': 'secret' })
- expect(invocation.state.globals.request.headers).toEqual({})
- })
+ // A cyclotron worker only executes destinations. Re-enqueuing a source webhook (or any
+ // other type) onto the hog queue wedges the partition, since nothing there can run it.
+ // rehydrateInvocation must return null so the row is counted as skipped, not queued.
+ it.each(['source_webhook', 'warehouse_source_webhook', 'transformation', 'site_destination', 'site_app'])(
+ 'skips rerun of non-rerunnable type %s',
+ async (type) => {
+ expect(await rehydrate(type)).toBeNull()
+ }
+ )
- it('leaves request.headers intact for non-webhook functions', async () => {
- const invocation = await rehydrate('destination', { authorization: 'secret' })
- expect(invocation.state.globals.request.headers).toEqual({ authorization: 'secret' })
+ it.each(['destination', 'internal_destination'])('rehydrates rerunnable type %s', async (type) => {
+ const invocation = await rehydrate(type)
+ expect(invocation).not.toBeNull()
+ expect(invocation.queue).toBe('hog')
})
})
diff --git a/nodejs/src/cdp/rerun/rerun-paginator.service.ts b/nodejs/src/cdp/rerun/rerun-paginator.service.ts
index b1c1013cfd4c..6fba71da3ab4 100644
--- a/nodejs/src/cdp/rerun/rerun-paginator.service.ts
+++ b/nodejs/src/cdp/rerun/rerun-paginator.service.ts
@@ -21,14 +21,11 @@ import {
CyclotronJobInvocationHogFunction,
HogFunctionFilterGlobals,
HogFunctionInvocationGlobalsWithInputs,
+ RERUNNABLE_HOG_FUNCTION_TYPES,
} from '../types'
import { convertToHogFunctionFilterGlobal } from '../utils/hog-function-filtering'
import { RERUN_PAGE_SIZE, RerunFunctionKind, RerunJobProgress, RerunJobState } from './rerun-job.types'
-// Function types whose stored globals carry inbound `request.headers`
-// (sender credentials) that must be stripped before a rerun rehydrates them.
-const WEBHOOK_SOURCE_TYPES = new Set(['source_webhook', 'warehouse_source_webhook'])
-
const counterRerunPageProcessed = new Counter({
name: 'cdp_hog_invocation_rerun_pages_processed_total',
help: 'Rerun paginator pages processed, by function kind and outcome.',
@@ -589,6 +586,21 @@ export class RerunPaginatorService {
if (!hogFunction || hogFunction.team_id !== teamId) {
return null
}
+
+ // Only re-enqueue types a cyclotron worker executes. Others (source webhooks,
+ // transformations, site_*) run elsewhere and would never drain from the hog
+ // queue, so a re-enqueued invocation wedges the partition. The API rejects these
+ // up front; this is the backstop for any rerun job that reaches the worker anyway.
+ if (!RERUNNABLE_HOG_FUNCTION_TYPES.has(hogFunction.type)) {
+ logger.warn('⚠️', 'Skipping rerun of invocation with non-rerunnable function type', {
+ functionId,
+ teamId,
+ type: hogFunction.type,
+ invocation_id: row.invocation_id,
+ })
+ return null
+ }
+
// The persisted globals are minimal — `inputs`, `groups` and
// `person` are all stripped. Re-enqueue as-is: the cyclotron worker
// rehydrates `groups`/`person` and the executor rebuilds `inputs`
@@ -596,18 +608,6 @@ export class RerunPaginatorService {
// the latest config/secrets rather than a stored snapshot.
const persistedGlobals = parsedGlobals as HogFunctionInvocationGlobalsWithInputs
- // For source-webhook functions the stored `request.headers` AND
- // `request.query` carry the inbound sender's credentials
- // (Authorization / x-api-key / signing secrets in headers; URL
- // tokens like `?token=` in query). Rerunning feeds those back into
- // the live function, so a write-access user could reconfigure the
- // function to forward them to an attacker endpoint and replay
- // history to exfiltrate past senders' secrets. Drop both on
- // rehydration; non-webhook globals never carry `request` so they're
- // untouched.
- if (WEBHOOK_SOURCE_TYPES.has(hogFunction.type) && persistedGlobals.request) {
- persistedGlobals.request = { ...persistedGlobals.request, headers: {}, query: {} }
- }
const invocation: CyclotronJobInvocationHogFunction = {
// Preserve invocation_id so lifecycle rows collapse under the
// ReplacingMergeTree on the same key.
diff --git a/nodejs/src/cdp/types.ts b/nodejs/src/cdp/types.ts
index 14ed9f0bbf41..926836cca585 100644
--- a/nodejs/src/cdp/types.ts
+++ b/nodejs/src/cdp/types.ts
@@ -451,6 +451,14 @@ export type HogFunctionTypeType =
| 'warehouse_source_webhook'
| 'site_destination'
+// Function types a cyclotron worker actually executes, so a rerun can safely re-enqueue
+// the stored invocation onto the cyclotron hog queue and have it run. Every other type
+// runs elsewhere (source webhooks inline in the cdp-api HTTP handler, transformations
+// during ingestion, site_* transpiled to client-side JS) and would never drain from that
+// queue — re-enqueuing one wedges the partition. Mirror of the Django `TYPES_THAT_CAN_RERUN`
+// allowlist and the frontend invocations UI.
+export const RERUNNABLE_HOG_FUNCTION_TYPES = new Set<HogFunctionTypeType>(['destination', 'internal_destination'])
+
export interface HogFunctionMappingType {
inputs_schema?: HogFunctionInputSchemaType[]
inputs?: Record<string, CyclotronInputType> | null
diff --git a/products/cdp/backend/api/hog_function.py b/products/cdp/backend/api/hog_function.py
index 4699fb2eec2a..b623d8a9abe2 100644
--- a/products/cdp/backend/api/hog_function.py
+++ b/products/cdp/backend/api/hog_function.py
@@ -49,6 +49,7 @@ from posthog.plugins.plugin_server_api import create_hog_invocation_test, rerun_
from products.cdp.backend.api.hog_function_template import HogFunctionTemplateSerializer
from products.cdp.backend.models.hog_function_template import HogFunctionTemplate
from products.cdp.backend.models.hog_functions.hog_function import (
+ TYPES_THAT_CAN_RERUN,
TYPES_WITH_JAVASCRIPT_SOURCE,
HogFunction,
HogFunctionState,
@@ -692,17 +693,29 @@ class HogFunctionViewSet(
run reuses the original `invocation_id` with `is_retry=1` set on the
new lifecycle row so the UI can surface that it was a rerun.
- For source-webhook functions the worker strips `request.headers` from
- the rehydrated globals before re-enqueuing (see the rerun paginator):
- those headers carry the inbound sender's credentials, and replaying
- them through a reconfigured function would let a write-access user
- exfiltrate stored secrets.
+ Only types a cyclotron worker executes (`TYPES_THAT_CAN_RERUN`) can be
+ rerun: rerun re-enqueues onto the cyclotron hog queue, and other types
+ run elsewhere (source webhooks inline in the cdp-api HTTP handler,
+ transformations during ingestion, `site_*` transpiled to client-side
+ JS). A re-enqueued invocation of one of those would never drain and
+ wedges the partition, so a rerun of a non-rerunnable type is rejected
+ with a 400 here.
Because rerun replays historical event/person/group data, it requires
`person:read` and `group:read` on top of `hog_function:write`.
"""
hog_function = self.get_object()
+ if hog_function.type not in TYPES_THAT_CAN_RERUN:
+ return Response(
+ {
+ "queued_count": 0,
+ "skipped_count": 0,
+ "detail": f"Re-runs aren't supported for '{hog_function.type}' functions.",
+ },
+ status=400,
+ )
+
serializer = HogInvocationRerunRequestSerializer(data=request.data)
serializer.is_valid(raise_exception=True)
diff --git a/products/cdp/backend/api/test/test_hog_function.py b/products/cdp/backend/api/test/test_hog_function.py
index 9522f5ebf0a7..55b5df024351 100644
--- a/products/cdp/backend/api/test/test_hog_function.py
+++ b/products/cdp/backend/api/test/test_hog_function.py
@@ -1821,6 +1821,55 @@ class TestHogFunctionAPI(ClickhouseTestMixin, APIBaseTest, QueryMatchingTest):
"value": "http://localhost:2080/0e02d917-563f-4050-9725-aad881b69937",
}
+ # warehouse_source_webhook is intentionally omitted: it's excluded from the viewset queryset
+ # entirely (see test_warehouse_source_webhook_excluded), so its rerun endpoint 404s before the
+ # rerunnable-type guard is ever reached — it can't exercise the 400 this test asserts.
+ @parameterized.expand(
+ [
+ ("source_webhook",),
+ ("transformation",),
+ ("site_app",),
+ ("site_destination",),
+ ]
+ )
+ def test_rerun_rejected_for_non_rerunnable_type(self, hog_function_type):
+ fn = HogFunction.objects.create(team=self.team, type=hog_function_type, hog="return event")
+
+ with patch("products.cdp.backend.api.hog_function.rerun_hog_invocations") as mock_rerun:
+ response = self.client.post(
+ f"/api/projects/{self.team.id}/hog_functions/{fn.id}/rerun/",
+ data={
+ "filter": {
+ "window_start": "2026-07-01T00:00:00Z",
+ "window_end": "2026-07-02T00:00:00Z",
+ }
+ },
+ )
+
+ assert response.status_code == status.HTTP_400_BAD_REQUEST, response.json()
+ assert hog_function_type in response.json()["detail"]
+ # The whole point: a non-rerunnable type must never reach the enqueue path.
+ mock_rerun.assert_not_called()
+
+ def test_rerun_allowed_for_destination(self):
+ fn = HogFunction.objects.create(team=self.team, type="destination", hog="return event")
+
+ with patch("products.cdp.backend.api.hog_function.rerun_hog_invocations") as mock_rerun:
+ mock_rerun.return_value = MagicMock(status_code=200, json=lambda: {"rerun_job_id": "job-1"})
+
+ response = self.client.post(
+ f"/api/projects/{self.team.id}/hog_functions/{fn.id}/rerun/",
+ data={
+ "filter": {
+ "window_start": "2026-07-01T00:00:00Z",
+ "window_end": "2026-07-02T00:00:00Z",
+ }
+ },
+ )
+
+ assert response.status_code == status.HTTP_200_OK, response.json()
+ assert mock_rerun.call_count == 1
+
@parameterized.expand(
[
(
diff --git a/products/cdp/backend/models/hog_functions/hog_function.py b/products/cdp/backend/models/hog_functions/hog_function.py
index f041e665e1fe..40c8b80799dd 100644
--- a/products/cdp/backend/models/hog_functions/hog_function.py
+++ b/products/cdp/backend/models/hog_functions/hog_function.py
@@ -72,6 +72,17 @@ TYPES_THAT_RELOAD_PLUGIN_SERVER = (
TYPES_WITH_TRANSPILED_FILTERS = (HogFunctionType.SITE_DESTINATION, HogFunctionType.SITE_APP)
TYPES_WITH_JAVASCRIPT_SOURCE = (HogFunctionType.SITE_DESTINATION, HogFunctionType.SITE_APP)
+# Function types a cyclotron worker actually executes, so a "rerun" — which re-enqueues
+# the stored invocation onto the cyclotron hog queue — can run to completion. Every other
+# type executes elsewhere (source webhooks inline in the cdp-api HTTP handler,
+# transformations during ingestion, site_* transpiled to client-side JS) and can never
+# drain from that queue, so enqueuing one wedges the partition. Keep in sync with the Node
+# rerun paginator (`RERUNNABLE_HOG_FUNCTION_TYPES`) and the frontend invocations UI.
+TYPES_THAT_CAN_RERUN = (
+ HogFunctionType.DESTINATION,
+ HogFunctionType.INTERNAL_DESTINATION,
+)
+
class HogFunction(FileSystemSyncMixin, UUIDTModel):
class Meta:
diff --git a/products/cdp/frontend/generated/api.ts b/products/cdp/frontend/generated/api.ts
index 83afc3c8a1f4..48e947518f6e 100644
--- a/products/cdp/frontend/generated/api.ts
+++ b/products/cdp/frontend/generated/api.ts
@@ -343,11 +343,13 @@ export const getHogFunctionsRerunCreateUrl = (projectId: string, id: string) =>
* run reuses the original `invocation_id` with `is_retry=1` set on the
* new lifecycle row so the UI can surface that it was a rerun.
*
- * For source-webhook functions the worker strips `request.headers` from
- * the rehydrated globals before re-enqueuing (see the rerun paginator):
- * those headers carry the inbound sender's credentials, and replaying
- * them through a reconfigured function would let a write-access user
- * exfiltrate stored secrets.
+ * Only types a cyclotron worker executes (`TYPES_THAT_CAN_RERUN`) can be
+ * rerun: rerun re-enqueues onto the cyclotron hog queue, and other types
+ * run elsewhere (source webhooks inline in the cdp-api HTTP handler,
+ * transformations during ingestion, `site_*` transpiled to client-side
+ * JS). A re-enqueued invocation of one of those would never drain and
+ * wedges the partition, so a rerun of a non-rerunnable type is rejected
+ * with a 400 here.
*
* Because rerun replays historical event/person/group data, it requires
* `person:read` and `group:read` on top of `hog_function:write`.
diff --git a/products/cdp/frontend/generated/api.zod.ts b/products/cdp/frontend/generated/api.zod.ts
index 7f73f0eb3d47..31813e48a831 100644
--- a/products/cdp/frontend/generated/api.zod.ts
+++ b/products/cdp/frontend/generated/api.zod.ts
@@ -1455,11 +1455,13 @@ export const HogFunctionsInvocationsCreateBody = /* @__PURE__ */ zod.object({
* run reuses the original `invocation_id` with `is_retry=1` set on the
* new lifecycle row so the UI can surface that it was a rerun.
*
- * For source-webhook functions the worker strips `request.headers` from
- * the rehydrated globals before re-enqueuing (see the rerun paginator):
- * those headers carry the inbound sender's credentials, and replaying
- * them through a reconfigured function would let a write-access user
- * exfiltrate stored secrets.
+ * Only types a cyclotron worker executes (`TYPES_THAT_CAN_RERUN`) can be
+ * rerun: rerun re-enqueues onto the cyclotron hog queue, and other types
+ * run elsewhere (source webhooks inline in the cdp-api HTTP handler,
+ * transformations during ingestion, `site_*` transpiled to client-side
+ * JS). A re-enqueued invocation of one of those would never drain and
+ * wedges the partition, so a rerun of a non-rerunnable type is rejected
+ * with a 400 here.
*
* Because rerun replays historical event/person/group data, it requires
* `person:read` and `group:read` on top of `hog_function:write`.