Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
test: memory_propose joins the coverage ledger and managed-writer census; thin-client matrix and PGLite doctor goldens add the wave's command and checks
garrytan0ef483ab3b98
diff --git a/docs/architecture/managed-mutating-writers.tsv b/docs/architecture/managed-mutating-writers.tsvindex 511d4eb04a..873da6d260 100644--- a/docs/architecture/managed-mutating-writers.tsv+++ b/docs/architecture/managed-mutating-writers.tsv@@ -6,6 +6,7 @@op remember coordinator submitRememberMutation admits a journaled page mutation.op forget coordinator submitForgetMutation records a coordinated withdrawal.op memory_write coordinator Each fact is a remember write (submitRememberMutation) under a per-member child request id.+op memory_propose no_canonical_write Inserts one memory_proposals row awaiting the owner; no page changes until gbrain memory-proposals approve admits the held write to the journal under the proposal's stored authority.op put_page coordinator submitPageMutation; unbound Postgres sources refuse unless persistence.unbound_write=database_only.op put_pages coordinator Every page is admitted as its own coordinated put_page write request, together in one journal transaction (#6007)op delete_page coordinator submitPageMutation soft delete or trusted-local purge.diff --git a/test/cli-thin-client-refusal-matrix.test.ts b/test/cli-thin-client-refusal-matrix.test.tsindex 34b28aec23..02bc056370 100644--- a/test/cli-thin-client-refusal-matrix.test.ts+++ b/test/cli-thin-client-refusal-matrix.test.ts@@ -104,8 +104,8 @@ describe('A16b thin-client refusal matrix', () => {routing = await run(ROUTING_ROWS);}, 300_000);- test('the matrix covers all 72 handleCliOnly cases', () => {- expect(CASES.length).toBe(72);+ test('the matrix covers all 73 handleCliOnly cases', () => {+ expect(CASES.length).toBe(73);});test('every handleCliOnly case, run bare on a thin client, matches the golden', () => {diff --git a/test/fixtures/goldens/cli/thin-client-cases.json b/test/fixtures/goldens/cli/thin-client-cases.jsonindex 27fa1d0ceb..857d14e74c 100644--- a/test/fixtures/goldens/cli/thin-client-cases.json+++ b/test/fixtures/goldens/cli/thin-client-cases.json@@ -727,6 +727,16 @@],"stdout": []},+ {+ "argv": "memory-proposals",+ "exitCode": 1,+ "stderr": [+ "Error [requires_local_engine]: `gbrain memory-proposals` requires a local engine. This install is a thin client of http://127.0.0.1:1/mcp.",+ "Fix: gbrain memory-proposals",+ "Docs: https://github.com/garrytan/gbrain/blob/master/docs/guides/error-codes.md#requires_local_engine"+ ],+ "stdout": []+ },{"argv": "core","exitCode": 1,diff --git a/test/fixtures/goldens/doctor/content-pglite-human.json b/test/fixtures/goldens/doctor/content-pglite-human.jsonindex 1893717b14..ecf50e7df7 100644--- a/test/fixtures/goldens/doctor/content-pglite-human.json+++ b/test/fixtures/goldens/doctor/content-pglite-human.json@@ -87,12 +87,13 @@" [INFO] access_policy_invalid: Not applicable: no source has a folder rule."," [INFO] access_policy_store_mismatch: Not applicable: no source has a folder rule."," [INFO] access_may_act_for_wildcard: Not applicable: no page names readers and no member exists.",+ " [INFO] attest_read_shared_scope: Not applicable: no attest credential reads named sources as the person (--attest-read person)."," [OK] rls: Skipped (PGLite — no PostgREST exposure, RLS not applicable)"," [OK] function_search_path: Every gbrain function that pins a search_path ends it with pg_temp"," [OK] database_encoding: Skipped (PGLite is always UTF8)"," [OK] schema_version: Version <latest> (latest: <latest>)"," [OK] schema_columns: 1392 column(s) verified against live schema",- " [OK] schema_missing_tables: All 175 table(s) the applied migrations create exist.",+ " [OK] schema_missing_tables: All 177 table(s) the applied migrations create exist."," [OK] rls_event_trigger: Skipped (PGLite — no event trigger support)"," [INFO] embeddings: Not applicable: embeddings are disabled on this brain (keyword search keeps working)."," [INFO] embedding_provider: Not probed: embeddings are disabled on this brain by choice (keyword search keeps working).",@@ -212,6 +213,7 @@" [OK] tracked_ownership_marker: 1 Git checkout(s) track no ownership marker (markers on disk stay untracked and are denied on push)."," [OK] foreign_writers: Every locally created commit in the covered window of 1 repository is in gbrain's commit ledger, and no page file waits uncommitted for more than 30 minutes. A repository gbrain has not committed in yet has no ledger, so its window is empty."," [OK] decide_health: System One is off (every decide slot is off; nothing is sent).",+ " [OK] memory_proposals_pending: No memory proposals await the owner."," [OK] unlinked_facts: No active facts yet; nothing to link."," [OK] edge_validity: relationships: none yet; read policy on; contradiction mode propose (default)"," [OK] auto_chronicle: auto_chronicle is on (default). Last 24 h: 0 of 200 automatic extraction calls. Last 7 days: 0 extracted, 0 failed, 0 skipped; $0.00 known spend. 0 page(s) pending. No chat provider is configured, so nothing will be extracted until one is.",diff --git a/test/fixtures/goldens/doctor/content-pglite-json.json b/test/fixtures/goldens/doctor/content-pglite-json.jsonindex ccf2242b6f..b98a217b7b 100644--- a/test/fixtures/goldens/doctor/content-pglite-json.json+++ b/test/fixtures/goldens/doctor/content-pglite-json.json@@ -1124,6 +1124,15 @@"severity": "info","status": "ok"},+ {+ "category": "brain",+ "elapsed_ms": "<volatile>",+ "message": "Not applicable: no attest credential reads named sources as the person (--attest-read person).",+ "name": "attest_read_shared_scope",+ "readiness_state": "not_applicable",+ "severity": "info",+ "status": "ok"+ },{"category": "ops","elapsed_ms": "<volatile>",@@ -1162,7 +1171,7 @@{"category": "meta","elapsed_ms": "<volatile>",- "message": "All 175 table(s) the applied migrations create exist.",+ "message": "All 177 table(s) the applied migrations create exist.","name": "schema_missing_tables","status": "ok"},@@ -2855,6 +2864,13 @@"name": "decide_health","status": "ok"},+ {+ "category": "brain",+ "elapsed_ms": "<volatile>",+ "message": "No memory proposals await the owner.",+ "name": "memory_proposals_pending",+ "status": "ok"+ },{"category": "brain","details": {diff --git a/test/fixtures/goldens/doctor/hot-checks-pglite-json.json b/test/fixtures/goldens/doctor/hot-checks-pglite-json.jsonindex f871067c33..c79b42abc3 100644--- a/test/fixtures/goldens/doctor/hot-checks-pglite-json.json+++ b/test/fixtures/goldens/doctor/hot-checks-pglite-json.json@@ -1195,6 +1195,15 @@"severity": "info","status": "ok"},+ {+ "category": "brain",+ "elapsed_ms": "<volatile>",+ "message": "Not applicable: no attest credential reads named sources as the person (--attest-read person).",+ "name": "attest_read_shared_scope",+ "readiness_state": "not_applicable",+ "severity": "info",+ "status": "ok"+ },{"category": "ops","elapsed_ms": "<volatile>",@@ -1233,7 +1242,7 @@{"category": "meta","elapsed_ms": "<volatile>",- "message": "All 175 table(s) the applied migrations create exist.",+ "message": "All 177 table(s) the applied migrations create exist.","name": "schema_missing_tables","status": "ok"},@@ -3087,6 +3096,13 @@"name": "decide_health","status": "ok"},+ {+ "category": "brain",+ "elapsed_ms": "<volatile>",+ "message": "No memory proposals await the owner.",+ "name": "memory_proposals_pending",+ "status": "ok"+ },{"category": "brain","details": {@@ -6320,6 +6336,15 @@"severity": "info","status": "ok"},+ {+ "category": "brain",+ "elapsed_ms": "<volatile>",+ "message": "Not applicable: no attest credential reads named sources as the person (--attest-read person).",+ "name": "attest_read_shared_scope",+ "readiness_state": "not_applicable",+ "severity": "info",+ "status": "ok"+ },{"category": "ops","elapsed_ms": "<volatile>",@@ -6358,7 +6383,7 @@{"category": "meta","elapsed_ms": "<volatile>",- "message": "All 175 table(s) the applied migrations create exist.",+ "message": "All 177 table(s) the applied migrations create exist.","name": "schema_missing_tables","status": "ok"},@@ -8224,6 +8249,13 @@"name": "decide_health","status": "ok"},+ {+ "category": "brain",+ "elapsed_ms": "<volatile>",+ "message": "No memory proposals await the owner.",+ "name": "memory_proposals_pending",+ "status": "ok"+ },{"category": "brain","details": {diff --git a/test/fixtures/goldens/doctor/json-pglite-degraded.json b/test/fixtures/goldens/doctor/json-pglite-degraded.jsonindex de033160df..a0315b701f 100644--- a/test/fixtures/goldens/doctor/json-pglite-degraded.json+++ b/test/fixtures/goldens/doctor/json-pglite-degraded.json@@ -1084,7 +1084,7 @@{"category": "meta","elapsed_ms": "<volatile>",- "message": "All 175 table(s) the applied migrations create exist.",+ "message": "All 177 table(s) the applied migrations create exist.","name": "schema_missing_tables","status": "ok"},diff --git a/test/fixtures/goldens/doctor/json-pglite-fresh.json b/test/fixtures/goldens/doctor/json-pglite-fresh.jsonindex f0cd3d80af..783f42dc49 100644--- a/test/fixtures/goldens/doctor/json-pglite-fresh.json+++ b/test/fixtures/goldens/doctor/json-pglite-fresh.json@@ -1131,7 +1131,7 @@{"category": "meta","elapsed_ms": "<volatile>",- "message": "All 175 table(s) the applied migrations create exist.",+ "message": "All 177 table(s) the applied migrations create exist.","name": "schema_missing_tables","status": "ok"},diff --git a/test/operations-coverage-ledger.test.ts b/test/operations-coverage-ledger.test.tsindex d12ad26738..630ad3e7dd 100644--- a/test/operations-coverage-ledger.test.ts+++ b/test/operations-coverage-ledger.test.ts@@ -35,6 +35,7 @@ const LEDGER: Record<string, string> = {forget: 'test/memory-verbs-conformance.test.ts',memory_recall: 'test/qm-memory-tools.test.ts',memory_write: 'test/qm-memory-tools.test.ts',+ memory_propose: 'test/qm-memory-propose.test.ts',get_page: 'test/get-page-federated-scope.test.ts',put_page: 'test/put-page-provenance.test.ts',put_pages: 'test/put-pages-batch.test.ts',