Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
test(goldens): migration and doctor goldens regenerated on a clean tree after the #6396 merge (pinned_questions renumbered to v231)
garrytan587bd620c8d6
diff --git a/test/fixtures/goldens/doctor/content-pglite-human.json b/test/fixtures/goldens/doctor/content-pglite-human.jsonindex 9b011dac58..d891051927 100644--- a/test/fixtures/goldens/doctor/content-pglite-human.json+++ b/test/fixtures/goldens/doctor/content-pglite-human.json@@ -64,13 +64,14 @@" [OK] pglite_scale: PGLite at 5 pages — comfortable below the 1000-page threshold"," [OK] rls: Skipped (PGLite — no PostgREST exposure, RLS not applicable)"," [OK] schema_version: Version <latest> (latest: <latest>)",- " [OK] schema_columns: 1066 column(s) verified against live schema",+ " [OK] schema_columns: 1110 column(s) verified against live schema"," [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)."," [OK] embedding_column_registry: Registry healthy: 1 columns (embedding_image); primary embeddings disabled"," [OK] embedding_env_override: no embedding env overrides set"," [OK] embedding_migration_state: no embedding migration in flight",+ " [INFO] supersession_calibration: Embeddings are off on this brain, so facts are only deduplicated by exact text; no supersession threshold applies."," [OK] chat_fallback_chain: No chat_fallback_chain is set: every chat call uses only its own model."," [OK] behavior_changes: Nothing to disclose: this brain is a fresh install at v<version>, after every disclosed behavior change, so the one-time behavior-change notice does not apply."," [OK] graph_coverage: Only 2 eligible entity pages (< 5) — coverage ratio not meaningful at this scale",@@ -192,7 +193,7 @@" [OK] oauth_client_scope_health: Scoped-client grants consistent (no dangling federated reads, no orphaned workspace sources, no privileged self-registered clients)"," [OK] autopilot_lock_scope: Lock path: <home>/.gbrain/autopilot.lock"," [OK] stale_locks: No stale locks (no rows with ttl_expires_at < NOW())",- " [OK] cycle_phase_scope: Phase taxonomy: 12 source-scoped, 14 brain-global, 2 mixed. Source-safe: [lint, backlinks, sync, extract, extract_facts, extract_atoms, recompute_emotional_weight, consolidate, propose_takes, conversation_facts_backfill, enrich_thin, schema-suggest]. Brain-global: [fence_repair, content_repair, resolve_symbol_edges, synthesize_concepts, grade_takes, calibration_profile, edge_contradictions, drift, chronicle, facts_drain, skillopt, embed, orphans, purge]. Mixed: [synthesize, patterns].",+ " [OK] cycle_phase_scope: Phase taxonomy: 12 source-scoped, 15 brain-global, 2 mixed. Source-safe: [lint, backlinks, sync, extract, extract_facts, extract_atoms, recompute_emotional_weight, consolidate, propose_takes, conversation_facts_backfill, enrich_thin, schema-suggest]. Brain-global: [fence_repair, content_repair, resolve_symbol_edges, synthesize_concepts, grade_takes, calibration_profile, edge_contradictions, drift, standing_questions, chronicle, facts_drain, skillopt, embed, orphans, purge]. Mixed: [synthesize, patterns]."," [INFO] embed_staleness: Not applicable: embeddings are disabled on this brain by choice, so chunks have no vectors by design (keyword search keeps working)."," [OK] entity_link_coverage: Only 2 entity pages (< 5) — coverage ratio not meaningful at this scale"," [OK] timeline_coverage: Only 2 entity pages (< 5) — coverage ratio not meaningful at this scale",diff --git a/test/fixtures/goldens/doctor/content-pglite-json.json b/test/fixtures/goldens/doctor/content-pglite-json.jsonindex 8ab45c4477..17a98204ad 100644--- a/test/fixtures/goldens/doctor/content-pglite-json.json+++ b/test/fixtures/goldens/doctor/content-pglite-json.json@@ -535,7 +535,7 @@},{"category": "meta",- "message": "1066 column(s) verified against live schema",+ "message": "1110 column(s) verified against live schema","name": "schema_columns","status": "ok"},@@ -661,6 +661,14 @@"name": "embedding_migration_state","status": "ok"},+ {+ "category": "brain",+ "message": "Embeddings are off on this brain, so facts are only deduplicated by exact text; no supersession threshold applies.",+ "name": "supersession_calibration",+ "readiness_state": "not_applicable",+ "severity": "info",+ "status": "ok"+ },{"category": "ops","message": "No chat_fallback_chain is set: every chat call uses only its own model.",@@ -2329,7 +2337,7 @@"category": "meta","details": {"counts": {- "global": 14,+ "global": 15,"mixed": 2,"source": 12},@@ -2359,12 +2367,13 @@"resolve_symbol_edges": "global","schema-suggest": "source","skillopt": "global",+ "standing_questions": "global","sync": "source","synthesize": "mixed","synthesize_concepts": "global"}},- "message": "Phase taxonomy: 12 source-scoped, 14 brain-global, 2 mixed. Source-safe: [lint, backlinks, sync, extract, extract_facts, extract_atoms, recompute_emotional_weight, consolidate, propose_takes, conversation_facts_backfill, enrich_thin, schema-suggest]. Brain-global: [fence_repair, content_repair, resolve_symbol_edges, synthesize_concepts, grade_takes, calibration_profile, edge_contradictions, drift, chronicle, facts_drain, skillopt, embed, orphans, purge]. Mixed: [synthesize, patterns].",+ "message": "Phase taxonomy: 12 source-scoped, 15 brain-global, 2 mixed. Source-safe: [lint, backlinks, sync, extract, extract_facts, extract_atoms, recompute_emotional_weight, consolidate, propose_takes, conversation_facts_backfill, enrich_thin, schema-suggest]. Brain-global: [fence_repair, content_repair, resolve_symbol_edges, synthesize_concepts, grade_takes, calibration_profile, edge_contradictions, drift, standing_questions, chronicle, facts_drain, skillopt, embed, orphans, purge]. Mixed: [synthesize, patterns].","name": "cycle_phase_scope","status": "ok"},diff --git a/test/fixtures/goldens/doctor/json-pglite-degraded.json b/test/fixtures/goldens/doctor/json-pglite-degraded.jsonindex ce73d93e57..f8f4a4bc50 100644--- a/test/fixtures/goldens/doctor/json-pglite-degraded.json+++ b/test/fixtures/goldens/doctor/json-pglite-degraded.json@@ -518,7 +518,7 @@},{"category": "meta",- "message": "1066 column(s) verified against live schema",+ "message": "1110 column(s) verified against live schema","name": "schema_columns","status": "ok"},@@ -564,6 +564,78 @@"name": "embedding_migration_state","status": "ok"},+ {+ "category": "brain",+ "details": {+ "config_key": "facts.supersession_thresholds",+ "dims": 3072,+ "docs": "docs/eval/decisions/supersession-threshold-dev/README.md",+ "key": "openai:text-embedding-3-large@3072",+ "model": "openai:text-embedding-3-large",+ "source": "uncalibrated",+ "threshold": null+ },+ "fix": {+ "actor": "agent",+ "argv": [+ "bun",+ "<repo>/scripts/eval-c2-candidate-fusion.ts",+ "calibrate",+ "openai:text-embedding-3-large",+ "3072",+ "<tmp>/gbrain-supersession-openai-text-embedding-3-large-3072.json.gz"+ ],+ "command": "bun <repo>/scripts/eval-c2-candidate-fusion.ts calibrate openai:text-embedding-3-large 3072 <tmp>/gbrain-supersession-openai-text-embedding-3-large-3072.json.gz",+ "consent": [+ "paid",+ "egress"+ ],+ "docs": "https://github.com/garrytan/gbrain/blob/master/docs/eval/decisions/supersession-threshold-dev/README.md",+ "next": "ask_user",+ "requires_exclusive": false,+ "then": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "config",+ "set",+ "facts.supersession_thresholds",+ "{\"openai:text-embedding-3-large@3072\":THRESHOLD}",+ "--brain",+ "host"+ ],+ "command": "gbrain config set facts.supersession_thresholds '{\"openai:text-embedding-3-large@3072\":THRESHOLD}' --brain host",+ "consent": [],+ "inputs": [+ {+ "how": "threshold_pick.guarded from the calibrate output. When it is null no threshold is safe for this model: skip this step and leave supersession off.",+ "name": "THRESHOLD"+ }+ ],+ "next": "run",+ "requires_exclusive": false,+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "supersession_calibration",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "Registers the measured threshold for this model; the next fact write uses it. Remove it with gbrain config unset facts.supersession_thresholds."+ },+ "user_message": "Facts saved on this brain never replace a similar older fact automatically, because its embedding model (openai:text-embedding-3-large@3072) has no measured threshold. Measuring one sends about 23K tokens of synthetic test sentences to the embedding provider (about a cent). OK to run it?",+ "why": "Supersession by similarity is off for openai:text-embedding-3-large@3072 until a threshold is measured for it. This embeds the synthetic C2 fixture (1,506 test sentences, about 23K tokens) with openai:text-embedding-3-large, then replays it at thresholds 0.80 to 0.97 on a throwaway in-memory brain (several minutes, no further provider calls) and prints threshold_pick.guarded. No brain content is sent."+ },+ "message": "Embedding model openai:text-embedding-3-large@3072 has no calibrated fact supersession threshold, so a saved fact never replaces a similar older one by similarity: it is inserted beside it (exact-text duplicates still collapse), and the conflict review sweep judges the pair where it is on. Measure one with the C2 fixture (about a cent), then register it in facts.supersession_thresholds. See docs/eval/decisions/supersession-threshold-dev/README.md.",+ "name": "supersession_calibration",+ "readiness_state": "degraded",+ "severity": "info",+ "status": "ok"+ },{"category": "ops","message": "No chat_fallback_chain is set: every chat call uses only its own model.",@@ -2095,7 +2167,7 @@"category": "meta","details": {"counts": {- "global": 14,+ "global": 15,"mixed": 2,"source": 12},@@ -2125,12 +2197,13 @@"resolve_symbol_edges": "global","schema-suggest": "source","skillopt": "global",+ "standing_questions": "global","sync": "source","synthesize": "mixed","synthesize_concepts": "global"}},- "message": "Phase taxonomy: 12 source-scoped, 14 brain-global, 2 mixed. Source-safe: [lint, backlinks, sync, extract, extract_facts, extract_atoms, recompute_emotional_weight, consolidate, propose_takes, conversation_facts_backfill, enrich_thin, schema-suggest]. Brain-global: [fence_repair, content_repair, resolve_symbol_edges, synthesize_concepts, grade_takes, calibration_profile, edge_contradictions, drift, chronicle, facts_drain, skillopt, embed, orphans, purge]. Mixed: [synthesize, patterns].",+ "message": "Phase taxonomy: 12 source-scoped, 15 brain-global, 2 mixed. Source-safe: [lint, backlinks, sync, extract, extract_facts, extract_atoms, recompute_emotional_weight, consolidate, propose_takes, conversation_facts_backfill, enrich_thin, schema-suggest]. Brain-global: [fence_repair, content_repair, resolve_symbol_edges, synthesize_concepts, grade_takes, calibration_profile, edge_contradictions, drift, standing_questions, chronicle, facts_drain, skillopt, embed, orphans, purge]. Mixed: [synthesize, patterns].","name": "cycle_phase_scope","status": "ok"},diff --git a/test/fixtures/goldens/doctor/json-pglite-fresh.json b/test/fixtures/goldens/doctor/json-pglite-fresh.jsonindex 6bb652c96c..386b2fd087 100644--- a/test/fixtures/goldens/doctor/json-pglite-fresh.json+++ b/test/fixtures/goldens/doctor/json-pglite-fresh.json@@ -521,7 +521,7 @@},{"category": "meta",- "message": "1066 column(s) verified against live schema",+ "message": "1110 column(s) verified against live schema","name": "schema_columns","status": "ok"},@@ -647,6 +647,14 @@"name": "embedding_migration_state","status": "ok"},+ {+ "category": "brain",+ "message": "Embeddings are off on this brain, so facts are only deduplicated by exact text; no supersession threshold applies.",+ "name": "supersession_calibration",+ "readiness_state": "not_applicable",+ "severity": "info",+ "status": "ok"+ },{"category": "ops","message": "No chat_fallback_chain is set: every chat call uses only its own model.",@@ -2166,7 +2174,7 @@"category": "meta","details": {"counts": {- "global": 14,+ "global": 15,"mixed": 2,"source": 12},@@ -2196,12 +2204,13 @@"resolve_symbol_edges": "global","schema-suggest": "source","skillopt": "global",+ "standing_questions": "global","sync": "source","synthesize": "mixed","synthesize_concepts": "global"}},- "message": "Phase taxonomy: 12 source-scoped, 14 brain-global, 2 mixed. Source-safe: [lint, backlinks, sync, extract, extract_facts, extract_atoms, recompute_emotional_weight, consolidate, propose_takes, conversation_facts_backfill, enrich_thin, schema-suggest]. Brain-global: [fence_repair, content_repair, resolve_symbol_edges, synthesize_concepts, grade_takes, calibration_profile, edge_contradictions, drift, chronicle, facts_drain, skillopt, embed, orphans, purge]. Mixed: [synthesize, patterns].",+ "message": "Phase taxonomy: 12 source-scoped, 15 brain-global, 2 mixed. Source-safe: [lint, backlinks, sync, extract, extract_facts, extract_atoms, recompute_emotional_weight, consolidate, propose_takes, conversation_facts_backfill, enrich_thin, schema-suggest]. Brain-global: [fence_repair, content_repair, resolve_symbol_edges, synthesize_concepts, grade_takes, calibration_profile, edge_contradictions, drift, standing_questions, chronicle, facts_drain, skillopt, embed, orphans, purge]. Mixed: [synthesize, patterns].","name": "cycle_phase_scope","status": "ok"},diff --git a/test/fixtures/goldens/doctor/json-postgres-fresh.json b/test/fixtures/goldens/doctor/json-postgres-fresh.jsonindex 56c2461749..d47ba928ed 100644--- a/test/fixtures/goldens/doctor/json-postgres-fresh.json+++ b/test/fixtures/goldens/doctor/json-postgres-fresh.json@@ -502,7 +502,7 @@},{"category": "ops",- "message": "RLS enabled on 132/132 public tables",+ "message": "RLS enabled on 134/134 public tables","name": "rls","status": "ok"},@@ -514,7 +514,7 @@},{"category": "meta",- "message": "1072 column(s) verified against live schema",+ "message": "1116 column(s) verified against live schema","name": "schema_columns","status": "ok"},@@ -636,6 +636,14 @@"name": "embedding_migration_state","status": "ok"},+ {+ "category": "brain",+ "message": "Embeddings are off on this brain, so facts are only deduplicated by exact text; no supersession threshold applies.",+ "name": "supersession_calibration",+ "readiness_state": "not_applicable",+ "severity": "info",+ "status": "ok"+ },{"category": "ops","message": "No chat_fallback_chain is set: every chat call uses only its own model.",@@ -2157,7 +2165,7 @@"category": "meta","details": {"counts": {- "global": 14,+ "global": 15,"mixed": 2,"source": 12},@@ -2187,12 +2195,13 @@"resolve_symbol_edges": "global","schema-suggest": "source","skillopt": "global",+ "standing_questions": "global","sync": "source","synthesize": "mixed","synthesize_concepts": "global"}},- "message": "Phase taxonomy: 12 source-scoped, 14 brain-global, 2 mixed. Source-safe: [lint, backlinks, sync, extract, extract_facts, extract_atoms, recompute_emotional_weight, consolidate, propose_takes, conversation_facts_backfill, enrich_thin, schema-suggest]. Brain-global: [fence_repair, content_repair, resolve_symbol_edges, synthesize_concepts, grade_takes, calibration_profile, edge_contradictions, drift, chronicle, facts_drain, skillopt, embed, orphans, purge]. Mixed: [synthesize, patterns].",+ "message": "Phase taxonomy: 12 source-scoped, 15 brain-global, 2 mixed. Source-safe: [lint, backlinks, sync, extract, extract_facts, extract_atoms, recompute_emotional_weight, consolidate, propose_takes, conversation_facts_backfill, enrich_thin, schema-suggest]. Brain-global: [fence_repair, content_repair, resolve_symbol_edges, synthesize_concepts, grade_takes, calibration_profile, edge_contradictions, drift, standing_questions, chronicle, facts_drain, skillopt, embed, orphans, purge]. Mixed: [synthesize, patterns].","name": "cycle_phase_scope","status": "ok"},diff --git a/test/fixtures/goldens/migrations/records.json b/test/fixtures/goldens/migrations/records.jsonindex 221dc2fe35..807fe7c1bf 100644--- a/test/fixtures/goldens/migrations/records.json+++ b/test/fixtures/goldens/migrations/records.json@@ -1,6 +1,6 @@{"golden": {- "count": 225,+ "count": 226,"gaps": [17,18,@@ -27,6 +27,7 @@"getFtsLanguage": "0d790b4c4af1f67a2a1bbd59470beb13f434917b381931baf8404a41c5d903db","grantFromRow": "2d0603bb0f964d7e45e04aa76bac54cd4f6f63c91a8d9f028b60b4792bc1695e","hnswMaxDimsForType": "a187cdcc520f813b7c39da97ce53da58509232ed9f851627ef41abfe1b68bd26",+ "migrateAutoThinkToPins": "acdb45b8a1c474004b119f900ddd4a902d98681d6379edad15708d87dd834bb4","migrateConnectorCheckpoints": "e0403022a56559556c82a9fa1e90d928f36e1d09c7db570e1d788a87d2dc9521","migrateLegacyTokens": "6e4abe3670127e7a495b56ecbf9f5789edd3a7362d45704656c2210a85b27f4c","migrationNotice": "9a6607b26a9719ef1833571b137bc8ebfcd1e16d545e89ff8728cf3ccbcbb409",@@ -39,7 +40,7 @@"sqlQueryForEngine": "71fb1ccec1b22cdc1662876dbd8c17ed81e9ab83485c6965cdf5caa4fc4a4ab5","verifyProjectionStatistics": "59d9ccfea1c53384d8607874a51209a9c2dfd51b2b85a2cb6269fa4120faf1f3"},- "latest": 230,+ "latest": 231,"records": [{"handler": {@@ -3429,6 +3430,25 @@"transaction": "absent","verify": "absent","version": 230+ },+ {+ "handler": {+ "form": "arrow",+ "helpers": [+ "migrateAutoThinkToPins"+ ],+ "sha256": "6538d483dacf5b76e4eb837603082e0c8611c613f6c534007fa2f2b197e1e1ed"+ },+ "idempotent": true,+ "name": "pinned_questions",+ "sql": {+ "length": 2746,+ "sha256": "07ff5ebf8abd16f5edf1bb76318ef541e7a74a3c275a78dac04acb103858e93b"+ },+ "sqlFor": "absent",+ "transaction": "absent",+ "verify": "absent",+ "version": 231}],"versions": [@@ -3656,7 +3676,8 @@227,228,229,- 230+ 230,+ 231]},"normalizer": "migrations-record-v1"