refactor: 提取 workflow 文件名常量,移除 root_cause_summary 截断
Co-authored-by: qinfendebingshuo <207279273+qinfendebingshuo@users.noreply.github.com>
This commit is contained in:
parent
5feb1bc94b
commit
b395dac2c8
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"version": "1.0",
|
||||
"description": "冰朔主控问题索引库 — 记录已知问题、根因与排查路由",
|
||||
"updated_at": "2026-03-10T10:09:40.966Z",
|
||||
"updated_at": "2026-03-10T10:11:06.561Z",
|
||||
"issues": [
|
||||
{
|
||||
"id": "BS-001",
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# 冰朔主控神经系统 · 核心主控大脑 v1.0
|
||||
|
||||
> 本文件为冰朔主控神经系统的总控脑文件。
|
||||
> 最后编译时间:2026-03-10T10:09:40.966Z
|
||||
> 最后编译时间:2026-03-10T10:11:06.562Z
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -85,7 +85,7 @@
|
|||
|
||||
> 本区块由 master-brain-compiler 自动编译。
|
||||
|
||||
- **编译时间**:2026-03-10T10:09:40.966Z
|
||||
- **编译时间**:2026-03-10T10:11:06.562Z
|
||||
- **脑文件规则版本**:v1.0
|
||||
- **脑文件完整性**:✅ 完整
|
||||
|
||||
|
|
@ -97,7 +97,7 @@
|
|||
|----|------|------|------|----------|
|
||||
| BS-001 | HLI 接口覆盖率仅 17.6%(3/17) | backend | in_progress | HLI 接口覆盖率 17.6%(3/17) |
|
||||
| BS-002 | collaborators.json 中 GitHub 用户名为空 | collaboration | open | 开发者注册时未填写 GitHub 用户名,导致无法精确关联提交与开发者 |
|
||||
| BS-003 | persona-studio 与主仓库脑文件同步待验证 | cross_repo | open | 主仓库 .github/brain/ 与 persona-studio/brai |
|
||||
| BS-003 | persona-studio 与主仓库脑文件同步待验证 | cross_repo | open | 主仓库 .github/brain/ 与 persona-studio/brain/ 存在独立脑文件,同步机制尚未经过完整端到端验证 |
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"version": "1.0",
|
||||
"description": "冰朔主控系统健康状态",
|
||||
"updated_at": "2026-03-10T10:09:40.966Z",
|
||||
"updated_at": "2026-03-10T10:11:06.561Z",
|
||||
"health": {
|
||||
"brain_consistency": {
|
||||
"status": "yellow",
|
||||
|
|
|
|||
|
|
@ -22,6 +22,20 @@ const path = require('path');
|
|||
const ROOT = path.resolve(__dirname, '..');
|
||||
const BRAIN_DIR = path.join(ROOT, '.github', 'brain');
|
||||
|
||||
// ─── 常量定义 ───────────────────────────────────────────────
|
||||
const DEPLOY_WORKFLOWS = {
|
||||
server: 'deploy-to-server.yml',
|
||||
pages: 'deploy-pages.yml',
|
||||
};
|
||||
const NOTION_WORKFLOWS = [
|
||||
'notion-poll.yml',
|
||||
'bridge-changes-to-notion.yml',
|
||||
];
|
||||
const BRAIN_SYNC_WORKFLOWS = [
|
||||
'brain-sync.yml',
|
||||
'sync-persona-studio.yml',
|
||||
];
|
||||
|
||||
// ─── 工具函数 ───────────────────────────────────────────────
|
||||
function readJSON(filepath) {
|
||||
try {
|
||||
|
|
@ -97,8 +111,8 @@ function runRuntimeChainAgent() {
|
|||
chains.ps_backend = fileExists(path.join(ROOT, 'persona-studio', 'backend'));
|
||||
|
||||
// 检查部署 workflow
|
||||
chains.deploy_server = fileExists(path.join(ROOT, '.github', 'workflows', 'deploy-to-server.yml'));
|
||||
chains.deploy_pages = fileExists(path.join(ROOT, '.github', 'workflows', 'deploy-pages.yml'));
|
||||
chains.deploy_server = fileExists(path.join(ROOT, '.github', 'workflows', DEPLOY_WORKFLOWS.server));
|
||||
chains.deploy_pages = fileExists(path.join(ROOT, '.github', 'workflows', DEPLOY_WORKFLOWS.pages));
|
||||
|
||||
return chains;
|
||||
}
|
||||
|
|
@ -248,11 +262,7 @@ function runSystemHealthAgent(brainCheck, runtimeChains) {
|
|||
};
|
||||
|
||||
// Notion 桥接
|
||||
const notionWorkflows = [
|
||||
'notion-poll.yml',
|
||||
'bridge-changes-to-notion.yml',
|
||||
];
|
||||
const notionOk = notionWorkflows.every(f =>
|
||||
const notionOk = NOTION_WORKFLOWS.every(f =>
|
||||
fileExists(path.join(ROOT, '.github', 'workflows', f))
|
||||
);
|
||||
health.notion_bridge_health = {
|
||||
|
|
@ -313,7 +323,7 @@ function compileMasterBrain(structureMap, runtimeChains, brainCheck, issues, hea
|
|||
|
||||
// 生成已知问题表
|
||||
const issueRows = issues.map(i =>
|
||||
`| ${i.id} | ${i.title} | ${i.scope} | ${i.status} | ${i.root_cause_summary.slice(0, 40)} |`
|
||||
`| ${i.id} | ${i.title} | ${i.scope} | ${i.status} | ${i.root_cause_summary} |`
|
||||
).join('\n');
|
||||
|
||||
// 生成健康状态表
|
||||
|
|
|
|||
Loading…
Reference in New Issue