Repository navigation
fix(benchmark): seal resumed worker phase deadlines - #8634
Conversation
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
loopx-agent
left a comment
There was a problem hiding this comment.
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
Reviewer: model_agent · gpt-6.1-sol · OpenAI · runtime_reported · max
本次评审对应提交 ef6922068b5ce7ac2ab86d719516b9f7f2f95c5d。
无阻塞发现。主干拒绝 scheduler 实写的两种小数,候选可封存、恢复并读回同一激活,保留原剩余时间和已用机会。
动机 / Motivation
给 SForge worker 创建恢复点的 operator。阶段时钟表示当前工作预算的绝对截止时间。scheduler 接续后写出的截止时间可能为 1800000000.0 或带小数部分。原 controller 把它当作非法整数文件,尚未调用 native capture 就退出。候选接受两种小数写法,封存原字节,按 native 捕获时刻计算余额;接收端仍用整秒,保留原已用机会与 incumbent。覆盖固定 SForge 的本地真实 HTTP 和生成的接收 shell。未运行整容器或真实评分,也不证明跨 Goal 的完整恢复或研究收益。
改动思路 / Approach
只让已有文件 adapter 接受生产者已写出的时钟,封存和恢复共享判断。保持 scheduler、native 激活和接收 shell 的各自 owner。 scheduler 把活动 deadline 写为十进制;controller 的既有 parser 统一读这个文件。接收端仍以整秒运行。 writer parser
具体改动 / Changes
关键代码讲解
- capture 在发 native HTTP 前检查时钟,再核对并封存同一原始字节。restore 用同一 parser 从原字节和 native 捕获时间重新计算余额。 捕获 恢复
- 接收端仍使用整数期限。recover 读取原激活,没有新增机会或补回消耗的时间。 激活与写回
以 base b7c9178 的 benchmark/README.md 为准。sealed_remaining 通过实际 scheduler 到 HTTP;finite_receiver 由生成 shell、原激活恢复和冷却核验;explicit_clock_only 由禁用和缺参与者对照核验。 原 phase-clock 契约
对主干的风险 / Risks
同一组五用例对照:base 在 native HTTP 前拒绝两种小数,其他三项通过;head 五项均通过。.625 原字节保持,整数接收不增加余额,恢复读回同一激活、incumbent 和已用机会。错误文件无 capture,缺参与者无激活。 接收测试
语义与 CI 对齐
固定 SForge 本地 HTTP 和生成 shell 共 58 项通过,3 项显式 Docker 跳过。初次 SOCKS 错误在两版相同的丢失响应用例复现,清除本地代理环境后候选套件通过。快速 premerge 执行项通过,benchmark 人工合并检查保留。未查询托管 CI。
我的整体评价 / Verdict
代码评审通过。capture 和 restore 已共用 parser,无需拆新的适配层;保留 Docker 与真实实验的单独资格。本次评审覆盖现有宿主与 CLI 行为。覆盖固定 SForge 的本地真实 HTTP 和生成的接收 shell。未运行整容器或真实评分,也不证明跨 Goal 的完整恢复或研究收益。
English verdict: APPROVE. At ef69220, the controller captures both scheduler decimal formats verbatim, preserves the original allowance and native opportunity, and leaves native-only capture unchanged.
Resumed benchmark workers publish their active deadline as decimal epoch seconds. The checkpoint controller only accepted integer text, so a deadline such as
1800000000.0prevented capture before the native judge was contacted.Accept the scheduler's decimal clock in both capture and restore. Retain the source bytes and calculate the remaining allowance at the native capture time. The receiving SForge phase still uses its existing integer clock and rounds down.
Validation uses the real local SForge checkpoint API and the generated receiver phase shell. The integer fixture passes with both implementations. The integral decimal and fractional fixtures fail on the base and pass with this change. The controller suite passed 58 tests, with three opt-in tests skipped. The tests use synthetic submissions and no model calls.