backup current stable ejclaw state
This commit is contained in:
@@ -802,4 +802,30 @@ describe('MessageTurnController outbound audit logging', () => {
|
||||
replaceMessageId: 'progress-1',
|
||||
});
|
||||
});
|
||||
|
||||
it('publishes a failure final when an error finishes before any visible output', async () => {
|
||||
const channel = makeChannel();
|
||||
const deliverFinalText = vi.fn().mockResolvedValue(true);
|
||||
const controller = new MessageTurnController({
|
||||
chatJid: 'dc:test-room',
|
||||
group: makeGroup(),
|
||||
runId: 'run-silent-error-final',
|
||||
channel,
|
||||
idleTimeout: 1_000,
|
||||
failureFinalText: '실패',
|
||||
isClaudeCodeAgent: true,
|
||||
clearSession: vi.fn(),
|
||||
requestClose: vi.fn(),
|
||||
deliverFinalText,
|
||||
deliveryRole: 'owner',
|
||||
});
|
||||
|
||||
await controller.start();
|
||||
const finishResult = await controller.finish('error');
|
||||
|
||||
expect(finishResult.visiblePhase).toBe('final');
|
||||
expect(deliverFinalText).toHaveBeenCalledWith('실패', {
|
||||
replaceMessageId: null,
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user