refactor(codex): name the pinned rollout lookup for what it does

With the terminal handoff gone, the module named codex-tui-rollout-proof holds
only the pinned rollout lookup that structured Codex launches use to resume a
thread, so the name described code that no longer exists. Rename the module and
its options type. Also drop a mobile allowlist assertion that pinned the
removed agentSession.requestHandoff method, which no longer exists to allow.
This commit is contained in:
Brennan Benson
2026-09-25 01:02:14 -07:00
parent faececed48
commit 250250e59d
4 changed files with 4 additions and 5 deletions
@@ -2,7 +2,7 @@ import { mkdir, mkdtemp, rm, writeFile } from 'node:fs/promises'
import { tmpdir } from 'node:os'
import { join } from 'node:path'
import { describe, expect, it, vi } from 'vitest'
import { resolvePinnedCodexRolloutProof } from './codex-tui-rollout-proof'
import { resolvePinnedCodexRolloutProof } from './codex-pinned-rollout-proof'
const THREAD = '019fd900-77aa-7c19-8bd0-2b3c4d5e6f70'
const OTHER_THREAD = '019fd900-77aa-7c19-8bd0-2b3c4d5e6f71'
@@ -3,7 +3,7 @@ import { relativePathInsideRoot } from '../../shared/cross-platform-path'
import { readCodexRolloutSessionMetaId } from './codex-rollout-session-meta'
import { listCodexSessionJsonlFilesIncrementally } from './codex-session-file-listing'
export type CodexTuiRolloutProofOptions = {
export type CodexPinnedRolloutProofOptions = {
listFiles?: (sessionsRoot: string) => AsyncIterable<string>
readSessionMetaId?: (filePath: string) => Promise<string | null>
}
@@ -11,7 +11,7 @@ export type CodexTuiRolloutProofOptions = {
export async function resolvePinnedCodexRolloutProof(
codexHome: string,
threadId: string,
options: CodexTuiRolloutProofOptions = {}
options: CodexPinnedRolloutProofOptions = {}
): Promise<string | null> {
const sessionsRoot = join(codexHome, 'sessions')
const listFiles =
@@ -13,7 +13,7 @@ import { resolveCodexCommand } from '../codex-cli/command'
import type { AgentSessionRecordStore } from '../runtime/agent-session-record-store'
import type { CodexStructuredLaunch } from './codex-structured-session-adapter'
import type { CodexStructuredPermissionPolicy } from './codex-structured-permission-policy'
import { resolvePinnedCodexRolloutProof } from './codex-tui-rollout-proof'
import { resolvePinnedCodexRolloutProof } from './codex-pinned-rollout-proof'
import { isWindowsProcessStartTimeAvailable } from '../windows/windows-process-table'
export type CodexStructuredLaunchResolverDeps = {
@@ -177,6 +177,5 @@ describe('mobile RPC allowlist', () => {
'agentSession.release'
])
expect(mobileRpcAllowlist().has('agentSession.attach')).toBe(false)
expect(mobileRpcAllowlist().has('agentSession.requestHandoff')).toBe(false)
})
})