Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
test(goldens): doctor and migration goldens regenerated on a clean tree after the master merge (v213 pinned_questions)
garrytan385955bfb511
diff --git a/test/fixtures/goldens/doctor/json-pglite-degraded.json b/test/fixtures/goldens/doctor/json-pglite-degraded.jsonindex 3ecea27a74..4170f7d2b7 100644--- a/test/fixtures/goldens/doctor/json-pglite-degraded.json+++ b/test/fixtures/goldens/doctor/json-pglite-degraded.json@@ -507,13 +507,13 @@},{"category": "meta",- "message": "Version 212 (latest: 212)",+ "message": "Version 213 (latest: 213)","name": "schema_version","status": "ok"},{"category": "meta",- "message": "960 column(s) verified against live schema",+ "message": "1004 column(s) verified against live schema","name": "schema_columns","status": "ok"},@@ -554,6 +554,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.",@@ -1754,7 +1826,7 @@"category": "meta","details": {"counts": {- "global": 12,+ "global": 13,"mixed": 2,"source": 12},@@ -1782,12 +1854,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, 12 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: [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, 13 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: [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 75935ba25e..2df99b4837 100644--- a/test/fixtures/goldens/doctor/json-pglite-fresh.json+++ b/test/fixtures/goldens/doctor/json-pglite-fresh.json@@ -510,13 +510,13 @@},{"category": "meta",- "message": "Version 212 (latest: 212)",+ "message": "Version 213 (latest: 213)","name": "schema_version","status": "ok"},{"category": "meta",- "message": "960 column(s) verified against live schema",+ "message": "1004 column(s) verified against live schema","name": "schema_columns","status": "ok"},@@ -642,6 +642,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.",@@ -1830,7 +1838,7 @@"category": "meta","details": {"counts": {- "global": 12,+ "global": 13,"mixed": 2,"source": 12},@@ -1858,12 +1866,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, 12 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: [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, 13 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: [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 7ff7b7c3fc..5cc523990a 100644--- a/test/fixtures/goldens/doctor/json-postgres-fresh.json+++ b/test/fixtures/goldens/doctor/json-postgres-fresh.json@@ -497,19 +497,19 @@},{"category": "ops",- "message": "RLS enabled on 118/118 public tables",+ "message": "RLS enabled on 120/120 public tables","name": "rls","status": "ok"},{"category": "meta",- "message": "Version 212 (latest: 212)",+ "message": "Version 213 (latest: 213)","name": "schema_version","status": "ok"},{"category": "meta",- "message": "966 column(s) verified against live schema",+ "message": "1010 column(s) verified against live schema","name": "schema_columns","status": "ok"},@@ -631,6 +631,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.",@@ -1820,7 +1828,7 @@"category": "meta","details": {"counts": {- "global": 12,+ "global": 13,"mixed": 2,"source": 12},@@ -1848,12 +1856,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, 12 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: [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, 13 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: [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 3016a926a2..16ae5855b2 100644--- a/test/fixtures/goldens/migrations/records.json+++ b/test/fixtures/goldens/migrations/records.json@@ -1,6 +1,6 @@{"golden": {- "count": 207,+ "count": 208,"gaps": [17,18,@@ -23,6 +23,7 @@"getFtsLanguage": "0d790b4c4af1f67a2a1bbd59470beb13f434917b381931baf8404a41c5d903db","grantFromRow": "2d0603bb0f964d7e45e04aa76bac54cd4f6f63c91a8d9f028b60b4792bc1695e","hnswMaxDimsForType": "a187cdcc520f813b7c39da97ce53da58509232ed9f851627ef41abfe1b68bd26",+ "migrateAutoThinkToPins": "acdb45b8a1c474004b119f900ddd4a902d98681d6379edad15708d87dd834bb4","migrateConnectorCheckpoints": "e0403022a56559556c82a9fa1e90d928f36e1d09c7db570e1d788a87d2dc9521","migrateLegacyTokens": "6e4abe3670127e7a495b56ecbf9f5789edd3a7362d45704656c2210a85b27f4c","migrationNotice": "9a6607b26a9719ef1833571b137bc8ebfcd1e16d545e89ff8728cf3ccbcbb409",@@ -35,7 +36,7 @@"sqlQueryForEngine": "71fb1ccec1b22cdc1662876dbd8c17ed81e9ab83485c6965cdf5caa4fc4a4ab5","verifyProjectionStatistics": "59d9ccfea1c53384d8607874a51209a9c2dfd51b2b85a2cb6269fa4120faf1f3"},- "latest": 212,+ "latest": 213,"records": [{"handler": {@@ -3152,6 +3153,25 @@"transaction": "absent","verify": "absent","version": 212+ },+ {+ "handler": {+ "form": "arrow",+ "helpers": [+ "migrateAutoThinkToPins"+ ],+ "sha256": "6538d483dacf5b76e4eb837603082e0c8611c613f6c534007fa2f2b197e1e1ed"+ },+ "idempotent": true,+ "name": "pinned_questions",+ "sql": {+ "length": 2746,+ "sha256": "07ff5ebf8abd16f5edf1bb76318ef541e7a74a3c275a78dac04acb103858e93b"+ },+ "sqlFor": "absent",+ "transaction": "absent",+ "verify": "absent",+ "version": 213}],"versions": [@@ -3361,7 +3381,8 @@209,210,211,- 212+ 212,+ 213]},"normalizer": "migrations-record-v1"