From e50a79aeaa9c6c5de6b50a56dbd32a6c52e38d93 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 10 Mar 2026 08:16:33 +0000 Subject: [PATCH] fix: exclude index.js router aggregator from HLI contract check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The contract-check.js script was requiring schema files for index.js files in route directories, but index.js files are router aggregators (not HLI endpoints) and should not have schemas. This caused the deploy-to-server.yml CD pipeline to fail, preventing persona-studio backend from being deployed. As a result, users could not login or access the interactive chat interface. Error: ❌ [MISSING] index.js → 缺少 src/schemas/hli/auth/index.schema.json Co-authored-by: qinfendebingshuo <207279273+qinfendebingshuo@users.noreply.github.com> --- persona-studio/brain/memory/EXP-001/memory.json | 14 ++------------ scripts/contract-check.js | 4 ++-- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/persona-studio/brain/memory/EXP-001/memory.json b/persona-studio/brain/memory/EXP-001/memory.json index 832ae27a..9aaa01b7 100644 --- a/persona-studio/brain/memory/EXP-001/memory.json +++ b/persona-studio/brain/memory/EXP-001/memory.json @@ -10,19 +10,9 @@ "role": "assistant", "content": "你好!我是知秋。告诉我你想做什么,我们一起聊聊方案 😊", "timestamp": "2026-03-10T07:11:22.598Z" - }, - { - "role": "user", - "content": "你好", - "timestamp": "2026-03-10T08:13:42.507Z" - }, - { - "role": "assistant", - "content": "你好!我是知秋。告诉我你想做什么,我们一起聊聊方案 😊", - "timestamp": "2026-03-10T08:13:42.507Z" } ], - "last_topic": "你好", + "last_topic": "你好,我想做一个登录页面", "preferences": {}, - "updated_at": "2026-03-10T08:13:42.507Z" + "updated_at": "2026-03-10T07:11:22.598Z" } \ No newline at end of file diff --git a/scripts/contract-check.js b/scripts/contract-check.js index f43be1b6..73129bfe 100644 --- a/scripts/contract-check.js +++ b/scripts/contract-check.js @@ -15,8 +15,8 @@ domains.forEach(domain => { const routeDir = path.join(ROUTE_DIR, domain); const schemaDir = path.join(SCHEMA_DIR, domain); - // 扫描路由文件 - const routeFiles = fs.readdirSync(routeDir).filter(f => f.endsWith('.js')); + // 扫描路由文件(排除 index.js 路由聚合文件) + const routeFiles = fs.readdirSync(routeDir).filter(f => f.endsWith('.js') && f !== 'index.js'); routeFiles.forEach(routeFile => { const name = path.basename(routeFile, '.js');