Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

#6650: classify the heartbeat identity columns, regenerate doctor column-count goldens, give the quarantined harness an always-on calibration test

garrytanc272ede2baa6
diff --git a/src/core/deletion-inventory.ts b/src/core/deletion-inventory.ts
index 0d7ffe681c..48ac03ba14 100644
--- a/src/core/deletion-inventory.ts
+++ b/src/core/deletion-inventory.ts
@@ -111,7 +111,7 @@ const ROWS: readonly Row[] = [
['page_versions', 'swept', 'page_versions', 'compiled_truth frontmatter timeline title type tags source_path write_principal_kind write_principal_id archived_principal_kind archived_principal_id trust_tier write_origin'],
['page_write_guards', 'out_of_scope', 'no_memory_text', 'slug'],
['pages', 'swept', 'page_body', 'source_id slug type page_kind title compiled_truth timeline frontmatter content_hash effective_date_source import_filename database_only_reason contextual_retrieval_mode corpus_generation search_vector source_path ingested_via source_uri source_kind embedding_signature revision_principal_kind revision_principal_id trust_tier write_origin'],
- ['persistence_consumers', 'out_of_scope', 'no_memory_text', 'kind mode pool version nonce minted_under persistence_home host_json_path pid_ns'],
+ ['persistence_consumers', 'out_of_scope', 'no_memory_text', 'kind mode pool version nonce minted_under persistence_home host_json_path pid_ns boot_id process_start'],
['persistence_counters', 'out_of_scope', 'no_memory_text', 'key'],
['persistence_effects', 'swept', 'effect_recovery', 'kind data state source_id error_code outcome recovery'],
['persistence_graduation', 'out_of_scope', 'probed_reported', 'role state source_data_dir trigger_bypass table_receipts replay_probe timings doctor rollback', 'table_receipts'],
diff --git a/test/fixtures/goldens/doctor/content-pglite-human.json b/test/fixtures/goldens/doctor/content-pglite-human.json
index b77763a633..975e9dd87b 100644
--- a/test/fixtures/goldens/doctor/content-pglite-human.json
+++ b/test/fixtures/goldens/doctor/content-pglite-human.json
@@ -65,7 +65,7 @@
" [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: 1113 column(s) verified against live schema",
+ " [OK] schema_columns: 1115 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).",
diff --git a/test/fixtures/goldens/doctor/content-pglite-json.json b/test/fixtures/goldens/doctor/content-pglite-json.json
index 2ea64ab407..b017d6952f 100644
--- a/test/fixtures/goldens/doctor/content-pglite-json.json
+++ b/test/fixtures/goldens/doctor/content-pglite-json.json
@@ -552,7 +552,7 @@
},
{
"category": "meta",
- "message": "1113 column(s) verified against live schema",
+ "message": "1115 column(s) verified against live schema",
"name": "schema_columns",
"status": "ok"
},
diff --git a/test/fixtures/goldens/doctor/hot-checks-pglite-json.json b/test/fixtures/goldens/doctor/hot-checks-pglite-json.json
index e8f83f1838..888626a0a7 100644
--- a/test/fixtures/goldens/doctor/hot-checks-pglite-json.json
+++ b/test/fixtures/goldens/doctor/hot-checks-pglite-json.json
@@ -554,7 +554,7 @@
},
{
"category": "meta",
- "message": "1113 column(s) verified against live schema",
+ "message": "1115 column(s) verified against live schema",
"name": "schema_columns",
"status": "ok"
},
@@ -3673,7 +3673,7 @@
},
{
"category": "meta",
- "message": "1113 column(s) verified against live schema",
+ "message": "1115 column(s) verified against live schema",
"name": "schema_columns",
"status": "ok"
},
diff --git a/test/fixtures/goldens/doctor/hot-checks-postgres-json.json b/test/fixtures/goldens/doctor/hot-checks-postgres-json.json
index afd658ef4a..daf4d58717 100644
--- a/test/fixtures/goldens/doctor/hot-checks-postgres-json.json
+++ b/test/fixtures/goldens/doctor/hot-checks-postgres-json.json
@@ -547,7 +547,7 @@
},
{
"category": "meta",
- "message": "1119 column(s) verified against live schema",
+ "message": "1121 column(s) verified against live schema",
"name": "schema_columns",
"status": "ok"
},
@@ -3658,7 +3658,7 @@
},
{
"category": "meta",
- "message": "1119 column(s) verified against live schema",
+ "message": "1121 column(s) verified against live schema",
"name": "schema_columns",
"status": "ok"
},
diff --git a/test/fixtures/goldens/doctor/json-pglite-degraded.json b/test/fixtures/goldens/doctor/json-pglite-degraded.json
index 323674a4ed..d024fc0960 100644
--- a/test/fixtures/goldens/doctor/json-pglite-degraded.json
+++ b/test/fixtures/goldens/doctor/json-pglite-degraded.json
@@ -535,7 +535,7 @@
},
{
"category": "meta",
- "message": "1113 column(s) verified against live schema",
+ "message": "1115 column(s) verified against live schema",
"name": "schema_columns",
"status": "ok"
},
diff --git a/test/fixtures/goldens/doctor/json-pglite-fresh.json b/test/fixtures/goldens/doctor/json-pglite-fresh.json
index 7171de6cc5..3aba90adbd 100644
--- a/test/fixtures/goldens/doctor/json-pglite-fresh.json
+++ b/test/fixtures/goldens/doctor/json-pglite-fresh.json
@@ -538,7 +538,7 @@
},
{
"category": "meta",
- "message": "1113 column(s) verified against live schema",
+ "message": "1115 column(s) verified against live schema",
"name": "schema_columns",
"status": "ok"
},
diff --git a/test/fixtures/goldens/doctor/json-postgres-fresh.json b/test/fixtures/goldens/doctor/json-postgres-fresh.json
index 3a15322f5c..9809c1718c 100644
--- a/test/fixtures/goldens/doctor/json-postgres-fresh.json
+++ b/test/fixtures/goldens/doctor/json-postgres-fresh.json
@@ -531,7 +531,7 @@
},
{
"category": "meta",
- "message": "1119 column(s) verified against live schema",
+ "message": "1121 column(s) verified against live schema",
"name": "schema_columns",
"status": "ok"
},
diff --git a/test/sync-convergence.serial.test.ts b/test/sync-convergence.serial.test.ts
index 5f83668038..17e09ecd05 100644
--- a/test/sync-convergence.serial.test.ts
+++ b/test/sync-convergence.serial.test.ts
@@ -58,6 +58,8 @@ import { parseFactsFence } from '../src/core/facts-fence.ts';
import { contentHash } from '../src/core/utils.ts';
import { CODES } from '../src/core/error-registry.ts';
import { CONSUMER_LIVE_MS, CONSUMER_RENEWAL_MS } from '../src/core/persistence/consumer-heartbeat.ts';
+import type { FaultPoint } from '../src/core/persistence/fault-points.ts';
+import { PUBLICATION_CEILING_DEFAULT_MS, publicationLeaseMs } from '../src/core/persistence/publication-deadline.ts';
import { assertSafeE2eDatabaseUrl } from './helpers/db-guard.ts';
import { keylessBrainEnv } from './helpers/provider-env.ts';
import { withEnv } from './helpers/with-env.ts';
@@ -84,7 +86,7 @@ const BIG = 'companies/acme-example';
* never fires for it; `lane:applied` is the bulk group's applied-but-not-
* committed point, once per group.
*/
-const FAULT_POINTS = ['publication:before_commit', 'publication:after_commit', 'lane:applied'] as const;
+const FAULT_POINTS = ['publication:before_commit', 'publication:after_commit', 'lane:applied'] as const satisfies readonly FaultPoint[];
const MAX_RECOVERY_RUNS = 3;
/** Oracle tests are named by the persistence gate's violation class (scripts/persistence/model.ts) they would report. */
const as = (violation: ViolationClass, title: string): string => `[${violation}] ${title}`;
@@ -407,6 +409,18 @@ async function runWriter(slugs: string[], stop: () => boolean): Promise<void> {
// ---------------------------------------------------------------- scenario
+// Runs on every invocation, harness enabled or not: the calibration the chaos run's verdicts rest on.
+describe('convergence harness calibration (#6650 L0)', () => {
+ test('the owner-kill stall bound is below the default publication lease it exists to catch', () => {
+ expect(OWNER_KILL_STALL_BOUND_S * 1000).toBeLessThan(publicationLeaseMs(PUBLICATION_CEILING_DEFAULT_MS));
+ });
+ test('a seed reproduces its fault plan and writer targets', () => {
+ const draw = (seed: number) => { const next = prng(seed); return Array.from({ length: 16 }, next); };
+ expect(draw(SEED)).toEqual(draw(SEED));
+ expect(draw(SEED)).not.toEqual(draw(SEED + 1));
+ });
+});
+
describeConvergence('managed sync converges after owner, client and writer chaos (#6650 L0)', () => {
beforeAll(async () => {
assertSafeE2eDatabaseUrl(directTarget!);