Skip to content

fix(benchmark): advance shared EdgeBench source - #7824

Merged
huangruiteng merged 2 commits into
mainfrom
codex/edgebench-default-integration-20261101
Nov 1, 2026
Merged

huangruiteng merged 2 commits into
mainfrom
codex/edgebench-default-integration-20261101

Conversation

@huangruiteng

@huangruiteng huangruiteng commented Nov 1, 2026 •

Copy link
Copy Markdown
Collaborator

New implicit EdgeBench cohorts now select reviewed upstream 118f925 together with the existing nonfinite-checkpoint-v2 compatibility patch, producing effective source cedd08b. The upstream fixes ordinary nonfinite feedback and cleanup lock ordering; the separate patch keeps checkpoint scores and metrics lossless. Existing frozen cohorts retain their original receipt, checkout and patch for offline reuse; explicit source selections remain unmodified.

Source identity now compares the literal repository-local remote.origin.url with its receipt. A normal Git url.*.insteadOf HTTPS-to-SSH transport rewrite no longer looks like source corruption, while an actual stored-remote change still fails validation. Native scoring, budgets and submission opportunities are unchanged.

Validation:

  • Exact-head correction and author validation.
  • Independent whole-PR review at a01d7ba, including source CLI parity, nonfinite checkpoint negative controls and cleanup failure/retry coverage; its explicit environment skips and maintainer boundary remain documented.
  • Post-merge readback at 07149df: uv run --extra test python -m pytest -q benchmark/tests/test_edgebench_source.py — 48 passed. These source/default/test files are unchanged from the reviewed head.

This corrects the description's obsolete intermediate 2e29d24 / unpatched-default account. It adds no container, installed-host, scientific-effectiveness or CI qualification beyond the linked evidence.

Signed-off-by: huangruiteng <huangrt01@163.com>

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent; model=gpt-6.1-sol; provider=OpenAI; source=runtime_reported; reasoning_effort=max

动机 / Motivation

新建 EdgeBench cohort 的维护者,以及随后需要保存、读取并继续研究 checkpoint 的操作者。

合法的 HTTPS→SSH transport rewrite 在旧实现中被当作源码漂移;当前 canonical URL 检查修复此误拒绝,但同一默认升级移除了 checkpoint 的非有限值支持。

预期新 cohort 能直接采用已审查源码、合法重写可复用 frozen source,且既有 checkpoint 与 session 恢复能力保持;本次实际确认前两项改善,同时复现两项回归。

本审查不启动 benchmark、模型推理、容器研究或安装升级,也不改变历史 cohort、评分、预算、合并或 review dismissal 权限。

改动思路 / Approach

canonical identity 属于已有 source owner 的不变量;Git transport 属于 provider IO;checkpoint 编码和 session 生命周期属于原生 provider,升级 pin 必须共同保留这些已交付能力。

当前 PR 只涉及四个文件的新 cohort 默认源与 canonical URL 判定;无需新配置框架或独立界面,但不能用移除兼容补丁换取一个不完整的新默认。

source-default.json 只在首次准备 cohort 时读取;已有 receipt 先由 _validate 检查并直接返回。此次把 git remote get-url 改成 literal repository-local remote.origin.url,正确区分 canonical identity 与 fetch transport:同一 HTTPS URL 通过 SSH 获取并不意味着源码换了仓库。独立 Git 夹具还验证了相反方向:实际 stored URL 被改动、但 rewrite 把它映回原 URL 时,旧实现误放行,当前实现拒绝。

然而,pin 从 e278cda3f4d2da3cf06aabf2df4daa99b9749501 的 patched source 变为 2e29d24f44fece91dc240fc5459d17cad19c5fcd 的 unpatched source,会同时切换真正执行的 provider。完整 upstream diff 只有 judge_server.py 及两份测试;并未包含 checkpoint codec。HTTP feedback JSON projection 与持久 checkpoint capsule 具有不同 consumer,前者不能替代后者。

具体改动 / Changes

