Repository navigation
Isolate native receiver preflight before starting benchmark solver time - #8176
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
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
动机 / Motivation
APPROVE;本次完整评审未发现阻塞问题。精确 head:e9beb144a6f9984c9cb2129bf1d52690fa446d2b,实际 merge base:d602248c53298f256ea72fe75091a39f35c6ae4b。
运行原生 ChatGPT 登录的 SForge LoopX worker 的操作者。接收端登录或代理不可用时,旧入口仍建立求解截止并进入调度;新入口先观察原生账户与额度路由,失败后保留原状态并退出。已验证三种 LoopX profile 的失败均发生在计时与调度之前,健康接收端仍继续;没有模型调用或旧请求重放。不恢复已提交但结果未知的旧 Turn,不变更评分、实验条件、期限、账户选择或重试授权。新 runner 在真实接收端的完整安装、续跑和长程收益仍由既有运行负责人单独验收。
改动思路 / Approach
在已有 SForge 接收端命令入口复用原生 stdio transport,避免引入第二份账户、调度或恢复状态;一次启动观察与求解计时分工明确。本 PR 仅交付新启动的接收端路径预检;不接管旧 Turn 的恢复,也不改变 official/single 或自定义 API 的执行入口。
入口没有重新实现登录或恢复控制器。SForgeWorker.format_run_cmd 保留 official/single 的早返回以及自定义 API 的原路径,仅在原生登录的 LoopX 分支给既有 clock/scheduler 命令加一次检查。检查复用 native_checkpoint_reader 的初始化、stdio 请求和清理。既有 codex_auth._native_refresh 会请求刷新凭证,解决的是可信宿主授权,不能拿来替代此次接收端观察;从宿主读取登录文件也不能证明远端 workspace route 可用。
具体改动 / Changes
规范依据:benchmark/runtime/RUNTIME.md,spec_revision d602248c53298f256ea72fe75091a39f35c6ae4b。RUNTIME.md:406 的独立 trial home/config 边界已保持;RUNTIME.md:583 的 setup 不调用模型、原 phase deadline 和 scheduler 资格分别验证。新增文档说明启动拒绝的边界,不能倒过来把预检成功解释为旧 Turn 已恢复。
关键代码讲解
SForgeWorker.format_run_cmd(benchmark/runtime/sforge.py:419)先处理原 profile 及 API 选择,把 module 调用放在既有持久化 deadline 之前;没有增加每次 heartbeat 的查询、求解器超时或新账户选择。check_native_receiver(benchmark/runtime/codex_readiness.py:16)用LOOPX_CODEX_HOME指向原 trial,account/read明确refreshToken=false,随后读取额度路由。25 秒是这次一次性观察的总 I/O 预算;后续请求使用剩余额度,不是给每项请求重新发一整段预算。main(同文件39行)只把成功/失败、局部 code 和inference_invoked=false写到 stdout;不转发可能含账户或私有路由的异常。失败 exit1 配合 shellset -e,阻止后面的计时和 scheduler。
完整范围是5个文件:两处生产代码 +62/-1、两处测试 +133、文档 +11。局部 Python 模块适配已有原生 transport,没有第二个 quota、调度、凭证或 pending journal owner;错误码保持在 runner 的局部诊断边界。
对主干的风险 / Risks
PASS:相同准备条件下,immutable base 的既有 SForge runtime 324 项通过;head 的完整相关集合332项通过,0 skipped,覆盖 native-goal、heartbeat-resume、heartbeat-explore、official/single 和自定义 API 隔离。Ruff 对全部变更 Python 文件通过;原生 premerge 的5项 direct和9项 selected 均已执行且无失败,语义 advisory 与完整选定语义检查通过。
独立的同条件 shell 对照使用真实 format_run_cmd 生成入口,控制账户 RPC、scheduler sentinel 和 timeout fixture:base 的三种拒绝场景仍创建 deadline 并进入 scheduler,健康三种正常;head 拒绝三种均 exit1,deadline/start marker/scheduler 均未产生,健康三种仍成功。两边原 auth/pending 字节不变;调用序列只含 initialize、initialized、account/read 与健康时的 rateLimits/read。另用真实本机 Codex app-server 和空的隔离 home 跑模块,得到脱敏拒绝、空 stderr,没有模型请求。这些证据证明入口和原生传输失败边界,不证明远端已登录账户的长期可用性或 Linux deadline 精度。
初次隔离依赖缺少 SOCKS transport 的 socksio:base/head 分别85/88个用例在同一 httpx 初始化处失败。补齐两个隔离环境的 httpx[socks] 后重跑上述完整集合,保留原失败,不修改源码或断言。最初自建 shell fixture 在 macOS 缺少 timeout;修复该测试环境并固定 seeded-todo 后重新做两侧完整对照,未用第一次不完整结果认证健康路径。
语义与 CI 对齐
局部诊断复用现有 native account/profile 词义,不按错误 prose 推断账户或工作状态。新的启动拒绝是明确披露的行为改变;无新默认开启的模型、hook 或安装指令。wait_for_ci=false,未查询、轮询或等待 CI。premerge 整体 exit1 仍为 manual_review_required,原因是 benchmark_sensitive 要求维护者审阅后才能自合并;它没有执行检查失败,也不由本次代码批准解除。 独立 exact-scope change-quality 回执亦保留 fail:唯一 blocker 为同一 premerge 维护者 gate,未将退出1改写为通过。
我的整体评价 / Verdict
该切片有独立价值,属于 justified_increment。long_horizon 与 user_experience 在此启动边界 improved:失败可以在消耗新求解时段之前显式暴露,原请求与恢复职责保留,没有增加用户确认轮次。未验证远端完整安装/续跑、历史卡住根因、模型实际采用和净成本收益;不将332项通过或一次真实原生拒绝当成这些结论。
代码与问题规模相称,复用现有 transport、删除重复账户/调度状态比新建控制器更合适。无 rendered presentation 改变,visual_review 不适用。保留维护者 merge hold;本评审未合并、安装或启动实验。
English verdict: APPROVE e9beb14; receiver rejection precedes solver timing across the three LoopX profiles, with 332 passing runtime tests and no inference or pending-work replay. The maintainer merge hold remains.
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
e9beb14 to
fbdc2fb
Compare
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.
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
当前 exact head:8176@fbdc2fb8d7c7e5592c364c29662b06e8882bd995。未发现阻塞本代码切片的 finding。以下结论基于本次独立执行;旧 head 的 approval 不继承,合并资格另行保留。
动机 / Motivation
受影响的是在 SForge 中启动 native-goal、heartbeat-resume 或 heartbeat-explore 任务的操作者。
接收端登录文件存在但账户路由不可用时,旧命令仍先写入求解截止时间并启动 worker;新命令在这两步之前给出脱敏失败。
已验证三个 profile 的真实生成命令在预检失败时保持原 profile、pending 记录与时钟不变,路由恢复后继续启动。
本 PR 不认证后续模型请求可用、额度充足、Linux 完整 trial、恢复任务得分或模型效果。
剩余验收是原有 benchmark 运行者在授权条件下完成真实 Linux trial 与原 checkpoint 的完整比较;本次没有启动这些工作。
只检查登录文件会遗漏真实路由故障;新增一次不推理的 transport 观察,是比消耗模型请求或创建持久化健康状态更小的修复。记忆建议在此用于核对操作者的启动、失败和恢复结果;没有将未来完整产品或模型实验扩成当前源码切片的前置条件。
改动思路 / Approach
既有 SForgeWorker.format_run_cmd 继续拥有 profile、时钟与 worker 组合。仅对明确选定的三个 native/non-API profile,在 set -eu 后、持久化 phase deadline 前调用观察器;任何 RPC 失败都会先退出。观察器复用现有 stdio owner,临时复制 auth/config、启动 account-only app-server,销毁目录并关闭进程后才返回。原 pending、session、求解预算与恢复策略不转移给它。
保留该机制的理由是:现有 formatter 继续拥有时钟与执行,stdio owner 继续拥有 provider I/O;新增 helper 只做一次隔离观察,无新控制面状态。当前 PR 只交付不污染固定输入的启动前账户 transport 检查;原 qualification、pending recovery 与模型执行不被替代。旧 checkpoint import 直接指向搬迁后的同一函数,没有两套初始化或清理实现。
具体改动 / Changes
完整差异为 7 文件,+233/-17,包含新增观察器、8 行 formatter 插入和 136 行 readiness 回归测试。实际三点差分基准是 c6c328d50b456c3dbb88de7021414c1921b69174;GitHub 本次报告的 PR base tip 为 5a58635028fbef1316dc66531daf5fdb655e9b13,它不是 head 的祖先,因此没有把它误当作受控行为实验的 merge-base。
接受的规范为 benchmark/runtime/RUNTIME.md,固定 revision c6c328d50b456c3dbb88de7021414c1921b69174,逐项对应如下:
| criterion_id | 当前 disposition 与证据 |
|---|---|
| Install and isolate | implemented:原 home/config/auth/pending 的字节摘要保持不变;bundled skills 只写入临时观察目录。 |
| Native SForge task entry | implemented:三个 native profile 的真实格式化 shell 在 clock 前拒绝路由错误;健康继续,重复入口不补 deadline,API/official/single 控制命令逐字相同。 |
| Migration and qualification | deferred:完整 Linux/native trial、原 checkpoint 和结果/成本资格仍由已有 benchmark qualification owner 负责,本次没有启动或认证。 |
关键代码讲解
SForgeWorker.format_run_cmd保留 ordinary/API 分支,在既有 clock 前插入一次检查,未添加每轮 heartbeat 探针。check_native_receiver只复制两个输入文件到临时 home,使用总观察 deadline,依次读取account/read(refreshToken=False)和account/rateLimits/read。usage 可读并不等于额度充足。native_checkpoint_reader是原 stdio transport 的共享 owner;旧 import 的函数对象相同。按实际 native source whitelist 解包后,-I -S的纯标准库 import 也通过,避免依赖整个 host 模块。
对主干的风险 / Risks
最危险的两侧故障是:坏账户仍开始计时,或健康账户被过度拒绝。实际 shell 对照同时检查这两侧:base 三个 profile 在账户/usage 故障下仍写 clock 并启动;head 六个故障 case 均为 rc1 / clock0 / worker0,三个健康 case 正常继续。仅移除 head 的 preflight prefix 后,三个 profile 的独立 oracle 都检出错误启动。随后在同一失败 fixture 恢复 RPC,三个 profile 均保留原 home/pending 并继续启动;六个 base/head 健康重入 case 的 deadline 字节不变。
| 本次独立验证 | 观察 |
|---|---|
| actual SForge/Harbor suites 与 checkpoint tests | base 519 passed;head 527 passed,无 dependency skip。SDK 为项目声明源码的固定 revision,双方使用相同版本。 |
| 24 个成对 formatter case、5 个 off/API 控制命令 | head 同时满足健康与失败分支;所有控制命令逐字相同。post-clock worker 为无模型 sentinel。 |
安装的 Codex 0.166.0-alpha.5.1,刻意空的隔离 profile |
脱敏 native_receiver_unavailable,原 home 无新增技能;无推理调用。 |
| 原始17根 mypy、DCO、diff/双语、native quick checks | mypy B/H PASS;6 direct +3 selected 机械检查通过。 |
| 补充全树 Ruff | FAIL 保留:受控 B/H 完整121个 failure identities 相同,所有失败源及配置 blob 不变,均不在本7个修改路径。未修复或冒充 PASS。 |
| 严格质量与合并政策 | CQR receipt_missing;完整 quick premerge exit1,另有 benchmark-sensitive 人工 hold。没有放宽或清除。 |
这里执行了真实 formatter、shell、stdio 子进程和安装的空账户失败分支;健康 RPC 使用可控 provider fixture,求解器由 sentinel 截断。这些证据支持启动边界,不支持 Linux 完整 trial、真实健康账户的后续推理、checkpoint 得分或成本收益。当前 required 本地行为检查已经覆盖修改,不要求本 PR 修复未变化的全树 lint;远端 CI 遵守当前策略未查询或等待。
我的整体评价 / Verdict
这是有用且可独立回退的增量:long_horizon preserved,原 deadline/pending/重入责任未改变;user_experience improved,沿用现有启动入口,不增加配置或确认回合,setup 故障能在开始计时前被识别并在恢复后继续。复用现有 stdio owner 与短 helper 的维护成本与风险相称,不需要新增 readiness registry 或持久化策略。
检查的是 benchmark CLI 启动、JSON 失败和原状态回读;没有修改渲染页面、布局或 App 导航。无受影响的图形界面;Linux 完整 trial 和后续模型调用未验证。新增诊断保持本地词汇,未增加通用 Goal 状态或任何新权限。当前源码 review 结论为 APPROVE;CQR、人工 hold、正式合并授权与后续实验资格继续分别保留。
English verdict: APPROVE. The isolated account-only preflight rejects bad native routes before solver timing, preserves existing control paths, and recovers without rewriting the original profile or pending state. Exact-scope quality and maintainer merge holds remain; this review grants no merge or trial authority.
Benchmark workers could start their solver clock before verifying the native account and receiver route. The preflight now uses the existing Codex stdio owner to read account and rate-limit availability before scheduling, without a model request or credential refresh. Its temporary private Codex home copies only the selected auth/config, so installed skills and live trial profiles remain unchanged.
Native Goal packaging also uses a dependency-free checkpoint reader in the shared stdio transport; the historical host import remains compatible. Official/plain and custom API execution keep their existing paths. This is an entrypoint check, not per-heartbeat polling, and does not clear pending requests, replay unknown turns or adjust budgets.
Validation on
fbdc2fb8d7c7e5592c364c29662b06e8882bd995: independent focused receiver/host/runner regression run 224 passed, 93 skipped (skips require the unavailable SForge/Harbor environment in that checkout). A frozen Native Goal source archive imports successfully with an empty environment and isolated Python, covering the packaged dependency closure. Earlier native receiver experiments verified available/unavailable proxy routes without model calls; those are supporting evidence, not a complete installation or resumed-run qualification of this head.The change remains a Python transport adapter, with no new control-plane state machine. Full Linux packaged launch and live continuation qualification remain outstanding before claiming operational recovery or score benefit.