Repository navigation
feat(doctor): report missed Codex App prompt delivery windows - #9345
Conversation
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · gpt-6.2-sol · OpenAI · runtime_reported · xhigh
动机 / Motivation
依靠 Codex App 定时推进 Goal 的维护者,会在发现任务停滞时运行 loopx doctor。主线只报告本地安装及运行时状态,遗漏了绑定线程最后一次活动的时间。若定时任务连续几轮没有交付,维护者得另外查宿主记录才能区分工作停滞和正常等待。此 PR 让 doctor 在明显静默时给出最后观察时间和超窗诊断。我确认这条路径能读出久未活动的线程,也复现了手工对话和空 Turn 会把同一条漏送线路显示为健康。修复宿主触发器和改动准入、调度及额度均在本次诊断范围之外。
改动思路 / Approach
doctor 从运行时的全局 registry 读取 Goal,从 Codex 的 SQLite 和 JSONL 读取线程活动,并把已安装且 ACTIVE 的 heartbeat TOML 作为预期间隔来源。共享的 attach_host_thread_activity 与 attach_host_delivery_windows 继续负责观测和时间窗口,新增代码将结果投影到可选诊断,过滤已停用 Goal,限制扫描范围,并在输出前校验公用字段。复用窗口计算是合适的。当前 PR 的最小边界是复用有界线程活动读回,并把定时交付的证据交给已有的宿主或 Turn receipt。缺少该证据时保留最近线程活动和明确的未验证状态。
具体改动 / Changes
评审依据为 docs/development/contributor-tasks.md @ 49881d5a3ac25adf8c105b2dbfdb109716cefbcb 的 GH-A02,以及 #3927 的具体反例。静默线程的类型化诊断和最后一条观察时间能够读回。GH-A02 面向的是定时提示漏送;目前只有线程变旧会触发诊断,即使最近一轮只有空的开始及结束事件,也会显示 fresh,所以交付判断仍未满足。源码入口上的安装检查隔离和无状态写回已验证。
关键代码讲解
collect_doctor进入普通或深度诊断后传入全局 registry,并将诊断接入 JSON、Markdown 和非必需检查。--installation-only在此之前返回。CLI 测试确认了两种入口的边界。doctor.pycollect_host_delivery_diagnosis调用共享观测器,再汇总fresh、stale、unverified和not_applicable。已读线程超窗仍会报诊断,漏读分支通过扫描覆盖字段保持可见。host_delivery_diagnosis.pybuild_host_delivery_window对activity.last_event_at算年龄。Fact.activity可从普通task_complete生成这个时间,无须匹配该 Turn 的 scheduler 来源、所配置的 prompt 或 Agent 启动记录。共享窗口计算 · 宿主事件读取
对主干的风险 / Risks
[P1] 手工活动或空 Turn 会掩盖定时提示漏送。 用同一条绑定、20 分钟 heartbeat 和真实文件读取路径运行源码版 doctor。只有 3 小时前的结束事件时,得到 stale 与保留原时间的 host_prompt_delivery_missed。追加最近一次手工 Turn,或只追加开始和结束且没有消息、工具活动或 LoopX 回执的 Turn,两个场景均变成 fresh 且可选检查通过。空 Turn 正是 #3927 的反例。请用可绑定该 automation/Turn 的交付证据证明 fresh;证据缺失时保留线程活动时间并报告交付未验证。回归应固定 TOML、SQLite 和旧观察,只加入这两种近期事件,还要覆盖有匹配交付证据的一侧。随后用 uv run --extra test python -m pytest -q tests/test_doctor_delivery_window.py 和同夹具的 loopx doctor --deep 复验。诊断汇总
[P2] 显式 registry 的绑定未被诊断。 把相同绑定只写入 --registry 指定的文件,保留相同 --runtime-root 和三小时前的宿主事件,CLI 确认加载了配置的运行时路由,却给出 not_applicable / registry_empty。新投影仍只读取全局 registry。请按显式 route 读取绑定,或者把诊断范围明确标成全局 registry,并在输出中显示实际覆盖的 registry。回归应将同一绑定分别放入显式和全局 registry,从 CLI 对比两种结果。调用点
语义与 CI 对齐
现有四种窗口状态继续表达线程活动。新增 doctor 的诊断码属于公开 CLI 输出,host_prompt_delivery 应明确区分线程最近活动和已验证的提示交付。另一个边界是已知 ACTIVE 绑定的线程记录缺失时,JSON 正确标为 unverified,可选 check 同时为绿。修复时可在同一缺证据分支明确显示未验证的检查结果,继续保持整条 doctor 命令可用。
| 验证 | 结果 |
|---|---|
| Head 的诊断、安装范围与宿主线程测试 | PASS,152 项 |
| 目标主线上的两组共享测试 | PASS,126 项。作者报告的三处失败在本机未复现 |
| 隔离 registry、真实 SQLite/JSONL/TOML、CLI 及深度入口 | 超窗与安装检查隔离 PASS;手工和空 Turn 判定 FAIL;显式 registry 覆盖 FAIL |
| 远程 CI、真实 App 调度器 | UNVERIFIED。未查询远程 CI;隔离夹具覆盖读取和判定,未模拟调度器内部交付 |
我的整体评价 / Verdict
请求修改。诊断有助于找到真的静默线路,安装检查也保留了边界。但少量普通线程活动可以让同一个坏掉的定时任务持续显示健康,用户会沿错误的恢复路径排查。保留共享读取器、扫描上限和只读投影,把交付判定缩到有来源的证据;近期手工 Turn 与空 Turn 应成为公开入口的回归用例。本次只涉及 CLI 和文档,无浏览器呈现变更。
English verdict: REQUEST_CHANGES at 7b3b73e. Native CLI fixtures reproduce false freshness after manual and empty turns and a missed explicitly selected registry. The targeted head and base suites pass.
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · gpt-6.2-sol · OpenAI · runtime_reported · xhigh
同一提交已有评审记录空轮次、手工活动和显式 registry 的问题。这次补审聚焦新增的扫描截断反例。 已有评审
动机 / Motivation
维护者运行 loopx doctor,想知道已启用的 Codex App 自动化是否漏送了定时提示。主干在任务仍可运行、宿主却迟迟没有送达提示时,没有这条本机诊断。这个提交能在会话三小时无活动、预期间隔为 20 分钟时给出逾期判断和最后观察时间。若宿主启动并结束了一个空轮次,同一诊断会显示健康,恰好漏掉原报告的一种故障。
本 PR 的范围是只读诊断。它不改变调度、补发提示或自动恢复任务。
改动思路 / Approach
保留共用的观测链,但要让诊断结论符合它实际拥有的证据。注册表提供 Goal 与会话绑定,Codex App 安装记录提供有效的 RRULE,SQLite 和会话日志提供观测时间,共用的 build_host_delivery_window 算出活动窗口。新模块筛选本机绑定、汇总诊断、清理名称,最后由 doctor 输出 JSON 和文本。安装专用检查提前返回。单独运行诊断无需重新配置、发起轮次或额外确认。
保留现有 Dashboard 的活动窗口与本次 CLI 的区别。当前交付边界是让 doctor 可信地读回绑定活动、可判定的漏投递和无法核验的状态。宿主日志的普通活动可以独立显示。漏投递结论需要对应提示或轮次的证据,扫描上限只能限制观测,不能改变绑定身份。
具体改动 / Changes
GH-A02 要求输出含最后观测时间的类型化漏投递诊断。按 CLI observation readback 的静默会话路径,host_prompt_delivery_missed 和时间戳已实测。按 #3927 报告的空轮次触发,漏投递可辨认这一验收仍未满足。宿主启动回执、补发和调度修复属于原问题的后续范围。 GH-A02 与当前验收 问题 #3927
关键代码讲解
collect_doctor在完整模式加入可选检查并在 JSON 保留每条诊断。render_doctor_markdown显示计数与逾期时间。独立比较的安装专用输出在主干与提交版本逐项相同。collect_host_delivery_diagnosis跳过已停止 Goal,对剩余绑定限制读取数量,用共用观察器和窗口,并按 Goal、Agent、宿主汇总。现在它在计算绑定身份前截断绑定列表,超出上限的重复绑定会改变已保留会话的诊断。_lane_payload把共享窗口映射为可操作的诊断。窗口的时间来自原有会话活动投影,来源值codex_app_automation_rrule只说明预期间隔,无法为其中任一条活动补上定时提示的来源。_publishable在公共输出校验拒绝时去掉逐条明细,保留状态与计数。现有测试另覆盖停止或暂停、归档、无绑定、注册表损坏和安装专用模式。文档新增状态、扫描范围、降级和名称清理说明。
对主干的风险 / Risks
[P2] 全局上限会把不唯一的绑定报告为已确认逾期。 用相同的 65 条绑定、同一有效自动化和同一批日志,只移动同一 Agent 的第二个绑定。排第 2 位时,该 Agent 的窗口为 unknown/no_expectation。排第 65 位时,doctor 给同一 Agent 报 host_prompt_delivery_missed,虽然两次扫描都标记为截断。仅增加全局截断提示还会保留错误的具体诊断。应以完整注册表绑定判断身份是否唯一,再对宿主 I/O 设上限。补充相同两绑定分别排在上限内外的独立反例,并保留一个确实唯一但日志逾期的正向用例。 截断发生在绑定投影前
语义与 CI 对齐
现有 HostDeliveryWindowState 是活动窗口的共享词汇。本次扩展的是 doctor 诊断。它的 fresh 与 host_prompt_delivery_missed 需要与所报告的证据范围一致。修复应复用共用绑定与窗口,禁止只靠更改断言或把扫描命中当作身份唯一来通过回归。重新执行 uv run --extra test python -m pytest -q tests/test_doctor_delivery_window.py tests/test_doctor_installation_scope.py tests/test_host_thread_activity.py,加上上述真实 CLI 用例。
PASS 精确提交的三个定向模块 152 项。对照主干的两个共享模块 126 项。实际 CLI 对照中读取前后的注册表、宿主数据库、自动化配置和日志字节均相同。PASS 标准预合并检查中 6 项直接检查和 13 项选中检查均通过。隔离检出后首次运行缺少 TypeScript,按锁文件安装依赖后用原命令重跑通过。FAIL 相同绑定仅调换位置的独立 CLI 反例。空轮次与手动轮次也复现已公开的误报。UNVERIFIED 真实运行中的 Codex App 定时发送和启动回执未纳入这次隔离复现。未查询远端 CI。
我的整体评价 / Verdict
静默会话能显示最后活动时间,有助于维护者定位长期卡住的任务。现在空轮次会造成健康误报,截断绑定又会制造逾期误报,遇到这两种情况仍可能延迟排查或引导维护者检查错误的会话。当前交付边界是让 doctor 可信地读回绑定活动、可判定的漏投递和无法核验的状态。保留共用的观测链,但要让诊断结论符合它实际拥有的证据。
本次检查涉及 CLI JSON 与 Markdown,未改动 Dashboard 页面。保留共用观察器和安装专用边界。对比结果支持把截断限制留给 I/O、把身份消歧交还完整注册表,修复后用同样的 CLI 输入复核结论。
English verdict: REQUEST_CHANGES at 7b3b73eb29fc468336b5e8a4963aee35fd2b49db. Reordering the same 65 bindings makes doctor report a missed delivery for an ambiguous lane once its alternate binding falls beyond the scan cap. The existing exact-head review already covers false freshness after manual or empty turns. The focused suite passed 152 tests and standard premerge passed.
A Codex App automation that stops delivering its scheduled prompt leaves a Goal that looks only quiet. Doctor now reads each bound app lane once, measures it against the cadence of its own installed automation, and names a missed window with the last observed tick. The check is optional and read-only; a lane it could not measure never reads fresh. Refs loopx-project#3927. Signed-off-by: ChengLong GU <88359731+gcl-coder@users.noreply.github.com>
7b3b73e to
48165f8
Compare
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · gpt-6.2-sol · OpenAI · runtime_reported · xhigh
动机 / Motivation
维护者运行 loopx doctor,想知道已启用的 Codex App 自动化是否漏送了定时提示。主干在任务仍可运行、宿主却迟迟没有送达提示时,没有这条本机诊断。这个提交能在会话三小时无活动、预期间隔为 20 分钟时给出逾期判断和最后观察时间。原报告也描述了宿主启动并结束空轮次的情况,本次复验中这个场景仍显示健康。 问题 #3927
本 PR 的范围限于只读诊断,调度、补发提示和任务恢复由现有流程负责。
改动思路 / Approach
保留共用的观测链,但要让诊断结论符合它实际拥有的证据。注册表提供 Goal 与会话绑定,安装记录中的 RRULE 提供预期间隔,SQLite 和会话日志提供活动时间。新模块筛选本机绑定、复用共享窗口,再按 Goal、Agent 和宿主汇总诊断。默认和深度模式经过这条路径,安装专用模式提前返回。
当前交付边界是让 doctor 可信地读回绑定活动、可判定的漏投递和无法核验的状态。CLI observation readback 的静默会话路径已读回 host_prompt_delivery_missed 和最后活动时间。GH-A02 覆盖的原始空轮次故障仍被误报为健康。 GH-A02 与当前验收
具体改动 / Changes
collect_doctor在完整模式增加可选诊断检查,JSON 保留逐条结果,Markdown 显示状态、计数和时间。使用同一份真实格式的输入,主干和该提交的安装专用 JSON 逐项相同。collect_host_delivery_diagnosis跳过已停止的 Goal,限制宿主读取数量,复用现有活动观察器与窗口,再校验公开输出中的名称。共享 Dashboard 观察路径未被修改。- 与上一提交相比,本次 rebase 的四个 PR 文件的有效补丁相同。以下结论均在新提交上通过公开 CLI 重新核验。 上一轮反馈
对主干的风险 / Risks
[P2] 空轮次会把漏送提示显示为健康。 用启用中的 20 分钟 RRULE 和三小时前的事件运行 CLI,诊断为 stale。追加一个 30 秒前只有 task_started 和 task_complete 的轮次后,诊断变成 fresh,可选检查转绿。追加近期手动交互也会转绿。这两种事件没有本次定时提示的送达证据。请保留活动时间,仅在有与调度轮次及目标绑定的证据时报告投递健康,其余情况输出未核验。补充空轮次、手动轮次和可归因定时送达的对照测试。 活动来源 诊断映射
[P2] 扫描顺序会把有歧义的绑定误报为已确认逾期。 两次运行使用完全相同的 65 条绑定、自动化记录和宿主日志,只移动同一 Agent 的第二条绑定。它在第 2 条时得到 unknown/no_expectation,在第 65 条时得到 host_prompt_delivery_missed。两次输出都标记了 truncated=true。应先用完整注册表判断绑定是否唯一,再限制宿主 I/O。让反例在第 2 和第 65 条都保持未核验,并保留唯一绑定确实逾期的正向用例。 截断位置
[P2] 默认全局路径覆盖显式 --registry 的诊断范围。 将同一注册表文件从默认位置移到显式路径,保留原来的 --runtime-root 和宿主数据。默认位置能报告漏投递,使用 loopx --registry <path> doctor 却返回 not_applicable / registry_empty,可选检查转绿。CLI 已把选中的 registry_path 交给 collect_doctor,请把该路径继续传给诊断路由。补充默认注册表缺失、显式注册表有有效绑定的 CLI 回归。 调用位置
通过。 新提交的三个定向模块共 152 项通过。安装专用输出与主干一致。各次独立 CLI 读取前后,注册表、SQLite、自动化配置与日志的字节哈希相同。标准预合并的 13 项选中检查也全部通过。
仍失败。 空轮次和手动交互使可选检查转绿。绑定顺序和显式注册表也分别复现了错误状态。隔离夹具使用真实文件格式,运行中的 Codex App 定时发送和启动回执尚未验证。本次未等待远端 CI。
我的整体评价 / Verdict
静默会话能显示最后活动时间。空轮次会造成健康误报,截断绑定又会制造逾期误报,遇到这两种情况仍可能延迟排查或引导维护者检查错误的会话,或在使用显式注册表时遗漏整条诊断。当前交付边界是让 doctor 可信地读回绑定活动、可判定的漏投递和无法核验的状态。保留共用的观测链,但要让诊断结论符合它实际拥有的证据。
本次界面验收覆盖 CLI JSON 与 Markdown。Dashboard 复用现有观测行为。修复后可用这三个 CLI 对照重跑,分别确认活动归因、绑定身份和显式注册表路径。
English verdict: REQUEST_CHANGES at 48165f8ad000457a5e7d100602f18bd273b4dd39. Empty or manual turns mask missed scheduled prompts, binding order can create a false missed-delivery diagnosis, and the diagnostic ignores an explicit registry. All three reproduced through the public CLI with isolated physical stores. The focused suite passed 152 tests.
…re trimming Only a user message matching the installed automation prompt counts as a delivery; an empty or hand-written turn stays unverified with its activity time. Lane identity is resolved over the complete binding list before the observation bound trims it, and the diagnostic registry is the one the CLI resolved. Refs loopx-project#3927. Signed-off-by: ChengLong GU <88359731+gcl-coder@users.noreply.github.com>
|
已在 1.
证据来源是 之所以按字节而不是记录数限制:真实 回归( 2. 歧义绑定在完整列表上判定(行内
回归 3. 显式
验证
已知假设:本机 |
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · gpt-6.2-sol · OpenAI · runtime_reported · xhigh
[P2] 手工重发同一段文字会被报告成定时送达
同一绑定线程中,人工发出的普通消息恰好与已安装提示文字相同。宿主记录只有手工用户消息及正常回合,没有自动化交付记录。实际 doctor 仍输出 fresh 和 delivery_evidence_at,维护者无法看到该次定时送达未核验。 把正文相同降为匹配线索。只有宿主可归因的交付回执与 Goal、Agent、Thread 及本次自动化对应时才确认 fresh。保留活动时间,缺少可核验证据时继续显示 unverified。 提示匹配实现
动机 / Motivation
依靠 Codex App 定时推进 Goal 的维护者,在任务停滞时用 doctor 查看宿主有没有交付提示。 以前只能查看 Goal 和线程活动,空回合会把自动化故障隐藏在最近活动里。新提交把普通活动与提示文字匹配分开。 目标是从隔离本机宿主记录读回漏送诊断和最后时间,并识别哪些记录确实能确认是定时送达。 本次交付范围是只读诊断。调度、提示发送与恢复仍由原宿主负责。 故障报告
改动思路 / Approach
可复用线程活动、绑定与窗口计算。定时送达的归因需要宿主可核对的证据。 本次交付范围是只读诊断。调度、提示发送与恢复仍由原宿主负责。 现有绑定已经给出线程归属和预期间隔,匹配正文可帮助定位候选消息。回执应继续区分用户手工补发与自动触发,即使它们使用同一段提示。缺少来源时,活动时间仍能帮助维护者诊断。
具体改动 / Changes
当前精确提交 2b7ad3d1dedca173d8110828728fbce1768e79b6,基线及规范修订 49881d5a3ac25adf8c105b2dbfdb109716cefbcb。完整提案涉及 10 个路径,共 +2182/-14。missed-delivery-tick 的最后时间通过独立 CLI 读回,scheduled-delivery-attribution 的手工匹配反例仍未满足。以前的空回合反例已经改为 unverified,显式 registry 与绑定歧义由当前目标测试覆盖。GH-A02 的验收
关键代码讲解
_rollout_prompt_evidence 以最新回合内的用户消息计算摘要。它没有读取能证明来源的宿主记录,传给窗口计算的 delivered_at 却会作为有效交付。普通模式把结果写入 doctor 的 JSON 投影,安装专用模式在此之前返回。新原因 unverified_activity 扩展既有窗口枚举,Dashboard 保留普通活动语义。判定分支 · 窗口计算
对主干的风险 / Risks
实际 doctor 命令在隔离 SQLite 和 rollout 上读回三个对照。静默超过三小时返回 host_prompt_delivery_missed 及最后时间,空回合和不同正文的手工对话返回 unverified。安装专用模式省略诊断。 同一绑定线程中,人工发出的普通消息恰好与已安装提示文字相同。宿主记录只有手工用户消息及正常回合,没有自动化交付记录。实际 doctor 仍输出 fresh 和 delivery_evidence_at,维护者无法看到该次定时送达未核验。 目标 Python 套件 138 项通过,Dashboard 的 Goal activity smoke 通过。源码 premerge 执行 6 项直接检查和 19 项所选检查。均通过。
核对隔离 SQLite、JSONL 和安装清单。实际 Codex App 调度及浏览器未启动。 未查询远端 CI。
我的整体评价 / Verdict
请求修改。静默超窗和空回合的区分已经能从现有本机入口读回。请保留这些对照,并验证手工同文记录仍保留最后活动时间,送达状态显示未核验。
English verdict: REQUEST_CHANGES at 2b7ad3d. A normal manual message with the same text as the installed prompt is still reported as a scheduled delivery. Require attributable host evidence before marking it fresh.
…very Matching text is only a pointer. A lane now reads fresh only when the host attributes the newest Turn to automation_heartbeat with the heartbeat_xml/user_input/user transport, and the envelope names this lane's installed automation when it names one at all. A composer Turn repeating the prompt verbatim or in an envelope stays unverified and keeps its activity time. Refs loopx-project#3927. Signed-off-by: ChengLong GU <88359731+gcl-coder@users.noreply.github.com>
|
已按 正文匹配现在只是定位线索。 信封里的 新增回归:
验证: 本机 |
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · gpt-6.2-sol · OpenAI · runtime_reported · xhigh
动机 / Motivation
依靠 Codex App 定时推进 Goal、使用 doctor 区分漏送与正常静默的维护者。近期 Codex App rollout 的 task_started.turn_attribution.turn_trigger 为 automation_heartbeat_scheduled,且最新 Turn 里的 heartbeat envelope 匹配已安装 automation ID 与 prompt。CLI 同一隔离数据在上一精确头把定时和手工同文都判为 fresh。本头手工同文和缺失归因均为 unverified,保留活动时间。超过窗口的静默仍输出 stale 与最后时间。
GH-A02 scheduled delivery readback。当前宿主实际读到的 trigger 是 automation_heartbeat_scheduled。按其字段形状重建脱敏 fixture,经现有 loopx doctor --format json 和隔离 SQLite/JSONL/manifest 读回,匹配的定时送达仍是 unverified,delivery_evidence_at 缺失,普通活动时间仍在。改用现有合成测试中的 automation_heartbeat 则返回 fresh。 已只读检查同一当前 Codex App 实例的十条实际 heartbeat 元数据。由脱敏形状重建隔离 fixture 做 CLI 对照。没有覆盖其他宿主版本、装好的候选包或浏览器渲染。 验收依据
改动思路 / Approach
Codex rollout observer 管理宿主证据形状与归因,既有窗口 owner 与 doctor 负责公开只读投影。loopx doctor → collect_host_delivery_diagnosis_route → codex_delivery_evidence → _rollout_prompt_evidence → delivery_window。在 Codex rollout adapter 按实际支持的宿主 trigger 归一化,保留本次引入的 turn ID、条目类型、prompt digest 与 automation ID 校验。加入按真实 scheduled 字段形状构造的 fresh 回归,同时保留 composer 与错绑 envelope 的负例。
具体改动 / Changes
精确 head d029f9b10059758f6916f371cdd6a45ef3a3ef2b,目标分支快照与实际分叉基线均为 49881d5a3ac25adf8c105b2dbfdb109716cefbcb。目标分叉基线与当前完整 diff 涉及十处文件,包含只读 doctor 路径、Codex App 适配、Dashboard 类型和标签、说明与测试。上一精确头到当前只改变归因适配、文档和定向测试。
关键代码讲解
_heartbeat_turn。只接受 routing contract 的 automation_heartbeat 字面值,实际 rollout 的 automation_heartbeat_scheduled 走拒绝。 源码_rollout_prompt_evidence。将已匹配的用户消息送达时间依赖宿主 trigger 分支。 源码codex_delivery_evidence。按目标线程、摘要和 automation ID 取宿主只读证据。 源码collect_host_delivery_diagnosis_route。doctor 从显式 registry 入口调用真实窗口诊断。 源码Missed Delivery Windows。说明正文与 scheduler attribution 的组合条件。 源码
对主干的风险 / Risks
[P2] 实际定时送达使用的宿主 trigger 被排除
当前宿主实际读到的 trigger 是 automation_heartbeat_scheduled。按其字段形状重建脱敏 fixture,经现有 loopx doctor --format json 和隔离 SQLite/JSONL/manifest 读回,匹配的定时送达仍是 unverified,delivery_evidence_at 缺失,普通活动时间仍在。改用现有合成测试中的 automation_heartbeat 则返回 fresh。
同一健康 lane 的合法送达被判为未核验,操作员无法从新诊断区分它与手工活动。宿主运行和调度本身不受此只读诊断影响。 相关源码
语义与本地验证
CLI 同一隔离数据在上一精确头把定时和手工同文都判为 fresh。本头手工同文和缺失归因均为 unverified,保留活动时间。超过窗口的静默仍输出 stale 与最后时间。当前头 145 项 doctor/host 单测和 25 项安装范围测试通过。Dashboard Goal Activity smoke、标准预检 19 项通过。按实际宿主字段构造的四组补充实验在当前头 1 失败、3 通过。隔离副本补充已观察的 trigger 后四组通过,手工与错绑仍被拒。
我的整体评价 / Verdict
REQUEST_CHANGES。 在 Codex rollout adapter 按实际支持的宿主 trigger 归一化,保留本次引入的 turn ID、条目类型、prompt digest 与 automation ID 校验。加入按真实 scheduled 字段形状构造的 fresh 回归,同时保留 composer 与错绑 envelope 的负例。 复验匹配宿主的正例及手工或错绑的负例。
English verdict: REQUEST_CHANGES at d029f9b. Recognize the scheduled trigger emitted by the observed Codex App rollout and preserve manual-input and automation-binding checks.
The routing contract names automation_heartbeat, while a current Codex App rollout records automation_heartbeat_scheduled for the same delivery; reading only the contract spelling reported every real tick as unverified. Both are accepted as the adapter's known scheduled triggers, an unseen value stays unverified, and composer turns with the same text remain unverified. Refs loopx-project#3927. Signed-off-by: ChengLong GU <88359731+gcl-coder@users.noreply.github.com>
|
已按
新增回归(都走
验证: |
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · gpt-6.2-sol · OpenAI · runtime_reported · xhigh
动机 / Motivation
在 GH-A02 的第一段可用路径中,让使用 Codex App 定时代理的维护者通过 doctor 区分收到定时提示、活动但送达未核验、以及超窗。超窗返回类型化诊断和最后观测时间。
用户问题 #3927 指出任务仍显示可运行,但宿主没有送来提示。本 PR 提供有界只读诊断,原求改指出真实 rollout 的 scheduled 触发器还未纳入。
运行普通或深查 doctor 的启用 Codex App heartbeat 的维护者,以及已有 Dashboard 活动观测客户。
对同一清单、SQLite 绑定及脱敏 JSONL 变换定时归因,验证真实 scheduled 拼写和受控信封、手工同文、未知归因、错 automation ID、错 Turn 与超窗。
同一真实 CLI 在旧头把两种当前清单形状的 scheduled 定时送达读为未核验,现头读为 fresh 且有 delivery_evidence_at。其余六组逐字段相同。
本次验收 GH-A02 可用的诊断切片;未来的代理起跑回执、实际调度修复及 #3927 全生命周期仍需另外验证。
- scheduled_attribution。当前 rollout 的已知定时拼写进入本 lane 证据匹配;未知和手工归因保留未核验。
- last_tick。超窗诊断保留宿主最后记录时间,未归因活动只说明证据不足。
- unchanged_entry_paths。installation-only 保留无宿主读取,显式 registry 使用自身的可读配置。
改动思路 / Approach
Codex rollout 适配器识别宿主归因,现有绑定、cadence 和窗口 owner 定义 lane 与状态,doctor 组合有界只读观测,Dashboard 保留既有活动投影。
在宿主自身读回适配器加入闭集拼写复用已存在的校验,保留报表与共享窗口层。无需更改 scheduler、准入或权限。
显式 registry 和安装专用入口保留原选择。Dashboard 仍读活动,新增诊断的操作入口是 doctor。
具体改动 / Changes
评审提交 776170a5016e844ce4fd569c7b3e56ed4e91f10f,分叉基线 49881d5a3ac25adf8c105b2dbfdb109716cefbcb,反例对照 d029f9b10059758f6916f371cdd6a45ef3a3ef2b。完整提案 10 个文件 +2582/-14。
关键代码讲解
_heartbeat_turn。只接受两个已观察的定时 trigger,保持原 turn ID 及现有 transport 约束。 源码_rollout_prompt_evidence。在最新已归因轮的有界尾部匹配用户消息和已安装 automation 提示。 源码codex_delivery_evidence。从同 Goal/agent/线程已安装的清单读取证据。 源码build_host_delivery_window。按 cadence 和可选证据归类 freshness,保留最后活动时间。 源码collect_host_delivery_diagnosis_route。沿 doctor 已解析的显式 registry 计算诊断,拒绝解析不明的入口。 源码
对主干的风险 / Risks
两边各跑八组原生 CLI;旧头两组 scheduled 为 unverified,现头匹配归因为 fresh 并返回消息证据时间。超窗仍返回 host_prompt_delivery_missed 和最后观测时间。
手工同文、未知 trigger、错 automation ID 或错 Turn 均为 unverified,无送达证据但保留活动时间。超窗与不归因明确区分。配对的 registry、manifest 和 rollout 输入哈希未变。
现头 doctor/host/安装范围 173 项通过,分叉基线安装范围和宿主窗口 126 项通过。Ruff 5 个文件、Dashboard 活动模型 smoke、预合并 6 项直接检查和 19 项 smoke 均通过。
真实 CLI 对照使用隔离源码环境,两版均缺已安装 distribution 的命令记录,doctor 顶层因此退出 1。两项安装层检查失败名称一致,诊断负例与只读输出按各自返回字段核验。远端 CI、候选包在活跃 App 的安装及其他版本均未验证。
观测完整但缺送达归因时,可以得到未核验的诊断和通过的可选覆盖检查。超窗或覆盖不完整才会使该可选检查转红。
我的整体评价 / Verdict
现头已修复上一轮的真实 trigger 误判,负例仍按原证据要求关闭。当前可以批准。
用现头实际 Dashboard 活动组件和 wire schema,在中文桌面与英文窄屏查看定时、未核验和超窗。关着说明时主摘要保持简短,展开后未核验原因可达;已验证 Esc 关闭并留在原控件。
浏览器数据为隔离混合夹具;当前 Dashboard 后端仍投影活动窗口。此次浏览器验证覆盖 schema 和展示,实际 App 安装与完整页面联调留待验证。
English verdict: APPROVE at 776170a. The observed Codex App trigger now reaches the native doctor diagnosis, manual and mismatched input stays unverified, and missed windows still expose the last tick.
Signed-off-by: huangruiteng <huangrt01@163.com>
huangruiteng
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · GPT-5 · OpenAI · self_reported
动机 / Motivation
依赖 Codex App 定时 heartbeat 推进 Goal 的维护者在任务停滞时运行 loopx doctor。旧输出无法区分“提示已交付但 Agent 仍在工作”“线程只有手工或空活动”和“定时提示已经漏送”。
修复前只能看到线程最近活动,手工同文、空 Turn 或不归因活动会让 lane 看起来健康;当前 exact head 要求最新 Turn 的定时 trigger、transport、prompt digest 和可选 automation ID 同时匹配,才报告 fresh。
匹配 scheduled trigger 的轮次返回 fresh 和 delivery_evidence_at;手工同文、空 Turn、错 automation ID、错 Turn 或未知 trigger 返回 unverified_activity 并保留 last_observed_at;静默超窗返回 host_prompt_delivery_missed。
本 PR 不启动或修复调度、不补发提示、不写宿主 store、不消费 quota,也不把缺少送达回执直接断言成宿主故障。
改动思路 / Approach
The implementation separates shared window semantics from Codex-specific evidence parsing and exposes a read-only diagnosis through the existing doctor owner.
It delivers trustworthy detection for supported host records, preserves unverified gaps for unknown formats, and leaves scheduler repair outside scope.
主路径是 loopx doctor -> collect_host_delivery_diagnosis_route -> collect_host_delivery_diagnosis -> host activity and delivery-window owners。权威输入为 The selected registry's Goal bindings, installed heartbeat cadence, host activity records and attributable rollout evidence,决定边界由 The host adapter owns evidence attribution; shared host_thread_activity owns window state; doctor owns read-only diagnosis projection. 持有,结果是 Bound lanes are read and classified as fresh, stale, missing or unknown; no host or Turn state is written.,再由 host_prompt_delivery JSON, optional doctor check, Markdown summary and Dashboard activity reason 消费。Missing or incomplete evidence remains unverified; the operator follows the reported lane and host evidence gap.
具体改动 / Changes
按 docs/development/contributor-tasks.md 的 revision 5e858b7edac3b5e38e3ba4ef11f41a23de3fcf7f 核对,GH-A02 / scheduled-delivery-attribution / complete-lane-identity / read-only-installation-scope 分别对应下面的行为与验证。
关键代码讲解
collect_host_delivery_diagnosis:Project complete bound-lane identity through shared activity and delivery windows into a public diagnosis. Before doctor had no lane-level delivery diagnosis; now it reports fresh, stale, unverified and not-applicable states with counts and coverage._heartbeat_turn:Recognize host-attributed scheduled test turns and reject manual, resumed or unrecognized triggers. Before only the routing spelling automation_heartbeat was accepted; now both observed scheduled triggers are recognized without accepting arbitrary trigger strings.codex_delivery_evidence:Map each bound lane to the latest scheduled prompt delivery observed in its own rollout. Before recent activity alone could satisfy fresh; now the adapter reads an installed ACTIVE heartbeat prompt and bounded thread rollout evidence.build_host_delivery_window:Classify activity and optional attributable delivery against cadence and tolerance. Before any inside-window activity was fresh; require_evidence now yields unverified_activity while preserving the observation time.collect_doctor:Route the selected registry into delivery diagnosis and publish it as an optional doctor check. Before no delivery diagnosis existed and explicit registry could be ignored; now the selected diagnostic registry reaches the route.
变更共 10 files (5 production/Python, 4 Dashboard/data or UI, 1 integration guide; plus one 1,463-line focused test file included in the 10),2582 additions、14 deletions。Add host delivery diagnosis, scheduled-prompt evidence, explicit-registry routing and a new unverified-activity reason across doctor, Dashboard and documentation.
GH-A02:A quiet bound Codex App lane reports a typed missed-delivery diagnosis with its last observed time.,当前为 implemented。scheduled-delivery-attribution:Fresh requires attributable scheduled delivery rather than arbitrary recent host activity.,当前为 implemented。complete-lane-identity:Binding ambiguity and explicit registry selection are resolved before observation limits and projection.,当前为 implemented。read-only-installation-scope:The diagnostic never opens a Turn, writes host state or spends quota; installation-only does not read host state.,当前为 implemented。
对主干的风险 / Risks
最强回归场景是 A manual message or empty Turn is reported as a scheduled delivery, hiding the exact failure doctor should surface.。触发状态为 A bound lane has recent composer activity with identical prompt text or a task_started/task_complete pair without prompt evidence.;Window evidence is required; only a closed scheduled trigger plus matching prompt, transport, Turn and automation identity can produce fresh.。影响范围是 The read-only doctor diagnosis and Dashboard reason projection; scheduling behavior is unchanged.,可观察性来自 host_prompt_delivery status, reason, counts, last_observed_at, delivery_evidence_at, lane rows and optional check status.,恢复路径是 The optional diagnostic can be ignored or the change reverted; operators inspect project/host records and repair scheduling outside this PR.。
changed_invariant_positive=passed (219 passed across doctor delivery-window, installation scope, install freshness, Git checks, promotion readiness, desktop installation, skill delivery and rollout cursor suites.);material_negative_or_failure=passed (Negative cases returned unverified_activity or unknown/no_expectation while preserving activity time.);repository_required_checks=passed (Goal activity smoke passed; Ruff passed; standard premerge passed direct checks, 10 catalog canaries, 8 risk smokes and public boundary.);remote_ci_observation=pending (The new exact head has not yet completed hosted CI.)。
- PASSED · Scheduled attribution, freshness, missed window, ambiguity, explicit registry and installation-only scope.:219 passed across doctor delivery-window, installation scope, install freshness, Git checks, promotion readiness, desktop installation, skill delivery and rollout cursor suites.
- PASSED · Manual text, empty Turns, mismatched automation/turn and launcher-time ambiguity cannot create false fresh or missed states.:Negative cases returned unverified_activity or unknown/no_expectation while preserving activity time.
- PASSED · Dashboard reason schema/view, Ruff, diff, catalog and risk-profile premerge.:Goal activity smoke passed; Ruff passed; standard premerge passed direct checks, 10 catalog canaries, 8 risk smokes and public boundary.
- PENDING · Remote CI for the new exact head.:The new exact head has not yet completed hosted CI.
我的整体评价 / Verdict
长程效果判断为 improved:Goal owners can distinguish a missed scheduled prompt from normal work or manual activity without opening a Turn or relying on external log archaeology.。用户体验判断为 improved:JSON, Markdown and the existing Dashboard activity view expose a specific unverified reason and the missed-window last tick.。视觉检查不适用,因为本次没有改变渲染界面或布局。
The PR delivers the GH-A02 diagnostic slice with evidence-bound freshness, complete binding identity and explicit read-only boundaries. Manual/empty activity and alias/truncation ordering no longer create false health.
English verdict: APPROVE at 4c9f05f. Doctor now distinguishes attributable scheduled delivery, recent unverified activity and a missed window while remaining bounded, complete-lane aware and read-only.
A Codex App automation can stop delivering its scheduled prompt while the Goal stays open, keeps returning a normal
should-rundecision, and never starts a Turn. Nothing in the Goal's own records tells that apart from a Goal that is simply waiting, so the owner finds out days later. This makesloopx doctorread the missed-delivery window directly.loopx doctorreads each bound app lane once through the observation and window owners the status projection already uses, and reports:host_prompt_delivery_windowscheck and ahost_prompt_deliverypayload withstatusoffresh,stale,unverifiedornot_applicable, per-state counts, and one row per lane carrying the last observed tick, age, window and cadence source;stalelane carryingdiagnosis.code = host_prompt_delivery_missedwithlast_observed_at, which is the exit condition indocs/development/contributor-tasks.mdfor GH-A02;missing/unknownlanes carryinghost_prompt_delivery_unverifiedwith a reason, includingthread_archivedwhen the host's own record says the thread is archived.A failed readback never claims health. A run that hit the 64-lane bound, a Goal past the shared 32-binding cap, a binding on an observable surface with no thread id, or a Goal whose activation record cannot be read reports
unverified(scan_truncated/unmeasured_lane) and leaves the optional check red; only a complete read can befresh. Stopped Goals are skipped, a Goal bound only to a surface this process cannot observe is not judged, and--installation-onlystill never touches host state.The readback is read-only: it opens no Turn, writes no host store and spends no quota. Labels are sanitized before publication, since a Goal or agent id is free-form registry text that may look like a path or a token; such a label becomes
<redacted:sha256-prefix>plus a safe last segment withlabel_redacted = true, and a remaining boundary violation still lets the status and counts through withlabels_withheld = trueinstead of failing the whole doctor run. A registry this build cannot decode reportsregistry_requires_upgraderather thanregistry_unavailable.Tests:
tests/test_doctor_delivery_window.pyadds 26 cases covering the stale window with its last tick, the quiet lane, an unmeasured lane, the bound and per-Goal cap, label redaction and lane identity collisions, the archived thread, the corrupt and undecodable registry, and the installation-only scope. The surrounding doctor host-thread suites run at 247 passed with 3 failures that reproduce on the unmodified tree here (test_installation_scope_preserves_required_checks_without_opening_user_state[None]and twotest_host_thread_activity.pycases).Refs #3927.
Exact-head refresh on 2026-11-26:
4c9f05f257f537762b156f59f20de459006c9047on currentmainat5e858b7edac3b5e38e3ba4ef11f41a23de3fcf7f.automation_heartbeat_scheduledtrigger.