mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-07 06:52:28 +00:00
fix(codex): surface thread system errors (#519)
Co-authored-by: Liu-KM <Liu-KM@users.noreply.github.com>
This commit is contained in:
@@ -44,6 +44,32 @@ describe('shouldIgnoreTerminalEvent', () => {
|
||||
expect(ignored).toBe(true);
|
||||
});
|
||||
|
||||
it('accepts thread-level terminal events for the current thread when explicitly allowed', () => {
|
||||
const ignored = shouldIgnoreTerminalEvent({
|
||||
eventTurnId: null,
|
||||
currentTurnId: 'turn-1',
|
||||
turnInFlight: true,
|
||||
eventThreadId: 'thread-1',
|
||||
currentThreadId: 'thread-1',
|
||||
allowMatchingThreadIdTerminalEvent: true
|
||||
});
|
||||
|
||||
expect(ignored).toBe(false);
|
||||
});
|
||||
|
||||
it('ignores thread-level terminal events for a different thread', () => {
|
||||
const ignored = shouldIgnoreTerminalEvent({
|
||||
eventTurnId: null,
|
||||
currentTurnId: 'turn-1',
|
||||
turnInFlight: true,
|
||||
eventThreadId: 'thread-old',
|
||||
currentThreadId: 'thread-1',
|
||||
allowMatchingThreadIdTerminalEvent: true
|
||||
});
|
||||
|
||||
expect(ignored).toBe(true);
|
||||
});
|
||||
|
||||
it('ignores stale terminal events from another turn', () => {
|
||||
const ignored = shouldIgnoreTerminalEvent({
|
||||
eventTurnId: 'turn-old',
|
||||
|
||||
Reference in New Issue
Block a user