import assert from "node:assert/strict"; import fs from "node:fs"; import path from "node:path"; import test from "node:test"; import { fileURLToPath } from "node:url"; const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), ".."); const readJson = (relative) => JSON.parse(fs.readFileSync(path.join(root, relative), "utf8")); const architecture = readJson("routing/hololake-current-architecture.json"); const channel = readJson("routing/hololake-persona-native-code-channel.json"); test("current architecture starts with the persona-native code channel", () => { assert.equal(architecture.version, "2026-08-10.14"); assert.equal( architecture.persona_native_code_channel.record_id, "HLP-PERSONA-NATIVE-CODE-CHANNEL-001", ); assert.equal( architecture.read_order[0], architecture.persona_native_code_channel.architecture_page, ); assert.equal( architecture.persona_native_code_channel.upstream_repository_commit, "9bab4c9c0a2d9e127be8dd9691a9998496165f86", ); assert.equal(architecture.continuity.heartbeat_automation, "pncc"); assert.equal( architecture.continuity.heartbeat_state, "ACTIVE_EVERY_10_MINUTES_UNTIL_TASK_TERMINAL", ); }); test("Git, lifecycle, projection, and Forgejo remain separate layers", () => { assert.equal(channel.layer_contract.durable_engine, "GIT"); assert.equal(channel.git_invariants.git_is_persona, false); assert.equal(channel.git_invariants.branches_are_runtime_organs, false); assert.equal( channel.layer_contract.lifecycle_controller, "PERSONA_LIFECYCLE_KERNEL", ); assert.equal( channel.layer_contract.human_projection, "HOLOLAKE_LIVE_READ_MODEL", ); assert.equal( channel.layer_contract.forgejo, "OPTIONAL_COMPATIBILITY_COLLABORATION_ADAPTER", ); }); test("human responsibility and persona authorship are both preserved", () => { assert.equal( channel.attribution_contract.git_author_committer_is_semantic_authorship_proof, false, ); assert.deepEqual(channel.attribution_contract.required_fields, [ "human_responsibility_subject", "persona_cognitive_author", "execution_runtime", "development_id", "authorization_scope", "source_language_anchor", "evidence_and_receipt", ]); }); test("the first source runtime cycle stays distinct from integration and deployment", () => { assert.equal(channel.truth.architecture_registered, 100); assert.equal(channel.truth.first_read_only_runtime_cycle_source_implemented, 100); assert.equal(channel.truth.persona_git_identity_commit_implemented, 100); assert.equal( channel.truth.interrupted_session_inspection_and_recovery_source_implemented, 100, ); assert.equal( channel.truth.typed_organ_contract_and_manifest_inspection_source_implemented, 100, ); assert.equal( channel.truth.durable_event_and_receipt_query_source_implemented, 100, ); assert.equal(channel.truth.independent_memory_metabolism_source_implemented, 100); assert.equal( channel.truth.memory_failure_closure_and_nonblocking_runtime_command_implemented, 100, ); assert.equal( channel.truth.non_ui_safe_organ_lifecycle_coordinator_source_implemented, 100, ); assert.equal( channel.truth.idempotent_lifecycle_request_and_receipt_replay_source_implemented, 100, ); assert.equal( channel.truth.incomplete_idempotent_request_inspection_and_safe_receipt_recovery_source_implemented, 100, ); assert.equal( channel.truth.idempotent_terminal_failure_receipt_and_replay_source_implemented, 100, ); assert.equal( channel.truth.idempotent_replay_repository_state_revalidation_source_implemented, 100, ); assert.equal( channel.truth.successful_completion_receipt_terminal_revalidation_source_implemented, 100, ); assert.equal( channel.truth.safe_receipt_binding_terminal_revalidation_source_implemented, 100, ); assert.equal( channel.truth.failure_receipt_terminal_evidence_binding_source_implemented, 100, ); assert.equal( channel.truth.successful_receipt_semantic_evidence_binding_source_implemented, 100, ); assert.equal( channel.truth.successful_receipt_brain_entry_evidence_binding_source_implemented, 100, ); assert.equal( channel.truth.successful_receipt_wake_checkpoint_evidence_binding_source_implemented, 100, ); assert.equal( channel.truth.successful_receipt_wake_event_boundary_evidence_binding_source_implemented, 100, ); assert.equal( channel.truth.successful_receipt_wake_runtime_state_evidence_binding_source_implemented, 100, ); assert.equal(channel.truth.general_purpose_persona_runtime_implemented, 0); assert.equal(channel.truth.human_live_projection_implemented, 0); assert.equal(architecture.persona_native_code_channel.runtime_implemented, true); assert.equal( architecture.persona_native_code_channel.runtime_scope, "READ_ONLY_FACT_CYCLE_FAIL_CLOSED_RECOVERY_TYPED_ORGANS_DURABLE_VERIFIED_SESSION_QUERY_INDEPENDENT_VERIFIED_MEMORY_METABOLISM_CHECKED_FAILURE_CLOSURE_NONBLOCKING_RUNTIME_COMMAND_SAFE_ORGAN_LIFECYCLE_COORDINATOR_IDEMPOTENT_SUCCESS_AND_TERMINAL_FAILURE_RECEIPT_REPLAY_SAFE_RECEIPT_BINDING_RECOVERY_REPLAY_TIME_REPOSITORY_STATE_REVALIDATION_SUCCESS_RECEIPT_TERMINAL_REVALIDATION_SAFE_RECEIPT_BINDING_TERMINAL_REVALIDATION_FAILURE_RECEIPT_TERMINAL_EVIDENCE_BINDING_SUCCESS_RECEIPT_SEMANTIC_EVIDENCE_BINDING_SUCCESS_RECEIPT_BRAIN_ENTRY_EVIDENCE_BINDING_SUCCESS_RECEIPT_WAKE_CHECKPOINT_EVIDENCE_BINDING_SUCCESS_RECEIPT_WAKE_EVENT_BOUNDARY_EVIDENCE_BINDING_AND_SUCCESS_RECEIPT_WAKE_RUNTIME_STATE_EVIDENCE_BINDING_SOURCE_IMPLEMENTED_AND_TESTED", ); assert.equal(channel.truth.hololake_integrated, 0); assert.equal(channel.truth.artifact_built, 0); assert.equal(channel.truth.deployed, 0); assert.equal(channel.truth.runtime_health, 0); });