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.

chore(posthog-ai): shorten warm run test case labels (#99923)

Paul D'Ambraf36dd2de2806
diff --git a/products/posthog_ai/frontend/utils/warmRunSubmission.test.ts b/products/posthog_ai/frontend/utils/warmRunSubmission.test.ts
index c1cf38eade3d..d76c74741616 100644
--- a/products/posthog_ai/frontend/utils/warmRunSubmission.test.ts
+++ b/products/posthog_ai/frontend/utils/warmRunSubmission.test.ts
@@ -63,15 +63,27 @@ describe('submitWithWarmRunRetry', () => {
})
test.each([
- new Error('network failure'),
- new DOMException('request timed out', 'TimeoutError'),
- new ApiError('unavailable', 503),
- new ApiError('unavailable', 500, undefined, { code: 'warm_run_activation_unavailable', retry_token: 'token' }),
- new ApiError('unavailable', 503, undefined, { code: 'another_error', retry_token: 'token' }),
- starting(''),
- starting(' '),
- new ApiError('starting', 503, undefined, { code: 'warm_run_activation_unavailable', retry_token: 1 }),
- ])('stops without retrying an unconfirmed failure: %s', async (error) => {
+ ['network failure', new Error('network failure')],
+ ['request timeout', new DOMException('request timed out', 'TimeoutError')],
+ ['missing retry token', new ApiError('unavailable', 503)],
+ [
+ 'non-retryable status',
+ new ApiError('unavailable', 500, undefined, {
+ code: 'warm_run_activation_unavailable',
+ retry_token: 'token',
+ }),
+ ],
+ [
+ 'unrecognized error code',
+ new ApiError('unavailable', 503, undefined, { code: 'another_error', retry_token: 'token' }),
+ ],
+ ['empty retry token', starting('')],
+ ['blank retry token', starting(' ')],
+ [
+ 'non-string retry token',
+ new ApiError('starting', 503, undefined, { code: 'warm_run_activation_unavailable', retry_token: 1 }),
+ ],
+ ])('stops without retrying an unconfirmed failure: %s', async (_case, error) => {
const send = jest.fn().mockRejectedValueOnce(starting()).mockRejectedValueOnce(error)
const result = submitWithWarmRunRetry(send, disposables)
const rejected = result.catch((error) => error)