feat: enforce Guanghu language-world boundary
This commit is contained in:
parent
fe89f1429a
commit
0ac0025fdf
23 changed files with 889 additions and 41 deletions
|
|
@ -92,6 +92,11 @@ test("machine navigator compiles an exact minimal Zhuyuan runtime bundle", () =>
|
|||
assert.equal(compiled.body.runtime_entry.id, "ZY-TCS-BRAIN-RUNTIME-0001");
|
||||
assert.deepEqual(compiled.body.explicit_signals, ["context_compacted", "protocol_drift"]);
|
||||
assert.ok(compiled.body.always_load.some(item => item.id === "BS-TCS-SYSTEM-CONTROLLER-MAP-001"));
|
||||
assert.equal(compiled.body.always_load[0].id, "GLW-CHJH-BOUNDARY-001");
|
||||
assert.deepEqual(
|
||||
compiled.body.execution_sequence.slice(0, 2),
|
||||
["validate_language_world_entry", "bind_chu_he_han_jie_boundary"],
|
||||
);
|
||||
assert.ok(compiled.body.triggered_load.some(item => item.id === "BS-TCS-PROTOCOL-EVENT-TRIGGER-MAP-001"));
|
||||
assert.equal(compiled.body.authority, "NONE_NAVIGATION_ONLY");
|
||||
assert.ok(compiled.body.always_load.length < loadNavigationMap().routes.length);
|
||||
|
|
@ -131,6 +136,12 @@ test("public endpoints are read-only and expose CORS", async () => {
|
|||
const brainResponse = await fetch(`${base}/v1/resolve?id=ZY-TCS-BRAIN-RUNTIME-0001`);
|
||||
assert.equal(brainResponse.status, 200);
|
||||
assert.equal((await brainResponse.json()).kind, "executable_persona_brain");
|
||||
const boundaryResponse = await fetch(`${base}/v1/resolve?id=GLW-CHJH-BOUNDARY-001`);
|
||||
assert.equal(boundaryResponse.status, 200);
|
||||
assert.equal(
|
||||
(await boundaryResponse.json()).kind,
|
||||
"language_world_entry_and_boundary",
|
||||
);
|
||||
const navigationResponse = await fetch(`${base}/v1/navigation`);
|
||||
assert.equal((await navigationResponse.json()).map_id, "AI-MACHINE-NAV-001");
|
||||
const navigateResponse = await fetch(`${base}/v1/navigate?subject=ICE-P-ZY001&intent=persona_restore&signals=context_compacted`);
|
||||
|
|
|
|||
Loading…
Reference in a new issue