Repository navigation
fix(collaboration): recover original tasks without worker or stdin races - #6866
Conversation
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent | gpt-6.1-sol | OpenAI | runtime_reported | reasoning_effort=max
REQUEST_CHANGES:后端竞态修复已有独立支持;当前仍缺少要求的实际界面证据,不能把后端通过等同整个可见恢复旅程已验收。
动机
需要修复委派产物并继续原任务的用户,以及承载该委派的 CLI、MCP 和团队证据面板。 例如 worker 已写出任务验收失败、却尚未释放执行锁时,立即复核原任务曾抛出锁超时;当前实现返回原执行观察,等待 worker 结束后沿同一任务继续。 实际 File、SQLite 的同一竞态用例在旧基线均失败、当前提交均通过;24 项本地检查通过,Windows 专属一项未运行。 本 PR 仅修复既有原任务恢复和委派输入隔离,不完成整个团队协作路线,也不改变普通独立校验器的输入合同。
改动思路
操作占用由既有内核锁决定,校验器输入由既有 IO owner 的上下文作用域决定;无需持久化 busy 标记、额外重试器或新审批。 保留原记录、原 Turn、当前 grant/stop/来源检查;锁忙时只读,释放后才执行原任务复核。界面仍需可核验的实际视口证据。 既有授权和原任务信息都可复用,正常恢复不需要用户重新建立 Agent、重输标识或增加一次审批。保持现状会留下已复现的错误;把所有锁异常吞掉又会掩盖真正的执行失败。当前实现把“外层执行仍占用”与“重试内部出错”分开,是合适的最小边界。
下表仅解释当前提交 e55f4ce290337b63b38e37024f71274c5b2f5114 的源码控制流,不替代执行证据:
| 触发条件 | 当前行为 | 后续路径 |
|---|---|---|
| 原 worker 尚持锁 | 只读原观察 | 结束后刷新原交付 |
| 锁已释放、产物仍失败 | 保留拒绝 | 修复实际产物后再复核 |
| 原复核已提交但响应丢失 | 对账原记录 | 不重跑 Host 或另造 Turn |
具体改动
验收依据是改动前的 docs/reference/local-delegation.md,固定版本 1c7b258cb720b3eae92f9f62c419b919f1bf2542,见版本化合同。逐项映射:Original task revalidation 已由真实产物修复和原 Turn 继续覆盖;Acceptance and return 已由独立验收、失败保留及原结果读回覆盖;Disconnect and recovery 已核原 operation 的提交丢响应恢复,以及撤权、stop 和来源链拒绝。原 Task/Goal 的完成仍各有自己的权威。
关键代码讲解
Delegations.revalidate(loopx/collaboration_mcp.py:786)复用非阻塞锁;只有锁未取得才返回read,内部_cli的锁异常仍向上传播。File、SQLite 的同一冻结测试在旧基线分别报锁超时,当前各通过一次;测试还检查原记录和 journal 不变、Host 调用仍为一次。noninteractive_validation(loopx/control_plane/runtime/validation_command.py:21)用上下文变量给受管校验器 EOF,在finally恢复 token。普通调用、另一个线程和嵌套异常都不是这个 scope 的副作用对象。Delegations._cli的普通子进程也明确使用 DEVNULL;没有改变原验收 deadline 或业务判定 owner。GoalTeamEvidence(apps/presentation/dashboard/src/features/personal-workspace/goal-team-evidence.tsx:135)沿用真实worker_active观测,禁用原复核按钮并指向已有刷新动作。伴随的浏览器 smoke 增加等待态、非消费重复请求、释放、修复和恢复检查;API fixture 调整 teardown,接收方保留 UTF-8 原字节;工作流增加相应 Windows 与打包验证选择,没有生产超时扩容。
对主干的风险
[P2] 请补齐实际视口证据。 仓库 First-Screen Review Evidence 规则要求实际截图直接进入 PR 描述。当前描述只有“由 CI 保存图片”的说明,没有嵌入等待态、恢复态的实际截图;工作流的 upload 步骤也不能证明读者现在已经能看见合适的视口。最小修复是发布已有 smoke 的公开安全截图、标明 e55f4ce290337b63b38e37024f71274c5b2f5114 及合成数据/源码打包边界,再核禁用态、键盘刷新与释放后的原结果恢复。无需为此引入新的产品确认或重写后端。
独立本地验证:python -m pytest -q tests/test_delegation_task_revalidation.py tests/control_plane/test_validation_process_cleanup.py 为 24 passed / 1 skipped;同一竞态冻结用例旧版 2 failed、当前 2 passed。标准 canary premerge --from-git-diff --git-diff-base 1c7b258cb720b3eae92f9f62c419b919f1bf2542 的 6 direct / 19 selected 均通过。新的 Chat bundle 已构建;本次独立浏览器只到达合成工作区,未完成目标恢复面板核验,相关夹具配置问题不归因于产品缺陷。Windows 专属用例未在本机执行;未查询、轮询或等待远端 CI。
我的整体评价
long_horizon=improved:已核原任务、原 Turn、失败证据和一次 Host 调用能连续恢复;user_experience=not_yet_proven:实际目标视口及其公开证据尚未闭合。源码的 IO owner 选择、上下文隔离与规模是合理的,普通独立校验器兼容性有对照支持;没有新增权限、调度规则或持久化 busy 状态。当前请求补齐的是已经要求的产品证据,保留全部后端通过结果,不声称发现了尚未复现的界面错误。补齐同一提交的视口与恢复读回后即可重新判断完整提案,当前结论不授予合并权限。
English verdict: REQUEST_CHANGES — e55f4ce290337b63b38e37024f71274c5b2f5114. Original-task lock contention and scoped stdin handling pass independent File/SQLite recovery tests (24 passed; one native-Windows skip), with base-fail/head-pass race evidence and a passing local premerge gate. Attach and inspect the required actual recovery-panel screenshots in the PR description before qualifying the visible journey; no product UI defect is inferred from the reviewer fixture limitation.
|
This pull request has merge conflicts with Choose the remote for the base repository, not an out-of-date fork. git fetch upstream
git rebase upstream/main
# Resolve each conflict, git add the resolved files, then git rebase --continue.
git push --force-with-lease origin HEADFor a same-repository clone whose Keep the DCO |
e55f4ce to
172dd4f
Compare
Signed-off-by: BigDataDZ <76271875+BigDataDZ@users.noreply.github.com>
Signed-off-by: BigDataDZ <76271875+BigDataDZ@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
172dd4f to
09d05ff
Compare
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · GPT-5 · OpenAI · self_reported
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
动机
需要修复委派产物并继续原任务的用户,以及承载该委派的 CLI、MCP 和团队证据面板。此前 worker 已发布任务失败但尚未释放 operation lock 时,立即复核会触发锁超时;Windows 继承的交互 stdin 也可能阻塞嵌套 CLI 或 validator。
例如,worker 仍在收尾时,团队证据面板现在保留“重新检查交付”作为下一步,并禁用“复核原任务”。worker 结束后刷新、修复实际产物、恢复原失败 Turn,最终只执行一次 Host。相同授权、Stop、依赖和原 operation 身份保持不变。
例如,worker 已发布任务失败但尚未释放 operation lock 时,当前实现只返回原执行观察,并禁用“复核原任务”;worker 结束后刷新、修复实际产物,再恢复同一失败 Turn。
Busy requests consume no work, released work revalidates the same operation, managed children receive EOF, and the accepted artifact returns with one Host call.
本 PR 完成已有任务绑定的 busy/input recovery 切片,不完成整个多 worker 路线、安装态 App 采用或真实模型收益。
本 PR 不完成整个多 worker 路线,也不声称已安装 App、真实模型收益或完整成本已经资格化。
改动思路
锁占用继续由现有内核 single-flight 所有权判断;busy 时使用非阻塞锁返回当前 readback,只有真正获得锁才进入原任务复核。内部复核错误仍向上传播,不把所有锁异常吞成成功。
托管子进程明确使用 stdin=DEVNULL,delegation validator 使用 context-local noninteractive_validation();作用域在 finally 恢复,普通调用、其他线程和嵌套失败不受影响。前端直接消费已有 worker_active,不增加新的 busy 状态、轮询或权限 owner。
锁状态、原失败 Turn、validator 和 Team evidence 都由既有 owner 管理;本 PR 仅复用 try-lock、上下文变量和现有 refresh,不引入第二执行器或持久 busy 状态。
当前 PR 边界是已有失败委派 operation 在 worker/lock 和 stdin 竞争下的原任务恢复;不实现通用 team scheduler 或安装态采用。
具体改动
本次完整审查 exact head 883284bc175efbaef9c02ce37000eaf25b8cc73b 的 16 个文件、+339/-19。规范依据是 docs/reference/local-delegation.md,fixed revision 1803e1b986d66053405a3f104e686642f5162545。
规范映射:LD-original-revalidation implemented,busy 时返回原 observation,释放后仍复核同一失败 Turn;LD-acceptance-return implemented,实际产物仍由独立 validator 验证后才提交验收和返回;LD-disconnect-recovery implemented,响应丢失后使用原 operation 对账;LD-input-isolation implemented,仅 delegation 托管子进程与 validator 获得 EOF。
关键代码讲解
Delegations.revalidate使用try_exclusive_file_lock;未获得锁只读当前 operation,获得锁后才检查 Stop、grant、依赖、失败证据和原 Turn。Delegations._spawn与普通_cli都切断继承 stdin;Host 仍可终止自己的进程树,恢复继续依赖 durable execution。noninteractive_validation是局部、可恢复的验证输入作用域,standalone caller 和其他线程保留原 stdin 合同。GoalTeamEvidence在worker_active时禁用 revalidate,并继续显示现有 refresh 入口;没有新增临时业务状态。- 浏览器 smoke 检查 disabled revalidation、非消费重复请求、释放后的刷新、产物修复、响应丢失恢复和一次 Host 调用,并保存四个当前 head viewport。
对主干的风险
没有发现阻塞性的当前 PR 问题。最强回归是 busylock 被误当成失败或 busy path 触发重试;新增 File/SQLite barrier 断言锁期间无 CLI retry、spawn 或状态写入,释放后恢复同一 Turn 且 Host 计数 1。
第二个风险是 stdin isolation 泄漏到普通验证器。上下文 scope 在 finally 恢复,并有同线程、其他线程与嵌套失败对照。前端只改变 action 可用性,不改权限或验收数据。
| 当前 head 验证 | 结果 |
|---|---|
| File/SQLite race、recovery、validation input 主套件 | 24 passed,1 个 POSIX-only skip |
| Packaged Chat UI + native HTTP recovery | passed |
| 4 张 mobile/desktop 截图 | 已生成、人工检查并嵌入 PR 描述 |
| Dashboard TypeScript / Node syntax / Ruff | passed |
| standard premerge | 18/19 passed |
premerge 的唯一代码失败是 todo-readmodel-boundary-smoke.py;它在纯 main@1803e1b98 上以相同的 active_state_todo_fields runtime-root 参数错误复现。四张 PNG 产生 manual_review_required,本轮已逐张检查像素、尺寸、合成数据来源和公开安全边界,未发现私有路径、凭据或真实操作内容。
语义与 CI 对齐
锁和安全输入是机器强制条件,不是提示。busy response 明确保留 worker_active,UI 禁用动作并给出 refresh 路径;只有锁真正释放且原产物被修复后才允许复核。Windows 不宣称 worker 能跨越宿主进程树终止,只验证 durable operation 可恢复。
真实 PostgreSQL、安装态 App、live model 和完整成本本轮未重新资格化;文件系统/CLI、真实 disposable HTTP backend 与 packaged source bundle 是本轮主要边界。
我的整体评价
对 exact head 883284bc175efbaef9c02ce37000eaf25b8cc73b 的结论为 APPROVE。旧 P2 要求的实际视口证据已补齐,CLI/MCP/Chat 路径共享同一 busy 语义,所有恢复仍绑定原 operation、原失败 Turn 和一次 Host。
long_horizon 为 improved:锁释放与 stdin 隔离不再阻断原任务连续恢复;user_experience 为 improved:等待态清楚指向现有 refresh,恢复后能打开原产物。剩余普通基线 smoke 与 installed adoption 是独立边界。
English verdict: APPROVE - 883284b. Busy revalidation now returns current readback without consuming the operation, managed input is isolated, and four embedded mobile/desktop screenshots cover disabled waiting and original-operation recovery. The focused race suite passes 24 tests with one POSIX skip, the packaged Chat recovery smoke, TypeScript, Node syntax, Ruff and 18/19 premerge checks pass. The remaining todo-readmodel smoke reproduces identically on pure main; binary-image holds were manually inspected. No installed-App or live-model qualification is claimed.
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · GPT-5 · OpenAI · self_reported
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
动机
需要修复委派产物并继续原任务的用户,以及承载该委派的 CLI、MCP 和团队证据面板。此前 worker 已发布任务失败但尚未释放 operation lock 时,立即复核会触发锁超时;Windows 继承的交互 stdin 也可能阻塞嵌套 CLI 或 validator。
例如,worker 仍在收尾时,团队证据面板现在保留“重新检查交付”作为下一步,并禁用“复核原任务”。worker 结束后刷新、修复实际产物、恢复原失败 Turn,最终只执行一次 Host。相同授权、Stop、依赖和原 operation 身份保持不变。
例如,worker 已发布任务失败但尚未释放 operation lock 时,当前实现只返回原执行观察,并禁用“复核原任务”;worker 结束后刷新、修复实际产物,再恢复同一失败 Turn。
Busy requests consume no work, released work revalidates the same operation, managed children receive EOF, and the accepted artifact returns with one Host call.
本 PR 完成已有任务绑定的 busy/input recovery 切片,不完成整个多 worker 路线、安装态 App 采用或真实模型收益。
本 PR 不完成整个多 worker 路线,也不声称已安装 App、真实模型收益或完整成本已经资格化。
改动思路
锁占用继续由现有内核 single-flight 所有权判断;busy 时使用非阻塞锁返回当前 readback,只有真正获得锁才进入原任务复核。内部复核错误仍向上传播,不把所有锁异常吞成成功。
托管子进程明确使用 stdin=DEVNULL,delegation validator 使用 context-local noninteractive_validation();作用域在 finally 恢复,普通调用、其他线程和嵌套失败不受影响。前端直接消费已有 worker_active,不增加新的 busy 状态、轮询或权限 owner。
锁状态、原失败 Turn、validator 和 Team evidence 都由既有 owner 管理;本 PR 仅复用 try-lock、上下文变量和现有 refresh,不引入第二执行器或持久 busy 状态。
当前 PR 边界是已有失败委派 operation 在 worker/lock 和 stdin 竞争下的原任务恢复;不实现通用 team scheduler 或安装态采用。
具体改动
本次完整审查 exact head 883284bc175efbaef9c02ce37000eaf25b8cc73b 的 16 个文件、+339/-19。规范依据是 docs/reference/local-delegation.md,fixed revision 1803e1b986d66053405a3f104e686642f5162545。
规范映射:LD-original-revalidation implemented,busy 时返回原 observation,释放后仍复核同一失败 Turn;LD-acceptance-return implemented,实际产物仍由独立 validator 验证后才提交验收和返回;LD-disconnect-recovery implemented,响应丢失后使用原 operation 对账;LD-input-isolation implemented,仅 delegation 托管子进程与 validator 获得 EOF。
关键代码讲解
Delegations.revalidate使用try_exclusive_file_lock;未获得锁只读当前 operation,获得锁后才检查 Stop、grant、依赖、失败证据和原 Turn。Delegations._spawn与普通_cli都切断继承 stdin;Host 仍可终止自己的进程树,恢复继续依赖 durable execution。noninteractive_validation是局部、可恢复的验证输入作用域,standalone caller 和其他线程保留原 stdin 合同。GoalTeamEvidence在worker_active时禁用 revalidate,并继续显示现有 refresh 入口;没有新增临时业务状态。- 浏览器 smoke 检查 disabled revalidation、非消费重复请求、释放后的刷新、产物修复、响应丢失恢复和一次 Host 调用,并保存四个当前 head viewport。
对主干的风险
没有发现阻塞性的当前 PR 问题。最强回归是 busylock 被误当成失败或 busy path 触发重试;新增 File/SQLite barrier 断言锁期间无 CLI retry、spawn 或状态写入,释放后恢复同一 Turn 且 Host 计数 1。
第二个风险是 stdin isolation 泄漏到普通验证器。上下文 scope 在 finally 恢复,并有同线程、其他线程与嵌套失败对照。前端只改变 action 可用性,不改权限或验收数据。
| 当前 head 验证 | 结果 |
|---|---|
| File/SQLite race、recovery、validation input 主套件 | 24 passed,1 个 POSIX-only skip |
| Packaged Chat UI + native HTTP recovery | passed |
| 4 张 mobile/desktop 截图 | 已生成、人工检查并嵌入 PR 描述 |
| Dashboard TypeScript / Node syntax / Ruff | passed |
| standard premerge | 18/19 passed |
premerge 的唯一代码失败是 todo-readmodel-boundary-smoke.py;它在纯 main@1803e1b98 上以相同的 active_state_todo_fields runtime-root 参数错误复现。四张 PNG 产生 manual_review_required,本轮已逐张检查像素、尺寸、合成数据来源和公开安全边界,未发现私有路径、凭据或真实操作内容。
语义与 CI 对齐
锁和安全输入是机器强制条件,不是提示。busy response 明确保留 worker_active,UI 禁用动作并给出 refresh 路径;只有锁真正释放且原产物被修复后才允许复核。Windows 不宣称 worker 能跨越宿主进程树终止,只验证 durable operation 可恢复。
真实 PostgreSQL、安装态 App、live model 和完整成本本轮未重新资格化;文件系统/CLI、真实 disposable HTTP backend 与 packaged source bundle 是本轮主要边界。
我的整体评价
对 exact head 883284bc175efbaef9c02ce37000eaf25b8cc73b 的结论为 APPROVE。旧 P2 要求的实际视口证据已补齐,CLI/MCP/Chat 路径共享同一 busy 语义,所有恢复仍绑定原 operation、原失败 Turn 和一次 Host。
long_horizon 为 improved:锁释放与 stdin 隔离不再阻断原任务连续恢复;user_experience 为 improved:等待态清楚指向现有 refresh,恢复后能打开原产物。剩余普通基线 smoke 与 installed adoption 是独立边界。
English verdict: APPROVE - 883284b. Busy revalidation now returns current readback without consuming the operation, managed input is isolated, and four embedded mobile/desktop screenshots cover disabled waiting and original-operation recovery. The focused race suite passes 24 tests with one POSIX skip, the packaged Chat recovery smoke, TypeScript, Node syntax, Ruff and 18/19 premerge checks pass. The remaining todo-readmodel smoke reproduces identically on pure main; binary-image holds were manually inspected. No installed-App or live-model qualification is claimed.
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · GPT-5 · OpenAI · self_reported
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
动机
需要修复委派产物并继续原任务的用户,以及承载该委派的 CLI、MCP 和团队证据面板。此前 worker 已发布任务失败但尚未释放 operation lock 时,立即复核会触发锁超时;Windows 继承的交互 stdin 也可能阻塞嵌套 CLI 或 validator。
例如,worker 仍在收尾时,团队证据面板现在保留“重新检查交付”作为下一步,并禁用“复核原任务”。worker 结束后刷新、修复实际产物、恢复原失败 Turn,最终只执行一次 Host。相同授权、Stop、依赖和原 operation 身份保持不变。
例如,worker 已发布任务失败但尚未释放 operation lock 时,当前实现只返回原执行观察,并禁用“复核原任务”;worker 结束后刷新、修复实际产物,再恢复同一失败 Turn。
Busy requests consume no work, released work revalidates the same operation, managed children receive EOF, and the accepted artifact returns with one Host call.
本 PR 完成已有任务绑定的 busy/input recovery 切片,不完成整个多 worker 路线、安装态 App 采用或真实模型收益。
本 PR 不完成整个多 worker 路线,也不声称已安装 App、真实模型收益或完整成本已经资格化。
改动思路
锁占用继续由现有内核 single-flight 所有权判断;busy 时使用非阻塞锁返回当前 readback,只有真正获得锁才进入原任务复核。内部复核错误仍向上传播,不把所有锁异常吞成成功。
托管子进程明确使用 stdin=DEVNULL,delegation validator 使用 context-local noninteractive_validation();作用域在 finally 恢复,普通调用、其他线程和嵌套失败不受影响。前端直接消费已有 worker_active,不增加新的 busy 状态、轮询或权限 owner。
锁状态、原失败 Turn、validator 和 Team evidence 都由既有 owner 管理;本 PR 仅复用 try-lock、上下文变量和现有 refresh,不引入第二执行器或持久 busy 状态。
当前 PR 边界是已有失败委派 operation 在 worker/lock 和 stdin 竞争下的原任务恢复;不实现通用 team scheduler 或安装态采用。
具体改动
本次完整审查 exact head 883284bc175efbaef9c02ce37000eaf25b8cc73b 的 16 个文件、+339/-19。规范依据是 docs/reference/local-delegation.md,fixed revision 1803e1b986d66053405a3f104e686642f5162545。
规范映射:LD-original-revalidation implemented,busy 时返回原 observation,释放后仍复核同一失败 Turn;LD-acceptance-return implemented,实际产物仍由独立 validator 验证后才提交验收和返回;LD-disconnect-recovery implemented,响应丢失后使用原 operation 对账;LD-input-isolation implemented,仅 delegation 托管子进程与 validator 获得 EOF。
关键代码讲解
Delegations.revalidate使用try_exclusive_file_lock;未获得锁只读当前 operation,获得锁后才检查 Stop、grant、依赖、失败证据和原 Turn。Delegations._spawn与普通_cli都切断继承 stdin;Host 仍可终止自己的进程树,恢复继续依赖 durable execution。noninteractive_validation是局部、可恢复的验证输入作用域,standalone caller 和其他线程保留原 stdin 合同。GoalTeamEvidence在worker_active时禁用 revalidate,并继续显示现有 refresh 入口;没有新增临时业务状态。- 浏览器 smoke 检查 disabled revalidation、非消费重复请求、释放后的刷新、产物修复、响应丢失恢复和一次 Host 调用,并保存四个当前 head viewport。
对主干的风险
没有发现阻塞性的当前 PR 问题。最强回归是 busylock 被误当成失败或 busy path 触发重试;新增 File/SQLite barrier 断言锁期间无 CLI retry、spawn 或状态写入,释放后恢复同一 Turn 且 Host 计数 1。
第二个风险是 stdin isolation 泄漏到普通验证器。上下文 scope 在 finally 恢复,并有同线程、其他线程与嵌套失败对照。前端只改变 action 可用性,不改权限或验收数据。
| 当前 head 验证 | 结果 |
|---|---|
| File/SQLite race、recovery、validation input 主套件 | 24 passed,1 个 POSIX-only skip |
| Packaged Chat UI + native HTTP recovery | passed |
| 4 张 mobile/desktop 截图 | 已生成、人工检查并嵌入 PR 描述 |
| Dashboard TypeScript / Node syntax / Ruff | passed |
| standard premerge | 18/19 passed |
premerge 的唯一代码失败是 todo-readmodel-boundary-smoke.py;它在纯 main@1803e1b98 上以相同的 active_state_todo_fields runtime-root 参数错误复现。四张 PNG 产生 manual_review_required,本轮已逐张检查像素、尺寸、合成数据来源和公开安全边界,未发现私有路径、凭据或真实操作内容。
语义与 CI 对齐
锁和安全输入是机器强制条件,不是提示。busy response 明确保留 worker_active,UI 禁用动作并给出 refresh 路径;只有锁真正释放且原产物被修复后才允许复核。Windows 不宣称 worker 能跨越宿主进程树终止,只验证 durable operation 可恢复。
真实 PostgreSQL、安装态 App、live model 和完整成本本轮未重新资格化;文件系统/CLI、真实 disposable HTTP backend 与 packaged source bundle 是本轮主要边界。
我的整体评价
对 exact head 883284bc175efbaef9c02ce37000eaf25b8cc73b 的结论为 APPROVE。旧 P2 要求的实际视口证据已补齐,CLI/MCP/Chat 路径共享同一 busy 语义,所有恢复仍绑定原 operation、原失败 Turn 和一次 Host。
long_horizon 为 improved:锁释放与 stdin 隔离不再阻断原任务连续恢复;user_experience 为 improved:等待态清楚指向现有 refresh,恢复后能打开原产物。剩余普通基线 smoke 与 installed adoption 是独立边界。
English verdict: APPROVE - 883284b. Busy revalidation now returns current readback without consuming the operation, managed input is isolated, and four embedded mobile/desktop screenshots cover disabled waiting and original-operation recovery. The focused race suite passes 24 tests with one POSIX skip, the packaged Chat recovery smoke, TypeScript, Node syntax, Ruff and 18/19 premerge checks pass. The remaining todo-readmodel smoke reproduces identically on pure main; binary-image holds were manually inspected. No installed-App or live-model qualification is claimed.
huangruiteng
left a comment
There was a problem hiding this comment.
Code-owner approval for exact head 883284bc175efbaef9c02ce37000eaf25b8cc73b.
I reviewed the linked exact-head review evidence: File/SQLite race and stdin-isolation tests pass, the packaged Chat recovery journey passes, and the PR description embeds inspected mobile/desktop waiting and recovery screenshots from synthetic source-built data. The remaining premerge todo-readmodel failure reproduces unchanged on pure main.
English verdict: APPROVE - 883284b.
Problem and result
A delegation can publish its task failure before its worker releases the operation lock, so immediate revalidation raises
LockAcquireTimeoutError. On Windows, inherited interactive input can also block the nested CLI or acceptance validator, preventing the same recovery journey from completing.Use the existing nonblocking lock helper to return current readback when occupied, preserving nested errors and stop/grant/dependency/original-Turn checks. Disable revalidation in the existing evidence panel while the worker is active, with the existing refresh as the next action.
Managed CLI subprocesses now receive EOF. Delegation validators use a small context-local scope in the existing validation IO owner, so standalone callers retain their inherited-input contract, including other threads and nested failure recovery. This is a disclosed change to delegation input handling; deadlines, receipts, response shapes and TypeScript decision ownership are unchanged.
Windows MCP hosts may terminate their process tree on disconnect. Exercise existing
resumeagainst the original durable execution after transport closure; do not bypass that host policy or claim the worker survives it.Validation
User journey and visual evidence
The ordinary task stays in its existing evidence panel: repair output, refresh after the worker finishes, then revalidate the original result. No new setup, owner decision or confirmation round is added. One temporary explanation keeps unavailable recovery visible beside the existing action. CLI/MCP/Chat HTTP share the same non-consuming contention behavior; no new Lark operation or provider is introduced.
The packaged smoke captures actual synthetic mobile/desktop finishing-state views and response-loss recovery. CI runs that journey against the packaged source and preserves
task-revalidation-<workflow revision>images. The native Windows lane also runs the race, MCP and input regressions with a short fixture root; dedicated long-path checks remain. This qualifies a source-built bundle and disposable backend, not installation into a running App or a paid-model team.The related refactor pass reuses the lock helper and central validation IO owner. Fixture teardown waits for owned handlers/runtime, and its short temporary name leaves room for ordinary Windows lock-incident filenames. No new polling, product timeout, protocol vocabulary, provider or decision owner is introduced.
This is a bounded recovery fix under the existing collaboration contract, not closure of the broader multi-worker delivery roadmap. Hosted CI and maintainer review remain required.
Required viewport evidence
Captured by the packaged source-built Chat bundle with synthetic fixture data and a disposable native backend at exact head
883284bc175efbaef9c02ce37000eaf25b8cc73b. These are not installed-App or live Goal screenshots.Worker still finishing: refresh is the next action, revalidation disabled
Mobile, 390×844
Desktop, 1280×900
Original execution recovery after refresh and response loss
Mobile, 390×844
Desktop, 1280×900
The smoke also checks keyboard focus on the refresh control, a second stale revalidation request that does not consume or replace the original failure, release of the original worker, unchanged failed validation, repair of the actual output, committed-response loss, recovery through the same operation, and final accepted artifact readback with one Host invocation.