Repository navigation
fix(worktree): 创建超时配置纳入守护进程生命周期快照 - #3557
Merged
Merged
Conversation
#3554 新增的 BOTMUX_WORKTREE_CREATE_TIMEOUT_MS 未加入 DAEMON_ENV_KEYS。该键不在会话 pane 的清理名单里,会随旧 daemon 环境透传进会话 CLI;从会话内(或 detached 自升级)执行重启时, 新 daemon 继承旧值,而 index-daemon.ts 的 dotenv 不覆盖已存在的 变量,导致修改 ~/.botmux/.env 不生效、删除该键也无法恢复 60s 默认值。普通 shell 启动与未配置时的默认行为不受影响。 将该键加入生命周期快照(与 BOTMUX_SENDER_RESOLVE_TIMEOUT_MS 同构),session-origin 重启从持久化文件解析、缺失回退默认;补 session-origin 重启的修改生效/删除回滚测试,并端到端校验消费侧 resolveWorktreeCreateTimeoutMs。 Co-Authored-By: Claude Fable 5 <[email protected]>
deepcoldy
requested review from
47seek,
LucasIcarus,
xiaoxueSunn and
xiongz-c
as code owners
November 18, 2026 07:10
|
@deepcoldy 合入 master 后的 Midscene E2E 失败:Feishu live Midscene 失败。 这次运行覆盖 94e46cd。
|
|
🚀 Released in v3.59.20 |
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.
背景
#3554 新增了
BOTMUX_WORKTREE_CREATE_TIMEOUT_MS(每次git worktree add的预算,默认 60000ms)。合入后复核发现该键没有进入DAEMON_ENV_KEYS生命周期快照,存在一个重启生效缺口。问题
该键不在会话 CLI pane 的环境清理名单中,会随旧 daemon 的环境透传进会话子进程。当从一个 botmux 会话内部(或 detached 自升级路径)执行重启时:
src/index-daemon.ts的 dotenv 加载默认不覆盖已存在的变量。于是在
~/.botmux/.env中把60000改成90000后,会话内重启仍是60000;从文件里删除该键,也无法恢复文档声明的 60s 默认值。普通 shell 启动/重启、以及从未配置过该键的默认行为均不受影响。改动
BOTMUX_WORKTREE_CREATE_TIMEOUT_MS加入src/cli/daemon-lifecycle-env.ts的DAEMON_ENV_KEYS,与已有的同类机器级超时BOTMUX_SENDER_RESOLVE_TIMEOUT_MS同构:session-origin 重启从持久化文件权威解析,文件缺失时解析为空串,由消费侧resolveWorktreeCreateTimeoutMs回退默认。detached 重启的 fallback 快照也从同一名单派生,自动一并覆盖。test/daemon-lifecycle-env.test.ts补 session-origin 重启的「修改生效、删除恢复默认」回归用例,并端到端校验消费侧解析结果。影响面
仅守护进程生命周期环境快照这一处共用路径;新增的是非密钥配置项,不涉及 H5 凭证家族(不触发
DASHBOARD_H5_ENV_PREFIX扫描)。对普通 shell 启动零行为变化(shell 显式 export 仍优先于文件,已有用例覆盖)。验证
bun run test test/daemon-lifecycle-env.test.ts test/runtime-timeout-config.test.ts:33 用例通过;加跑test-hygiene共 61 用例通过。DAEMON_ENV_KEYS,新回归用例失败、真实组装探针复现「编辑仍为旧值、删除不回默认」;还原后全部转绿。resolveFleetDaemonEnv+resolveWorktreeCreateTimeoutMs)四场景:会话重启改 90000 生效、删除回 60000、shell export 120000 优先、shell 仅文件设 90000 生效。bun run build(tsc + 构建审计)通过。