Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
test: doctor goldens treat a bare `day` stamp as volatile; serial-lane row for the adopted-connection suite
garrytan931abe71a374
diff --git a/scripts/serial-files.tsv b/scripts/serial-files.tsvindex 68931e6661..5c92a00212 100644--- a/scripts/serial-files.tsv+++ b/scripts/serial-files.tsv@@ -41,6 +41,7 @@ test/backup-powershell-warmup.serial.test.ts global-state global-state: spyOn chtest/backup-status-file.serial.test.ts R1 R1: mutates process.env (GBRAIN_HOME, GBRAIN_BACKUP_CHECK_DAYS, GBRAIN_BACKUP_CHECK, GBRAIN_FORCE_BACKUP_NAG (+2 more))test/backup-verification.serial.test.ts R1 R1: mutates process.env (GBRAIN_HOME)test/binary-self-update-compiled.serial.test.ts global-state global-state: compile smoke gated by GBRAIN_SELFUPDATE_COMPILE_SMOKE+test/bootstrap-adopted-connection.serial.test.ts R1 R1: mutates process.env (GBRAIN_HOME) so the bootstrap dispatcher resolves the sandboxed hometest/bootstrap-dispatcher.serial.test.ts R1 R1: mutates process.env (GBRAIN_HOME, CODEX_HOME, HOME, CLAUDE_CONFIG_DIR)test/bootstrap-harness-lifecycle.serial.test.ts global-state global-state: patches process stdout/stderr/consoletest/bootstrap-harness.serial.test.ts global-state global-state: patches process stdout/stderr/consolediff --git a/test/fixtures/goldens/doctor/hot-checks-pglite-json.json b/test/fixtures/goldens/doctor/hot-checks-pglite-json.jsonindex dc89b1ace8..80868dea21 100644--- a/test/fixtures/goldens/doctor/hot-checks-pglite-json.json+++ b/test/fixtures/goldens/doctor/hot-checks-pglite-json.json@@ -2405,7 +2405,7 @@"by_day": [{"count": 1,- "day": "2026-10-11"+ "day": "<volatile>"}],"normalized_7d": 1,@@ -5423,7 +5423,7 @@"by_day": [{"count": 1,- "day": "2026-10-11"+ "day": "<volatile>"}],"normalized_7d": 1,diff --git a/test/fixtures/goldens/doctor/hot-checks-postgres-json.json b/test/fixtures/goldens/doctor/hot-checks-postgres-json.jsonindex f0f01c170a..5d510e9416 100644--- a/test/fixtures/goldens/doctor/hot-checks-postgres-json.json+++ b/test/fixtures/goldens/doctor/hot-checks-postgres-json.json@@ -530,7 +530,7 @@},{"category": "meta",- "message": "1072 column(s) verified against live schema",+ "message": "1073 column(s) verified against live schema","name": "schema_columns","status": "ok"},@@ -1055,6 +1055,17 @@"name": "orphan_persistence_bindings","status": "ok"},+ {+ "category": "brain",+ "details": {+ "count": 0,+ "docs": "docs/guides/write-refusals.md#foreign-ownership-marker",+ "markers": []+ },+ "message": "Every ownership marker beside a source checkout belongs to this brain.",+ "name": "foreign_ownership_marker",+ "status": "ok"+ },{"category": "brain","details": {@@ -2385,7 +2396,7 @@"by_day": [{"count": 1,- "day": "2026-10-10"+ "day": "<volatile>"}],"normalized_7d": 1,@@ -3526,7 +3537,7 @@},{"category": "meta",- "message": "1072 column(s) verified against live schema",+ "message": "1073 column(s) verified against live schema","name": "schema_columns","status": "ok"},@@ -4051,6 +4062,17 @@"name": "orphan_persistence_bindings","status": "ok"},+ {+ "category": "brain",+ "details": {+ "count": 0,+ "docs": "docs/guides/write-refusals.md#foreign-ownership-marker",+ "markers": []+ },+ "message": "Every ownership marker beside a source checkout belongs to this brain.",+ "name": "foreign_ownership_marker",+ "status": "ok"+ },{"category": "brain","details": {@@ -5381,7 +5403,7 @@"by_day": [{"count": 1,- "day": "2026-10-10"+ "day": "<volatile>"}],"normalized_7d": 1,diff --git a/test/helpers/doctor-json-golden.ts b/test/helpers/doctor-json-golden.tsindex af71b375df..738b7b9a76 100644--- a/test/helpers/doctor-json-golden.ts+++ b/test/helpers/doctor-json-golden.ts@@ -137,7 +137,9 @@ export function patchConfig(h: DoctorHome, patch: (cfg: Record<string, unknown>)}const UUID = /\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi;-const VOLATILE_KEYS = /(^|_)(ms|pid|elapsed|duration|uptime)$|_ms$|^elapsed/i;+// `day` is a bare YYYY-MM-DD the fixture derives from its own created_at (lost_caller_writes trend);+// ISO timestamps are scrubbed by text, a bare date is not, so a golden captured today would fail tomorrow.+const VOLATILE_KEYS = /(^|_)(ms|pid|elapsed|duration|uptime)$|_ms$|^elapsed|^day$/i;export function normalizeDoctorText(text: string, roots: Record<string, string>, extra: Array<[RegExp | string, string]> = []): string {let out = scrubPaths(text, roots);