Skip to content

Commit 46aa502

Browse files
authored
fix(sessions): type CONNECT_PARAMS as ConnectParams in retry-config test
The `as const` assertion made initialPrompt a readonly tuple, which is not assignable to the mutable ContentBlock[] on ConnectParams, failing the CI typecheck. Annotating the constant with ConnectParams checks the fixture against the real contract instead. Generated-By: PostHog Code Task-Id: 48ee9023-8509-47f8-8bce-dd50321fc3d8
1 parent 8a32d3f commit 46aa502

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

packages/core/src/sessions/sessionServiceRetryConfig.test.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
import type { AgentSession } from "@posthog/shared";
22
import type { Task } from "@posthog/shared/domain-types";
33
import { describe, expect, it, vi } from "vitest";
4-
import { SessionService, type SessionServiceDeps } from "./sessionService";
4+
import {
5+
type ConnectParams,
6+
SessionService,
7+
type SessionServiceDeps,
8+
} from "./sessionService";
59

610
function makeSession(overrides: Partial<AgentSession> = {}): AgentSession {
711
return {
@@ -92,7 +96,7 @@ describe("SessionService.clearSessionError retry config", () => {
9296
});
9397
});
9498

95-
const CONNECT_PARAMS = {
99+
const CONNECT_PARAMS: ConnectParams = {
96100
task: {
97101
id: "task-1",
98102
title: "Test task",
@@ -105,7 +109,7 @@ const CONNECT_PARAMS = {
105109
adapter: "claude",
106110
model: "claude-fable-5",
107111
reasoningLevel: "high",
108-
} as const;
112+
};
109113

110114
function assertRunConfigPersisted(setSession: ReturnType<typeof vi.fn>): void {
111115
// Exactly one error session should be stored — pinning this stops a future

0 commit comments

Comments
 (0)