Repository navigation
fix(schedule): 静默运行超时丢失回合 ID 后仍保持隐藏并收尾 - #2914
Merged
deepcoldy merged 1 commit intoNov 7, 2026
Merged
Conversation
xinna2001
requested review from
47seek,
LucasIcarus,
deepcoldy,
xiaoxueSunn and
xiongz-c
as code owners
November 6, 2026 03:59
Owner
|
已合并,感谢贡献。 修复在 master 上验证通过:静默 new-topic/task 定时任务在结构化桥接退休 capture identity(预启动/采集超时等)后,无 turnId 的屏幕帧不再泄漏自动状态卡,隐藏会话也能按 idle episode 正常结算关闭;普通共享会话与话题物化后的真人回合行为不变。 合并采用与最新 master 的非相邻豁免(交集仅 worker-pool.ts,改动块与主干近期改动均不相邻),落地树与 merge-tree 预测一致;合并后 master CI 已在跑。 两个非阻断的后续点:
|
|
🚀 Released in v3.58.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.
问题
静默
new-topic定时任务在隐藏的独立会话中运行。Structured bridge 的预启动/采集超时会退休当前 turn attribution(retireStructuredTurnAttribution清空 capture identity),之后的screen_update可以不再携带turnId。原有
isSilentScheduledTurn遇到缺失 ID 返回 false,导致真实 IPC handler 走到自动状态卡 POST;同一帧因缺失msg.turnId跳过隐藏运行的 idle 收尾。与已有 #2334(首条提示词还未确认进入 CLI 时不提前关闭)和 #2586(结束的排队回合不再重挂 authority)是不同的缺口。截至提交前已核对 master 与现有 PR,没有找到覆盖此门禁/收尾组合的修复。
修改
deferredScheduleRun解析该独立运行的 exact turn。缺失事件 ID 时,仅在仍未物化的独立运行,或当前 turn 仍是原运行时恢复静默身份;不把普通共享会话的静默 registry 当成 session 级静默。复现与回归证据
在最新主干
accead9bdf8e2cf1fed84698417984b083396258上,测试调用真实setupWorkerHandlers,仅替换 IPC child 和 Lark transport,不使用源码字符串断言,也没有向真实群发测试消息:新增 17 条回归:无 ID/有 ID、第一帧已 idle、重复 idle 与恢复工作、静默 registry 过期、普通共享会话、显式其他回合,以及已物化话题中的真人后续回合。
实际验证
bun run build:通过,包括源码、scripts/test-mocks 类型检查、Dashboard bundle 和资源审计。vitest run --project unit test/bridge-final-output-retry.test.ts test/silent-schedule-turns.test.ts test/scheduler-silent-execute.test.ts test/deferred-schedule-settlement.test.ts test/cot-message.test.ts test/worker-ready-display-mode.test.ts test/worker-terminal-authority-release.test.ts test/test-hygiene.test.ts:8 文件、599 条通过。bun test ./test/silent-schedule-turns.test.ts和bun test ./test/deferred-schedule-settlement.test.ts:Bun 1.4.3,分别在独立进程与隔离 HOME 中运行,8 + 9 条通过。node scripts/run-bun-tests.mjs --self-check:1/1 文件通过,子进程 HOME fence 通过;这不是全量 Bun suite 结果。git diff --check:通过。影响面与限制
变更位于公共静默门禁和 worker IPC idle 处理,不改 CLI/后端适配器、模型、权限、调度配置或卡片布局。平台无路径或进程行为变化;普通共享会话继续 turn-exact,已物化后的真人回合不被隐藏。相关回归覆盖 TraeX/Claude/Codex 等 IPC 路径、思考消息、截图 cache、调度创建和原有 terminal authority。
验证环境为 macOS arm64、Node 24.16.0 与 Bun 1.4.3。未运行全仓库测试、真实 CLI/飞书 E2E 或 Linux 实机验证;没有替换运行二进制,也没有重启任何 live daemon。此 PR 只提交修复,运行环境尚未部署。