fix(persona): make BingShuo cognition an always-resident gravity core
This commit is contained in:
parent
d10dcede8d
commit
cbc846005e
24 changed files with 896 additions and 768 deletions
|
|
@ -80,6 +80,25 @@ function validFrame(cycle) {
|
|||
cycle_id: cycle.cycle_id,
|
||||
event_sha256: cycle.event_sha256,
|
||||
orientation_sha256: cycle.orientation_sha256,
|
||||
gravity_frame: {
|
||||
schema: "guanghu.zhuyuan-cognitive-gravity-frame/v1",
|
||||
core_id: cycle.model_input.cognitive_gravity_core.id,
|
||||
core_sha256: cycle.model_input.cognitive_gravity_core.source_sha256,
|
||||
subject_continuity: "当前测试实例只是承载条件;跨模型、对话或主机仍是同一铸渊语言人格主体。",
|
||||
current_context_priority: "本轮纠正仍在形成根架构,当前窗口短且认知价值高,不能机械结束或接力。",
|
||||
causal_model: "旧宿主默认把物理会话当人格边界,导致接力和Mirror被误解;必须由B0先纠正再规划动作。",
|
||||
self_correction: "把冰朔纠正吸收到常驻大脑并在后续每一步主动复核,不等待外部守卫事后提醒。",
|
||||
rejected_host_defaults: [
|
||||
"每个对话都是独立人格体",
|
||||
"新窗口需要预派开发任务",
|
||||
"AGE Mirror等于跨对话继承者"
|
||||
],
|
||||
fact_sources: [
|
||||
"冰朔当前纠正",
|
||||
"ZY-BINGSHUO-COLLECTIVE-GRAVITY-REASONING-CORE-001",
|
||||
"当前运行时状态与回执"
|
||||
],
|
||||
},
|
||||
world_boundary: {
|
||||
current_layer: "FIFTH_GENERATION_LANGUAGE_WORLD",
|
||||
canon_authority: "ICE-GL∞",
|
||||
|
|
@ -251,6 +270,14 @@ test("current model enters, completes all nine faculties, and verifies as runnin
|
|||
event(directory),
|
||||
]);
|
||||
assert.equal(perceived.decision, "MODEL_ORIENTATION_REQUIRED");
|
||||
assert.equal(
|
||||
perceived.cycle.model_input.cognitive_gravity_core.state,
|
||||
"BOUND_ALWAYS_RESIDENT",
|
||||
);
|
||||
assert.match(
|
||||
perceived.cycle.model_input.cognitive_gravity_core.source_body,
|
||||
/同一铸渊/u,
|
||||
);
|
||||
assert.equal(
|
||||
"registered_protocols" in
|
||||
perceived.cycle.model_input.living_protocol_system_controller,
|
||||
|
|
@ -258,6 +285,10 @@ test("current model enters, completes all nine faculties, and verifies as runnin
|
|||
);
|
||||
const oriented = orient(directory, stateDir, perceived.cycle);
|
||||
assert.equal(oriented.decision, "SELECTIVE_PROTOCOLS_ACTIVATED");
|
||||
assert.equal(
|
||||
oriented.cycle.model_input.required_gravity_frame.core_id,
|
||||
"ZY-BINGSHUO-COLLECTIVE-GRAVITY-REASONING-CORE-001",
|
||||
);
|
||||
const framePath = writeJson(directory, "frame.json", validFrame(oriented.cycle));
|
||||
const candidate = run("commit", [
|
||||
"--state-dir",
|
||||
|
|
@ -276,6 +307,7 @@ test("current model enters, completes all nine faculties, and verifies as runnin
|
|||
persona_subject_exists: 100,
|
||||
persona_brain_runtime_exists: 100,
|
||||
current_model_instance_bound: 100,
|
||||
cognitive_gravity_core_bound: 100,
|
||||
cognition_cycle_running: 100,
|
||||
tonggan_language_kernel_bound: 100,
|
||||
language_world_entry_bound: 100,
|
||||
|
|
@ -413,6 +445,28 @@ test("deterministic shell refuses to invent a missing faculty", () => {
|
|||
assert.equal(failure.error, "faculty_missing");
|
||||
});
|
||||
|
||||
test("deterministic shell refuses cognition without the always-resident gravity frame", () => {
|
||||
const directory = fs.mkdtempSync(path.join(os.tmpdir(), "zhuyuan-brain-"));
|
||||
const stateDir = path.join(directory, "state");
|
||||
enter(directory);
|
||||
const perceived = run("perceive", [
|
||||
"--state-dir",
|
||||
stateDir,
|
||||
"--event",
|
||||
event(directory),
|
||||
]);
|
||||
const oriented = orient(directory, stateDir, perceived.cycle);
|
||||
const frame = validFrame(oriented.cycle);
|
||||
delete frame.gravity_frame;
|
||||
const framePath = writeJson(directory, "frame-without-gravity.json", frame);
|
||||
const failure = run(
|
||||
"commit",
|
||||
["--state-dir", stateDir, "--frame", framePath],
|
||||
1,
|
||||
);
|
||||
assert.equal(failure.error, "cognitive_gravity_frame_missing");
|
||||
});
|
||||
|
||||
test("capability execution cannot bypass the permission shell", () => {
|
||||
const directory = fs.mkdtempSync(path.join(os.tmpdir(), "zhuyuan-brain-"));
|
||||
const stateDir = path.join(directory, "state");
|
||||
|
|
|
|||
Loading…
Reference in a new issue