审查 head 为 1dbb6103518cd25918f0fc9af2aa146181157a1a,实际 PR merge-base 为 73cf83edd6d80275d0c8f44c5289837eebe8ab0d;获取到的 target main 为 38fcfece0dea9a754832390d8eb0e24037cb669b。完整 PR 为四文件 +33/-40,另已逐段阅读导入的 provider 三文件 diff。独立依据是变更前的 benchmark/edgebench/README.md,spec revision 73cf83edd6d80275d0c8f44c5289837eebe8ab0d,按其现有条款映射如下;这些是文档小节标签,不是新增 RFC 编号。

  • Select and freeze the native provider / frozen cohort — implemented:旧 v2 cohort 在当前 head 下离线复用,原 receipt bytes、effective commit d0863478c09d7f929c0b2ab905e030aafb6c8c14 和 frozen patch 保持不变。
  • Select and freeze the native provider / nonfinite checkpoint — not_met:旧默认支持非有限值 capture/readback;新默认丢失该能力,详见 F1。
  • Select and freeze the native provider / reviewed pin — not_met:40 位 pin 与实际 fetch 一致,但真实默认 codec 和失败清理反例未满足升级资格,详见 F1/F2。
  • Select and freeze the native provider / explicit source — implemented:显式 source/ref/revision 仍选择 unmodified provider;冲突不改写 frozen cohort。

关键代码讲解

  1. source-default.json:3 将新 cohort 指向 2e29d24f44fece91dc240fc5459d17cad19c5fcd,同时删除 compatibility patch 选择。实际 CLI 准备结果为 edgebench_source_v1,commit 与 ref 一致;旧默认实际准备结果为 edgebench_source_v2,upstream 为 e278、effective commit 为 d0863478c09d7f929c0b2ab905e030aafb6c8c14。这是执行字节与持久恢复行为的变化,不是只改一个标签。
  2. _validate / source.py:167–191 读取 literal local URL,继续核对 HEAD、dirty state 和原 frozen patch;合法 rewrite 返回原 receipt,真正的 stored URL 改动仍走原错误与恢复提示。没有新 selector、prose heuristic 或权限 owner。
  3. prepare_source / source.py:194–245 先处理已有 cohort,再读取新 defaults,暂存 fetch/receipt 后才 rename 发布。bootstrap 随后把实际 checkout 放到 provider import 前面;run、serve、online_judge 均有真实 caller。没有新的 frontend 操作或安装步骤。

对主干的风险 / Risks

F1 — [P2] 新默认移除了仍必需的 non-finite checkpoint 编码

位置:benchmark/edgebench/source-default.json:3。此前的 nonfinite-checkpoint-v2 patch 修改的是 sforge/harness/checkpoint.py,对 released history/results 的 Infinity、-Infinity、NaN 做 lossless strict-JSON encoding,读取时恢复原数字。新 pin 的 checkpoint.py 仍使用 allow_nan=False 的 _encode,而 capture 直接调用它;新加入的 json_safe_feedback_payload 只覆盖 feedback routes。

我实际准备了旧、新两个默认 source,在各自完整的真实 JudgeCheckpoints.capture / _packet 上执行相同 finite/Inf/-Inf/NaN 输入:旧 source 四项均成功,三个非有限 case 为 strict JSON v2 且 lossless readback、opportunity 不变;新 source 只有 finite 成功,其余均抛 ValueError: Out of range float values are not JSON compliant,没有发布 capsule。这会让一次合法但无效的优化结果阻断后续保存和继续研究。这里使用 synthetic judge state/image metadata,只有未使用的 FastAPI exception type 被替代;没有声称跑过 HTTP 或完整 restore。

最小修复是把 checkpoint codec 修复纳入共享 source,或针对新 pin 保留/重做兼容补丁,再升级默认。补上“准备 production default 后实际 capture/readback 三种非有限值”的回归测试;仅断言 pin 是 40 位 SHA、或用 fixture patch 测 source owner,不能覆盖这个缺口。

F2 — [P2] 新 provider 在多 session 清理失败时可形成锁循环

位置:同一默认 pin 引入的 close_all_game_sessions / game_status。close_all 持有 A、B 的 operation locks;A 清理失败后重新插入 game_sessions,但继续持有 A lock 处理 B。该分支限于 native judge 配置为 E2B 的情况;benchmark.edgebench.serve 直接委托 native cmd_serve,后者读取支持 SFORGE_BACKEND=e2b 的配置,并非默认 Docker 成功清理分支。此时 game_status(A) 可以取得 _game_lock,并在持有它时等待 A lock。随后 B 清理也失败,close_all 要再次取得 _game_lock 才能恢复 B,于是形成循环等待,连其他 session 的 registry 操作也被阻塞。

以未改写的真实 provider 方法 AST、synthetic E2B cleanup/response 和 event 排序,执行同一双失败/并发读取夹具:旧 source 两个线程均退出并返回预期 RuntimeError,global lock 释放;新 source 的 close/status 两线程均保持 blocked,global lock 保持持有。线程是有界测试进程内的 daemon,不运行真实 E2B 或 judge。现有新增 concurrency test 只覆盖 Docker 成功清理与编号分配,没有覆盖这个失败恢复顺序。

