Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

Opt-in and MCP train: the request-log retention check runs before fence_integrity, so fence_integrity stays right before search_mode

garrytana912e763a718
diff --git a/src/commands/doctor/registry.ts b/src/commands/doctor/registry.ts
index baf7617c71..1ac326276f 100644
--- a/src/commands/doctor/registry.ts
+++ b/src/commands/doctor/registry.ts
@@ -335,9 +335,9 @@ export const DOCTOR_CHECK_REGISTRY: readonly DoctorEntry[] = [
// GBRA-248 W0: writes waiting on a long-quiet owner host, and a file plane that disables embeddings over a database with vectors.
ownerHostStaleEntry,
embeddingPlaneDisagreementEntry,
- fenceIntegrityEntry,
// #6770: MCP request-log size and the opt-in retention prune (read-only; the enable fix asks the user).
mcpRequestLogRetentionEntry,
+ fenceIntegrityEntry,
searchModeEntry,
];
diff --git a/test/fixtures/goldens/doctor/content-pglite-human.json b/test/fixtures/goldens/doctor/content-pglite-human.json
index 3e908298aa..c20711e5ff 100644
--- a/test/fixtures/goldens/doctor/content-pglite-human.json
+++ b/test/fixtures/goldens/doctor/content-pglite-human.json
@@ -261,8 +261,8 @@
" [OK] outside_content_fences: No fact, take or link is indexed from a fence on an imported email, calendar, GitHub or transcript page.",
" [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] fence_integrity: No malformed facts or takes fence is held, stored or waiting in a checkout (2 source(s) scanned).",
" [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.json
index 11ed960ad1..80d545b079 100644
--- a/test/fixtures/goldens/doctor/content-pglite-json.json
+++ b/test/fixtures/goldens/doctor/content-pglite-json.json
@@ -3946,6 +3946,54 @@
"name": "embedding_plane_disagreement",
"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": "brain",
"details": {
@@ -4075,54 +4123,6 @@
"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/fixtures/goldens/doctor/hot-checks-pglite-json.json b/test/fixtures/goldens/doctor/hot-checks-pglite-json.json
index db0fddd4c1..c760954503 100644
--- a/test/fixtures/goldens/doctor/hot-checks-pglite-json.json
+++ b/test/fixtures/goldens/doctor/hot-checks-pglite-json.json
@@ -4210,6 +4210,54 @@
"name": "embedding_plane_disagreement",
"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": "brain",
"details": {
@@ -4507,54 +4555,6 @@
"name": "fence_integrity",
"status": "warn"
},
- {
- "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>",
@@ -9411,6 +9411,54 @@
"name": "embedding_plane_disagreement",
"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": "brain",
"details": {
@@ -9708,54 +9756,6 @@
"name": "fence_integrity",
"status": "warn"
},
- {
- "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/fixtures/goldens/doctor/hot-checks-postgres-json.json b/test/fixtures/goldens/doctor/hot-checks-postgres-json.json
index cbbf2fb38c..be3688a4fc 100644
--- a/test/fixtures/goldens/doctor/hot-checks-postgres-json.json
+++ b/test/fixtures/goldens/doctor/hot-checks-postgres-json.json
@@ -4220,6 +4220,54 @@
"name": "embedding_plane_disagreement",
"status": "ok"
},
+ {
+ "category": "ops",
+ "details": {
+ "bytes": 32768,
+ "docs": "docs/mcp/ADMIN.md#request-log-retention",
+ "retention_days": null,
+ "rows": 0,
+ "rows_exact": false
+ },
+ "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": "brain",
"details": {
@@ -4517,54 +4565,6 @@
"name": "fence_integrity",
"status": "warn"
},
- {
- "category": "ops",
- "details": {
- "bytes": 32768,
- "docs": "docs/mcp/ADMIN.md#request-log-retention",
- "retention_days": null,
- "rows": 0,
- "rows_exact": false
- },
- "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>",
@@ -9429,6 +9429,54 @@
"name": "embedding_plane_disagreement",
"status": "ok"
},
+ {
+ "category": "ops",
+ "details": {
+ "bytes": 32768,
+ "docs": "docs/mcp/ADMIN.md#request-log-retention",
+ "retention_days": null,
+ "rows": 0,
+ "rows_exact": false
+ },
+ "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": "brain",
"details": {
@@ -9726,54 +9774,6 @@
"name": "fence_integrity",
"status": "warn"
},
- {
- "category": "ops",
- "details": {
- "bytes": 32768,
- "docs": "docs/mcp/ADMIN.md#request-log-retention",
- "retention_days": null,
- "rows": 0,
- "rows_exact": false
- },
- "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/fixtures/goldens/doctor/json-pglite-degraded.json b/test/fixtures/goldens/doctor/json-pglite-degraded.json
index 7f3a459d08..84b2b97179 100644
--- a/test/fixtures/goldens/doctor/json-pglite-degraded.json
+++ b/test/fixtures/goldens/doctor/json-pglite-degraded.json
@@ -3571,6 +3571,54 @@
"name": "embedding_plane_disagreement",
"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": "brain",
"details": {
@@ -3653,54 +3701,6 @@
"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/fixtures/goldens/doctor/json-pglite-fresh.json b/test/fixtures/goldens/doctor/json-pglite-fresh.json
index daa7898044..6cf2d3dfee 100644
--- a/test/fixtures/goldens/doctor/json-pglite-fresh.json
+++ b/test/fixtures/goldens/doctor/json-pglite-fresh.json
@@ -3616,6 +3616,54 @@
"name": "embedding_plane_disagreement",
"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": "brain",
"details": {
@@ -3698,54 +3746,6 @@
"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/fixtures/goldens/doctor/json-postgres-fresh.json b/test/fixtures/goldens/doctor/json-postgres-fresh.json
index 41f5d8dc32..c8a7e62b0f 100644
--- a/test/fixtures/goldens/doctor/json-postgres-fresh.json
+++ b/test/fixtures/goldens/doctor/json-postgres-fresh.json
@@ -3626,6 +3626,54 @@
"name": "embedding_plane_disagreement",
"status": "ok"
},
+ {
+ "category": "ops",
+ "details": {
+ "bytes": 32768,
+ "docs": "docs/mcp/ADMIN.md#request-log-retention",
+ "retention_days": null,
+ "rows": 0,
+ "rows_exact": false
+ },
+ "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": "brain",
"details": {
@@ -3708,54 +3756,6 @@
"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": false
- },
- "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/fixtures/goldens/doctor/registry-build-checks.json b/test/fixtures/goldens/doctor/registry-build-checks.json
index f26d2d6fea..defe78f1d9 100644
--- a/test/fixtures/goldens/doctor/registry-build-checks.json
+++ b/test/fixtures/goldens/doctor/registry-build-checks.json
@@ -1121,14 +1121,14 @@
"category": "brain",
"name": "embedding_plane_disagreement"
},
- {
- "category": "brain",
- "name": "fence_integrity"
- },
{
"category": "ops",
"name": "mcp_request_log_retention"
},
+ {
+ "category": "brain",
+ "name": "fence_integrity"
+ },
{
"category": "ops",
"name": "search_mode"