Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

notifier: classify the v261 tables for graduation and deletion

garrytand5e53762b18b
diff --git a/src/core/deletion-inventory.ts b/src/core/deletion-inventory.ts
index d8e8875776..2cbac77b73 100644
--- a/src/core/deletion-inventory.ts
+++ b/src/core/deletion-inventory.ts
@@ -162,6 +162,9 @@ const ROWS: readonly Row[] = [
['subagent_messages', 'out_of_scope', 'probed_reported', 'role content_blocks provider_id model', 'content_blocks'],
['subagent_rate_leases', 'out_of_scope', 'no_memory_text', 'key'],
['subagent_tool_executions', 'out_of_scope', 'probed_reported', 'tool_use_id tool_name input status output error provider_id', 'input output'],
+ ['sync_notifier_leases', 'out_of_scope', 'no_memory_text', 'host_id owner_id resident_kind'],
+ ['sync_notifier_sources', 'out_of_scope', 'probed_reported', 'source_id source_incarnation syncer_host_id state reason last_error_code last_error trace_path observed_head detection_mode owner_host_id owner_kind', 'last_error'],
+ ['sync_wanted_markers', 'out_of_scope', 'no_memory_text', 'source_id intent source_incarnation wanted_head requested_by'],
['tags', 'out_of_scope', 'no_memory_text', 'tag tag_source'],
['take_domain_assignments', 'out_of_scope', 'no_memory_text', 'domain pack source'],
['take_horizons', 'out_of_scope', 'text_free_ledger', 'claim_sha256 basis'],
diff --git a/src/core/persistence/graduation-inventory.ts b/src/core/persistence/graduation-inventory.ts
index ef1a743e05..02383b0f2a 100644
--- a/src/core/persistence/graduation-inventory.ts
+++ b/src/core/persistence/graduation-inventory.ts
@@ -171,6 +171,7 @@ export const GRADUATION_INVENTORY: Inventory = {
carry('sources', 'user_data', 'Sources with incarnations and archive state.'),
carry('subagent_messages', 'operational', 'Subagent job transcripts.'),
carry('subagent_tool_executions', 'operational', 'Subagent tool execution log.'),
+ carry('sync_wanted_markers', 'operational', 'Pending sync requests (GBRA-133): a sync trigger, push or nudge not yet drained; dropping them would lose an accepted request. Rows name carried sources and jobs; the target\'s residents drain them.'),
carry('synthesis_evidence', 'user_data', 'Synthesis citations.'),
carry('tags', 'user_data', 'Page tags.'),
carry('take_domain_assignments', 'user_data', 'Take domain assignments.'),
@@ -203,6 +204,8 @@ export const GRADUATION_INVENTORY: Inventory = {
entry('budget_reservations', 'discard', 'operational', 'Daily-ledger holds (src/core/budget/daily-ledger.ts) that expire within minutes; budget_ledger carries the day\'s totals, so a hold dropped mid-graduation stays counted as reserved until its UTC day ends (only tightening that day\'s cap).'),
entry('subagent_rate_leases', 'discard', 'operational', 'Job-owned concurrency leases that expire.'),
entry('persistence_consumers', 'discard', 'operational', 'Per-process consumer heartbeat rows (#6317): each is renewed every 10 s by a live process on the source host and lapses in 90 s; the target\'s consumers write their own rows.'),
+ entry('sync_notifier_leases', 'discard', 'operational', 'Host notifier lease (GBRA-133): renewed every heartbeat by a live resident on the source engine and lapses in two; the target\'s residents claim their own.'),
+ entry('sync_notifier_sources', 'discard', 'operational', 'Per-source notifier runtime state and coverage (GBRA-133), written by the source engine\'s resident; the target\'s resident re-observes HEAD, and a classic source\'s syncer host is recorded again by its next sync on the target (until then it reads not monitored).'),
entry('oauth_codes', 'discard', 'security', 'One-time authorization codes; an in-flight OAuth handshake restarts.'),
entry('page_links', 'schema_owned', 'operational', 'View over links; each engine\'s schema defines it.', { kind: 'view' }),
diff --git a/test/graduation-inventory.test.ts b/test/graduation-inventory.test.ts
index 50ae260c44..0f1cfbc62c 100644
--- a/test/graduation-inventory.test.ts
+++ b/test/graduation-inventory.test.ts
@@ -60,7 +60,7 @@ describe('graduation inventory', () => {
expect(new Set(names).size).toBe(names.length);
const counts: Record<string, number> = {};
for (const e of GRADUATION_INVENTORY.entries) counts[e.class] = (counts[e.class] ?? 0) + 1;
- expect(counts).toEqual({ carry: 135, rebind: 2, rebuild: 3, discard: 7, schema_owned: 4 });
+ expect(counts).toEqual({ carry: 136, rebind: 2, rebuild: 3, discard: 9, schema_owned: 4 });
for (const e of GRADUATION_INVENTORY.entries) {
expect({ relation: e.relation, reason: e.reason.length > 5, present: e.engines.pglite || e.engines.postgres })
.toEqual({ relation: e.relation, reason: true, present: true });