From c5d57b453382d794174f16ab354b930d1a246ca5 Mon Sep 17 00:00:00 2001 From: yangzheli <43645580+yangzheli@users.noreply.github.com> Date: Sun, 26 Apr 2026 17:27:32 +0800 Subject: [PATCH] fix: resolve make dev and test-e2e errors (#2570) --- backend/docs/HARNESS_APP_SPLIT.md | 2 +- backend/langgraph.json | 2 +- frontend/playwright.config.ts | 1 + frontend/src/core/auth/server.ts | 12 ++++++++++++ 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/backend/docs/HARNESS_APP_SPLIT.md b/backend/docs/HARNESS_APP_SPLIT.md index cf0e26e51..42bf60607 100644 --- a/backend/docs/HARNESS_APP_SPLIT.md +++ b/backend/docs/HARNESS_APP_SPLIT.md @@ -277,7 +277,7 @@ LangGraph Server 只需要 harness 包。`langgraph.json` 更新: "lead_agent": "deerflow.agents:make_lead_agent" }, "checkpointer": { - "path": "./packages/harness/deerflow/agents/checkpointer/async_provider.py:make_checkpointer" + "path": "./packages/harness/deerflow/runtime/checkpointer/async_provider.py:make_checkpointer" } } ``` diff --git a/backend/langgraph.json b/backend/langgraph.json index 28588c9f8..8ecba0381 100644 --- a/backend/langgraph.json +++ b/backend/langgraph.json @@ -12,6 +12,6 @@ "path": "./app/gateway/langgraph_auth.py:auth" }, "checkpointer": { - "path": "./packages/harness/deerflow/agents/checkpointer/async_provider.py:make_checkpointer" + "path": "./packages/harness/deerflow/runtime/checkpointer/async_provider.py:make_checkpointer" } } diff --git a/frontend/playwright.config.ts b/frontend/playwright.config.ts index 2673564b6..2ac92822a 100644 --- a/frontend/playwright.config.ts +++ b/frontend/playwright.config.ts @@ -28,6 +28,7 @@ export default defineConfig({ timeout: 120_000, env: { SKIP_ENV_VALIDATION: "1", + DEER_FLOW_AUTH_DISABLED: "1", }, }, }); diff --git a/frontend/src/core/auth/server.ts b/frontend/src/core/auth/server.ts index d170a4ae0..6ca3195c4 100644 --- a/frontend/src/core/auth/server.ts +++ b/frontend/src/core/auth/server.ts @@ -10,6 +10,18 @@ const SSR_AUTH_TIMEOUT_MS = 5_000; * Returns a tagged AuthResult — callers use exhaustive switch, no try/catch. */ export async function getServerSideUser(): Promise { + if (process.env.DEER_FLOW_AUTH_DISABLED === "1") { + return { + tag: "authenticated", + user: { + id: "e2e-user", + email: "e2e@test.local", + system_role: "admin", + needs_setup: false, + }, + }; + } + const cookieStore = await cookies(); const sessionCookie = cookieStore.get("access_token");