Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

test(goldens): migration and doctor goldens regenerated on a clean tree after the #6330 merge (pinned_questions renumbered to v223)

garrytan359df0f5d95c
diff --git a/test/fixtures/goldens/doctor/json-pglite-degraded.json b/test/fixtures/goldens/doctor/json-pglite-degraded.json
index 8dcd5f3cac..5e3f86c17d 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": "1001 column(s) verified against live schema",
+ "message": "1045 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.",
@@ -1990,7 +2062,7 @@
"category": "meta",
"details": {
"counts": {
- "global": 13,
+ "global": 14,
"mixed": 2,
"source": 12
},
@@ -2019,12 +2091,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, 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: [fence_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, 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, 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.json
index f1a2fb9f38..24d748d11c 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": "1001 column(s) verified against live schema",
+ "message": "1045 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.",
@@ -2061,7 +2069,7 @@
"category": "meta",
"details": {
"counts": {
- "global": 13,
+ "global": 14,
"mixed": 2,
"source": 12
},
@@ -2090,12 +2098,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, 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: [fence_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, 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, 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.json
index d9b3102844..cfe7231622 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 121/121 public tables",
+ "message": "RLS enabled on 123/123 public tables",
"name": "rls",
"status": "ok"
},
@@ -514,7 +514,7 @@
},
{
"category": "meta",
- "message": "1007 column(s) verified against live schema",
+ "message": "1051 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.",
@@ -2052,7 +2060,7 @@
"category": "meta",
"details": {
"counts": {
- "global": 13,
+ "global": 14,
"mixed": 2,
"source": 12
},
@@ -2081,12 +2089,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, 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: [fence_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, 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, 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.json
index 20894c8ef7..13baa3c770 100644
--- a/test/fixtures/goldens/migrations/records.json
+++ b/test/fixtures/goldens/migrations/records.json
@@ -1,6 +1,6 @@
{
"golden": {
- "count": 217,
+ "count": 218,
"gaps": [
17,
18,
@@ -25,6 +25,7 @@
"getFtsLanguage": "0d790b4c4af1f67a2a1bbd59470beb13f434917b381931baf8404a41c5d903db",
"grantFromRow": "2d0603bb0f964d7e45e04aa76bac54cd4f6f63c91a8d9f028b60b4792bc1695e",
"hnswMaxDimsForType": "a187cdcc520f813b7c39da97ce53da58509232ed9f851627ef41abfe1b68bd26",
+ "migrateAutoThinkToPins": "acdb45b8a1c474004b119f900ddd4a902d98681d6379edad15708d87dd834bb4",
"migrateConnectorCheckpoints": "e0403022a56559556c82a9fa1e90d928f36e1d09c7db570e1d788a87d2dc9521",
"migrateLegacyTokens": "6e4abe3670127e7a495b56ecbf9f5789edd3a7362d45704656c2210a85b27f4c",
"migrationNotice": "9a6607b26a9719ef1833571b137bc8ebfcd1e16d545e89ff8728cf3ccbcbb409",
@@ -37,7 +38,7 @@
"sqlQueryForEngine": "71fb1ccec1b22cdc1662876dbd8c17ed81e9ab83485c6965cdf5caa4fc4a4ab5",
"verifyProjectionStatistics": "59d9ccfea1c53384d8607874a51209a9c2dfd51b2b85a2cb6269fa4120faf1f3"
},
- "latest": 222,
+ "latest": 223,
"records": [
{
"handler": {
@@ -3304,6 +3305,25 @@
"transaction": "absent",
"verify": "absent",
"version": 222
+ },
+ {
+ "handler": {
+ "form": "arrow",
+ "helpers": [
+ "migrateAutoThinkToPins"
+ ],
+ "sha256": "6538d483dacf5b76e4eb837603082e0c8611c613f6c534007fa2f2b197e1e1ed"
+ },
+ "idempotent": true,
+ "name": "pinned_questions",
+ "sql": {
+ "length": 2746,
+ "sha256": "07ff5ebf8abd16f5edf1bb76318ef541e7a74a3c275a78dac04acb103858e93b"
+ },
+ "sqlFor": "absent",
+ "transaction": "absent",
+ "verify": "absent",
+ "version": 223
}
],
"versions": [
@@ -3523,7 +3543,8 @@
219,
220,
221,
- 222
+ 222,
+ 223
]
},
"normalizer": "migrations-record-v1"