Repository navigation
fix(codex): 完善共享接入边界 - #978
Merged
deepcoldy merged 1 commit intoAug 23, 2026
Merged
Conversation
|
🚀 Released in v3.17.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概述
这是 #974(已合入 shared-adopt)的后续小修复 PR,集中处理合入评论中列出的 4 条非阻断建议。
不重做 shared-adopt 主功能,不改变“不起第二个 App Server、不抢 writer、官方
codex --remote ... resume ...作为第二客户端”的核心设计。变更
1. endpoint 显式拒绝控制字符
existingAppServer.endpoint在 URL 解析和trim前显式拒绝 C0 / DEL 控制字符:这样不会依赖 URL 解析器静默剥离尾部控制字符,所有调用方都得到可打印、无歧义的 endpoint。
新增 NUL、ESC、DEL、换行的回归用例。
2.
/detach//disconnect与/close使用同一安全结果语义此前 shared-adopt 的
/close、历史 close 卡片和 disconnect 卡片已经区分:但文字
/detach//disconnect仍沿用旧的乐观成功路径。本 PR 使它们也只在普通
closed时确认断开;refused、异常或closed_with_residual会明确提示未完成,不会把未证实的清理报告为成功。3. 收窄
existingAppServer注释承诺“不会自动创建新 thread”只适用于
cliId: "codex"的 shared-adopt 路径。cliId: "codex-app"仍保留既有的新会话工作流,直到操作员显式/adopt选择共享 thread。更新注释以免读者误解为所有配置组合都禁止新会话。4. 明确 daemon 重启的后端限定
文档现在明确:
pty后端在 daemon 重启时会失去 remote TUI 进程;同时移除 shared-adopt 设计文档中已经属于 #975 的 Web Terminal worker-restart 表述,保持 PR 范围清晰。
影响范围
验证
已执行:
结果:8 个测试文件、458 项测试通过。
另已执行
pnpm build,通过 TypeScript、脚本类型检查、Dashboard 打包、公开域名审计和产物审计。