fix: exclude index.js router aggregator from HLI contract check

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>
This commit is contained in:
copilot-swe-agent[bot] 2026-03-10 08:16:33 +00:00
parent 00d87f0d37
commit e50a79aeaa
2 changed files with 4 additions and 14 deletions

View File

@ -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"
}

View File

@ -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');