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")); test("handoff claims no installation or publication", () => { assert.equal(handoff.state, "LOCAL_READY_NOT_INSTALLED_NOT_PUBLISHED"); 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); });