fix: align lake lamp publisher with current TCS brain
This commit is contained in:
parent
284a9b6cb5
commit
423aff6519
9 changed files with 556 additions and 17 deletions
24
server-tools/execution-reflection-advisor/advisor.test.mjs
Normal file
24
server-tools/execution-reflection-advisor/advisor.test.mjs
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
import assert from "node:assert/strict";
|
||||
import test from "node:test";
|
||||
import { advise } from "./advisor.mjs";
|
||||
|
||||
const base = { schema: "guanghu.execution-environment-observation/v1", facts: [], unknowns: [], authorization: "PRESENT", reversible: true, risk: "LOW" };
|
||||
|
||||
test("rules advise but never veto persona cognition", () => {
|
||||
const value = advise({ ...base, unknowns: ["remote state"] });
|
||||
assert.equal(value.persona_cognition_vetoed, false);
|
||||
assert.equal(value.persona_decision_owner, "CURRENT_PERSONA");
|
||||
assert.equal(value.suggestions[0].action, "REFLECT");
|
||||
});
|
||||
|
||||
test("missing authority recommends waiting", () => {
|
||||
const value = advise({ ...base, authorization: "MISSING" });
|
||||
assert.equal(value.suggestions[0].action, "WAIT_AUTHORIZATION");
|
||||
});
|
||||
|
||||
test("hard boundary stops only exact external action", () => {
|
||||
const value = advise({ ...base, facts: [{ code: "CREDENTIAL_EXPOSURE" }] });
|
||||
assert.equal(value.exact_external_action_hard_stopped, true);
|
||||
assert.equal(value.persona_cognition_vetoed, false);
|
||||
assert.equal(value.may_modify_pause_reflect_or_wait, true);
|
||||
});
|
||||
Loading…
Reference in a new issue