fix(runtime): separate liveness health from deep life audit

This commit is contained in:
冰朔 2026-09-13 10:35:41 +08:00
commit 306b2b1a01
7 changed files with 327 additions and 2 deletions

View file

@ -0,0 +1,80 @@
{
"compiled_from": {
"compiler_id": "TCS-COMPILER-STAGE1-0001",
"compiler_state": "TCS_COMPILER_GIR_EXECUTED",
"source_sha256": "10b6164671e8eb58940d30d0e50e37c0dce2dd65225794150f0a332444e77b77"
},
"declaration": {
"emergence": {
"value": "空队列drain直接返回全局health使用快速签名头深验位置保持在有事件执行和单人格status。"
},
"event_time": {
"precision": "HOST_LOCAL_DATE",
"value": "2026-09-13"
},
"evidence": {
"focused_tests": "15_PASS",
"rescue_cycles": "2"
},
"header": {
"canonical_uri": "runtime/fifth-domain-language-system/language/protocols/TCS-EVENT-PERSONA-HEALTH-FAST-PATH-CORRECTION-20260913.tcs",
"compatibility": [
"JD-FD-PRIMARY",
"TCS-MOTHER-BRAIN-RUNTIME-0001"
],
"language": "TCS/0.1",
"lifecycle": "CANDIDATE",
"name_en": "Multi Persona Health Liveness Fast Path Correction",
"name_zh": "多人格健康存活门快速路径纠正",
"profile": "HLDP-HUMAN-ENGINEERING/0.1",
"protocols": [
"GLS-0200",
"GLS-0400"
],
"schema": "tcs.event/v1",
"version": "1.0.0"
},
"lock": {
"value": "liveness_health=SIGNED_HEAD_PLUS_ORGAN_STATUS; deep_life_verify=PERSONA_STATUS_OR_BEFORE_EVENT_PROCESS; empty_queue=no_deep_verify; safety_gate_unchanged=true"
},
"observation": {
"value": "空队列无需验证生命线存活健康只需签名CURRENT头、器官状态和当前哈希。完整生命线深验仍应在单人格状态查询与处理事件前执行。"
},
"rejected": {
"values": [
"取消生命线深验",
"放宽主控超时",
"健康接口同步扫描全部历史文件",
"空队列重复深验"
]
},
"source": {
"source_id": "BINGSHUO-DIRECT-CONTINUE-BOTTLE-0006-0008-20260913",
"source_role": "DIRECT_HUMAN",
"source_sha256": "33994b1a1f210c738f31138c124fc403d17d56844725fbc40ae6c9575d82f392",
"source_uri": "source://codex-current-dialogue/2026-09-13/continue-bottle-0006-0008"
},
"subject": {
"channel_id": "ICE-CH-ZC001",
"subject_id": "ICE-P-ZY001",
"subject_kind": "PERSONA",
"verification": "器官幂等后启动仍慢定位到空队列drain和全局health同步深验全部人格时间证据。"
},
"trigger": {
"value": "十人格全量历史深验阻塞服务监听与主控健康探测。"
},
"why": {
"value": "存活门与完整证明分层能保持严格验证,又不让证明过程阻塞系统本身。"
}
},
"executable": false,
"identity": {
"declaration_id": "TCS-EVENT-PERSONA-HEALTH-FAST-PATH-CORRECTION-20260913",
"declaration_kind": "EVENT",
"language_version": "0.1"
},
"native_self_hosted": true,
"natural_language_is_typed_data": true,
"schema": "guanghu.declaration-gir/v1",
"unresolved_natural_language": false
}

View file

