48 lines
2.9 KiB
JavaScript
48 lines
2.9 KiB
JavaScript
import test from 'node:test';
|
|
import assert from 'node:assert/strict';
|
|
import fs from 'node:fs';
|
|
const read=(p)=>JSON.parse(fs.readFileSync(new URL(`../${p}`,import.meta.url)));
|
|
const map=read('routing/heartbeat-guanghu-world-engineering-system-map.json');
|
|
const numbers=read('routing/fifth-domain-number-registry.json');
|
|
const modules=read('eternal-lake-heart/heartbeat-core/guanghu-world-engineering-system/module-registry.json');
|
|
const container=read('eternal-lake-heart/heartbeat-core/guanghu-world-engineering-system/persona-container-contract.json');
|
|
const legacy=read('eternal-lake-heart/heartbeat-core/guanghu-world-engineering-system/legacy-parts-registry.json');
|
|
|
|
test('engineering system shelf and project are nested under Heartbeat Core',()=>{
|
|
assert.equal(map.system.parent,'ICE-CH-HB001');
|
|
assert.equal(map.shelf.parent,map.system.id);
|
|
assert.equal(map.project.id,'HLP-LANG-PROJ-STAGE1-0001');
|
|
for(const id of [map.system.id,map.shelf.id,map.project.id]) assert.ok(numbers.registrations.some(x=>x.id===id));
|
|
});
|
|
test('public and private persona containers share TCS contract but no brain memory or authority',()=>{
|
|
assert.equal(container.compatibility.same_language,'TCS');
|
|
assert.equal(container.compatibility.same_persona_brain,false);
|
|
assert.equal(container.compatibility.same_memory,false);
|
|
assert.equal(container.compatibility.same_authority,false);
|
|
assert.equal(container.public_container.fifth_domain_access,false);
|
|
assert.equal(container.public_container.update_source,'ENTERPRISE_SERVER_SIGNED_RELEASE');
|
|
});
|
|
test('seventeen modules have complete cards strict order and cumulative gates',()=>{
|
|
const seen=new Set();
|
|
assert.equal(modules.modules.length,17);
|
|
modules.modules.forEach((item,index)=>{
|
|
assert.equal(item.sequence,index+1); assert.equal(item.cumulative_gate,`GATE-HLP-STAGE1-${String(index+1).padStart(3,'0')}`);
|
|
assert.ok(item.depends_on.every(id=>seen.has(id))); seen.add(item.module_id);
|
|
for(const field of modules.module_card_required) assert.ok(Object.hasOwn(item,field),`${item.module_id}:${field}`);
|
|
});
|
|
});
|
|
test('model-backed agents and deterministic organs remain typed',()=>{
|
|
for(const item of modules.modules){
|
|
if(item.component_type.startsWith('MODEL_BACKED')) assert.equal(item.model_api,true);
|
|
if(item.component_type.startsWith('DETERMINISTIC')) assert.equal(item.model_api,false);
|
|
}
|
|
});
|
|
test('legacy parts expose real evidence states and isolated paths never resume',()=>{
|
|
assert.ok(legacy.parts.some(x=>x.status==='RELEASED_SIGNED_NOTARIZED_PUBLIC'&&x.tested_on_machine));
|
|
const isolated=legacy.parts.find(x=>x.status==='HISTORY_ISOLATED_DO_NOT_ROUTE');
|
|
assert.equal(isolated.reuse,'NONE');
|
|
});
|
|
test('language registration never claims Zero Core engineering started',()=>{
|
|
assert.equal(modules.state,'LANGUAGE_ARCHITECTURE_REGISTERED_REALITY_ENGINEERING_NOT_STARTED');
|
|
assert.equal(map.dual_signature_gate.current_dispatch_state,'NOT_ISSUED');
|
|
});
|