Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
wave18: integration fixes: rename-identity carry counts the updateSlug preimage version (belief W2); write-gate drift exempts the rename-identity owner repair
garrytan15b8d135cfff
diff --git a/test/repair-rename-identity-6729.test.ts b/test/repair-rename-identity-6729.test.tsindex e197089e90..47f2fcc381 100644--- a/test/repair-rename-identity-6729.test.ts+++ b/test/repair-rename-identity-6729.test.ts@@ -143,8 +143,10 @@ for (const kind of testBackends()) describe(`gbrain repair rename-identity (#672expect(await page(s.id, 'notes/plan')).toBeUndefined();expect(await engine.executeRaw('SELECT alias_slug, canonical_slug FROM slug_aliases WHERE source_id=$1', [s.id])).toEqual([{ alias_slug: 'notes/plan', canonical_slug: 'notes/roadmap' }]);expect(await pageById(s.fresh.id)).toMatchObject({ slug: `notes/roadmap~purged-${s.fresh.id}`, deleted_at: expect.anything() });- // History: the old versions, the provisional's versions, and the import's snapshot of the old body (the new file is the page now).- expect(await versions(s.old.id)).toBe(oldVersions + provisionalVersions + 1);+ // History: the old versions, the provisional's versions, the rename's preimage (updateSlug versions the page as it+ // stood, for belief page-at-time) and the import's snapshot of the old body (the new file is the page now).+ const carriedVersions = oldVersions + provisionalVersions + 2;+ expect(await versions(s.old.id)).toBe(carriedVersions);expect(await versions(s.fresh.id)).toBe(0);expect(await engine.executeRaw('SELECT summary FROM timeline_entries WHERE page_id=$1', [s.old.id])).toEqual([{ summary: 'Planning kickoff' }]);expect((await engine.executeRaw<{ to_page_id: number }>('SELECT to_page_id FROM links WHERE from_page_id=$1', [s.old.id])).map(l => Number(l.to_page_id))).toContain(peer.id);@@ -167,7 +169,7 @@ for (const kind of testBackends()) describe(`gbrain repair rename-identity (#672expect(again.suggestion).toContain('already carried or closed');}expect(await facts(s.id)).toEqual(after);- expect(await versions(s.old.id)).toBe(oldVersions + provisionalVersions + 1);+ expect(await versions(s.old.id)).toBe(carriedVersions);// The next sync keeps the carried page.await s.sync();expect((await page(s.id, 'notes/roadmap'))!.id).toBe(s.old.id);diff --git a/test/trust-write-gate-drift.test.ts b/test/trust-write-gate-drift.test.tsindex f4bc3fb3d5..3652337aac 100644--- a/test/trust-write-gate-drift.test.ts+++ b/test/trust-write-gate-drift.test.ts@@ -19,6 +19,7 @@ const EXEMPT: Record<string, string> = {'src/commands/extract-timeline-db.ts': 're-derives timeline rows from stored page text the page gate already assessed','src/commands/migrate-engine.ts': 'copies rows verbatim between engines; tiers and receipts travel with them','src/commands/sync/holds.ts': 'held-file bookkeeping; writes no content',+ 'src/core/repair/rename-identity.ts': 'owner repair behind preview-bound destructive consent: moves the old page to the new slug (updateSlug), copies fence-row attributes the two pages already store and retires the provisional page; the new file imports through importFile, which passes the owner gate input (import-file.ts)','src/commands/sync/rename-collision.ts': 'moves a page between slugs (updateSlug, tombstone re-key, source_path repair) and writes no content; the renamed body still imports through importFile, which passes the owner gate input (import-file.ts)','src/core/calibration/undo-wave.ts': 'restores prior take lifecycle fields; no new text','src/core/company-brain/profile.ts': 'company profile publication of an owner-approved company source (operator_curated, never gated)',