From 250250e59de4963f5d22e9e0fa0fc68ede010064 Mon Sep 17 00:00:00 2001 From: Brennan Benson <79079362+brennanb2025@users.noreply.github.com> Date: Fri, 25 Sep 2026 01:02:14 -0700 Subject: [PATCH] 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. --- ...llout-proof.test.ts => codex-pinned-rollout-proof.test.ts} | 2 +- ...dex-tui-rollout-proof.ts => codex-pinned-rollout-proof.ts} | 4 ++-- src/main/codex/codex-structured-launch-resolution.ts | 2 +- src/main/runtime/mobile-rpc-allowlist.test.ts | 1 - 4 files changed, 4 insertions(+), 5 deletions(-) rename src/main/codex/{codex-tui-rollout-proof.test.ts => codex-pinned-rollout-proof.test.ts} (97%) rename src/main/codex/{codex-tui-rollout-proof.ts => codex-pinned-rollout-proof.ts} (94%) diff --git a/src/main/codex/codex-tui-rollout-proof.test.ts b/src/main/codex/codex-pinned-rollout-proof.test.ts similarity index 97% rename from src/main/codex/codex-tui-rollout-proof.test.ts rename to src/main/codex/codex-pinned-rollout-proof.test.ts index 130d167f21e..d4bc35a03ff 100644 --- a/src/main/codex/codex-tui-rollout-proof.test.ts +++ b/src/main/codex/codex-pinned-rollout-proof.test.ts @@ -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' diff --git a/src/main/codex/codex-tui-rollout-proof.ts b/src/main/codex/codex-pinned-rollout-proof.ts similarity index 94% rename from src/main/codex/codex-tui-rollout-proof.ts rename to src/main/codex/codex-pinned-rollout-proof.ts index dfab50cae08..248d2892e32 100644 --- a/src/main/codex/codex-tui-rollout-proof.ts +++ b/src/main/codex/codex-pinned-rollout-proof.ts @@ -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 readSessionMetaId?: (filePath: string) => Promise } @@ -11,7 +11,7 @@ export type CodexTuiRolloutProofOptions = { export async function resolvePinnedCodexRolloutProof( codexHome: string, threadId: string, - options: CodexTuiRolloutProofOptions = {} + options: CodexPinnedRolloutProofOptions = {} ): Promise { const sessionsRoot = join(codexHome, 'sessions') const listFiles = diff --git a/src/main/codex/codex-structured-launch-resolution.ts b/src/main/codex/codex-structured-launch-resolution.ts index 2b0b169b031..8a3fe002cb1 100644 --- a/src/main/codex/codex-structured-launch-resolution.ts +++ b/src/main/codex/codex-structured-launch-resolution.ts @@ -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 = { diff --git a/src/main/runtime/mobile-rpc-allowlist.test.ts b/src/main/runtime/mobile-rpc-allowlist.test.ts index 34a4006ec45..06f99c594fb 100644 --- a/src/main/runtime/mobile-rpc-allowlist.test.ts +++ b/src/main/runtime/mobile-rpc-allowlist.test.ts @@ -177,6 +177,5 @@ describe('mobile RPC allowlist', () => { 'agentSession.release' ]) expect(mobileRpcAllowlist().has('agentSession.attach')).toBe(false) - expect(mobileRpcAllowlist().has('agentSession.requestHandoff')).toBe(false) }) })