Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

v268 claim_owner: catalog goldens, bootstrap exemption and deletion inventory; runbook row; the dead-owner e2e gives its repositories a Git identity

garrytan7843b9b423c1
diff --git a/docs/guides/sync-unblock-runbook.md b/docs/guides/sync-unblock-runbook.md
index 9829f9ea0d..132ac21afb 100644
--- a/docs/guides/sync-unblock-runbook.md
+++ b/docs/guides/sync-unblock-runbook.md
@@ -122,7 +122,7 @@ Every hold and error has three fields, from one table
|---|---|---|---|---|
| `worktree_dirty` | page | retry_when_clean | no | 3 failed attempts over 24 h with no edit in the last 24 h: the uncommitted edit is abandoned |
| `concurrent_write` | page | reconcile | yes | always: the file and the database page diverge |
-| `file_drift` | page | reconcile | yes | always: the page changed in the database since its file was last imported |
+| `file_drift` | page | reconcile | yes | always: importing the file would replace a database version of the page that sync cannot trace to an import of it |
| `preparation_stalled` | page | retry, upgrade | no | 3 failed attempts over 24 h, or writer status names a step that never finishes |
| `write_interrupted` | page | retry | no | 3 failed attempts over 24 h: gbrain sources writer status --source <source> --json (read-only) names the load on the write owner |
| `invalid_fence` | page | repair | no | the fence repair preview offers no plan (a manual reason) |
diff --git a/src/core/deletion-inventory.ts b/src/core/deletion-inventory.ts
index ff25f13544..4dbaf8dee3 100644
--- a/src/core/deletion-inventory.ts
+++ b/src/core/deletion-inventory.ts
@@ -130,7 +130,7 @@ const ROWS: readonly Row[] = [
['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 body_storage body_flags truth_lead timeline_lead links_extract_failure'],
['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_effects', 'swept', 'effect_recovery', 'kind data state source_id error_code outcome recovery claim_owner'],
['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'],
diff --git a/test/e2e/persistence-dead-owner-effect-gbra133.test.ts b/test/e2e/persistence-dead-owner-effect-gbra133.test.ts
index 03a10b1de7..427269faa6 100644
--- a/test/e2e/persistence-dead-owner-effect-gbra133.test.ts
+++ b/test/e2e/persistence-dead-owner-effect-gbra133.test.ts
@@ -65,6 +65,8 @@ async function withBrain(run: (ctx: Ctx) => Promise<void>) {
const sources = await fixtures(engine, config);
for (const source of sources) {
execFileSync('git', ['init', '-q', source.root]);
+ // The Git effect commits with the repository's identity; a runner without a global one needs it here.
+ for (const [key, value] of [['user.name', 't'], ['user.email', '[email protected]']]) execFileSync('git', ['-C', source.root, 'config', key, value]);
execFileSync('git', ['-C', source.root, '-c', 'user.name=t', '-c', '[email protected]', 'commit', '-q', '--allow-empty', '-m', 'init']);
}
await engine.executeRaw("UPDATE persistence_host_bindings SET git_durability='enabled'");
diff --git a/test/fixtures/goldens/catalog/postgres-engine-init-default.json b/test/fixtures/goldens/catalog/postgres-engine-init-default.json
index 69f8598652..2ad88f15f8 100644
--- a/test/fixtures/goldens/catalog/postgres-engine-init-default.json
+++ b/test/fixtures/goldens/catalog/postgres-engine-init-default.json
@@ -3259,7 +3259,8 @@
"15 error_code text/text NULL",
"16 outcome jsonb/jsonb NULL",
"17 recovery jsonb/jsonb NULL",
- "18 recovery_bytes bigint/int8 NOT NULL DEFAULT 0"
+ "18 recovery_bytes bigint/int8 NOT NULL DEFAULT 0",
+ "19 claim_owner jsonb/jsonb NULL"
],
"flags": "relkind=r rls=true force_rls=false"
},
diff --git a/test/fixtures/goldens/catalog/postgres-engine-init-fts-portuguese.json b/test/fixtures/goldens/catalog/postgres-engine-init-fts-portuguese.json
index 367517a73b..db3cc318fc 100644
--- a/test/fixtures/goldens/catalog/postgres-engine-init-fts-portuguese.json
+++ b/test/fixtures/goldens/catalog/postgres-engine-init-fts-portuguese.json
@@ -3259,7 +3259,8 @@
"15 error_code text/text NULL",
"16 outcome jsonb/jsonb NULL",
"17 recovery jsonb/jsonb NULL",
- "18 recovery_bytes bigint/int8 NOT NULL DEFAULT 0"
+ "18 recovery_bytes bigint/int8 NOT NULL DEFAULT 0",
+ "19 claim_owner jsonb/jsonb NULL"
],
"flags": "relkind=r rls=true force_rls=false"
},
diff --git a/test/fixtures/goldens/catalog/postgres-engine-init-high-dims.json b/test/fixtures/goldens/catalog/postgres-engine-init-high-dims.json
index 1bf87c2207..5f1e4fc57e 100644
--- a/test/fixtures/goldens/catalog/postgres-engine-init-high-dims.json
+++ b/test/fixtures/goldens/catalog/postgres-engine-init-high-dims.json
@@ -3255,7 +3255,8 @@
"15 error_code text/text NULL",
"16 outcome jsonb/jsonb NULL",
"17 recovery jsonb/jsonb NULL",
- "18 recovery_bytes bigint/int8 NOT NULL DEFAULT 0"
+ "18 recovery_bytes bigint/int8 NOT NULL DEFAULT 0",
+ "19 claim_owner jsonb/jsonb NULL"
],
"flags": "relkind=r rls=true force_rls=false"
},
diff --git a/test/fixtures/goldens/pglite-upgrade-replay/catalog-after-boot.json b/test/fixtures/goldens/pglite-upgrade-replay/catalog-after-boot.json
index 7ae0dd23aa..13844ce3ec 100644
--- a/test/fixtures/goldens/pglite-upgrade-replay/catalog-after-boot.json
+++ b/test/fixtures/goldens/pglite-upgrade-replay/catalog-after-boot.json
@@ -3247,7 +3247,8 @@
"15 error_code text/text NULL",
"16 outcome jsonb/jsonb NULL",
"17 recovery jsonb/jsonb NULL",
- "18 recovery_bytes bigint/int8 NOT NULL DEFAULT 0"
+ "18 recovery_bytes bigint/int8 NOT NULL DEFAULT 0",
+ "19 claim_owner jsonb/jsonb NULL"
],
"flags": "relkind=r rls=false force_rls=false"
},
diff --git a/test/schema-bootstrap-coverage.test.ts b/test/schema-bootstrap-coverage.test.ts
index eac300c7be..9022abfe7a 100644
--- a/test/schema-bootstrap-coverage.test.ts
+++ b/test/schema-bootstrap-coverage.test.ts
@@ -1108,6 +1108,10 @@ const COLUMN_EXEMPTIONS = new Set<string>([
// and every reader treats a missing value as 0 interruptions and no backoff.
'persistence_requests.transient_interruptions',
'persistence_requests.next_attempt_at',
+ // GBRA-133 (migration v268) — owner stamp of an effect claim. Same posture: persistence_effects is
+ // migration-created on PGLite, no index references the column, and every reader treats NULL as an
+ // unstamped claim (never provably dead, so it keeps its lease).
+ 'persistence_effects.claim_owner',
// Cat 40 Hard F6 (migration v238) — the client's original request_id. Same
// posture as v178/v198: persistence_requests is migration-created on PGLite,
// no index references the column, and every reader treats NULL as "sent a UUID or nothing".