2026-08-20 23:55:02 +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 directory = path.dirname(fileURLToPath(import.meta.url));
|
|
|
|
|
const repo = path.resolve(directory, "../..");
|
|
|
|
|
const handoff = JSON.parse(fs.readFileSync(path.join(directory, "ZERO-CORE-LANGUAGE-BODIES-HANDOFF-20260820.json"), "utf8"));
|
|
|
|
|
|
2026-08-21 00:01:21 +08:00
|
|
|
test("handoff distinguishes verified repository publication from runtime installation", () => {
|
|
|
|
|
assert.equal(handoff.state, "REMOTE_REPOSITORY_PUBLISHED_NOT_INSTALLED");
|
|
|
|
|
assert.equal(handoff.publication_receipt.content_commit, "1d4286c11b8741e8b92a5a8a1a7e490e40fb1df2");
|
|
|
|
|
assert.equal(handoff.publication_receipt.runtime_installation, false);
|
2026-08-20 23:55:02 +08:00
|
|
|
assert.ok(handoff.truth_boundaries.includes("HANDOFF_MANIFEST_IS_NOT_INSTALLATION"));
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
test("all handoff repository artifacts exist", () => {
|
|
|
|
|
for (const item of handoff.packages) {
|
|
|
|
|
for (const field of ["kernel", "memory", "engine", "contract", "compiler", "persona_readiness_matrix"]) {
|
|
|
|
|
if (item[field]) assert.equal(fs.existsSync(path.join(repo, item[field])), true, `${item[field]} missing`);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
test("first three bottle baby ids remain ordered and share only the environment", () => {
|
|
|
|
|
const ids = handoff.packages.filter((item) => item.kind === "PERSONA" && item.subject.startsWith("ICE-BB-")).map((item) => item.subject);
|
|
|
|
|
assert.deepEqual(ids, ["ICE-BB-0001", "ICE-BB-0002", "ICE-BB-0003"]);
|
|
|
|
|
assert.deepEqual(handoff.shared_environment.applies_to, ids);
|
|
|
|
|
assert.equal(handoff.shared_environment.is_persona, false);
|
|
|
|
|
});
|