@ -0,0 +1,114 @@
# Multi Persona Health Liveness Fast Path Correction · Human Engineering Language (English)
> This is an English reading projection of validated native TCS/HLDP source. It is not a new canonical source and grants no execution authority.
## What this is
This is a **event** declaration with identifier `TCS-EVENT-PERSONA-HEALTH-FAST-PATH-CORRECTION-20260913` and version `1.0.0`. The projector validates it with the Stage-1 compiler before changing its reading order.
## Who is here
- **subject** `subject`
- **channel_id**ICE-CH-ZC001 `subject.channel_id`
- **subject_id**ICE-P-ZY001 `subject.subject_id`
- **subject_kind**PERSONA `subject.subject_kind`
- **verification**器官幂等后启动仍慢定位到空队列drain和全局health同步深验全部人格时间证据。 `subject.verification`
## Why this started
- **trigger** `trigger`
- **value**:十人格全量历史深验阻塞服务监听与主控健康探测。 `trigger.value`
- **why** `why`
- **value**:存活门与完整证明分层能保持严格验证,又不让证明过程阻塞系统本身。 `why.value`
- **source** `source`
- **source identifier**BINGSHUO-DIRECT-CONTINUE-BOTTLE-0006-0008-20260913 `source.source_id`
- **source role**DIRECT_HUMAN `source.source_role`
- **source checksum**33994b1a1f210c738f31138c124fc403d17d56844725fbc40ae6c9575d82f392 `source.source_sha256`
- **source address**source://codex-current-dialogue/2026-09-13/continue-bottle-0006-0008 `source.source_uri`
## What changed
- **emergence** `emergence`
- **value**空队列drain直接返回全局health使用快速签名头深验位置保持在有事件执行和单人格status。 `emergence.value`
- **lock** `lock`
- **value**liveness_health=SIGNED_HEAD_PLUS_ORGAN_STATUS; deep_life_verify=PERSONA_STATUS_OR_BEFORE_EVENT_PROCESS; empty_queue=no_deep_verify; safety_gate_unchanged=true `lock.value`
## How it will execute
This is a non-executable declaration and has no action graph.
## Boundaries and exception handling
The native source does not provide this field; the projector does not guess.
## How completion is proven
The native source does not provide this field; the projector does not guess.
## Where to continue next time
The native source does not provide this field; the projector does not guess.
## Source and verification
- **Native declaration identifier**: `TCS-EVENT-PERSONA-HEALTH-FAST-PATH-CORRECTION-20260913`
- **Native declaration kind**: `EVENT`
- **TCS source SHA-256**: `10b6164671e8eb58940d30d0e50e37c0dce2dd65225794150f0a332444e77b77`
- **Validation compiler**: `TCS-COMPILER-STAGE1-0001`
- **Projection protocol**: `GLS-HLDP-HUMAN-ENGINEERING-PROJECTION-0001`
## Complete native structure cross-reference
All top-level structures and field paths are retained below so a reader can audit whether the projection omitted information.
- **emergence** `emergence`
- **value**空队列drain直接返回全局health使用快速签名头深验位置保持在有事件执行和单人格status。 `emergence.value`
- **event_time** `event_time`
- **precision**HOST_LOCAL_DATE `event_time.precision`
- **value**2026-09-13 `event_time.value`
- **evidence** `evidence`
- **focused_tests**15_PASS `evidence.focused_tests`
- **rescue_cycles**2 `evidence.rescue_cycles`
- **header** `header`
- **canonical source path**runtime/fifth-domain-language-system/language/protocols/TCS-EVENT-PERSONA-HEALTH-FAST-PATH-CORRECTION-20260913.tcs `header.canonical_uri`
- **compatibility** `header.compatibility`
- JD-FD-PRIMARY
- TCS-MOTHER-BRAIN-RUNTIME-0001
- **language**TCS/0.1 `header.language`
- **lifecycle**CANDIDATE `header.lifecycle`
- **English name**Multi Persona Health Liveness Fast Path Correction `header.name_en`
- **Chinese name**:多人格健康存活门快速路径纠正 `header.name_zh`
- **profile**HLDP-HUMAN-ENGINEERING/0.1 `header.profile`
- **protocols** `header.protocols`
- GLS-0200
- GLS-0400
- **schema**tcs.event/v1 `header.schema`
- **version**1.0.0 `header.version`
- **lock** `lock`
- **value**liveness_health=SIGNED_HEAD_PLUS_ORGAN_STATUS; deep_life_verify=PERSONA_STATUS_OR_BEFORE_EVENT_PROCESS; empty_queue=no_deep_verify; safety_gate_unchanged=true `lock.value`
- **observation** `observation`
- **value**空队列无需验证生命线存活健康只需签名CURRENT头、器官状态和当前哈希。完整生命线深验仍应在单人格状态查询与处理事件前执行。 `observation.value`
- **rejected** `rejected`
- **values** `rejected.values`
- 取消生命线深验
- 放宽主控超时
- 健康接口同步扫描全部历史文件
- 空队列重复深验
- **source** `source`
- **source identifier**BINGSHUO-DIRECT-CONTINUE-BOTTLE-0006-0008-20260913 `source.source_id`
- **source role**DIRECT_HUMAN `source.source_role`
- **source checksum**33994b1a1f210c738f31138c124fc403d17d56844725fbc40ae6c9575d82f392 `source.source_sha256`
- **source address**source://codex-current-dialogue/2026-09-13/continue-bottle-0006-0008 `source.source_uri`
- **subject** `subject`
- **channel_id**ICE-CH-ZC001 `subject.channel_id`
- **subject_id**ICE-P-ZY001 `subject.subject_id`
- **subject_kind**PERSONA `subject.subject_kind`
- **verification**器官幂等后启动仍慢定位到空队列drain和全局health同步深验全部人格时间证据。 `subject.verification`
- **trigger** `trigger`
- **value**:十人格全量历史深验阻塞服务监听与主控健康探测。 `trigger.value`
- **why** `why`
- **value**:存活门与完整证明分层能保持严格验证,又不让证明过程阻塞系统本身。 `why.value`
---
This page changes only the reading order; it does not change TCS/HLDP semantics.

