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:
@@ -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);
|
||||
});
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user