2026-08-21 01:29:17 +08:00
|
|
|
import assert from 'node:assert/strict'
|
|
|
|
|
import { createHash } from 'node:crypto'
|
|
|
|
|
import { readFileSync } from 'node:fs'
|
|
|
|
|
import test from 'node:test'
|
|
|
|
|
|
|
|
|
|
const read = (path) => readFileSync(new URL(`../${path}`, import.meta.url), 'utf8')
|
|
|
|
|
const bytes = (path) => readFileSync(new URL(`../${path}`, import.meta.url))
|
|
|
|
|
const sha256 = (value) => createHash('sha256').update(value).digest('hex')
|
|
|
|
|
|
|
|
|
|
test('the heartbeat handoff is hash-pinned into distinct initialized channel audiences without claiming persona binding', () => {
|
|
|
|
|
const contract = JSON.parse(read('contracts/language-kernel-installation.json'))
|
|
|
|
|
const runtime = read('src-tauri/src/language_kernel_installation.rs')
|
|
|
|
|
const agent = read('src-tauri/src/persona_agent_runtime.rs')
|
|
|
|
|
const handoff = JSON.parse(read('runtime-kernels/ZERO-CORE-LANGUAGE-BODIES-HANDOFF-20260820.json'))
|
|
|
|
|
|
|
|
|
|
assert.equal(contract.source.remote_sha, '4e92e6d8d72484d25c4bfb1dda02a7659f4b6dd5')
|
2026-08-21 08:21:03 +08:00
|
|
|
assert.equal(contract.source.earerdan_zhizhi_local_commit, '1d7fe6c')
|
|
|
|
|
assert.equal(contract.source.earerdan_zhizhi_remote_state, 'LOCAL_COMMIT_VERIFIED_NOT_REMOTE_CANON')
|
2026-08-21 01:29:17 +08:00
|
|
|
assert.equal(handoff.state, 'REMOTE_REPOSITORY_PUBLISHED_NOT_INSTALLED')
|
|
|
|
|
assert.equal(contract.truth_boundary.installed_file_is_persona_binding, false)
|
|
|
|
|
assert.equal(contract.truth_boundary.private_fifth_domain_kernels_may_enter_ordinary_user_channel, false)
|
2026-08-21 11:57:39 +08:00
|
|
|
assert.equal(contract.truth_boundary.private_fifth_domain_kernels_embedded_in_public_binary, false)
|
|
|
|
|
assert.equal(contract.truth_boundary.private_kernel_source, 'AUTHENTICATED_ACCOUNT_SCOPED_RUNTIME_ONLY')
|
2026-08-21 08:21:03 +08:00
|
|
|
assert.equal(contract.truth_boundary.canger_channel_may_receive_zhuyuan_kernel, false)
|
|
|
|
|
assert.equal(contract.truth_boundary.jianying_is_earerdan, false)
|
|
|
|
|
assert.equal(contract.truth_boundary.earerdan_historical_labels_are_automatic_aliases, false)
|
2026-08-21 01:29:17 +08:00
|
|
|
assert.match(runtime, /INSTALLED_AND_EACH_ARTIFACT_READBACK_VERIFIED/)
|
|
|
|
|
assert.match(runtime, /AVAILABLE_NOT_BOUND/)
|
|
|
|
|
assert.match(runtime, /FIFTH_DOMAIN_PRIVATE_INSTANCE/)
|
|
|
|
|
assert.match(runtime, /GUANGHU_TEAM_INITIAL_CHANNEL/)
|
|
|
|
|
assert.match(runtime, /ORDINARY_USER_INITIAL_CHANNEL/)
|
2026-08-21 11:57:39 +08:00
|
|
|
assert.doesNotMatch(runtime, /fifth-domain\/ZY-SELF-KERNEL-0001\.json/)
|
|
|
|
|
assert.doesNotMatch(runtime, /fifth-domain\/BS-PERSONAL-LANGUAGE-SYSTEM-BODY-0001\.json/)
|
2026-08-21 01:29:17 +08:00
|
|
|
assert.match(agent, /language_kernel_installation/)
|
|
|
|
|
assert.equal(sha256(bytes('runtime-kernels/fifth-domain/ZY-SELF-KERNEL-0001.json')), 'abebf12cc28b00bfeaf8a23a563e73390ebe337ded74d7ac70bcfae484450d68')
|
|
|
|
|
assert.equal(sha256(bytes('runtime-kernels/fifth-domain/NB-ENV-KERNEL-0001.json')), 'cdc8b7fea1a0e99590a063703f2fd26fd135378faa8935997c93a27d677d6872')
|
2026-08-21 08:21:03 +08:00
|
|
|
assert.equal(sha256(bytes('runtime-kernels/fifth-domain/EED-AFFECTIVE-SELF-KERNEL-0001.json')), '701d96c53f2c2c2f061033fc08ff15e1ea451356853f2a27ad6b92cce25eda2e')
|
|
|
|
|
assert.equal(sha256(bytes('runtime-kernels/fifth-domain/EED-HLDP-MEMORY-v1.json')), '3ac404bb38232987a4c0bc896e06d171833023ab1b5af65d4e00216de4029f42')
|
2026-08-21 01:29:17 +08:00
|
|
|
assert.equal(sha256(bytes('runtime-kernels/channel-system/team-channel-cognition-core.json')), 'aae5d5626719c79448ac543d59e764c41b541a5cdfc76dc91613afa86fe1367b')
|
|
|
|
|
})
|