Skip to content

Commit 58c889d

Browse files
author
u5a-2359
committed
test(webview): carry perWriteCheckpoints in the postMessageToWebview state fixture
pnpm check-types fails on src in this tree: core/webview/__tests__/ClineProvider.spec.ts(3159,9): error TS2322: Type '{ version: string; clineMessages: never[]; ... }' is not assignable to type 'ExtensionState'. Property 'perWriteCheckpoints' is missing ... but required in type '{ lockApiConfigAcrossModes?: boolean | undefined; version: string; ... }' That is the command .husky/pre-push line 19 runs, and the command the compile context runs (code-qa.yml line 112, run: pnpm check-types). Attribution with the parents named: the required declaration is branch-side - e406c09 packages/types/src/vscode-extension-host.ts line 373 declares perWriteCheckpoints: boolean, while that blob at base e487cd7 and at main tip 18861b2 declares it nowhere, and main added zero lines to that path between those tips. The fixture at line 3159 is byte-identical in the base blob, the branch blob and this merge, so the branch carried the defect into the merge rather than main introducing it. CI reads compile success at e406c09; both readings are recorded here instead of one being chosen. Fix: the fixture is a fully specified ExtensionState literal, so it carries the field the branch made required; true matches the branch's own documented default when unset. No production line changed and no assertion changed. Measured in this worktree (wt-r234-1404, node v22.23.4): eslint over the edited file exits 0 with --max-warnings=0 --no-warn-ignored; src/eslint-suppressions.json is left untouched because the run deliberately omits --prune-suppressions so this unit does not rewrite that file; pnpm run check-types reports 12 successful over 12 tasks.
1 parent 9fcb38a commit 58c889d

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎src/core/webview/__tests__/ClineProvider.spec.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3182,6 +3182,9 @@ describe("ClineProvider", () => {
31823182
soundEnabled: false,
31833183
ttsEnabled: false,
31843184
enableCheckpoints: false,
3185+
// The branch makes perWriteCheckpoints required in ExtensionState, and this
3186+
// fixture is a fully specified state, so it has to carry the field.
3187+
perWriteCheckpoints: true,
31853188
writeDelayMs: 1000,
31863189
mcpEnabled: true,
31873190
mode: defaultModeSlug,

0 commit comments

Comments
 (0)