Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
fix(orphans): exclude generated corpus roots (#2068)
Matt Gunnin836d83012d06
diff --git a/src/commands/orphans.ts b/src/commands/orphans.tsindex 04765d05f3..a440c1017a 100644--- a/src/commands/orphans.ts+++ b/src/commands/orphans.ts@@ -53,7 +53,15 @@ const DENY_PREFIXES = [];/** First slug segments where no inbound links is expected */-const FIRST_SEGMENT_EXCLUSIONS = new Set(['scratch', 'thoughts', 'catalog', 'entities']);+const FIRST_SEGMENT_EXCLUSIONS = new Set([+ 'scratch',+ 'thoughts',+ 'catalog',+ 'entities',+ 'raw',+ 'atoms',+ 'skills',+]);// --- Filter logic ---diff --git a/test/orphans-pure-fn.test.ts b/test/orphans-pure-fn.test.tsindex 4906e9124e..ada6a7d09a 100644--- a/test/orphans-pure-fn.test.ts+++ b/test/orphans-pure-fn.test.ts@@ -169,6 +169,7 @@ describe('shouldExclude — orphan filter regression (preserve curation)', () =>test('raw segment is excluded', () => {expect(shouldExclude('media/x/raw/post')).toBe(true);+ expect(shouldExclude('raw/chats/claude-code/session')).toBe(true);});test('deny-prefixes are excluded', () => {@@ -183,6 +184,8 @@ describe('shouldExclude — orphan filter regression (preserve curation)', () =>expect(shouldExclude('thoughts/today')).toBe(true);expect(shouldExclude('catalog/movies')).toBe(true);expect(shouldExclude('entities/anonymous')).toBe(true);+ expect(shouldExclude('atoms/fact-123')).toBe(true);+ expect(shouldExclude('skills/gbrain-operations')).toBe(true);});test('regular slugs are NOT excluded', () => {