feat(brain): encode Guanghu OS cognitive control
This commit is contained in:
parent
cf3e106ec9
commit
098a29e417
16 changed files with 768 additions and 7 deletions
52
gls/scripts/audit-protocol-execution-bindings.test.mjs
Normal file
52
gls/scripts/audit-protocol-execution-bindings.test.mjs
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
import assert from "node:assert/strict";
|
||||
import test from "node:test";
|
||||
|
||||
import { audit } from "./audit-protocol-execution-bindings.mjs";
|
||||
|
||||
test("classifies registered-only control protocols separately from native evidence", () => {
|
||||
const result = audit(
|
||||
{
|
||||
registry_id: "TEST",
|
||||
status: "CURRENT",
|
||||
registered_draft_protocols: [
|
||||
{
|
||||
id: "GLS-0130",
|
||||
acronym: "GLC",
|
||||
source: "glc.hdlp",
|
||||
implementation: "NOT_STARTED"
|
||||
},
|
||||
{
|
||||
id: "GLS-0841",
|
||||
acronym: "GHAL",
|
||||
source: "ghal.hdlp",
|
||||
implementation: "IMPLEMENTED_ON_LAB"
|
||||
}
|
||||
]
|
||||
},
|
||||
() => true
|
||||
);
|
||||
|
||||
assert.equal(result.registered_only_count, 1);
|
||||
assert.equal(result.registry_implementation_claim_count, 1);
|
||||
assert.equal(result.production_control_registered_only_count, 1);
|
||||
assert.equal(result.production_control_ready_count, 0);
|
||||
assert.equal(result.aggregate_production_control_state, "FAIL_0");
|
||||
assert.equal(result.entries[0].lane, "PRODUCTION_COGNITIVE_CONTROL");
|
||||
assert.equal(result.entries[1].lane, "BARE_METAL_RESEARCH_AND_RECOVERY");
|
||||
});
|
||||
|
||||
test("rejects duplicate protocol ids", () => {
|
||||
assert.throws(
|
||||
() =>
|
||||
audit(
|
||||
{
|
||||
registered_draft_protocols: [
|
||||
{ id: "GLS-0130", source: "a", implementation: "NOT_STARTED" },
|
||||
{ id: "GLS-0130", source: "b", implementation: "NOT_STARTED" }
|
||||
]
|
||||
},
|
||||
() => true
|
||||
),
|
||||
/duplicate protocol id/
|
||||
);
|
||||
});
|
||||
Loading…
Reference in a new issue