请在 provider owner 修复该 lock ordering,避免仍持有 operation lock 的 session 提前对 reader 可见,或避免在 global registry lock 内阻塞等待 operation lock;用两个 cleanup failure 加并发 status 的确定性测试验证最终错误返回、锁释放和后续进展,再选择修复后的 immutable pin。

验证 结果
EdgeBench owning suite PASS:196 passed;46 skipped 单列保留
同输入 source base/head PASS:rewrite、stored URL、ordinary reuse、dirty/ref conflict 及恢复
旧 v2 frozen cohort 在新 head 复用 PASS:离线、receipt byte-identical、原 source 不改写
真实旧/新默认 checkpoint capture/readback FAIL:新默认三种非有限值均失败;旧默认通过
真实方法的双失败清理/并发 status FAIL:新 provider 锁循环;旧 source 完成
本地 premerge 5 direct +19 selected/executed 均 PASS;整体 gate 因 current-base CQR stale 未通过,benchmark-sensitive maintainer hold 保留
语义与 public boundary diff-scoped advisory 0 supported carriers、full semantic smoke、四文件 boundary scan 均 PASS;不证明运行语义正确
GitHub CI UNVERIFIED / not_consulted;required=false;没有查询、轮询或等待

语义与 CI 对齐

没有新增 LoopX 共享词汇,继续使用既有 edgebench_source_v1/v2;native codec 的缺失仍是可观察语义回归。既有 README 的 checkpoint preservation 和“先资格验证再更新默认”条款不能被 feedback route 的修复替代。当前阻塞来自两项独立反例,不来自 CI 未知,也不要求本 PR 处理其他历史失败。修复后应重跑真实默认 source/capture 与确定性 cleanup 负例,再执行 owning suite 和 current-base qualification;不要放宽 JSON、锁或冻结要求来取得绿色结果。

我的整体评价 / Verdict

REQUEST_CHANGES。canonical URL 修复成立,四文件规模与既有 source owner 的划分也合理;无需新框架。兼容层应保留已存在的 persisted receipt/capsule 义务,不能因为新默认没有 patch 字段就推断原能力已经被 upstream 接管。当前 long_horizon 与 user_experience 均为 regression:正常研究结果不能保存,清理恢复可锁死,收益不足以接受这些损失。

已检查四个文件及 run/serve/source 调用链,没有渲染页面、布局或 viewport 变化;这是现有 benchmark CLI 的依赖选择与恢复路径。

未运行真实 native HTTP 服务、Docker/E2B 清理、模型、付费研究或完整 checkpoint restore;46 个 skipped 测试保持未验证,未把聚合 skip 数当作逐项资格;并发反例使用未改写的真实方法 AST 与 synthetic backend。

没有执行 merge 或 dismissal;benchmark-sensitive hold、stale quality receipt 和单独的 merge readiness/authorization 仍保持各自边界。此处是对 1dbb6103518cd25918f0fc9af2aa146181157a1a 的独立代码结论,既不把测试数当作交付,也不把依赖版本更新当作研究效果证明。

English verdict: REQUEST_CHANGES for #78241dbb610. Preserve non-finite checkpoint support and fix the selected provider's cleanup lock cycle; CI was not consulted.

Signed-off-by: huangruiteng <huangrt01@163.com>
@huangruiteng

Copy link
Copy Markdown
Collaborator Author

Resolved both review blockers at exact head a01d7ba9f01f3eda3f2c88d740ba5eff7430a19d.

  • The default source now points to EdgeBench 118f9257d39c71d0805bb5b9cd4eb85d13a1e6d2. That commit contains the cleanup lock-order repair and deterministic two-failure concurrency regression from EdgeBench #22.
  • The default restores the versioned nonfinite-checkpoint-v2 compatibility patch, so persisted checkpoint capture/readback remains lossless for Infinity, -Infinity, and NaN.
  • The ordinary HTTP feedback regression matrix from fix(benchmark): restore non-finite native feedback delivery #7828 is included, while this PR's literal canonical URL validation remains in place.
  • The immutable production-source oracle now checks the reviewed revision and compatibility-patch digest as one pair.

Validation on the exact head:

  • benchmark/tests/test_edgebench_source.py benchmark/tests/test_checkpoint_judge.py: 50 passed, 20 explicit environment skips.
  • Standard premerge: direct checks and Python compile passed; 10/10 catalog canaries, 8/8 risk-profile smokes, and the public-boundary scan passed.
  • The gate remains manual_review_required only because this is a benchmark-sensitive change. I did not merge or dismiss the maintainer hold.

