Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
Opt-in and MCP train: pin the local think model error, regenerate two goldens
garrytanead42430e4f9
diff --git a/test/fixtures/goldens/cli/thin-client-cases.json b/test/fixtures/goldens/cli/thin-client-cases.jsonindex 857d14e74c..c8243b538d 100644--- a/test/fixtures/goldens/cli/thin-client-cases.json+++ b/test/fixtures/goldens/cli/thin-client-cases.json@@ -629,7 +629,9 @@" --model <name> Override the model: provider:model (preferred) or"," provider/model or a bare alias. An explicit --model that"," can't be resolved is a hard error (exit 1) — never a",- " silent no-LLM degrade.",+ " silent no-LLM degrade. On a thin client the remote",+ " brain answers with its own think model unless its",+ " host allows this one (think.remote_models)."," --source <id> Scope evidence gathering to this source. An unknown"," or archived source is a hard error (exit 1)."," --since YYYY-MM-DD Start of temporal window",diff --git a/test/fixtures/goldens/doctor/content-pglite-human.json b/test/fixtures/goldens/doctor/content-pglite-human.jsonindex ecf50e7df7..3e908298aa 100644--- a/test/fixtures/goldens/doctor/content-pglite-human.json+++ b/test/fixtures/goldens/doctor/content-pglite-human.json@@ -93,7 +93,7 @@" [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 177 table(s) the applied migrations create exist.",+ " [OK] schema_missing_tables: All 178 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).",@@ -262,6 +262,7 @@" [OK] owner_host_stale: No managed write is waiting on an owner host."," [OK] embedding_plane_disagreement: The config file disables embeddings and the database holds no vectors."," [OK] fence_integrity: No malformed facts or takes fence is held, stored or waiting in a checkout (2 source(s) scanned).",+ " [INFO] mcp_request_log_retention: The MCP request log holds 0 row(s) (0.0 MB); request-log retention is off, so it keeps every request."," [OK] search_mode: Mode: conservative (no per-key overrides — mode bundle is canonical)."," [OK] hidden_by_search_policy: No pages hidden by search-exclude policy."," [OK] eval_drift: No retrieval-affecting files changed in working tree.",diff --git a/test/fixtures/goldens/doctor/content-pglite-json.json b/test/fixtures/goldens/doctor/content-pglite-json.jsonindex b98a217b7b..11ed960ad1 100644--- a/test/fixtures/goldens/doctor/content-pglite-json.json+++ b/test/fixtures/goldens/doctor/content-pglite-json.json@@ -1171,7 +1171,7 @@{"category": "meta","elapsed_ms": "<volatile>",- "message": "All 177 table(s) the applied migrations create exist.",+ "message": "All 178 table(s) the applied migrations create exist.","name": "schema_missing_tables","status": "ok"},@@ -4075,6 +4075,54 @@"name": "fence_integrity","status": "ok"},+ {+ "category": "ops",+ "details": {+ "bytes": 32768,+ "docs": "docs/mcp/ADMIN.md#request-log-retention",+ "retention_days": null,+ "rows": 0,+ "rows_exact": true+ },+ "elapsed_ms": "<volatile>",+ "fix": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "config",+ "set",+ "cycle.purge.mcp_request_log_retention_days",+ "90",+ "--brain",+ "host"+ ],+ "command": "gbrain config set cycle.purge.mcp_request_log_retention_days 90 --brain host",+ "consent": [+ "destructive"+ ],+ "docs": "https://github.com/garrytan/gbrain/blob/master/docs/mcp/ADMIN.md#request-log-retention",+ "next": "ask_user",+ "requires_exclusive": false,+ "user_message": "Your MCP request log holds 0 row(s) (0.0 MB) and nothing prunes it. Turn on 90-day retention? Request details older than 90 days (operation, status, parameters, errors) will be deleted and cannot be restored; per-client totals and audit rows are kept.",+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "mcp_request_log_retention",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "Turns on the request-log prune: the next cycle purge phase (or, on a PGLite brain, a live serve within the hour) deletes request rows older than 90 days. Per-client lifetime totals and the audit rows (surface, memory-setting and access changes) are kept."+ },+ "message": "The MCP request log holds 0 row(s) (0.0 MB); request-log retention is off, so it keeps every request.",+ "name": "mcp_request_log_retention",+ "readiness_state": "disabled_by_choice",+ "severity": "info",+ "status": "ok"+ },{"category": "ops","elapsed_ms": "<volatile>",diff --git a/test/ops-error-fixes-g2.test.ts b/test/ops-error-fixes-g2.test.tsindex a40adf3bcb..a63fd37eed 100644--- a/test/ops-error-fixes-g2.test.ts+++ b/test/ops-error-fixes-g2.test.ts@@ -119,13 +119,14 @@ describe('loops ops', () => {});describe('think', () => {- test('an unusable explicit model is a caller error naming `model`, not --model', async () => {- const env = await envelopeOf('think', ctx('http'), { question: 'q', model: 'bogusprovider:foo' });+ test('an unusable explicit model is a caller error on the local CLI naming --model', async () => {+ const env = await envelopeOf('think', ctx('cli'), { question: 'q', model: 'bogusprovider:foo' });expect(env.code).toBe('invalid_params');expect(env.message).toMatch(/not usable.*unknown_provider/);- expect(`${env.message} ${env.suggestion}`).not.toMatch(/--model/);- expect(env.suggestion).toContain('`model`');+ expect(env.suggestion).toMatch(/--model/);});+ // GBRA-437 (#9050): a remote caller's unusable model is never an error; the host model answers+ // with MODEL_OVERRIDE_IGNORED:unusable, pinned on real engines in test/think-remote-model.test.ts.});describe('add_timeline_entry', () => {