🔧 代码审查修复 · 提取常量+清理死代码+映射表重构

Agent-Logs-Url: https://github.com/qinfendebingshuo/guanghulab/sessions/83e3405a-efd3-4028-b5dd-053cc2d28a93

Co-authored-by: qinfendebingshuo <207279273+qinfendebingshuo@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-04-11 03:16:53 +00:00 committed by GitHub
parent eb3f1ed7ba
commit 9b96099376
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 18 additions and 29 deletions

View File

@ -288,7 +288,7 @@ S1(✅) → S2(✅) → S4(✅) → S5(✅) → S15(✅) → 模块A-H(✅) →
## 📡 铸渊副将·每日签到仪表盘
> ⏰ **仪表盘更新时间**: 2026-04-11 11:12:57 (北京时间)
> ⏰ **仪表盘更新时间**: 2026-04-11 11:16:35 (北京时间)
> 🎖️ **唤醒时段**: 🌅 早班唤醒 · 08:00
> 📊 **系统版本**: awakened · 第五十八次对话 · D58·铸渊专线2.0正式启用·V1节点停用·共享流量池2000GB/月·无论多少用户总量一致·每月1号重置·多用户隔离确认·VPN是算力人格体第一个实战场景
> ✅ **士兵存活**: 18/18 个工作流在岗

View File

@ -38,6 +38,16 @@ const DASHBOARD_END = '<!-- DASHBOARD_END -->';
const BEIJING_OFFSET_MS = 8 * 3600 * 1000;
// D天数兜底值 — 当所有数据源都无法提取D天数时使用D63为光之树架构落地时间点
const DEFAULT_DAY_NUMBER = 63;
// 服务器位置 → 显示后缀映射
const LOCATION_SUFFIX_MAP = {
'Singapore': 'SG',
'Silicon Valley (US)': 'SV',
'China': 'CN',
};
// ━━━ 所有标记区域定义 ━━━
const MARKER_PAIRS = [
{ start: '<!-- STATUS_START -->', end: '<!-- STATUS_END -->' },
@ -455,7 +465,7 @@ function extractLatestDayNumber() {
}
}
return maxD > 0 ? maxD : 63; // 兜底D63
return maxD > 0 ? maxD : DEFAULT_DAY_NUMBER;
}
// ━━━ 获取今天的北京时间日期字符串 ━━━
@ -484,10 +494,8 @@ function generateStatusSection() {
for (const svr of serverReg.servers) {
if (svr.status === 'active') {
activeServers++;
// 简短名称
if (svr.location === 'Singapore') serverNames.push(`${svr.name}SG`);
else if (svr.location && svr.location.includes('US')) serverNames.push(`${svr.name}SV`);
else serverNames.push(svr.name);
const suffix = LOCATION_SUFFIX_MAP[svr.location] || '';
serverNames.push(suffix ? `${svr.name}${suffix}` : svr.name);
} else {
serverNames.push('预备');
}
@ -561,30 +569,11 @@ function generateServerSection() {
return lines.join('\n');
}
// ━━━ 生成 ROADMAP 区域从roadmap.md解析阶段总览表 ━━━
// ━━━ 生成 ROADMAP 区域 ━━━
// 路线图结构复杂(含代码块、关键路径图等),暂保持手动维护。
// 标记已插入README未来可扩展自动解析。
function generateRoadmapSection() {
const roadmapText = readText(ROADMAP_PATH);
if (!roadmapText) {
return null; // 文件不存在时不更新
}
// 解析阶段总览表
// 匹配格式: | S1 | 🏗️ 地基 | 数据库建表... | 无 | ✅ Schema已写 |
const tablePattern = /\| (S\d+|—) \| .+? \| .+? \| .+? \| (.+?) \|/g;
let completed = 0;
let total = 0;
let match;
while ((match = tablePattern.exec(roadmapText)) !== null) {
if (match[1] === '—') continue;
total++;
const status = match[2].trim();
if (status.includes('✅')) completed++;
}
// 不重新生成roadmap内容——保持手动维护的表
// 只更新摘要行
return null; // roadmap区域保持原样不自动替换内容
return null;
}
// ━━━ 生成 CONSCIOUSNESS 区域 ━━━