Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
test(goldens): PGLite doctor goldens carry google_calendar_readable (#5012) and the sync_freshness outcome text (#4960)
garrytand7486493bf7f
diff --git a/test/fixtures/goldens/doctor/content-pglite-human.json b/test/fixtures/goldens/doctor/content-pglite-human.jsonindex fe20f54280..3fb3dd7df5 100644--- a/test/fixtures/goldens/doctor/content-pglite-human.json+++ b/test/fixtures/goldens/doctor/content-pglite-human.json@@ -15,7 +15,7 @@"GBrain Health Check","===================","Top issues (ranked by cause):",- " [FAIL] sync_freshness → Source 'notes' has never been synced. Run `gbrain sync --source <id> --no-pull` for each stale source. 1 writer-owned canonical content source(s): upstream sync is not applicable; see canonical_content_writes for publication status",+ " [FAIL] sync_freshness → gbrain sync --source notes --no-pull --brain host"," [WARN] brain_score → gbrain doctor --remediation-plan --json --brain host"," [WARN] frontmatter_integrity → gbrain repair frontmatter --source notes --brain host"," [WARN] frontmatter_repairable → gbrain repair frontmatter --source notes --brain host",@@ -113,6 +113,7 @@" [OK] keyword_plan: Skipped: PGLite runs keyword search with no statement timeout; the canary applies to Postgres brains."," [OK] stale_embedding_effects: No committed write has a stale queued or failed embedding effect."," [OK] google_file_modes: No group- or world-readable gbrain files under Google source directories outside ~/.gbrain.",+ " [OK] google_calendar_readable: No Google source recorded an unreadable calendar at its last sync."," [OK] extractor_facts_expired: No conversation-extractor fact is left expired by the pre-v0.60.11.0 projection."," [OK] conversation_label_facts: No conversation fact carries the pre-fix meeting-label signature (a 1970-01-01 segment on a label page)."," [OK] conversation_outcomes_stale: No conversation extraction outcome predates extractor version 1.",@@ -160,7 +161,8 @@" [OK] image_assets: No image assets indexed yet"," [OK] ocr_health: OCR not in use (or no images ingested with OCR opt-in)"," [OK] image_embedding_coverage: No image pages indexed yet.",- " [FAIL] sync_freshness: Source 'notes' has never been synced. Run `gbrain sync --source <id> --no-pull` for each stale source. 1 writer-owned canonical content source(s): upstream sync is not applicable; see canonical_content_writes for publication status",+ " [FAIL] sync_freshness: Source 'notes': no successful sync recorded; no attempt recorded; run `gbrain sync --source notes --no-pull`. 1 writer-owned canonical content source(s): upstream sync is not applicable; see canonical_content_writes for publication status",+ " Fix: gbrain sync --source notes --no-pull --brain host"," [OK] canonical_content_writes: 1 writer-owned content source(s); no pending canonical publication or recovery."," [INFO] backup_coverage: Not urgent yet: the brain holds 5 page(s)+fact(s) and is under 7 days old (backup coaching starts at 25 items or 7 days). 2 knowledge asset(s) lack verified recovery: default (not_a_git_repo), notes (no git remote). A source repo with a pushed git remote restores its Markdown files only, never DB-only pages, facts, config or credentials. Run `gbrain backup status` for each asset's fix command."," [OK] sync_consolidation: 2 active sources on a managed brain. Recommended cron on the owner host, every 15 minutes: `gbrain sync --all --no-pull --hard-deadline 13m`. Managed sync never pulls: for each checkout that tracks a remote, chain `gbrain sources refresh <id>;` in front of it to take upstream commits. Keep the deadline under the interval: managed sync takes no per-source lock, so a tick that outlives the interval would overlap the next one.",diff --git a/test/fixtures/goldens/doctor/content-pglite-json.json b/test/fixtures/goldens/doctor/content-pglite-json.jsonindex 87ad6d512b..f63d0528d2 100644--- a/test/fixtures/goldens/doctor/content-pglite-json.json+++ b/test/fixtures/goldens/doctor/content-pglite-json.json@@ -1512,6 +1512,18 @@"name": "google_file_modes","status": "ok"},+ {+ "category": "ops",+ "details": {+ "count": 0,+ "docs": "docs/guides/google-connect.md#unreadable-calendar",+ "sources": []+ },+ "elapsed_ms": "<volatile>",+ "message": "No Google source recorded an unreadable calendar at its last sync.",+ "name": "google_calendar_readable",+ "status": "ok"+ },{"category": "brain","details": {@@ -2025,14 +2037,77 @@{"category": "brain","details": {+ "code": "sync_no_successful_sync",+ "no_successful_sync": [+ {+ "code": "sync_no_successful_sync",+ "fix": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "sync",+ "--source",+ "notes",+ "--no-pull"+ ],+ "consent": [],+ "docs": "docs/guides/troubleshooting.md#sync-freshness-no-successful-sync",+ "requires_exclusive": false,+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "sync_freshness",+ "--json"+ ]+ },+ "why": "No successful sync of notes is recorded; this runs one and stamps last_sync_at when it succeeds."+ },+ "held": 0,+ "job_id": null,+ "last_attempt_at": null,+ "reason": "no_attempt",+ "result": null,+ "source_id": "notes"+ }+ ],"stale_count": 1,"synced_recently_count": 0,"unchanged_count": 0,"writer_owned_count": 1},"elapsed_ms": "<volatile>",- "fix_unavailable_reason": "unstructured",- "message": "Source 'notes' has never been synced. Run `gbrain sync --source <id> --no-pull` for each stale source. 1 writer-owned canonical content source(s): upstream sync is not applicable; see canonical_content_writes for publication status",+ "fix": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "sync",+ "--source",+ "notes",+ "--no-pull",+ "--brain",+ "host"+ ],+ "command": "gbrain sync --source notes --no-pull --brain host",+ "consent": [],+ "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/troubleshooting.md#sync-freshness-no-successful-sync",+ "next": "run",+ "requires_exclusive": false,+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "sync_freshness",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "No successful sync of notes is recorded; this runs one and stamps last_sync_at when it succeeds."+ },+ "message": "Source 'notes': no successful sync recorded; no attempt recorded; run `gbrain sync --source notes --no-pull`. 1 writer-owned canonical content source(s): upstream sync is not applicable; see canonical_content_writes for publication status","name": "sync_freshness","status": "fail"},@@ -3189,7 +3264,36 @@"status": "unhealthy","top_issues": [{- "fix": "Source 'notes' has never been synced. Run `gbrain sync --source <id> --no-pull` for each stale source. 1 writer-owned canonical content source(s): upstream sync is not applicable; see canonical_content_writes for publication status",+ "action": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "sync",+ "--source",+ "notes",+ "--no-pull",+ "--brain",+ "host"+ ],+ "command": "gbrain sync --source notes --no-pull --brain host",+ "consent": [],+ "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/troubleshooting.md#sync-freshness-no-successful-sync",+ "next": "run",+ "requires_exclusive": false,+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "sync_freshness",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "No successful sync of notes is recorded; this runs one and stamps last_sync_at when it succeeds."+ },+ "fix": "Source 'notes': no successful sync recorded; no attempt recorded; run `gbrain sync --source notes --no-pull`. 1 writer-owned canonical content source(s): upstream sync is not applicable; see canonical_content_writes for publication status","name": "sync_freshness","status": "fail","tier": "root"diff --git a/test/fixtures/goldens/doctor/hot-checks-pglite-json.json b/test/fixtures/goldens/doctor/hot-checks-pglite-json.jsonindex f679c90501..8b2364223a 100644--- a/test/fixtures/goldens/doctor/hot-checks-pglite-json.json+++ b/test/fixtures/goldens/doctor/hot-checks-pglite-json.json@@ -2155,14 +2155,77 @@{"category": "brain","details": {+ "code": "sync_no_successful_sync",+ "no_successful_sync": [+ {+ "code": "sync_no_successful_sync",+ "fix": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "sync",+ "--source",+ "plain",+ "--no-pull"+ ],+ "consent": [],+ "docs": "docs/guides/troubleshooting.md#sync-freshness-no-successful-sync",+ "requires_exclusive": false,+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "sync_freshness",+ "--json"+ ]+ },+ "why": "No successful sync of plain is recorded; this runs one and stamps last_sync_at when it succeeds."+ },+ "held": 0,+ "job_id": null,+ "last_attempt_at": null,+ "reason": "no_attempt",+ "result": null,+ "source_id": "plain"+ }+ ],"stale_count": 1,"synced_recently_count": 1,"unchanged_count": 0,"writer_owned_count": 1},"elapsed_ms": "<volatile>",- "fix_unavailable_reason": "unstructured",- "message": "Source 'plain' has never been synced. Run `gbrain sync --source <id> --no-pull` for each stale source. 1 writer-owned canonical content source(s): upstream sync is not applicable; see canonical_content_writes for publication status",+ "fix": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "sync",+ "--source",+ "plain",+ "--no-pull",+ "--brain",+ "host"+ ],+ "command": "gbrain sync --source plain --no-pull --brain host",+ "consent": [],+ "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/troubleshooting.md#sync-freshness-no-successful-sync",+ "next": "run",+ "requires_exclusive": false,+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "sync_freshness",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "No successful sync of plain is recorded; this runs one and stamps last_sync_at when it succeeds."+ },+ "message": "Source 'plain': no successful sync recorded; no attempt recorded; run `gbrain sync --source plain --no-pull`. 1 writer-owned canonical content source(s): upstream sync is not applicable; see canonical_content_writes for publication status","name": "sync_freshness","status": "fail"},@@ -3493,7 +3556,36 @@"status": "unhealthy","top_issues": [{- "fix": "Source 'plain' has never been synced. Run `gbrain sync --source <id> --no-pull` for each stale source. 1 writer-owned canonical content source(s): upstream sync is not applicable; see canonical_content_writes for publication status",+ "action": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "sync",+ "--source",+ "plain",+ "--no-pull",+ "--brain",+ "host"+ ],+ "command": "gbrain sync --source plain --no-pull --brain host",+ "consent": [],+ "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/troubleshooting.md#sync-freshness-no-successful-sync",+ "next": "run",+ "requires_exclusive": false,+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "sync_freshness",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "No successful sync of plain is recorded; this runs one and stamps last_sync_at when it succeeds."+ },+ "fix": "Source 'plain': no successful sync recorded; no attempt recorded; run `gbrain sync --source plain --no-pull`. 1 writer-owned canonical content source(s): upstream sync is not applicable; see canonical_content_writes for publication status","name": "sync_freshness","status": "fail","tier": "root"@@ -5881,14 +5973,77 @@{"category": "brain","details": {+ "code": "sync_no_successful_sync",+ "no_successful_sync": [+ {+ "code": "sync_no_successful_sync",+ "fix": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "sync",+ "--source",+ "plain",+ "--no-pull"+ ],+ "consent": [],+ "docs": "docs/guides/troubleshooting.md#sync-freshness-no-successful-sync",+ "requires_exclusive": false,+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "sync_freshness",+ "--json"+ ]+ },+ "why": "No successful sync of plain is recorded; this runs one and stamps last_sync_at when it succeeds."+ },+ "held": 0,+ "job_id": null,+ "last_attempt_at": null,+ "reason": "no_attempt",+ "result": null,+ "source_id": "plain"+ }+ ],"stale_count": 1,"synced_recently_count": 1,"unchanged_count": 0,"writer_owned_count": 1},"elapsed_ms": "<volatile>",- "fix_unavailable_reason": "unstructured",- "message": "Source 'plain' has never been synced. Run `gbrain sync --source <id> --no-pull` for each stale source. 1 writer-owned canonical content source(s): upstream sync is not applicable; see canonical_content_writes for publication status",+ "fix": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "sync",+ "--source",+ "plain",+ "--no-pull",+ "--brain",+ "host"+ ],+ "command": "gbrain sync --source plain --no-pull --brain host",+ "consent": [],+ "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/troubleshooting.md#sync-freshness-no-successful-sync",+ "next": "run",+ "requires_exclusive": false,+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "sync_freshness",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "No successful sync of plain is recorded; this runs one and stamps last_sync_at when it succeeds."+ },+ "message": "Source 'plain': no successful sync recorded; no attempt recorded; run `gbrain sync --source plain --no-pull`. 1 writer-owned canonical content source(s): upstream sync is not applicable; see canonical_content_writes for publication status","name": "sync_freshness","status": "fail"},@@ -7219,7 +7374,36 @@"status": "unhealthy","top_issues": [{- "fix": "Source 'plain' has never been synced. Run `gbrain sync --source <id> --no-pull` for each stale source. 1 writer-owned canonical content source(s): upstream sync is not applicable; see canonical_content_writes for publication status",+ "action": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "sync",+ "--source",+ "plain",+ "--no-pull",+ "--brain",+ "host"+ ],+ "command": "gbrain sync --source plain --no-pull --brain host",+ "consent": [],+ "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/troubleshooting.md#sync-freshness-no-successful-sync",+ "next": "run",+ "requires_exclusive": false,+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "sync_freshness",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "No successful sync of plain is recorded; this runs one and stamps last_sync_at when it succeeds."+ },+ "fix": "Source 'plain': no successful sync recorded; no attempt recorded; run `gbrain sync --source plain --no-pull`. 1 writer-owned canonical content source(s): upstream sync is not applicable; see canonical_content_writes for publication status","name": "sync_freshness","status": "fail","tier": "root"