English verdict: READY_FOR_REVIEW at a01d7ba9f01f3eda3f2c88d740ba5eff7430a19d; both previously reported regressions have focused negative controls and pass.

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent; gpt-6.1-sol; OpenAI; runtime_reported; reasoning effort: max

动机 / Motivation

需要准备新 cohort(共享一份 judge/worker 源码的实验组)或继续已有 cohort 的 EdgeBench 运行者。 旧默认源码会让含非有限分数的普通反馈返回错误;启用常见 HTTPS→SSH Git rewrite 又会把完整源码误判为漂移。当前新 cohort 改用已修复的 provider,并保留非有限分数 checkpoint 补丁;已有 cohort 继续原样离线复用。

新默认的普通反馈能区分失败的非有限分数、有效零分和缺失分数,checkpoint 保存与重读保持数值及剩余机会,清理失败仍能继续重试。 本次交付仅更新源码选择和已存在反馈/保存路径的兼容性,不启动实验,不更改原生评分、预算或机会,也不认定真实 Docker/E2B 隔离、宿主采用或科学收益。

改动思路 / Approach

源码选择与冻结继续由 source.py 拥有,HTTP 表示和会话并发继续由 native Judge 拥有,持久化非有限数值继续使用已有 versioned patch;直接修正 canonical URL 读取,避免增加平行配置、codec 或状态 owner。 当前 PR 边界是新 cohort 的已复核源码/补丁组合,以及已有 cohort 的可靠复用;不迁移旧 receipt,不安装或启动运行中 worker。

这次重新检查了整个 proposal,而非只继承修复声明:LoopX 五文件 diff,以及 provider 从 e278 到 118f 的完整改动。HTTP 使用显式字符串表示非有限数值,服务端原始分数不变;原生 checkpoint 使用已有可逆编码,二者承担不同合同。并发清理先释放全部 session operation locks,再把失败会话重新放回 registry,使状态读取不会把两个锁的等待方向接成环。

下表是本次实际运行结果的比较,不是架构示意:

边界 已接受 base 上次被拒 proposal 当前 head
默认来源 e278 + v2 patch 2e29,unpatched 118f + v2 patch
原生 finite/Inf/-Inf/NaN capsule 4/4 lossless 仅 finite;其余 ValueError,无 capsule 4/4 lossless,严格 JSON、同 ID 重试不变
双清理失败并发 status 完成且 registry 可用 两线程阻塞、registry 不可用 完成、保留失败会话,随后成功重试

具体改动 / Changes

审查对象为 7824@a01d7ba9f01f3eda3f2c88d740ba5eff7430a19d,实际 merge base 为 73cf83edd6d80275d0c8f44c5289837eebe8ab0d;不是队列时刻可移动的 main。验收依据是 benchmark/edgebench/README.md#select-and-freeze-the-native-provider,规范 revision 为 73cf83edd6d80275d0c8f44c5289837eebe8ab0d,先于 implementation 阅读。

本评审用以下索引对应原有条款:freeze_existing_cohort implemented,旧 cohort 不 fetch、不重 pin,dirty/moved/conflict/缺失 receipt 继续拒绝;nonfinite_checkpoint_pair implemented,当前源码与原 nonfinite-checkpoint-v2 一起通过原生持久化反例;explicit_unmodified_source implemented,显式新选择仍为 unmodified v1,已有来源的选项只作匹配断言。这些索引是条款标记,没有新增 RFC 义务。

关键代码讲解

  1. source._validate 读取 git config --local --get remote.origin.url,用实际保存的 canonical URL 与 receipt 比较。正常 rewrite 从旧 exit 2 变为 0;把真实 remote 换成另一地址再 rewrite 回 canonical,则从旧 exit 0 变为 2。两边都检查完整 stdout、stderr、exit 和冻结来源不变。
  2. source.prepare_source 先复用已冻结目录,再为新隐式 cohort 读取唯一 default pair。实际准备产生 upstream 118f9257d39c71d0805bb5b9cd4eb85d13a1e6d2 和 effective cedd08b962f6eae25b0825bb47a7031626d13dc2,第二个新目录得到完全相同 receipt。显式指定同 upstream 则得到未打补丁的 v1;现有 patched cohort 仍离线保留原 commit。
  3. ordinary feedback regression 走 native result/history 与 feedback relay 的真实 loopback HTTP,不以 checkpoint-only codec 代替普通反馈。Inf、-Inf、NaN、0、None 五种输入均通过;确认仍剩两次提交、cooldown 未被读操作消费,journal digest 绑定实际响应。相同五项施压到 immutable base provider 时,三个非有限项失败、0/None 两项通过。

