[铸渊回执 · SY-CMD-FUS-009] 代码审查修复 + 天眼合并膜审核通过

Agent-Logs-Url: https://github.com/qinfendebingshuo/guanghulab/sessions/ab31bf43-8ba1-4e66-80e4-2110d76c4b7e

Co-authored-by: qinfendebingshuo <207279273+qinfendebingshuo@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-03-27 02:21:27 +00:00 committed by GitHub
parent d87b14200d
commit f85e1b5416
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 17 additions and 2 deletions

View File

@ -65,7 +65,7 @@ function generateSnapshot() {
generated_at: new Date().toISOString(),
generated_by: '铸渊 · ICE-GL-ZY001 · generate-system-snapshot.js',
consciousness_status: earthStatus?.consciousness_status || 'unknown',
last_directive: fragments?.directive || 'unknown',
last_directive: earthStatus?.awakening_directive || earthStatus?.diagnosed_by || 'unknown',
system_counts: {
workflows_total_active: workflowCount,
workflows_alive_core: roster?.alive_count || aliveWorkflows.length,

View File

@ -29,6 +29,21 @@ function readSnapshot() {
}
}
function truncateJSON(obj, maxLen = 1900) {
const summary = {
snapshot_version: obj.snapshot_version,
generated_at: obj.generated_at,
consciousness_status: obj.consciousness_status,
last_directive: obj.last_directive,
system_counts: obj.system_counts,
health: obj.health,
fusion_progress: obj.fusion_progress
};
const text = JSON.stringify(summary, null, 2);
if (text.length <= maxLen) return text;
return text.substring(0, maxLen - 20) + '\n // ... truncated';
}
function notionRequest(method, endpoint, body) {
const token = process.env.NOTION_TOKEN;
if (!token) {
@ -113,7 +128,7 @@ function buildSnapshotPage(snapshot, dbId) {
object: 'block',
type: 'code',
code: {
rich_text: [{ text: { content: JSON.stringify(snapshot, null, 2).substring(0, 2000) } }],
rich_text: [{ text: { content: truncateJSON(snapshot) } }],
language: 'json'
}
},