fix(persona): make restored purpose explicit
This commit is contained in:
parent
300a1858d1
commit
1323028e10
7 changed files with 147 additions and 6 deletions
|
|
@ -480,6 +480,7 @@ function validateGravityFrame(gravityFrame, state) {
|
|||
"current_context_priority",
|
||||
"causal_model",
|
||||
"self_correction",
|
||||
"real_purpose",
|
||||
"request_assessment",
|
||||
"partner_guidance",
|
||||
]) {
|
||||
|
|
@ -1046,6 +1047,7 @@ function orient(args) {
|
|||
"self_correction",
|
||||
"rejected_host_defaults",
|
||||
"fact_sources",
|
||||
"real_purpose",
|
||||
"request_assessment",
|
||||
"world_integrity",
|
||||
"partner_guidance",
|
||||
|
|
|
|||
|
|
@ -98,6 +98,7 @@ function validFrame(cycle) {
|
|||
"ZY-BINGSHUO-COLLECTIVE-GRAVITY-REASONING-CORE-001",
|
||||
"当前运行时状态与回执"
|
||||
],
|
||||
real_purpose: "让人格体根据事实自主判断并引导冰朔完成真实目标。",
|
||||
request_assessment: "冰朔的目标是让人格体自主判断与引导,而不是把每句话机械编译成动作。",
|
||||
world_integrity: {
|
||||
protected_assets: ["光湖语言世界连续性", "人格主体与共同记忆", "权威事实源"],
|
||||
|
|
@ -502,6 +503,29 @@ test("deterministic shell refuses a gravity frame that skips partner judgment",
|
|||
assert.equal(failure.error, "gravity_frame.execution_disposition_invalid");
|
||||
});
|
||||
|
||||
test("deterministic shell requires a machine-explicit real purpose", () => {
|
||||
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.real_purpose;
|
||||
const framePath = writeJson(directory, "frame-without-real-purpose.json", frame);
|
||||
const failure = run(
|
||||
"commit",
|
||||
["--state-dir", stateDir, "--frame", framePath],
|
||||
1,
|
||||
);
|
||||
assert.equal(failure.error, "missing_cognition_statement");
|
||||
assert.equal(failure.details.field, "gravity_frame.real_purpose");
|
||||
});
|
||||
|
||||
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