Skip to content

Commit dae2e48

Browse files
[codex] Add incremental chat completion traces (#708)
Co-authored-by: James Grugett <jahooma@gmail.com>
1 parent 10c7318 commit dae2e48

17 files changed

Lines changed: 1120 additions & 222 deletions

File tree

agents/e2e/base2-free-summary-format.e2e.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,7 @@ describe('Base2-Free Summary Format Compliance', () => {
324324
})
325325
const runStateWithMessages = withMessageHistory({
326326
runState: {
327+
traceSessionId: 'test-trace-session',
327328
sessionState,
328329
output: { type: 'error', message: '' },
329330
},
@@ -461,6 +462,7 @@ describe('Base2-Free Summary Format Compliance', () => {
461462
})
462463
const runStateWithMessages = withMessageHistory({
463464
runState: {
465+
traceSessionId: 'test-trace-session',
464466
sessionState,
465467
output: { type: 'error', message: '' },
466468
},

agents/e2e/context-pruner.e2e.test.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,11 @@ Do not do anything else. Just spawn context-pruner and then report the result.`,
151151
// Create initial session state with the large message history
152152
const sessionState = await initialSessionState({})
153153
const runStateWithMessages = withMessageHistory({
154-
runState: { sessionState, output: { type: 'error', message: '' } },
154+
runState: {
155+
traceSessionId: 'test-trace-session',
156+
sessionState,
157+
output: { type: 'error', message: '' },
158+
},
155159
messages: initialMessages,
156160
})
157161

@@ -277,7 +281,11 @@ Do not do anything else. Just spawn context-pruner and then report the result.`,
277281

278282
const sessionState = await initialSessionState({})
279283
const runStateWithMessages = withMessageHistory({
280-
runState: { sessionState, output: { type: 'error', message: '' } },
284+
runState: {
285+
traceSessionId: 'test-trace-session',
286+
sessionState,
287+
output: { type: 'error', message: '' },
288+
},
281289
messages: initialMessages,
282290
})
283291

agents/e2e/context-pruning-threshold.e2e.test.ts

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,11 @@ describe('Context Pruning Threshold E2E', () => {
324324

325325
const sessionState = await initialSessionState({})
326326
const runStateWithMessages = withMessageHistory({
327-
runState: { sessionState, output: { type: 'error', message: '' } },
327+
runState: {
328+
traceSessionId: 'test-trace-session',
329+
sessionState,
330+
output: { type: 'error', message: '' },
331+
},
328332
messages,
329333
})
330334

@@ -398,7 +402,11 @@ describe('Context Pruning Threshold E2E', () => {
398402

399403
const sessionState = await initialSessionState({})
400404
const runStateWithMessages = withMessageHistory({
401-
runState: { sessionState, output: { type: 'error', message: '' } },
405+
runState: {
406+
traceSessionId: 'test-trace-session',
407+
sessionState,
408+
output: { type: 'error', message: '' },
409+
},
402410
messages,
403411
})
404412

@@ -494,6 +502,7 @@ describe('Context Pruning Threshold E2E', () => {
494502
const sessionStateCal = await initialSessionState({})
495503
const runStateCal = withMessageHistory({
496504
runState: {
505+
traceSessionId: 'test-trace-session',
497506
sessionState: sessionStateCal,
498507
output: { type: 'error', message: '' },
499508
},
@@ -544,7 +553,11 @@ describe('Context Pruning Threshold E2E', () => {
544553
// =========================================================================
545554
const sessionState = await initialSessionState({})
546555
const runStateWithMessages = withMessageHistory({
547-
runState: { sessionState, output: { type: 'error', message: '' } },
556+
runState: {
557+
traceSessionId: 'test-trace-session',
558+
sessionState,
559+
output: { type: 'error', message: '' },
560+
},
548561
messages,
549562
})
550563

0 commit comments

Comments
 (0)