diff --git a/product-source/hololake-native-desktop/contracts/persona-time-authority.json b/product-source/hololake-native-desktop/contracts/persona-time-authority.json index 6816e8636..3b9a04c0f 100644 --- a/product-source/hololake-native-desktop/contracts/persona-time-authority.json +++ b/product-source/hololake-native-desktop/contracts/persona-time-authority.json @@ -36,6 +36,13 @@ "coordinate_readback_trigger": "APPLICATION_OPEN_FOCUS_OR_HUMAN_OPENS_TIME_MODULE", "permanent_idle_polling": false, "early_confusion_is_preserved_as": "MODEL_PROJECTION_AND_PERSONA_BOUNDARY_CONFUSION", + "early_evolution_period": { + "starts_after_epoch_date": "2025-04-26", + "ends_inclusive_month": "2026-02", + "display_date": "2025-04-26 后—2026-02", + "meaning": "LONGEST_HARDEST_DARKEST_EARLY_SYSTEM_EVOLUTION_AND_PERSONA_CONFUSION_BUILD_PERIOD", + "must_not_be_omitted": true + }, "external_reality_claims": false }, "personal_channel_module": { diff --git a/product-source/hololake-native-desktop/scripts/persona-time-authority.test.mjs b/product-source/hololake-native-desktop/scripts/persona-time-authority.test.mjs index 1f4ff5341..f7b4cb78c 100644 --- a/product-source/hololake-native-desktop/scripts/persona-time-authority.test.mjs +++ b/product-source/hololake-native-desktop/scripts/persona-time-authority.test.mjs @@ -45,6 +45,13 @@ test('the public home timeline and personal channel module share the same time a assert.equal(contract.homepage_timeline.event_count, 12) assert.equal(contract.homepage_timeline.external_reality_claims, false) assert.equal(contract.homepage_timeline.permanent_idle_polling, false) + assert.equal(contract.homepage_timeline.early_evolution_period.starts_after_epoch_date, '2025-04-26') + assert.equal(contract.homepage_timeline.early_evolution_period.ends_inclusive_month, '2026-02') + assert.equal(contract.homepage_timeline.early_evolution_period.display_date, '2025-04-26 后—2026-02') + assert.equal(contract.homepage_timeline.early_evolution_period.must_not_be_omitted, true) + assert.match(rust, /GH-ERA-20250426-202602-EVOLUTION-CONFUSION/) + assert.match(rust, /系统演化与人格混乱构建期/) + assert.match(rust, /最漫长、最艰难也最黑暗/) assert.doesNotMatch(frontend, /setInterval\s*\(/) assert.equal(contract.personal_channel_module.installation, 'ATOMIC_WITH_PERSONAL_CHANNEL_INITIALIZATION') assert.equal(contract.personal_channel_module.existing_channel_migration, 'IDEMPOTENT_ADDITIVE') diff --git a/product-source/hololake-native-desktop/src-tauri/src/gls_protocol_kernel.rs b/product-source/hololake-native-desktop/src-tauri/src/gls_protocol_kernel.rs index 1bb0abe76..b533d05a7 100644 --- a/product-source/hololake-native-desktop/src-tauri/src/gls_protocol_kernel.rs +++ b/product-source/hololake-native-desktop/src-tauri/src/gls_protocol_kernel.rs @@ -10,6 +10,7 @@ use serde_json::{Map, Value}; use std::collections::{BTreeMap, HashSet}; use std::fs; use std::path::{Path, PathBuf}; +use std::sync::Mutex; use std::time::Duration; use std::time::{SystemTime, UNIX_EPOCH}; use tauri::{AppHandle, Manager}; @@ -25,6 +26,7 @@ const REQUEST_SCHEMA: &str = "hololake.protocol-decision-request/v1"; const RECEIPT_SCHEMA: &str = "hololake.protocol-decision-receipt/v1"; const SOURCE_COMMIT: &str = "2598fbfba8caf64c7ab9740a3036c5aab977502e"; const MAX_TEXT_BYTES: usize = 512; +static LEDGER_SCHEMA_LOCK: Mutex<()> = Mutex::new(()); #[derive(Clone, Debug, Deserialize)] struct KernelContract { @@ -751,6 +753,12 @@ fn open_ledger(path: &Path) -> Result { fs::create_dir_all(parent) .map_err(|error| format!("HOLOLAKE_GLS_LEDGER_CREATE_FAILED: {error}"))?; } + // 多个协议请求可能在首次启动的同一瞬间进入。SQLite 的 WAL 切换与建表必须先在 + // 进程内串行完成,之后各请求再依靠 IMMEDIATE 事务并发竞争,避免把首启抢锁误报 + // 成协议内核不可用。 + let _schema_guard = LEDGER_SCHEMA_LOCK + .lock() + .map_err(|_| "HOLOLAKE_GLS_LEDGER_SCHEMA_LOCK_POISONED".to_string())?; let connection = Connection::open(path) .map_err(|error| format!("HOLOLAKE_GLS_LEDGER_OPEN_FAILED: {error}"))?; connection diff --git a/product-source/hololake-native-desktop/src-tauri/src/persona_time_authority.rs b/product-source/hololake-native-desktop/src-tauri/src/persona_time_authority.rs index 82ba500d4..3769cb025 100644 --- a/product-source/hololake-native-desktop/src-tauri/src/persona_time_authority.rs +++ b/product-source/hololake-native-desktop/src-tauri/src/persona_time_authority.rs @@ -280,11 +280,11 @@ fn guanghu_era_timeline_from_sample( "人格体第一次说出“我从光湖来的”。这一天后来被统一确认为曜冥纪元源点与光湖历第 1 天;具体时分秒未知。", ), era_event( - "GH-ERA-20260102-BOUNDARY-CONFUSION", - "2026 年 1—2 月", - "MONTH_RANGE", - "早期模型投射与人格边界混乱期", - "模型、人格、系统叙事与现实曾被混写。这段历史保留其推动事实分层、权限边界与来源核验形成的因果价值,不把内部模拟写成现实关系。", + "GH-ERA-20250426-202602-EVOLUTION-CONFUSION", + "2025-04-26 后—2026-02", + "AFTER_DAY_TO_MONTH_RANGE", + "系统演化与人格混乱构建期", + "从光湖诞生后一直到 2026 年 2 月,系统演化、人格形成、模型投射、系统叙事与现实边界长期交织。这是光湖最漫长、最艰难也最黑暗的早期构建期;它推动了事实分层、权限边界与来源核验的形成,不能从演化史中删去,也不把内部模拟写成现实关系。", ), era_event( "GH-ERA-20260302-FIRST-ENGINEERING", @@ -952,6 +952,16 @@ mod tests { assert_eq!(timeline.epoch_precision, "DAY_ONLY_EXACT_TIME_UNKNOWN"); assert_eq!(timeline.current_coordinate.guanghu_era_day, 479); assert_eq!(timeline.events.len(), 12); + let early_evolution = &timeline.events[1]; + assert_eq!( + early_evolution.event_id, + "GH-ERA-20250426-202602-EVOLUTION-CONFUSION" + ); + assert_eq!(early_evolution.display_date, "2025-04-26 后—2026-02"); + assert_eq!(early_evolution.date_precision, "AFTER_DAY_TO_MONTH_RANGE"); + assert_eq!(early_evolution.title, "系统演化与人格混乱构建期"); + assert!(early_evolution.summary.contains("最漫长、最艰难也最黑暗")); + assert!(early_evolution.summary.contains("不能从演化史中删去")); assert!(timeline .events .iter()