This commit is contained in:
@@ -574,7 +574,7 @@ describe('executeMovement parallel tool execution', () => {
|
||||
expect(markerMessages.length).toBeGreaterThanOrEqual(1);
|
||||
});
|
||||
|
||||
it('force-transitions to defaultNext when initial prompt is oversized and defaultNext is set', async () => {
|
||||
it('aborts when initial prompt is oversized and defaultNext is terminal', async () => {
|
||||
const { ContextManager } = await import('./context-manager.js');
|
||||
const cm = new ContextManager({ limitTokens: 1_000 });
|
||||
|
||||
@@ -594,10 +594,10 @@ describe('executeMovement parallel tool execution', () => {
|
||||
{ contextManager: cm },
|
||||
);
|
||||
|
||||
// makeMovement defaultNext is 'COMPLETE' so we force-transition there
|
||||
expect(result.next).toBe('COMPLETE');
|
||||
expect(result.output).toContain('Context overflow');
|
||||
expect(result.lessons).toContain('Context overflow');
|
||||
// A terminal fallback would report a false completion, so overflow aborts.
|
||||
expect(result.next).toBe('ABORT');
|
||||
expect(result.abortCode).toBe('context_overflow');
|
||||
expect(result.output).toContain('LLM request blocked before send');
|
||||
// Only the isolated summary call should have happened — no main LLM call
|
||||
expect(executeToolMock).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user