diff --git a/src/triggers/trello/label-added.ts b/src/triggers/trello/label-added.ts index a1810d1d..42c61f90 100644 --- a/src/triggers/trello/label-added.ts +++ b/src/triggers/trello/label-added.ts @@ -62,9 +62,11 @@ export class ReadyToProcessLabelTrigger implements TriggerHandler { } else if (currentListId === lists.todo) { agentType = 'implementation'; } else { - // Default to splitting if list not recognized - logger.warn('Card in unrecognized list, defaulting to splitting', { currentListId, lists }); - agentType = 'splitting'; + logger.info('Card not in a trigger-eligible list, skipping ready-to-process label', { + currentListId, + lists, + }); + return null; } logger.info('Agent type determined', { agentType, cardId, listId: currentListId }); diff --git a/tests/unit/triggers/label-added.test.ts b/tests/unit/triggers/label-added.test.ts index d8f7be02..f0561bc3 100644 --- a/tests/unit/triggers/label-added.test.ts +++ b/tests/unit/triggers/label-added.test.ts @@ -237,14 +237,14 @@ describe('ReadyToProcessLabelTrigger', () => { expect(result.workItemId).toBe('card789'); }); - it('defaults to splitting agent when card is in unknown list', async () => { + it('returns null when card is in an unrecognized list (e.g. IN PROGRESS)', async () => { mockGetCard.mockResolvedValue({ id: 'card999', name: 'Unknown List Card', desc: '', url: 'https://trello.com/c/xyz', shortUrl: 'https://trello.com/c/xyz', - idList: 'unknown-list-id', + idList: 'in-progress-list-id', labels: [], }); @@ -268,7 +268,7 @@ describe('ReadyToProcessLabelTrigger', () => { const result = await trigger.handle(ctx); - expect(result.agentType).toBe('splitting'); + expect(result).toBeNull(); }); it('returns null when card ID is missing', async () => {