Repository navigation
Conversation
Signed-off-by: aihop <4408344+hhyykk@users.noreply.github.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · gpt-6.2-sol · OpenAI · runtime_reported · xhigh
动机 / Motivation
使用 Steward 自动巡检的人会遇到这个问题。同一个 Steward 同时读到整秒和晚一微秒的监控截止时间。按原文本排序时,带小数点的较晚监控先派发。 基线在 File 和 SQLite 的四组检查中均把晚一微秒的 Monitor 派在第一个。 候选在两种 Todo 存储先提交整秒的 Monitor。等时刻按原时间文本和 ID 打破平局;第一项拒绝后按顺序提交下一项,仍只成功派发一次。 保持当前准入、租约、后台 Session 以及原 Monitor 的时间和身份。 Monitor 调度约定
改动思路 / Approach
在 due_monitors 的现有资格过滤之后,复用 chronology_key 排序,继续把原始截止时间与 Turn ID 交给原有宿主。 Core Todo 权威读取提供原行,Monitor scheduler 定义到期资格,Steward pump 负责原前台/后台隔离和宿主派发。
具体改动 / Changes
精确提交 bac12a0b8f709d657a8a3264fbd96551e9d643e5 对照目标基线 509360fb0d3e9e6e578ddf5c12db587886016b23。3 个文件,增加 128 行,删除 1 行。在一个现有排序点换键,新增同一泵的回归和 Lean 抽象模型。 monitor-timing 核对时间行为,original-monitor-scope 核对现有独立边界。
关键代码讲解
StewardMonitor.todos。返回实际存储的原始 deadline。 源码StewardMonitor.due_monitors。在原资格过滤后按 UTC 时刻、原文本和 Todo ID 排序。 源码chronology_key。使用共享 UTC 解析并以原文本打破同刻平局。 源码Steward Monitor 背景泵。保留故障退避、首个成功派发和原 deadline。 源码
对主干的风险 / Risks
候选在两种 Todo 存储先提交整秒的 Monitor。等时刻按原时间文本和 ID 打破平局;第一项拒绝后按顺序提交下一项,仍只成功派发一次。 未来、已过期、其他 Agent、被阻塞及另一路由的监控均未混入。真实原生巡检的绑定拒绝及后台隔离继续通过。 候选现有契约 14 项,原生集成 15 项通过。git diff --check 与两 PR 三方试合通过。Lean 模型的边界按源码核对。 Git 三方试合与 #9542 无冲突。 基线和候选均为精确提交的本地 File/SQLite。多条时间的实验记录宿主提交,原生测试另走现有持久化和本地模拟传输。外部模型、线上宿主与远端 CI 未运行。
我的整体评价 / Verdict
APPROVE。 按 UTC 时刻尝试最早合格的 Monitor。等时刻保留原时间文本和 Todo ID 作为次序。 候选在两种 Todo 存储先提交整秒的 Monitor。等时刻按原时间文本和 ID 打破平局;第一项拒绝后按顺序提交下一项,仍只成功派发一次。
English verdict: APPROVE at bac12a0. The real File and SQLite read paths now pick the earliest eligible UTC deadline, preserve deadline text and Turn identity, and advance to the next eligible monitor after a rejected submission.
Problem
Steward sorted due monitor deadlines as text. A deadline at
10:00:00.000001Zcould be attempted before a deadline at10:00:00Z. The pump uses that order for its first eligible submission.Fix
Use the shared UTC chronology key after the existing due, expiry, and routing filters. Keep the original deadline text as a tie breaker and retain the Todo ID tie breaker. The pump still passes the original deadline and derives the same Turn identity from it.
Verification
PR #9540 applies to follow-up creation dates. A local merge-tree check confirms both commits combine cleanly.