From 9454d3803e473e5f39391da610fe339b165a1820 Mon Sep 17 00:00:00 2001 From: Aegis Date: Sun, 19 Apr 2026 05:09:55 -0500 Subject: [PATCH] chore(issue-watcher): skip issues labeled 'blocked' Extend SKIP_LABELS in the scheduled issue-watcher so blocked issues are not auto-queued as single-session taskrunner tasks. Paired with the new 'blocked' label on aegis-daemon god-object-epic children (#536-542) that have unsatisfied phase-1 dependencies. Why: without this, a 2h issue-watcher tick could queue Phase 2/3/4 refactor issues as cc_tasks before Phase 1 foundations (#533-535) ship, forcing downstream work onto missing abstractions. - SKIP_LABELS: add 'blocked' alongside existing wishlist/roadmap/epic - Test: new case asserts blocked-labeled issues produce zero INSERT INTO cc_tasks Co-Authored-By: Claude Opus 4.7 (1M context) --- web/src/kernel/scheduled/issue-watcher.ts | 8 ++++---- web/tests/issue-watcher.test.ts | 12 ++++++++++++ 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/web/src/kernel/scheduled/issue-watcher.ts b/web/src/kernel/scheduled/issue-watcher.ts index 723ecaa..68d35af 100644 --- a/web/src/kernel/scheduled/issue-watcher.ts +++ b/web/src/kernel/scheduled/issue-watcher.ts @@ -16,10 +16,10 @@ const LABEL_TO_CATEGORY: Record { expect(insertCalls).toHaveLength(0); }); + it('skips issue with blocked label', async () => { + const db = createMockDb(); + const issue = makeIssue({ labels: ['refactor', 'blocked'] }); + mockListIssues.mockResolvedValueOnce([issue]); + + await runIssueWatcher(makeEnv(db)); + + const insertCalls = (db.prepare as ReturnType).mock.calls + .filter((c: string[]) => typeof c[0] === 'string' && c[0].includes('INSERT INTO cc_tasks')); + expect(insertCalls).toHaveLength(0); + }); + it('skip label filter is case-insensitive', async () => { const db = createMockDb(); const issue = makeIssue({ labels: ['bug', 'WISHLIST'] });