Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
fix: classify deferred_import_from in the deletion inventory; deferred is a non-terminal request state in the true-up guard
garrytan0318882daa71
diff --git a/src/core/deletion-inventory.ts b/src/core/deletion-inventory.tsindex 0394ccafc2..fc3ae36555 100644--- a/src/core/deletion-inventory.ts+++ b/src/core/deletion-inventory.ts@@ -146,7 +146,7 @@ const ROWS: readonly Row[] = [['persistence_graduation', 'out_of_scope', 'probed_reported', 'role state source_data_dir trigger_bypass table_receipts replay_probe timings doctor rollback', 'table_receipts'],['persistence_host_bindings', 'out_of_scope', 'no_memory_text', 'local_path coordination_path git_durability'],['persistence_local_writers', 'out_of_scope', 'secret_material', 'lane credential_hash grant_ceiling'],- ['persistence_requests', 'swept', 'request_intent', 'principal_kind principal_id operation source_id slug digest intent authority state recovery outcome error_code error_message blocked_reason target_kind admitter_version consumer_version error_detail claim_phase client_request_id'],+ ['persistence_requests', 'swept', 'request_intent', 'principal_kind principal_id operation source_id slug digest intent authority state recovery outcome error_code error_message blocked_reason target_kind admitter_version consumer_version error_detail claim_phase client_request_id deferred_import_from'],['persistence_source_bindings', 'out_of_scope', 'no_memory_text', 'source_id relative_path'],['persistence_topology_changes', 'out_of_scope', 'probed_reported', 'digest operation source_id state recovery outcome', 'recovery outcome'],['persistence_worktree_refreshes', 'out_of_scope', 'probed_reported', 'source_ids state old_head target_head upstream_ref preserved_uncommitted outcome', 'outcome'],diff --git a/test/persistence-true-up-sites.test.ts b/test/persistence-true-up-sites.test.tsindex edc200e1aa..ac550a1dab 100644--- a/test/persistence-true-up-sites.test.ts+++ b/test/persistence-true-up-sites.test.ts@@ -61,7 +61,7 @@ const COMPLETIONS: Record<string, number> = {};/** An UPDATE of persistence_requests assigning `state` in its SET list, with the statement text up to the closing backtick. */const REQUEST_STATE = /UPDATE\s+persistence_requests\b(?:(?!\bWHERE\b)[^`;])*?\bSET\b(?:(?!\bWHERE\b)[^`;])*?(?<![.\w])state\s*=\s*([^,\n]+)[^`]*/g;-const NON_TERMINAL = /^'(?:queued|running|recovering)'$/;+const NON_TERMINAL = /^'(?:queued|deferred|running|recovering)'$/;/** A CASE that only keeps the current state or moves it to a non-terminal one. */const NON_TERMINAL_CASE = (statement: string) => [...statement.matchAll(/\bTHEN\s+('[a-z_]+'|state)\b/g)].every(m => m[1] === 'state' || NON_TERMINAL.test(m[1]!));