Repository navigation
fix(benchmark): attest the effective stop hook profile - #7294
huangruiteng wants to merge 1 commit into
Conversation
Signed-off-by: huangruiteng <huangrt01@163.com>
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · gpt-6.1-sol · OpenAI · runtime_reported · max
REQUEST_CHANGES — d2f8daa9246df868bf85e0e14dc0684a7f808e39,实际基线 a9a720db5ef77f52ac9a3c1e59be7df324149aa6。
动机
运行五种 EdgeBench worker profile 的维护者需要让签名协议的停止钩子声明与实际安装行为一致。 原实现让四种非 official profile 继承 Codex 的 stop-hook 标记;当前实现按现有 profile 分支清除标记,使新协议声明与安装事实一致。 当前集成 provider 的协议和共享回调对照通过;但新测试在仍有文档说明的旧 provider 上新增五项 ImportError,兼容测试边界需要修复。
本次不运行 benchmark、模型、容器或评分,不重写历史凭证,也不改变停止、继续执行或研究准入权限。 剩余缺口是分离或按能力限定新协议断言,同时保留旧 provider 上原有五种 profile 的独立覆盖。 生产改动本身是有价值的事实修正:协议哈希存在并不能证明声明真实,声明必须对应实际 hook owner。
改动思路
声明沿用实际安装 hook 的既有 profile owner;一条赋值即可修复,无需新增协议、配置或安装规则。 真实 provider 在 disable_stop_hook=false 时按共享回调安装 worker,并不会因为 agent.stop_hook=None 就跳过回调。独立通过实际 _runtime_protocol 和 _install_tools 做了基线、当前各十组对照:四种非 official 的启用声明由 true 变 false,其他协议字段与全部回调调用次数相同。
声明沿用实际安装 hook 的既有 profile owner;一条赋值即可修复,无需新增协议、配置或安装规则。 新测试应把较新 SDK 的协议断言与原 profile 覆盖分开。交付边界是新运行的停止钩子声明修正;先修测试的 SDK 能力边界,保留 maintainer hold,不将单个元数据字段视作完整实验认证。
具体改动
完整两文件差异 +17/-2。SForgeWorker.__init__ 在现有 resume 策略旁设置 stop-hook 标记;整个生产 AST 去掉这一条赋值后与基线完全相同,安装、命令、receipt 和预算逻辑未改。测试覆盖五种 profile,并将已有错误匹配从 context_delivery 修正为实际的 native_goal_continue;这确实修复了两项旧断言失败。
关键代码讲解
SForgeWorker.__init__:222从已有 profile 派生 marker,保留 official 的基类值;不以“回调存在”推断 hook 已装。install_stop_hook:224仍是所有 profile 的共享 setup;_install_worker的 official 分支才调用基类 hook,其他安装/凭证逻辑未改。test_only_official...:86的新私有导入先于原断言执行,因此现代 SDK 通过不能替代旧固定 SDK 的覆盖。
[P2] 按 provider 能力分开新协议断言,保留既有 profile 覆盖。 benchmark/tests/test_sforge_runtime.py:86 现在无条件导入私有 _runtime_protocol。仓库文档仍说明的固定兼容 provider 071a884012754127f28f5b84be10f533a42db527 没有该函数;importorskip("sforge") 只验证包存在,不能验证这个新能力。同一 SDK、Python3.12、Harbor0.20.0、相同五项选择下,修改前 5 passed,当前 5 项 ImportError,尚未运行原有 continuation/profile 断言就失败。
最小修复是继续独立检查 marker/continuation,把新 builder 集成断言拆出并按其真实能力或明确固定的依赖限定。不要整组跳过旧五项覆盖,也不要为过测试重定向冻结实验。这个 finding 针对新测试兼容边界,不是发现生产 callback 被跳过。
依据修改前 benchmark/edgebench/README.md,版本 a9a720d:Worker profiles 规定 official-only hook;Select and freeze the native provider 规定固定来源及 caller-managed 兼容入口。前项通过实际 owner 验证,后一项的新增测试依赖仍需明确。benchmark/README.md 也保留了071a provider 的资格说明;较新的签名协议能力应单独限定。
对主干的风险
- 在公开集成 provider 7589eba864f24e1eb2bdf63f3dfc42881c755832 的隔离环境中,当前 focused suite 294 passed / 0 skipped。这是实际 provider builder 的结果,不是作者测试数字的转述。
- 实际原生 builder/安装 helper 基线与当前各 10 组:所有 profile、禁用开关、完整其他字段和共享 callback 次数保持,仅四个预期标记改变。底层安装 IO 使用 recording backend,未启动容器、模型或作业。
- 旧固定 SDK 的完整同模块:基线 290 passed / 4 failed,当前 287 passed / 7 failed。其中五项 private-import 失败为新增,两项旧错误匹配已修复,另外两项既有 attestation-config API 失败仍保留。没有把整套旧 SDK 称作原先全绿,也不把这两项旧失败归给本 PR。
- standard premerge 5 项直接检查、9 项选中检查通过;汇总仍为 manual_review_required,有1个
benchmark_sensitivemaintainer hold。精确 scope FAILcqr_79c1455a8b2b22da0ac7,失败未降为 optional 或洗绿。本轮未查询、轮询或等待 CI。
此改动修正新运行的描述性凭证,不修订历史签名、评分、权限或任务语义。真实 hook 文件、签名运行和科学效果仍须其拥有者在被授权的作业中资格化;本评审没有启动它们。
我的整体评价
声明沿用实际安装 hook 的既有 profile owner,一条赋值已经足够;新测试应把较新 SDK 的协议断言与原 profile 覆盖分开。交付边界是新运行的停止钩子声明修正;先修测试的 SDK 能力边界,保留 maintainer hold,不将单个元数据字段视作完整实验认证。 生产修复可保留,先完成这个可逆且局部的测试边界修复,再复跑两个固定 provider 的相关矩阵。
已追到 worker、原生协议 builder 和安装回调;没有修改页面、控件或布局,视觉审阅不适用。 未验证范围:未执行真实 Docker、模型或签名端到端作业;这是源码及受控 provider 调用边界的资格。
English verdict: REQUEST_CHANGES — d2f8daa9246df868bf85e0e14dc0684a7f808e39 correctly fixes effective stop-hook metadata and retains shared setup;294 tests and the real native10-case-per-revision matrix pass on the modern provider. However, an unconditional private builder import makes five existing profile cases fail on the documented071a compatibility SDK (base5 pass/head5 ImportError). Keep baseline profile coverage independent and capability-qualify the newer protocol assertion. Two unrelated old-SDK config failures and the benchmark maintainer hold remain explicit.
SForge signs
agent.stop_hookinto its runtime protocol, but every LoopX EdgeBench profile inherited Codex's class-level stop-hook marker even though LoopX installs that hook only for theofficialprofile. Native Goal runs therefore produced signed attestations claimingstop_hook_enabled=truewhile their worker receipts correctly saidstop_hook=false.Set the effective marker per profile so signed protocol evidence matches the installed behavior. The shared setup callback still runs for every profile, so this does not change worker installation or solver behavior. The regression test exercises SForge's real protocol builder across all five profiles; it also corrects a pre-existing mismatched error assertion exposed by the full focused suite.
Validation:
294 passedinbenchmark/tests/test_sforge_runtime.pyagainst the pinned SForge integration checkout.