Repository navigation
Conversation
Signed-off-by: Codex <codex@openai.com> Signed-off-by: song <liusongstep@gmail.com>
songoow
requested review from
huangruiteng,
loopx-agent and
maxliux5
as code owners
October 19, 2026 13:36
Collaborator
|
这个真实触发了?replan请求之后中断?
黄瑞腾
***@***.***
…---- 回复的原邮件 ----
发件人 song ***@***.***> 发送日期 2026年10月19日 21:36 收件人 loopx-project/loopx ***@***.***> 抄送人 LoopX Agent ***@***.***>,
Review requested ***@***.***> 主题 [loopx-project/loopx] fix(worker): retain durable replan attempts and expose recovery state (PR #6885)
为什么需要这次修改外部 worker 在重规划请求发出之后中断,无法仅凭新事件或重新启动证明原请求没有执行。复核尚未解决原 obligation 或请求结果未知时,必须保存原尝试并暂停新派发;owner 需要从现有 Goal 概览看到真实状态和下一步。
修改内容在 Host poll receipt 中持久化原始 worker attempt、obligation、Turn 与观察,保留原请求的恢复与结算边界,避免重启、并发 worker 或新事件造成重复派发。 将未解决复核显示为 replan_paused,将已发出但结果不明的请求显示为 replan_outcome_unknown。观察不是 Goal 激活、工作准入或完成证明。 通过现有 history/readback owner 验证 source Goal 与 global projection 的一致性。损坏、旧作用域或错误关联的观察可见为未知,不借普通 poll 改写原记录。 在现有 Goal 概览展示最近观察、原工作与时间和“查看任务与依赖”;保留直接 Stop 的 canonical 路径。带上 worker CLI / File / SQLite 回归、真实 backend packaged browser smoke 和桌面/移动截图。范围与依赖这是原 #6838 的第 4 个完整行为切片,基于 Host 当前启动 PR。worker 持久恢复、来源验证、history transport 与 UI 一起交付,使 owner 能看到未解决状态并查看原工作。后续方法比较 PR 使用同一成果界面,无需把只读观察升级为执行权。
验证与视觉证据改动 Python 文件 Ruff 与 diff whitespace 检查通过。 该分支的 packaged build 和真实 backend browser smoke 待串行验证;Python 关键链待单一重型测试槽位。 随片保留原 #6838 的 6 张 worker before / paused / unknown 桌面和移动证据;这是原实现的留存证据,不能替代本分支的新一轮运行。已检查留存的移动 unknown 视图,未解决状态与完整费用未知可直接读到,原始标识位于按需展开区域。 既有 smoke 覆盖 paused / unknown × 中文 / 英文 × 桌面 / 移动、真实 Stop、损坏/旧观察和只读导航零新派发。npm --prefix apps/presentation/dashboard run build
LOOPX_PERSONAL_WORKSPACE_SCENARIO=research-worker-readback LOOPX_PERSONAL_WORKSPACE_PACKAGED=1 node examples/personal-workspace-browser-smoke.mjs
测试使用隔离的合成 Goal 和本地 backend。保留 unknown 与未验证区别,不据这些观察推断模型能力、Goal 达成或完整成本。
Author Declaration / 实现依据Written by: model_agent — OpenAI GPT-6 Astra. 依据:用户要求把 #6784 / #6838 拆成完整可审阅切片。本片提取 #6838 eac8101 的 worker 尝试持久化、恢复/readback 和配套 UI。 Intended base: #6884,codex/split-research-host-launch。验收标准 Disposition 实现 / 验证入口重启与并发不重发未知结果的原请求 implemented external scheduler worker、Host poll receipts、worker continuity 回归 原 obligation / Turn / source 关联保持精确 implemented history / run history owner、File / SQLite 恢复回归 owner 能看到 paused / unknown 并查看任务或 Stop implemented Goal overview worker readback、packaged browser scenario Validation BindingPublished revision: c49bc36. Tested tree: 155aee2eed76c978577d6ca05b5a96a319f57081;GitHub 与本地源码树完全相等。 Run state: finished(当前静态检查已结束;backend 和 browser 验证待补)。 Input classes: synthetic, public_fixture. Ruff / diff-check: passed。 Dashboard build: 主动中断以释放独占回归窗口,未计通过。 Real CLI / File / SQLite / PostgreSQL: 本片新运行尚未完成,未把原 PR 的历史测试算作本次通过。 UI 构建、真实 backend 和正式 CI / review 的未完成项均保留为合并前验证事项。Frontend / Visual Evidence以下图片随本片原样保留,来源是原 #6838 的合成场景;它们描述该 UI 设计,不是本次新 head 的重新截图。
Before: 桌面 · 移动。
After / first viewport — unknown 桌面:
After — unknown 移动:
Paused: 桌面 · 移动。
UI impact: changed。 Source data: synthetic。 Attention review: 在现有 Goal 概览集中展示观察状态与原任务入口,技术标识按需展开;unknown 保持可见,Stop 走已有 canonical 路径。 Craft review: 保留来源中的同组桌面/移动设计;本次新构建的视觉复核仍待完成。Boundary Checklistworker、readback、完整 UI 和回归随片交付。 不把只读观察当作执行或达成证明。 描述、图片和源码只含公开/合成信息。 无已有双语 RFC 对变更;提交含 DCO sign-off。You can view, comment on, or merge this pull request online at: #6885
Commit Summaryc49bc36 fix(worker): retain unresolved attempts and expose truthful readbackFile Changes(28 files)
M apps/presentation/dashboard/src/data/status.ts (11) M apps/presentation/dashboard/src/features/personal-workspace/goal-overview.css (9) M apps/presentation/dashboard/src/features/personal-workspace/goal-overview.tsx (29) M apps/presentation/dashboard/src/features/personal-workspace/personal-workspace-model.ts (8) M apps/presentation/dashboard/src/views/dashboard-page.tsx (3) M docs/integrations/runtime-connector-catalog.md (89) M examples/dashboard-goal-acceptance-browser-smoke.mjs (6) M examples/personal-workspace-browser-smoke.mjs (2) A examples/personal-workspace-browser/evidence/research-continuity/README.md (51) A examples/personal-workspace-browser/evidence/research-continuity/research-worker-before-zh-CN-desktop.png (0) A examples/personal-workspace-browser/evidence/research-continuity/research-worker-before-zh-CN-mobile.png (0) A examples/personal-workspace-browser/evidence/research-continuity/research-worker-paused-zh-CN-desktop.png (0) A examples/personal-workspace-browser/evidence/research-continuity/research-worker-paused-zh-CN-mobile.png (0) A examples/personal-workspace-browser/evidence/research-continuity/research-worker-unknown-zh-CN-desktop.png (0) A examples/personal-workspace-browser/evidence/research-continuity/research-worker-unknown-zh-CN-mobile.png (0) A examples/personal-workspace-browser/research-worker-readback.mjs (184) M loopx/control_plane/quota/host_poll_receipts.py (148) M loopx/control_plane/runtime/run_history.py (1) M loopx/history.py (49) M scripts/external_scheduler_worker.py (299) A tests/control_plane/research_worker_readback_fixture.py (146) A tests/control_plane/test_external_worker_replan_cli.py (308) A tests/control_plane/test_research_negative_continuation_cli.py (148) A tests/control_plane/test_research_replan_basis_cli.py (256) A tests/control_plane/test_research_stage_continuity.py (262) A tests/control_plane/test_worker_observation_recovery_cli.py (178) A tests/test_external_worker_replan_continuity.py (319) M tests/test_host_poll_receipts.py (211)Patch Links:https://github.com/loopx-project/loopx/pull/6885.patch #6885.diff—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because your review was requested.Message ID: ***@***.***>
|
This was referenced Oct 19, 2026
Join fixture HTTP handlers before retiring their owned Effect runtimes. Wait for the authority process close event and require a successful exit before deleting its disposable root. Signed-off-by: Codex <codex@openai.com> Signed-off-by: song <liusongstep@gmail.com>
13 tasks done
This branch has not been deployed
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.
为什么需要这次修改
外部 worker 执行一次自动重规划后,命令正常返回不代表原重规划要求已经解决;命令中断、失败或超时,也不能证明原请求没有执行。若重启 worker、改变轮询 token 或收到新事件就直接再发请求,可能重复调用模型或重复产生效果。
本 PR 持久保留原重规划尝试:同一要求仍未解决时停止重复复核;原请求结果未知时暂停该执行通道的新派发,并在现有 Goal 概览显示状态。这里描述的是代码与合成回归覆盖的故障模型,没有声称已经读取或复现真实生产中的“重规划请求发出后中断”事故。
实际修改
replan_paused;对未确认结果的原尝试,显示replan_outcome_unknown。暂停条件与继续执行的边界
replan_paused,不重复该要求的模型复核,结束当前 worker 调用replan_outcome_unknown;同一作用域内暂停新派发,包括新的重规划要求和新的普通任务replan_paused只抑制同一语义重规划要求;一个已经正常返回的 attempt 不会阻止其他通过 Core 准入的普通工作,原记录仍保留。相比之下,started / unknown的未确认尝试会挡住同作用域内后续新派发,这是本 PR 的保守取舍,可能需要人工核实并增加恢复成本。现有
todo_lifecycle_settlement/receipt_bound_replan_settlement保留各自原结算 owner,不被当成新的语义重规划机会;它们也不能绕过尚未核实的原尝试。所有这些 worker 观察都不会自动改变 Goal activation、完成 Todo 或扣除交付 quota。作用范围与依赖
codex/split-research-host-launch;本片提取 fix: preserve research progress across replans, waits and Host recovery #6838 的 external shell-worker 行为及配套展示。--wake-cmd才涉及本片的派发控制。Author Declaration / 实现依据
eac81014fd3a8842ddd420d7908657af107c6787的 worker 尝试持久化、恢复核实和配套 UI。codex/split-research-host-launch。external_scheduler_worker.py、worker continuity 回归read_heartbeat_settlement、File / SQLite CLI 原回执恢复回归host_poll_receipts.py、history / run-history、观察恢复回归research-worker-readbackbrowser scenarioValidation Binding
c49bc360fb7a6ae25ef4e8f52a5bb07fbe76f15e。155aee2eed76c978577d6ca05b5a96a319f57081。uv run --extra test python -m pytest tests/test_external_worker_replan_continuity.py tests/test_host_poll_receipts.py -q:71 passed。uv run --extra test python -m pytest tests/control_plane/test_external_worker_replan_cli.py -k 'real_unresolved_replan_dispatches_once or real_original_receipt_recovery' -q:6 passed, 14 deselected;覆盖 File / SQLite 真实 CLI、返回后防重发、原结算核实后恢复下一任务。Host 工作受控,不能当作真实模型效果证据。research-worker-readback场景结束后清理临时目录时报ENOTEMPTY。该次运行未完成验证,不能计为该检查通过。goal-hierarchy的“不得读取无关 Goal 状态”断言失败;该失败尚未归因,整项检查仍为失败。复现 packaged 场景的入口如下,命令列出不代表已通过:
Frontend / Visual Evidence
以下图片随本片原样保留,来源是原 #6838 的合成场景;它们描述该 UI 设计,不是本次新 head 的重新截图。
Before: 桌面 · 移动。
After / first viewport — unknown 桌面:
After — unknown 移动:
Paused: 桌面 · 移动。
Boundary Checklist
恢复验证补充(2026-10-19)
9d905ca3866444ee58836790a53959ab2849a2b1。ca8d3732a2847c9e76e3d1f989e084e7158deb27,tested tree24afb2e36986222fca85c5c6a54a80ad6ea9cfc9;修复基于原发布 B4c49bc360fb7a6ae25ef4e8f52a5bb07fbe76f15e。155aee2eed76c978577d6ca05b5a96a319f57081,与原发布 B4 完全一致。上文的 71 项单测、6 项 CLI、旧截图和旧 CI 结论继续保留各自原版本绑定,不因这个 head 更新自动变成新 head 的全量通过。修复限定在
tests/control_plane/research_worker_readback_fixture.py和examples/personal-workspace-browser/research-worker-readback.mjs:fixture 等待已接受的 HTTP 请求结束后再退役其 Effect runtime;JS 等待 Python child 的close事件并确认零退出码,然后才删除临时根。下面的因果 probe 实证了 HTTP 请求尚未结束就开始 runtime 清理的缺陷。runtime_cleanup_started早于request_finished,HTTP 返回 500;Python 仍以0退出。request_finished早于runtime_cleanup_started,Python 以0退出。startAuthority("paused") → close()首轮stopped=false,Python 退出码为1;新增 JS 检查正确暴露了这个失败。close=0,临时根删除。原五秒 runtime 门槛保持,实际 runtime 退役约 1.006 秒。startAuthority("unknown") → close()close=0,临时根删除。Paused 诊断重跑中,shutdown 应答约
0.824 ms,listener 关闭,compile-cache flush 约545 ms,随后 locator 删除并退出;Python 的各次进程组观察约15–38 ms,最后正确接受已无法继续写入的 zombie 进程组。这些是这一次通过运行的观察;首轮stopped=false的根因仍未确定,后续通过不抹掉该失败。 本次修复没有修改共享 runtime owner,也没有增加五秒退出门槛、六十秒启动门槛或目录删除重试。本批使用 Node
v24.19.0,输入仍为synthetic, public_fixture,Host 调用受控。Python 语法、node --check和git diff --check通过。两边复用同一份已存在的 bundle,仅提供真实 JSON HTTP fixture 的启动资源;本批没有重新构建或渲染当前 head 的前端,不构成完整 packaged browser / UI 资格,也不是模型效果或成本证据。Run state: 本段限定恢复检查已完成,含上表明确保留的一次 runtime 清理失败;当前 head 的完整 packaged 场景及集成树视觉复核仍待执行。上文两项浏览器 CI 失败仍是对应原运行的失败,本段不能把它们改记为通过。合并资格另行按当前 head 的完整检查判定。
本轮发布链与集成验证
9d905ca3866444ee58836790a53959ab2849a2b1;tree:24afb2e36986222fca85c5c6a54a80ad6ea9cfc9。d1dc8ebfe,treecb8b1777655d7f37e3571b5087d6cd4db286dbbd,组合本次观察的 main45d742088a3f7896a0a008761f68d2437398bcd1与上述 12 个实际 source heads。LoopX supplied-candidate 收据为in_sync、drift 为空;远端集成 head 已读回。chat_store.py指标基线,按自动合并文件实测的 2067 行结算;没有新增集成专用产品逻辑。