Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
test: content_repair runs slug-conflicts on managed brains; paid-kind, banner and remediation-string pins take the lane
garrytan1a1341273bc5
diff --git a/src/core/content-repair/hold-fix.ts b/src/core/content-repair/hold-fix.tsindex 179bb4ebcc..df8a922c31 100644--- a/src/core/content-repair/hold-fix.ts+++ b/src/core/content-repair/hold-fix.ts@@ -65,7 +65,7 @@ export function contentHoldFix(record: { source_id: string; path: string; slug?:const base = { argv: preview, consent: [] as Effect[], requires_exclusive: false, verify, docs };if (!state) {return { ...base, actor: 'agent',- why: `The frontmatter slug of ${record.path} names another page. gbrain repairs this itself on the next maintenance run or with gbrain sync unblock --source ${source} --apply: `+ why: `The frontmatter slug of ${record.path} names another page. The content-repair lane clears this itself on the next maintenance run or with gbrain sync unblock --source ${source} --apply: `+ 'a stray slug (no such page, or a page of another type with nothing in common) is removed deterministically; anything else is judged by the content-repair model under the fences.repair caps. '+ 'The preview is read-only and calls no model: it lists the planned action, the estimated model cost and the cap left, and prints the apply command.' };}diff --git a/test/managed-phase-matrix.test.ts b/test/managed-phase-matrix.test.tsindex 26e4daeb13..fdf002ff9d 100644--- a/test/managed-phase-matrix.test.ts+++ b/test/managed-phase-matrix.test.ts@@ -146,12 +146,12 @@ const MATRIX: Record<CyclePhase, Entry> = {},},content_repair: {- // #6377: the lane minus `fences`; with no other content-repair kind registered in this release the phase runs nothing- // and says so, so it must finish skipped with `no_kinds` and never refuse or stop.+ // #6377: the lane minus `fences` (today the `slug-conflicts` kind) runs as a trusted apply on the managed brain; with no+ // slug-conflict hold seeded it must finish without a refusal or a stop and report the kind's (empty) result.seed: async ({ engine, sourceId }) => put(engine, sourceId, 'people/alice-example', page('person', 'Alice', 'A person with no holds.')),assert: async ({ result }) => {- expect(result.status).toBe('skipped');- expect(result.details).toMatchObject({ reason: 'no_kinds', kinds: [] });+ expect(result.status).toBe('ok');+ expect(result.details).toMatchObject({ mode: 'apply', kinds: ['slug-conflicts'] });},},synthesize: {diff --git a/test/post-upgrade-banner.test.ts b/test/post-upgrade-banner.test.tsindex 8e41263073..3e31ffe068 100644--- a/test/post-upgrade-banner.test.ts+++ b/test/post-upgrade-banner.test.ts@@ -102,10 +102,10 @@ describe('fence findings in the banner (#6188, D7)', () => {test('a fence-only git_held_files finding names the fence repair; a mixed one names both previews', () => {const fenceOnly = line('git_held_files', { held: 2, fences: 2, source_ids: ['notes-example'], auto_repair: { enabled: true, active: true } });- expect(fenceOnly).toBe('[AGENT] git_held_files: 2 (fence holds: repaired automatically by the next maintenance run; preview with: gbrain repair fences --source notes-example)');+ expect(fenceOnly).toBe('[AGENT] git_held_files: 2 (fence holds: repaired automatically by the next maintenance run; preview with: gbrain repair content --source notes-example)');const mixed = line('git_held_files', { held: 3, fences: 1, source_ids: ['notes-example'], auto_repair: { enabled: true, active: false } });expect(mixed).toContain('explicit_kind_required; preview with: gbrain repair frontmatter --source notes-example');- expect(mixed).toContain('fence holds: not repaired automatically (no maintenance run is active); preview with: gbrain repair fences --source notes-example');+ expect(mixed).toContain('fence holds: not repaired automatically (no maintenance run is active); preview with: gbrain repair content --source notes-example');expect(line('git_held_files', { held: 2, source_ids: ['notes-example'] })).toBe('[AGENT] git_held_files: 2 (explicit_kind_required; preview with: gbrain repair frontmatter --source notes-example)');});});diff --git a/test/repair-flags.test.ts b/test/repair-flags.test.tsindex cf0d70f5bb..88d5e664b8 100644--- a/test/repair-flags.test.ts+++ b/test/repair-flags.test.ts@@ -102,6 +102,6 @@ describe('gbrain repair flags', () => {const human = await captured(['--all']);expect(human).toContain("may queue paid embeddings: timeline, visibility, safe-chunks");const free = JSON.parse(await captured(["--all", "--json", "--no-embed"])) as { paid_kinds: string[] };- expect(free.paid_kinds).toEqual(["timeline", "visibility", "connector-fences", "take-supersession", "embedding-effects", "fences"]);+ expect(free.paid_kinds).toEqual(["timeline", "visibility", "connector-fences", "take-supersession", "embedding-effects", "fences", "slug-conflicts"]);});});