fix(subagent-codex): verify 0.147 on native Windows

This commit is contained in:
Tianyi Cui
2026-08-08 23:56:39 +08:00
parent 3a518021f6
commit 176e4c6bbb
16 changed files with 70 additions and 62 deletions

View File

@@ -109,8 +109,8 @@ describe.skipIf(!process.env.DEEPSEEK_API_KEY)(
const version = await execFileAsync(join(codexBinDir, 'codex'), ['--version'], {
env: { ...process.env, ...env },
})
expect(codexPackage.version).toBe('0.146.0')
expect(version.stdout.trim()).toBe('codex-cli 0.146.0')
expect(codexPackage.version).toBe('0.147.0')
expect(version.stdout.trim()).toBe('codex-cli 0.147.0')
const parent = {
id: 'deepseek-e2e-parent',

View File

@@ -140,18 +140,18 @@ function responseInputTexts(body: Record<string, unknown>): string[] {
})
}
describe('real @openai/codex 0.146.0 product', () => {
describe('real @openai/codex 0.147.0 product', () => {
it('passes the exact task and fake authentication to local Responses and returns exact text', async () => {
const sentinel = 'REAL_CODEX_SENTINEL_0_146_0'
const sentinel = 'REAL_CODEX_SENTINEL_0_147_0'
const task = 'Return the fixture sentinel exactly.'
const { harness, fixture } = await realHarness([
{ kind: 'complete', text: sentinel },
])
expect(codexPackage.version).toBe('0.146.0')
expect(codexPackage.version).toBe('0.147.0')
const version = await execFileAsync(process.execPath, [codexEntry, '--version'], {
env: { ...process.env, ...harness.env },
})
expect(version.stdout.trim()).toBe('codex-cli 0.146.0')
expect(version.stdout.trim()).toBe('codex-cli 0.147.0')
const run = await harness.ctx.subagents.start('codex', {
prompt: [{ type: 'text', text: task }],

View File

@@ -86,7 +86,7 @@ function responseObject(text: string): Record<string, unknown> {
}
/**
* Build the minimal Responses SSE event sequence consumed by Codex 0.146.0.
* Build the minimal Responses SSE event sequence consumed by Codex 0.147.0.
* @param text - exact assistant answer.
* @returns ordered response lifecycle events.
*/

View File

@@ -199,7 +199,7 @@ async function initializeWire(): Promise<{
wire.start()
const initializing = wire.initialize(new AbortController().signal)
const initialize = await child.peer.nextMethod('initialize')
child.peer.respond(initialize, { userAgent: 'codex-cli 0.146.0' })
child.peer.respond(initialize, { userAgent: 'codex-cli 0.147.0' })
await initializing
expect(await child.peer.nextMethod('initialized')).toEqual({
jsonrpc: '2.0',
@@ -219,7 +219,7 @@ async function publishRun(
) {
const starting = startCodexRun(request(undefined, signal), runSpec(child, specOverrides))
const initialize = await child.peer.nextMethod('initialize')
child.peer.respond(initialize, { userAgent: 'codex-cli 0.146.0' })
child.peer.respond(initialize, { userAgent: 'codex-cli 0.147.0' })
await child.peer.nextMethod('initialized')
const threadStart = await child.peer.nextMethod('thread/start')
child.peer.respond(threadStart, { thread: { id: 'thread-1', ephemeral: true } })
@@ -380,7 +380,7 @@ describe('CodexAppServerWire', () => {
requestAttestation: false,
},
})
child.peer.respond(initialize, { userAgent: 'codex-cli 0.146.0' })
child.peer.respond(initialize, { userAgent: 'codex-cli 0.147.0' })
await initializing
await child.peer.nextMethod('initialized')
@@ -855,7 +855,7 @@ describe('run lifecycle and quiescence', () => {
void starting.then(() => { published = true })
const initialize = await child.peer.nextMethod('initialize')
expect(published).toBe(false)
child.peer.respond(initialize, { userAgent: 'codex-cli 0.146.0' })
child.peer.respond(initialize, { userAgent: 'codex-cli 0.147.0' })
await child.peer.nextMethod('initialized')
const threadStart = await child.peer.nextMethod('thread/start')
expect(published).toBe(false)
@@ -962,7 +962,7 @@ describe('run lifecycle and quiescence', () => {
runSpec(child),
)
const initialize = await child.peer.nextMethod('initialize')
child.peer.respond(initialize, { userAgent: 'codex-cli 0.146.0' })
child.peer.respond(initialize, { userAgent: 'codex-cli 0.147.0' })
await child.peer.nextMethod('initialized')
const threadStart = await child.peer.nextMethod('thread/start')
child.peer.respond(threadStart, { thread: { id: 'thread-1', ephemeral: true } })
@@ -1032,7 +1032,7 @@ describe('run lifecycle and quiescence', () => {
signal: new AbortController().signal,
})
const initialize = await child.peer.nextMethod('initialize')
child.peer.respond(initialize, { userAgent: 'codex-cli 0.146.0' })
child.peer.respond(initialize, { userAgent: 'codex-cli 0.147.0' })
await child.peer.nextMethod('initialized')
const threadStart = await child.peer.nextMethod('thread/start')
child.peer.respond(threadStart, { thread: { id: 'thread-1', ephemeral: true } })