Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
tests: pinned CLI command count 65 (core alongside master's edge-proposals)
garrytanf3de9623fa21
diff --git a/test/cli-dispatch-phase.test.ts b/test/cli-dispatch-phase.test.tsindex 8c130b07ff..82febfb007 100644--- a/test/cli-dispatch-phase.test.ts+++ b/test/cli-dispatch-phase.test.ts@@ -89,7 +89,7 @@ describe('CLI dispatch shape (master AST)', () => {const shape = await expectNormalizerStable(extractCliDispatch, astNormalizer);expect(shape.sets.CLI_ONLY).toEqual([...CLI_ONLY].sort());expect(shape.sets.THIN_CLIENT_REFUSED_COMMANDS).toEqual([...THIN_CLIENT_REFUSED_COMMANDS].sort());- expect(shape.switchCases.length).toBe(64);+ expect(shape.switchCases.length).toBe(65);expect(Object.keys(shape.commands).length).toBeGreaterThanOrEqual(shape.sets.CLI_ONLY.length);});diff --git a/test/cli-thin-client-refusal-matrix.test.ts b/test/cli-thin-client-refusal-matrix.test.tsindex db835460e8..ec2a329fc9 100644--- a/test/cli-thin-client-refusal-matrix.test.ts+++ b/test/cli-thin-client-refusal-matrix.test.ts@@ -12,7 +12,7 @@* against a remote brain), routes a host-bound subcommand, changes a hint or* exit code, or moves a check across the connectEngine terminator.* Why new: test/cli-dispatch-thin-client.test.ts asserts refusal for a- * hand-picked subset by substring; nothing pins all 64 cases or the full+ * hand-picked subset by substring; nothing pins all 65 cases or the full* text. Seam: none.** Nothing leaves the machine: issuer and MCP URLs point at 127.0.0.1:1@@ -104,8 +104,8 @@ describe('A16b thin-client refusal matrix', () => {routing = await run(ROUTING_ROWS);}, 300_000);- test('the matrix covers all 64 handleCliOnly cases', () => {- expect(CASES.length).toBe(64);+ test('the matrix covers all 65 handleCliOnly cases', () => {+ expect(CASES.length).toBe(65);});test('every handleCliOnly case, run bare on a thin client, matches the golden', () => {diff --git a/test/fixtures/goldens/cli/literal-imports.json b/test/fixtures/goldens/cli/literal-imports.jsonindex 89c0fd2682..68e15434f7 100644--- a/test/fixtures/goldens/cli/literal-imports.json+++ b/test/fixtures/goldens/cli/literal-imports.json@@ -46,6 +46,9 @@"conversation-parser": ["./commands/conversation-parser.ts"],+ "core": [+ "./commands/core.ts"+ ],"edge-proposals": ["./commands/edge-proposals.ts"],diff --git a/test/fixtures/goldens/cli/thin-client-cases.json b/test/fixtures/goldens/cli/thin-client-cases.jsonindex f4dc787522..187e4af26e 100644--- a/test/fixtures/goldens/cli/thin-client-cases.json+++ b/test/fixtures/goldens/cli/thin-client-cases.json@@ -666,6 +666,16 @@],"stdout": []},+ {+ "argv": "core",+ "exitCode": 1,+ "stderr": [+ "Error [requires_local_engine]: `gbrain core` requires a local engine. This install is a thin client of http://127.0.0.1:1/mcp.",+ "Fix: gbrain core",+ "Docs: https://github.com/garrytan/gbrain/blob/master/docs/guides/error-codes.md#requires_local_engine"+ ],+ "stdout": []+ },{"argv": "connectors","exitCode": 1,diff --git a/test/fixtures/goldens/cli/tools-json.json b/test/fixtures/goldens/cli/tools-json.jsonindex fb4b430e37..f9ffc190d2 100644--- a/test/fixtures/goldens/cli/tools-json.json+++ b/test/fixtures/goldens/cli/tools-json.json@@ -2,8 +2,8 @@"golden": {"exitCode": 0,"stderr": "",- "stdoutBytes": 198595,- "stdoutSha256": "7d2b43ea2fc64cd07907cc2fd1ecb1fae4812fe23091cd76629a7512ff57de98",+ "stdoutBytes": 198857,+ "stdoutSha256": "ef37ddc34736248fba6d360976da8f8217d1a9674eaca8d44fd29243cc76377e","toolNames": ["remember","entity",@@ -172,9 +172,10 @@"parameters": {"entity": "string?","expected_revision": "string?",- "fact": "string",+ "fact": "string?","force": "boolean?","infer_entity": "boolean?",+ "items": "array?","kind": "string?","provenance": "string","request_id": "string?",@@ -205,6 +206,13 @@"description": "Default true.","type": "boolean"},+ "items": {+ "description": "Up to 20 facts at once (e.g. before compaction): [{fact, entity?, kind?, ttl?, provenance?}]",+ "items": {+ "type": "object"+ },+ "type": "array"+ },"kind": {"description": "Default fact.","enum": [@@ -242,7 +250,6 @@}},"required": [- "fact","provenance"],"type": "object"@@ -5217,14 +5224,14 @@"scope": "read"},{- "description": "MEMORY VERB (v1): budget-packed cards, open threads and hot facts for up to 8 entities, zero LLM. Call at session start and after compaction.",+ "description": "MEMORY VERB (v1): core memory plus budget-packed cards, open threads and hot facts for up to 8 entities, zero LLM. Call at session start and after compaction.","idempotent": true,"local_only": false,"mutating": false,"name": "context_pack","parameters": {"budget_tokens": "number?",- "entities": "string",+ "entities": "string?","include_private": "boolean?","session_id": "string?","since": "string?"@@ -5237,7 +5244,7 @@"type": "number"},"entities": {- "description": "Comma-separated names or slugs (max 8).",+ "description": "Comma-separated names or slugs (max 8); omit for core only.","type": "string"},"include_private": {@@ -5253,9 +5260,7 @@"type": "string"}},- "required": [- "entities"- ],+ "required": [],"type": "object"},"scope": "read"diff --git a/test/fixtures/goldens/doctor/json-pglite-degraded.json b/test/fixtures/goldens/doctor/json-pglite-degraded.jsonindex 94f7bae7f2..4c9220c130 100644--- a/test/fixtures/goldens/doctor/json-pglite-degraded.json+++ b/test/fixtures/goldens/doctor/json-pglite-degraded.json@@ -507,13 +507,13 @@},{"category": "meta",- "message": "Version 204 (latest: 204)",+ "message": "Version 205 (latest: 205)","name": "schema_version","status": "ok"},{"category": "meta",- "message": "901 column(s) verified against live schema",+ "message": "911 column(s) verified against live schema","name": "schema_columns","status": "ok"},@@ -1584,6 +1584,21 @@"name": "revision_backfill","status": "ok"},+ {+ "category": "brain",+ "details": {+ "bad_config": [],+ "chars_limit": 4000,+ "chars_used": 0,+ "compiled": [],+ "docs": "docs/guides/core-memory.md",+ "enabled": true,+ "pages": 0+ },+ "message": "No core pages. Start one with gbrain core init, then fill it in with the user.",+ "name": "core_memory",+ "status": "ok"+ },{"category": "ops","message": "Mode: conservative (no per-key overrides — mode bundle is canonical).",diff --git a/test/fixtures/goldens/doctor/json-pglite-fresh.json b/test/fixtures/goldens/doctor/json-pglite-fresh.jsonindex 06a1d81f94..ca14e85fab 100644--- a/test/fixtures/goldens/doctor/json-pglite-fresh.json+++ b/test/fixtures/goldens/doctor/json-pglite-fresh.json@@ -510,13 +510,13 @@},{"category": "meta",- "message": "Version 204 (latest: 204)",+ "message": "Version 205 (latest: 205)","name": "schema_version","status": "ok"},{"category": "meta",- "message": "901 column(s) verified against live schema",+ "message": "911 column(s) verified against live schema","name": "schema_columns","status": "ok"},@@ -1661,6 +1661,21 @@"name": "revision_backfill","status": "ok"},+ {+ "category": "brain",+ "details": {+ "bad_config": [],+ "chars_limit": 4000,+ "chars_used": 0,+ "compiled": [],+ "docs": "docs/guides/core-memory.md",+ "enabled": true,+ "pages": 0+ },+ "message": "No core pages. Start one with gbrain core init, then fill it in with the user.",+ "name": "core_memory",+ "status": "ok"+ },{"category": "ops","message": "Mode: conservative (no per-key overrides — mode bundle is canonical).",diff --git a/test/fixtures/goldens/migrations/records.json b/test/fixtures/goldens/migrations/records.jsonindex 6f81d1cc01..e3be0a2b6c 100644--- a/test/fixtures/goldens/migrations/records.json+++ b/test/fixtures/goldens/migrations/records.json@@ -1,6 +1,6 @@{"golden": {- "count": 199,+ "count": 200,"gaps": [17,18,@@ -29,7 +29,7 @@"slugifyPath": "401dbca23580865d8b168dd8d84db4a6c708c6610d7cb61abafc7d0ee9809063","verifyProjectionStatistics": "59d9ccfea1c53384d8607874a51209a9c2dfd51b2b85a2cb6269fa4120faf1f3"},- "latest": 204,+ "latest": 205,"records": [{"handler": {@@ -3029,6 +3029,19 @@"transaction": "absent","verify": "absent","version": 204+ },+ {+ "handler": "absent",+ "idempotent": true,+ "name": "core_edit_notices",+ "sql": {+ "length": 721,+ "sha256": "d025431d38cc094b0f5ea0b852fa2a8c288a67c10c61cdb5a16c72bee8e7dd1f"+ },+ "sqlFor": "absent",+ "transaction": "absent",+ "verify": "absent",+ "version": 205}],"versions": [@@ -3230,7 +3243,8 @@201,202,203,- 204+ 204,+ 205]},"normalizer": "migrations-record-v1"