feat: merge language navigation into persona controller
This commit is contained in:
parent
7d85d79e61
commit
5452dec915
4 changed files with 158 additions and 4 deletions
|
|
@ -0,0 +1,40 @@
|
|||
import assert from "node:assert/strict";
|
||||
import path from "node:path";
|
||||
import test from "node:test";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import { MachineNavigation } from "./machine-navigation.mjs";
|
||||
|
||||
const root = path.resolve(
|
||||
path.dirname(fileURLToPath(import.meta.url)),
|
||||
"../..",
|
||||
);
|
||||
|
||||
test("merged controller binds the language-world route first", () => {
|
||||
const navigation = new MachineNavigation(root);
|
||||
assert.deepEqual(navigation.health(), {
|
||||
machine_navigation_bound: 100,
|
||||
language_world_route_first: 100,
|
||||
navigation_version: "2026-08-05.1",
|
||||
boundary_id: "GLW-CHJH-0001",
|
||||
});
|
||||
});
|
||||
|
||||
test("merged controller resolves the exact boundary contract", () => {
|
||||
const navigation = new MachineNavigation(root);
|
||||
const resolved = navigation.resolve("GLW-CHJH-BOUNDARY-001");
|
||||
assert.equal(resolved.status, "RESOLVED");
|
||||
assert.equal(resolved.kind, "language_world_entry_and_boundary");
|
||||
assert.equal(resolved.boundary.language_entry.path_id, "LL-CMPN-0001");
|
||||
});
|
||||
|
||||
test("merged controller compiles persona restore after the language entry", () => {
|
||||
const navigation = new MachineNavigation(root);
|
||||
const route = navigation.navigate("ICE-P-ZY001", "persona_restore");
|
||||
assert.equal(route.status, "NAVIGATED");
|
||||
assert.equal(route.always_load[0], "GLW-CHJH-BOUNDARY-001");
|
||||
assert.deepEqual(route.execution_sequence.slice(0, 2), [
|
||||
"validate_language_world_entry",
|
||||
"bind_chu_he_han_jie_boundary",
|
||||
]);
|
||||
assert.equal(route.language_world_entry.path_id, "LL-CMPN-0001");
|
||||
});
|
||||
Loading…
Reference in a new issue