Merge pull request #3557 from gsd-build/feat/3347-auto-update-knowledge-graph-after-main-h

feat(3347): opt-in auto-update of knowledge graph after main HEAD advances
This commit is contained in:
Tom Boucher
2026-05-15 12:06:41 -04:00
committed by GitHub
19 changed files with 1013 additions and 17 deletions

View File

@@ -231,6 +231,10 @@ describe('isCompletedInventory', () => {
expect(isCompletedInventory('unknown')).toBe(false);
});
it('returns false for "unarchived" (word-boundary guard)', () => {
expect(isCompletedInventory('unarchived')).toBe(false);
});
it('returns false for empty string', () => {
expect(isCompletedInventory('')).toBe(false);
});

View File

@@ -86,11 +86,11 @@ function toPosixPath(p: string): string {
/**
* Pure classifier: returns true if the given status string indicates a
* completed or archived workstream (case-insensitive substring match).
* completed or archived workstream (case-insensitive, boundary-aware match).
*/
export function isCompletedInventory(status: string): boolean {
const s = String(status ?? '').toLowerCase();
return s.includes('milestone complete') || s.includes('archived');
const s = String(status ?? '').trim().toLowerCase();
return /\bmilestone\s+complete\b/.test(s) || /\barchived\b/.test(s);
}
/**