复核上游 118f9257d39c71d0805bb5b9cd4eb85d13a1e6d2 的 session allocation、step/status/close/destroy/close-all、归档与普通反馈投影;native checkpoint 明确不支持 game task。没有增加 LoopX CLI、重复 codec 或新的泛化状态 owner。

对主干的风险 / Risks

未发现当前 head 的阻塞代码问题。 上次 review 5728966335 的两项 P2 已由独立反例确认修复:真实 JudgeCheckpoints.capture/_packet 在四种分数下保存嵌套 metrics、marker-shaped 普通数据、incumbent 与 next-agent/max/cooldown;旧 proposal 的三次 ValueError/no-capsule 和死锁失败保留为负面对照。并发检查使用实际 native 方法,cleanup/容器镜像元数据为合成边界;修复后两次失败都有错误详情,registry 可用,后续重试成功且只归档两次。没有据此声称真实 E2B/Docker 生命周期已全面资格化。

PASS:12 组同 fixture 的真实 source CLI 对照,其中 10 组完整输出及退出状态一致,2 组为上述明确修复;没有 fetch 或改写冻结 receipt/patch/source。CLI 输出未删字段或截断后比较;仅 fixture 指纹排除了预期锁文件、Git index stat cache 和 reflog 时钟,staged identity 另行精确比较。初版私有 oracle 把这些 Git 记账差异当成源码变化,已识别并保留记录,不归因为产品回归。

PASS:当前 focused suite 110 passed、6 skipped,immutable base 104 passed、6 skipped;native 新增/相关检查 6 passed,既有 checkpoint/failure/feedback 检查 98 passed。Premerge 的 5 项 direct 与 10 catalog、8 risk-profile、1 public-boundary 检查通过;changed-path Ruff 通过。语义 advisory 未发现受支持的新 carrier,但这不等于覆盖所有语义形式。两笔提交都有 DCO sign-off。

UNVERIFIED:6 skips 中 3 项缺 Harbor,3 项要求显式 isolated Docker;真实容器隔离、Harbor restore、已安装宿主/模型采用与科学效果没有执行。Premerge 整体 exit 1 / manual_review_required,direct/run failure 都为 0,benchmark-sensitive maintainer 门保留。CI 按本次合同未查询、未等待;这不是 CI 通过结论。当前 PR description 仍叙述旧 2e29/no patch,建议改为当前 pair,避免和已更新 README、修正 comment 冲突。

语义与 CI 对齐

复用既有 edgebench_source_v1/v2 与 compatibility patch 合同,default 更新只覆盖新隐式 cohort;v1/v2 持久化读者和显式源保持。HTTP 字符串投影不改变服务器原始 numeric state、native selector 或机会。Source provenance 是入口强校验,文档没有把它称为可忽略 guidance;没有新通用 Goal/work-lane 义务或更宽的执行权限。

我的整体评价 / Verdict

这个小范围兼容性修复交付了可用结果:普通反馈能读、旧来源能复用、恢复点不会因失败分数丢失、失败清理仍能前进。long_horizon 为 improved,限于保存/重放及重试连续性;user_experience 为 improved,既有一轮入口直接完成正常操作,无新增确认或重输。已检查 source CLI、serve/run/online_judge 接入和 README;未修改渲染页面或前端布局,本次无需截图。 未执行真实 Docker/E2B、Harbor 恢复、已安装宿主交互或科学效果验证;这些不由本次本地合成边界验证建立。

改动成本与已证实的失败相称;bounded refactoring 已用直接 canonical lookup 复用既有 owner,没有无关抽象。保留 v1/v2 的理由是实际持久化重放,不是保留任意旧请求形式。旧 review 的失败历史保留,APPROVE 不代表 dismiss 旧意见、合并权限、取消人工门或实验推广;exact-head closeout/readiness 另行读回。

English verdict: APPROVE this exact head for the bounded source/feedback/checkpoint compatibility fix. Live environment qualification and maintainer merge gates remain separate.

@huangruiteng
huangruiteng merged commit 07149df into main Nov 1, 2026
30 of 38 checks passed
@huangruiteng
huangruiteng deleted the codex/edgebench-default-integration-20261101 branch November 1, 2026 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants