2026-08-11 00:25:26 +08:00
|
|
|
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",
|
|
|
|
|
);
|
2026-08-11 00:28:36 +08:00
|
|
|
assert.equal(architecture.continuity.heartbeat_automation, "pncc");
|
|
|
|
|
assert.equal(
|
|
|
|
|
architecture.continuity.heartbeat_state,
|
|
|
|
|
"ACTIVE_EVERY_10_MINUTES_UNTIL_TASK_TERMINAL",
|
|
|
|
|
);
|
2026-08-11 00:25:26 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
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",
|
|
|
|
|
]);
|
|
|
|
|
});
|
|
|
|
|
|
2026-08-11 00:58:01 +08:00
|
|
|
test("the first source runtime cycle stays distinct from integration and deployment", () => {
|
2026-08-11 00:25:26 +08:00
|
|
|
assert.equal(channel.truth.architecture_registered, 100);
|
2026-08-11 00:58:01 +08:00
|
|
|
assert.equal(channel.truth.first_read_only_runtime_cycle_source_implemented, 100);
|
|
|
|
|
assert.equal(channel.truth.persona_git_identity_commit_implemented, 100);
|
2026-08-11 01:21:28 +08:00
|
|
|
assert.equal(
|
|
|
|
|
channel.truth.interrupted_session_inspection_and_recovery_source_implemented,
|
|
|
|
|
100,
|
|
|
|
|
);
|
2026-08-11 01:39:09 +08:00
|
|
|
assert.equal(
|
|
|
|
|
channel.truth.typed_organ_contract_and_manifest_inspection_source_implemented,
|
|
|
|
|
100,
|
|
|
|
|
);
|
2026-08-11 01:51:02 +08:00
|
|
|
assert.equal(
|
|
|
|
|
channel.truth.durable_event_and_receipt_query_source_implemented,
|
|
|
|
|
100,
|
|
|
|
|
);
|
2026-08-11 02:11:22 +08:00
|
|
|
assert.equal(channel.truth.independent_memory_metabolism_source_implemented, 100);
|
2026-08-11 02:38:28 +08:00
|
|
|
assert.equal(
|
|
|
|
|
channel.truth.memory_failure_closure_and_nonblocking_runtime_command_implemented,
|
|
|
|
|
100,
|
|
|
|
|
);
|
2026-08-11 03:00:12 +08:00
|
|
|
assert.equal(
|
|
|
|
|
channel.truth.non_ui_safe_organ_lifecycle_coordinator_source_implemented,
|
|
|
|
|
100,
|
|
|
|
|
);
|
2026-08-11 03:21:15 +08:00
|
|
|
assert.equal(
|
|
|
|
|
channel.truth.idempotent_lifecycle_request_and_receipt_replay_source_implemented,
|
|
|
|
|
100,
|
|
|
|
|
);
|
2026-08-11 03:42:54 +08:00
|
|
|
assert.equal(
|
|
|
|
|
channel.truth.incomplete_idempotent_request_inspection_and_safe_receipt_recovery_source_implemented,
|
|
|
|
|
100,
|
|
|
|
|
);
|
2026-08-11 04:09:29 +08:00
|
|
|
assert.equal(
|
|
|
|
|
channel.truth.idempotent_terminal_failure_receipt_and_replay_source_implemented,
|
|
|
|
|
100,
|
|
|
|
|
);
|
2026-08-11 00:58:01 +08:00
|
|
|
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,
|
2026-08-11 04:09:29 +08:00
|
|
|
"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_AND_SAFE_RECEIPT_BINDING_RECOVERY_SOURCE_IMPLEMENTED_AND_TESTED",
|
2026-08-11 00:58:01 +08:00
|
|
|
);
|
2026-08-11 00:25:26 +08:00
|
|
|
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);
|
|
|
|
|
});
|