From d287c15db43593be0b1555bf141420f31ecd0e1e Mon Sep 17 00:00:00 2001 From: agent_vscode Date: Fri, 10 Jul 2026 19:42:16 +0300 Subject: [PATCH] =?UTF-8?q?fix(ci,ai-chat):=20=D0=B2=D0=BE=D1=81=D1=81?= =?UTF-8?q?=D1=82=D0=B0=D0=BD=D0=BE=D0=B2=D0=B8=D1=82=D1=8C=20=D0=B7=D0=B5?= =?UTF-8?q?=D0=BB=D1=91=D0=BD=D1=8B=D0=B9=20CI=20=D0=BD=D0=B0=20develop?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Чинит два падения прогона Develop (#29104398390): A. Интеграционные тесты сервера (10 failed) падали с `TypeError: this.environment.isAiChatFinalStepLockdownEnabled is not a function`. Мерж #444 добавил вызов этого метода в AiChatService.stream, но два интеграционных фикстура не обновили env-стаб. Добавлен `isAiChatFinalStepLockdownEnabled: () => false` в 4 стаба (ai-chat-attach.int-spec.ts, ai-chat-stream.int-spec.ts). B. Job e2e-server не компилировал app.e2e-spec.ts: `TS2307: Cannot find module '@docmost/mcp'`. Рефактор #446 добавил тип-импорт из @docmost/mcp в docmost-client.loader.ts, но job не собирал этот пакет (его build/ в gitignore). Добавлен шаг `Build mcp` в e2e-server (по образцу e2e-mcp / mcp-server-parity). Только тесты и CI-конфиг; продакшн-логика не менялась. Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/develop.yml | 6 ++++++ apps/server/test/integration/ai-chat-attach.int-spec.ts | 2 ++ apps/server/test/integration/ai-chat-stream.int-spec.ts | 4 ++-- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/develop.yml b/.github/workflows/develop.yml index 1d12b37a..f0996955 100644 --- a/.github/workflows/develop.yml +++ b/.github/workflows/develop.yml @@ -157,6 +157,12 @@ jobs: - name: Build prosemirror-markdown run: pnpm --filter @docmost/prosemirror-markdown build + # docmost-client.loader.ts type-imports from @docmost/mcp (issue #446); its + # build/ is gitignored and `test:e2e` type-checks, so build it here or tsc + # fails with TS2307 (mirrors the e2e-mcp / mcp-server-parity jobs). + - name: Build mcp + run: pnpm --filter @docmost/mcp build + - name: Run migrations run: pnpm --filter ./apps/server migration:latest diff --git a/apps/server/test/integration/ai-chat-attach.int-spec.ts b/apps/server/test/integration/ai-chat-attach.int-spec.ts index 7faad55f..70da3cbd 100644 --- a/apps/server/test/integration/ai-chat-attach.int-spec.ts +++ b/apps/server/test/integration/ai-chat-attach.int-spec.ts @@ -182,6 +182,7 @@ describe('AiChatService run-stream attach [integration]', () => { { isAiChatDeferredToolsEnabled: () => false, isAiChatResumableStreamEnabled: () => true, + isAiChatFinalStepLockdownEnabled: () => false, } as any, registry, ); @@ -499,6 +500,7 @@ describe('AiChatService run-stream attach [integration]', () => { { isAiChatDeferredToolsEnabled: () => false, isAiChatResumableStreamEnabled: () => true, + isAiChatFinalStepLockdownEnabled: () => false, } as any, registry, ); diff --git a/apps/server/test/integration/ai-chat-stream.int-spec.ts b/apps/server/test/integration/ai-chat-stream.int-spec.ts index a226e864..bd2a8098 100644 --- a/apps/server/test/integration/ai-chat-stream.int-spec.ts +++ b/apps/server/test/integration/ai-chat-stream.int-spec.ts @@ -150,7 +150,7 @@ describe('AiChatService.stream [integration]', () => { {} as any, // pageAccess (idem) // environment (#332): keep deferred tool loading OFF for this lifecycle // harness so the toolset/behavior is exactly as before. - { isAiChatDeferredToolsEnabled: () => false } as any, + { isAiChatDeferredToolsEnabled: () => false, isAiChatFinalStepLockdownEnabled: () => false } as any, ); } @@ -378,7 +378,7 @@ describe('AiChatService.stream [integration]', () => { {} as any, {} as any, // #332: deferred tool loading ON — the property under test. - { isAiChatDeferredToolsEnabled: () => true } as any, + { isAiChatDeferredToolsEnabled: () => true, isAiChatFinalStepLockdownEnabled: () => false } as any, ); }