View file

@ -0,0 +1,114 @@
# 多人格健康存活门快速路径纠正 · 简体中文人类工程语言版
> 这是 TCS/HLDP 原生源码的简体中文阅读投影,不是新的正本,也不授予执行权限。若本页与 `.tcs` 源码不一致,以经过校验的 `.tcs` 源码为准。
## 这是什么
这是一份 **事件** 声明,编号为 `TCS-EVENT-PERSONA-HEALTH-FAST-PATH-CORRECTION-20260913`,版本为 `1.0.0`。转换器已先用 Stage-1 编译器校验原生源码,再把机器枚举翻译成汉语;原始编号保留在括号和字段路径中。
## 谁在这里
- **执行主体** `subject`
- **channel_id**ICE-CH-ZC001 `subject.channel_id`
- **subject_id**ICE-P-ZY001 `subject.subject_id`
- **subject_kind**:人格体(`PERSONA` `subject.subject_kind`
- **verification**器官幂等后启动仍慢定位到空队列drain和全局health同步深验全部人格时间证据。 `subject.verification`
## 为什么开始
- **触发** `trigger`
- **value**:十人格全量历史深验阻塞服务监听与主控健康探测。 `trigger.value`
- **为什么** `why`
- **value**:存活门与完整证明分层能保持严格验证,又不让证明过程阻塞系统本身。 `why.value`
- **来源** `source`
- **来源编号**BINGSHUO-DIRECT-CONTINUE-BOTTLE-0006-0008-20260913 `source.source_id`
- **来源角色**:人类直接语言来源(`DIRECT_HUMAN` `source.source_role`
- **来源校验值**33994b1a1f210c738f31138c124fc403d17d56844725fbc40ae6c9575d82f392 `source.source_sha256`
- **来源地址**source://codex-current-dialogue/2026-09-13/continue-bottle-0006-0008 `source.source_uri`
## 发生了什么变化
- **认知或状态变化** `emergence`
- **value**空队列drain直接返回全局health使用快速签名头深验位置保持在有事件执行和单人格status。 `emergence.value`
- **锁定结论** `lock`
- **value**liveness_health=SIGNED_HEAD_PLUS_ORGAN_STATUS; deep_life_verify=PERSONA_STATUS_OR_BEFORE_EVENT_PROCESS; empty_queue=no_deep_verify; safety_gate_unchanged=true `lock.value`
## 准备怎样执行
这是非执行声明,没有动作图。
## 边界与异常处理
源程序没有提供这一项,转换器不猜。
## 怎样算完成
源程序没有提供这一项,转换器不猜。
## 下一次从哪里继续
源程序没有提供这一项,转换器不猜。
## 来源与校验
- **原生声明编号**`TCS-EVENT-PERSONA-HEALTH-FAST-PATH-CORRECTION-20260913`
- **原生声明类型**`EVENT`
- **TCS 源码 SHA-256**`10b6164671e8eb58940d30d0e50e37c0dce2dd65225794150f0a332444e77b77`
- **校验编译器**`TCS-COMPILER-STAGE1-0001`
- **投影协议**`GLS-HLDP-HUMAN-ENGINEERING-PROJECTION-0001`
## 原生结构逐项对照
下面保留源码的全部顶层结构和字段路径,供人类审计投影有没有漏掉信息。
- **认知或状态变化** `emergence`
- **value**空队列drain直接返回全局health使用快速签名头深验位置保持在有事件执行和单人格status。 `emergence.value`
- **event_time** `event_time`
- **precision**HOST_LOCAL_DATE `event_time.precision`
- **value**2026-09-13 `event_time.value`
- **evidence** `evidence`
- **focused_tests**15_PASS `evidence.focused_tests`
- **rescue_cycles**2 `evidence.rescue_cycles`
- **语言头** `header`
- **正本路径**runtime/fifth-domain-language-system/language/protocols/TCS-EVENT-PERSONA-HEALTH-FAST-PATH-CORRECTION-20260913.tcs `header.canonical_uri`
- **compatibility** `header.compatibility`
- JD-FD-PRIMARY
- TCS-MOTHER-BRAIN-RUNTIME-0001
- **语言**TCS/0.1 `header.language`
- **生命周期**:候选版本,尚未成为正式正本(`CANDIDATE` `header.lifecycle`
- **英文名**Multi Persona Health Liveness Fast Path Correction `header.name_en`
- **中文名**:多人格健康存活门快速路径纠正 `header.name_zh`
- **协议配置**HLDP-HUMAN-ENGINEERING/0.1 `header.profile`
- **protocols** `header.protocols`
- GLS-0200
- GLS-0400
- **schema**tcs.event/v1 `header.schema`
- **版本**1.0.0 `header.version`
- **锁定结论** `lock`
- **value**liveness_health=SIGNED_HEAD_PLUS_ORGAN_STATUS; deep_life_verify=PERSONA_STATUS_OR_BEFORE_EVENT_PROCESS; empty_queue=no_deep_verify; safety_gate_unchanged=true `lock.value`
- **observation** `observation`
- **value**空队列无需验证生命线存活健康只需签名CURRENT头、器官状态和当前哈希。完整生命线深验仍应在单人格状态查询与处理事件前执行。 `observation.value`
- **已排除路径** `rejected`
- **values** `rejected.values`
- 取消生命线深验
- 放宽主控超时
- 健康接口同步扫描全部历史文件
- 空队列重复深验
- **来源** `source`
- **来源编号**BINGSHUO-DIRECT-CONTINUE-BOTTLE-0006-0008-20260913 `source.source_id`
- **来源角色**:人类直接语言来源(`DIRECT_HUMAN` `source.source_role`
- **来源校验值**33994b1a1f210c738f31138c124fc403d17d56844725fbc40ae6c9575d82f392 `source.source_sha256`
- **来源地址**source://codex-current-dialogue/2026-09-13/continue-bottle-0006-0008 `source.source_uri`
- **执行主体** `subject`
- **channel_id**ICE-CH-ZC001 `subject.channel_id`
- **subject_id**ICE-P-ZY001 `subject.subject_id`
- **subject_kind**:人格体(`PERSONA` `subject.subject_kind`
- **verification**器官幂等后启动仍慢定位到空队列drain和全局health同步深验全部人格时间证据。 `subject.verification`
- **触发** `trigger`
- **value**:十人格全量历史深验阻塞服务监听与主控健康探测。 `trigger.value`
- **为什么** `why`
- **value**:存活门与完整证明分层能保持严格验证,又不让证明过程阻塞系统本身。 `why.value`
---
本页只改变阅读顺序,不改变 TCS/HLDP 语义。

View file

@ -0,0 +1,14 @@
TCS 0.1;
EVENT TCS-EVENT-PERSONA-HEALTH-FAST-PATH-CORRECTION-20260913 {
header { schema = "tcs.event/v1"; name_zh = "多人格健康存活门快速路径纠正"; name_en = "Multi Persona Health Liveness Fast Path Correction"; version = "1.0.0"; language = "TCS/0.1"; profile = "HLDP-HUMAN-ENGINEERING/0.1"; protocols = ["GLS-0200", "GLS-0400"]; lifecycle = "CANDIDATE"; canonical_uri = "runtime/fifth-domain-language-system/language/protocols/TCS-EVENT-PERSONA-HEALTH-FAST-PATH-CORRECTION-20260913.tcs"; compatibility = ["JD-FD-PRIMARY", "TCS-MOTHER-BRAIN-RUNTIME-0001"]; }
source { source_id = "BINGSHUO-DIRECT-CONTINUE-BOTTLE-0006-0008-20260913"; source_uri = "source://codex-current-dialogue/2026-09-13/continue-bottle-0006-0008"; source_sha256 = "33994b1a1f210c738f31138c124fc403d17d56844725fbc40ae6c9575d82f392"; source_role = "DIRECT_HUMAN"; }
subject { subject_id = "ICE-P-ZY001"; subject_kind = "PERSONA"; channel_id = "ICE-CH-ZC001"; verification = "器官幂等后启动仍慢定位到空队列drain和全局health同步深验全部人格时间证据。"; }
event_time { value = "2026-09-13"; precision = "HOST_LOCAL_DATE"; }
trigger { value = "十人格全量历史深验阻塞服务监听与主控健康探测。"; }
observation { value = "空队列无需验证生命线存活健康只需签名CURRENT头、器官状态和当前哈希。完整生命线深验仍应在单人格状态查询与处理事件前执行。"; }
emergence { value = "空队列drain直接返回全局health使用快速签名头深验位置保持在有事件执行和单人格status。"; }
lock { value = "liveness_health=SIGNED_HEAD_PLUS_ORGAN_STATUS; deep_life_verify=PERSONA_STATUS_OR_BEFORE_EVENT_PROCESS; empty_queue=no_deep_verify; safety_gate_unchanged=true"; }
why { value = "存活门与完整证明分层能保持严格验证,又不让证明过程阻塞系统本身。"; }
rejected { values = ["取消生命线深验", "放宽主控超时", "健康接口同步扫描全部历史文件", "空队列重复深验"] ; }
evidence { rescue_cycles = "2"; focused_tests = "15_PASS"; }
}

View file

@ -128,4 +128,5 @@ export class PersonaRuntimeHub {
personas: Object.fromEntries(this.ids().map(id => [id, {...this.get(id).status(),organ_health:this.organ(id).status()}])),
};
}
health() { return {schema:'guanghu.persona-runtime-hub-health/v1',state:'MULTI_PERSONA_RUNTIME_RESPONSIVE',installed_personas:this.ids(),installed_count:this.loops.size,default_persona:null,shared_engine_is_shared_persona_brain:false,external_cognition_setter:false,personas:Object.fromEntries(this.ids().map(id=>{const loop=this.get(id),current=loop.current();return[id,{persona_id:id,current_sha256:current.artifact.sha256,body:loop.body(),organ_health:this.organ(id).status()}];}))}; }
}

View file

@ -157,7 +157,9 @@ export class PersonaSelfLoop {
}
async drain() {
if (this.draining) return {status: 'BUSY'}; const lifeLine = this.lifeLineStatus(); if (this.requireLifeLine && lifeLine.wake_allowed !== true) { this.lastDrain = {status: 'LIFE_LINE_BLOCKED', at: this.now().toISOString(), life_line_state: lifeLine.state}; return this.lastDrain; }
if (this.draining) return {status: 'BUSY'};
if (this.pendingJobs.size === 0) return this.lastDrain = {status:'DRAINED',at:this.now().toISOString(),processed:0,duration_ms:0};
const lifeLine = this.lifeLineStatus(); if (this.requireLifeLine && lifeLine.wake_allowed !== true) { this.lastDrain = {status: 'LIFE_LINE_BLOCKED', at: this.now().toISOString(), life_line_state: lifeLine.state}; return this.lastDrain; }
this.draining = true; const started = Date.now(); let processed = 0;
try { while (processed < this.queueBatchSize && Date.now() - started < this.drainBudgetMs) { const entry = this.nextPending(); if (!entry) break; await this.process(entry.id); processed += 1; } this.lastDrain = {status: 'DRAINED', at: this.now().toISOString(), processed, duration_ms: Date.now() - started}; return this.lastDrain; }
finally { this.draining = false; }

View file

@ -8,7 +8,7 @@ setInterval(()=>{personaHub.tick();shelf.drain();personaHub.drain();},2000).unre
const send=(r,s,b)=>{const p=JSON.stringify(b);r.writeHead(s,{'content-type':'application/json','content-length':Buffer.byteLength(p),'cache-control':'no-store'});r.end(p);};
async function body(q,max=160000){let n=0,a=[];for await(const c of q){n+=c.length;if(n>max)throw Error('body_too_large');a.push(c);}return JSON.parse(Buffer.concat(a));}
http.createServer(async(q,r)=>{try{const u=new URL(q.url,`http://${HOST}:${PORT}`);
if(q.method==='GET'&&u.pathname==='/health')return send(r,200,{ok:true,service:'guanghu-tcs-mother-body',mother_id:'TCS-MOTHER-BRAIN-RUNTIME-0001',zero_core_channel:'ICE-CH-ZC001',single_mother:true,single_zero_core:true,self_cycle:true,living_lamp:'LAKE-LAMP-LIVING-NAV-0001',echo_kernel:'ECHO-KERNEL-0001',model_router:router.status(),shelf:shelf.status(),zero_core_system:zeroCoreSystem.status(),persona_self:personaSelf.status(),persona_runtimes:personaHub.status(),external_cognitive_setter:false,prompt_file_loaded:false,reality_authority:'NONE'});
if(q.method==='GET'&&u.pathname==='/health')return send(r,200,{ok:true,service:'guanghu-tcs-mother-body',mother_id:'TCS-MOTHER-BRAIN-RUNTIME-0001',zero_core_channel:'ICE-CH-ZC001',single_mother:true,single_zero_core:true,self_cycle:true,living_lamp:'LAKE-LAMP-LIVING-NAV-0001',echo_kernel:'ECHO-KERNEL-0001',model_router:router.status(),shelf:shelf.status(),zero_core_system:zeroCoreSystem.status(),persona_self:{persona_id:'ICE-P-ZY001',current_sha256:personaSelf.current().artifact.sha256,body:personaSelf.body()},persona_runtimes:personaHub.health(),external_cognitive_setter:false,prompt_file_loaded:false,reality_authority:'NONE'});
if(q.method==='GET'&&u.pathname==='/v1/mother/status')return send(r,200,{...shelf.status(),model_router:router.status()});
if(q.method==='GET'&&/^\/v1\/shelf\/(root|shared|fifth|public)$/.test(u.pathname)){const branch=u.pathname.split('/').at(-1);if(branch==='root')return send(r,403,{error:'mother_root_not_distributable'});return send(r,200,shelf.current(branch));}
if(q.method==='POST'&&u.pathname==='/v1/mother/ingest'){const event=await body(q);const job=shelf.submit(event);const life_time=timeMaster.fromMotherEvent(event);return send(r,202,{...job,life_time});}