Repository navigation
fix(dashboard): 保存 Agent 配置时保留自定义 wrapper - #2027
Merged
deepcoldy merged 1 commit intoOct 19, 2026
Merged
Conversation
pixystone
requested review from
47seek,
LucasIcarus,
deepcoldy,
xiaoxueSunn and
xiongz-c
as code owners
October 19, 2026 10:25
|
🚀 Released in v3.47.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.
Closes #2022
Dashboard 保存 Agent 配置时,未知 wrapper 会回落到裸 CLI 选择键,导致仅改模型/思考强度也丢失启动前缀。本次增加显式
replaceCliSelection意图:普通保存从锁内当前条目保留启动配置;主动选择 CLI(包括再次点击同一个 Codex 选项)或修改 runtime 才替换。旧客户端省略新字段时保持兼容。启动配置合成、可用性/能力校验和写盘在同一配置锁内完成,磁盘、内存、响应和会话身份比较使用同一结果。wrapper 检查不运行启动器或 hooks;不可达仍是保存后的告警。wrapper 与 runtime、launch mode、沙盒、读取隔离、隔离账号冲突时拒绝写入;不能证明 wrapper 的 service tier 能力时拒绝用裸 Codex 的目录代替验证。切换 Agent 不再自动关闭读取隔离。
影响面:公共 Agent 保存接口、异步配置事务和 Dashboard 选择器;重复选择通知仅由 Agent 选择器显式启用。覆盖 Codex/Claude 自定义 wrapper、注册网关、官方/runtime/CLI 切换、旧客户端、legacy path、launch mode、并发磁盘变更、失败无部分写入、RPC 排除、冻结会话身份和已有 pending-session 保护。未修改 CLI 启动器、PTY/持久后端实现或 IM 发送路径。
验证
49ad34abc基线。bun run daemon:restart→bun run daemon:status→bun run daemon:stop:通过;临时 apiOnly Bot 和 Dashboard 均 online,日志确认 IPC 7950 / Dashboard 7891 实际监听,随后干净停止。bun run build:最新49ad34abc基线上的构建通过(TypeScript、脚本/测试 mock 类型检查、Dashboard bundle、资产审计)。bun run test -- --maxWorkers=4:初始3295fbf16基线加本补丁的全量执行完成,33,202 通过、103 失败、57 跳过;文件统计 1,775 通过、23 失败、2 跳过,失败文件中含 1 个加载阶段失败。另建原始3295fbf16checkout(包含完整构建产物),按失败文件重跑,103 个失败用例和 1 个失败套件的名称全部匹配复现。其中包含 Git 2.20.1 不支持git init -b、本机路径/子进程环境限制;不把这些失败计作通过。定向回归命令(设置
BOTMUX_WRAPPER_BROWSER=1启用浏览器):BOTMUX_WRAPPER_BROWSER=1 bun run test -- test/dashboard-ipc.test.ts test/dashboard-bot-defaults-cliid.test.ts test/dashboard-dropdown-viewport.test.ts test/cli-selection.test.ts test/config-store.test.ts test/bot-config-store.test.ts test/codex-rpc-lifecycle.test.ts test/cli-availability.test.ts test/cli-runtime.test.ts test/read-isolation.test.ts --maxWorkers=4截图与边界
浏览器验证说明与复跑方法。截图底部 JSON 是测试页展示的服务端结果,不属于产品界面。
普通保存:
主动再次选择 Codex 后保存:
未做 macOS 实机验证,未执行任意真实 wrapper/hooks。验证使用隔离配置、IPC 服务及隔离 fleet 重启,不修改共享线上 fleet;不包含合并或发版操作。
CI 失败与复跑记录(2026-10-19)
对应提交:
dc7575ffbfdf8cd390036358b3c6e6086599e9db。工作流运行 / 失败分片日志。
第 2 分片共 10,626 项:10,612 通过、13 跳过、1 失败;600 个文件中 599 通过、1 失败。唯一失败为:
该用例的子进程等待达到既有 6,000 ms 上限。汇总
test是依赖此分片而失败,不是另一项测试失败。本补丁没有修改该用例及对应 hook 处理路径,但单独复跑通过不足以证明这是偶发问题或与补丁无关。在上述 PR 提交、Bun 1.4.3 / Node 22.23.2 的 Linux 环境中执行:
结果:
Test Files 1 passed (1);Tests 1 passed | 338 skipped (339);总耗时 9.87 秒,用例阶段 1.70 秒。这里的 338 项跳过来自-t筛选,并未修改测试的跳过条件。尝试通过 GitHub Actions API 重跑失败 job:
返回:
HTTP 403: Must have admin rights to Repository.当前提交账号缺少上游 Actions 重跑权限,尚未完成 CI 重跑。需要有权限的维护者重跑失败 jobs,并完成代码审批;若重跑仍失败,继续定位原因。未放宽超时、未跳过失败测试,也未将 CI 红灯表述为通过。