Skip to content

Record per-case Docker image observations in EdgeBench - #8377

Open
loopx-agent wants to merge 4 commits into
mainfrom
codex/edgebench-image-inventory-20261109
Open

loopx-agent wants to merge 4 commits into
mainfrom
codex/edgebench-image-inventory-20261109

Conversation

@loopx-agent

@loopx-agent loopx-agent commented Nov 8, 2026 •

Copy link
Copy Markdown
Collaborator

Goal and delivered outcome

EdgeBench workers already inspect their two required local Docker images during preflight. The runtime receipt now retains each image's ID and logical size from that lookup. The local inventory command groups selected receipts by task specification, role, and image ID, so operators can distinguish a new image version from another run on the same image.

The owning boundary is the EdgeBench runner and its SForge Docker adapter. Target branch is main.

Author declaration

  • Written by Codex, an OpenAI model agent.
  • Implemented against the runner request above and the native source boundary in benchmark/edgebench/README.md.
Criterion Disposition Owner Validation
Record work and judge image ID and logical size in the run receipt Implemented run.py, RecordingDockerBackend.observe_local_images Actual worker preflight and Docker inspection
Keep versions and roles separate, preserve the absence of historical observations Implemented image_inventory.py Report CLI with mixed receipt generations and synthetic retags
Reuse the local lookup and preserve the missing-image gate Implemented RecordingDockerBackend.observe_local_images One-lookup regression and real missing-image check

Scope and continuation

This is an operator diagnostic. It reads explicit log roots and exposes only the inventory projection. The observed values describe the worker host at preflight. Remote evaluator provenance, incremental disk usage, and runtime memory require their own measurements. Admission, scoring, and the public score export keep their existing behavior.

Validation

  • Tested revision f7fad04f0a52693997b1ae0cd3430060e71c413d.
  • Run state finished. Input classes synthetic and authorized_private_read_only.
Check kind Result Public-safe evidence
Static Passed git diff --check and the bilingual RFC diff check.
Unit and integration Passed 181 focused runner tests on Linux, including the existing warm-start and failure routes, the receipt write, and legacy inventory reads.
Real entrypoint and backend Passed Two existing task specifications passed benchmark.edgebench.run.main preflight on Linux with Docker 29.5.2. Both roles' IDs and byte counts matched Docker image inspection. The harness intercepted native dispatch, so the check created no containers and made no model calls. A missing image was rejected on the same daemon.
Manual Passed python -m benchmark.edgebench.image_inventory --log-dir ... grouped the two observations and counted older receipts separately.

Frontend and visual evidence

  • UI impact none. The change is a local runner receipt and read-only command.

Type and area

  • Feature, documentation, and tests in the benchmark boundary.
  • The patch and description contain generalized code and evidence summaries.
  • No paired RFC changed. The bilingual check passed.
  • The commit carries a DCO Signed-off-by trailer.

Review follow-up

The author update counts a cyclic receipt path once, including when an input root is repeated. It continues to inventory other readable receipts and skips resolved targets outside the selected root.

  • Revision fb0097da06a19794f1bb1b2a87f3821cbb2f8718 includes the current main base 73e49c4889774effa019c197fc8958d9f7505efb.
  • The real inventory command reproduced the crash on Python 3.12 at the reviewed head. The updated head produced the same bounded result on Python 3.12, 3.13 and 3.14, including one cycle and a link outside the input root.
  • Seven focused tests passed, including the module budget check on the current base. The optional SForge/Harbor-dependent preflight test was skipped in this local environment. The real Docker preflight evidence above covers the original image-capture change.
  • Standard premerge selected 19 automatic checks with zero failures and reported manual review required. Review and remote checks for the updated head are pending.

Resolved receipt path follow-up

The author update checks the resolved runs/<run>/<case>/runtime-receipt.json layout and selected case before reading a file. It still deduplicates a same-case alias and counts a cyclic path once. The in-root cross-case link, sidecar JSON, and misplaced receipt fixtures pass on Python 3.12, 3.13, and 3.14 with and without the task filter.

Revision 59aacc21b9b5d58fa6c3f410ec87d000040b7d4f passed the focused inventory suite with the pinned SForge and Harbor dependencies. Standard premerge ran five direct and 19 automatic checks with zero failures and retained the manual review gate.

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator Author

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

Request changes conclusion (author-owned PR; GitHub blocks formal self-review)

评审提交 f7fad04f0a52693997b1ae0cd3430060e71c413d,对照 PR 基线 3edaf9c25a56c9d714b097f2d6fee6ffabbd629d。

动机 / Motivation

同时查看多次 EdgeBench 运行的操作者,需要区分同一任务的工作镜像和评测镜像,以及标签实际指向的版本。 原 preflight 只验证镜像存在,运行回执缺少镜像 ID 和逻辑大小。之后遇到标签改指向时,操作者需要另行查证该次运行读到的镜像。

当前提交把检查时读到的镜像 ID 和字节写入回执,并提供按任务版本、角色和镜像 ID 汇总的本地清单。 记录描述 worker 当时连接的 Docker daemon 的观测,沿用既有准入,清单只读用户指定的运行目录。 在受支持的 Python 3.12 上,一条循环符号链接会中止整份清单,其他可读回执也得不到结果。

改动思路 / Approach

run.main 在派发 worker 前验证任务所需镜像。现有 SForge backend 已通过 Docker SDK 读取同一个对象。复用现有 Docker SDK inspect 与 runtime receipt,镜像观测和后续汇总都只保留本层拥有的数据。 预检继续拥有缺镜像的准入结果,清单在逐回执校验和汇总处处理读失败。 已保存的版本只描述预检当下的镜像,之后标签变化和远端 evaluator 的来源仍分别判断。

具体改动 / Changes

12 个文件,+228/−13。生产变化集中于 backend 的读取结果、原回执与清单入口,其他路径是文档和已有 runner 测试适配。

关键代码讲解

  • observe_local_images 对相同镜像 key 复用一次 images.get,分角色写入 ID 与逻辑大小,缺 Size 时记录未知。实际 run.main 加 Docker SDK 回环响应的三组对照通过。共享 key 从两次 GET 降到一次,两版缺镜像时都在派发前返回同一错误。 Docker observation, Receipt writer
  • [P2] 隔离单条回执的路径解析失败。 inventory 在逐文件异常处理前执行 path.resolve()。同一选定根放一条正常回执和一条循环链接,Python 3.12 的实际模块入口抛出 RuntimeError,整个清单退出。Python 3.13 和 3.14 读出正常 case,并计一条 unreadable。只隔离单条路径解析的对照在 3.12 也得到这份结果。请保留解析后的根边界检查,并给支持版本补混合回执反例。 Inventory path

native-image-observation 已实现,现有预检保留观测并维持缺镜像拒绝。legacy-and-malformed-inventory 尚未满足,旧回执的缺字段可读,单条损坏路径仍可使整份清单失败。remote-and-physical-qualification 留待另行验证。 Existing worker contract

对主干的风险 / Risks

在固定 SForge 源码和本地 Harbor 环境中,八个受影响测试文件通过 585 项,跳过 5 项。标准 premerge 通过 5 项直接和 19 项自动检查,保留 benchmark 手工门。基线尚无新清单模块,故 3.12 的失败由新增入口引入;实际 runner 的缺镜像对照在两版成立。Docker SDK 对照在回环服务完成,覆盖请求次数、错误映射和回执写入。本机 daemon 当前不可用,真实镜像的验证仍以作者提供的独立平台证据为限。 Shipped fixtures

我的整体评价 / Verdict

请求修改。现有镜像观测、旧回执统计及读范围足以支撑这项诊断。先让损坏的单条回执按路径计为不可读,并继续输出同目录的有效结果。修复后在支持的 Python 版本上复核相同混合输入。

English verdict: REQUEST_CHANGES. A single cyclic receipt symlink aborts the entire inventory on supported Python 3.12. Keep readable cases and report the failed path independently.

raise ValueError(f"Expected an EdgeBench log directory: {root}")
for path in root.glob("runs/*/*/runtime-receipt.json"):
if task is None or path.parent.name == task:
receipt = path.resolve()

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

[P2] 隔离单条回执的路径解析失败

path.resolve() 在逐回执异常处理外。将一条正常回执与一条循环符号链接放入同一个日志根,受支持的 Python 3.12 上,实际清单命令抛出 RuntimeError 并丢失所有结果。将失败隔离到单条路径后,同一 fixture 会输出一个有效 case 和一条 unreadable。请把该异常归到单条回执,保留解析后根目录边界,并补 3.12 的混合输入回归。

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
…-inventory-20261109

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator Author

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

Request changes conclusion (author-owned PR; GitHub blocks formal self-review)

动机 / Motivation

同时查看多次 EdgeBench 运行的操作者,需要区分同一任务的工作镜像和评测镜像,以及标签实际指向的版本。原预检只检查镜像是否存在,运行收据缺少镜像 ID 和逻辑大小。当前提交保存镜像观测,并在旧收据和循环链接并存时继续输出可读结果。评审覆盖已有预检、运行收据和用户选定任务的只读清单。同一日志根内的链接仍可越过任务筛选并让非收据进入清单。

改动思路 / Approach

复用现有 Docker SDK inspect 和运行收据,在清单 owner 内收紧解析后的路径。评审覆盖已有预检、运行收据和用户选定任务的只读清单。原 worker 保持所需镜像的准入,清单按显式日志根和任务选择收据。既有 worker 契约和本次 CLI --task 的参数语义共同约束结果。 基线 worker 契约

具体改动 / Changes

评审 fb0097d 对 73e49c4 的 12 个路径,+239/−13。native-image-observation 已在实际 runner 与 Docker SDK 的回环 HTTP 上通过。 legacy-and-malformed-inventory 的旧收据、循环和根外链接已复测,根内跨任务及非收据链接仍失败。remote-and-physical-qualification 需要独立的真实 daemon 与 evaluator 证据。

关键代码讲解

  • observe_local_images 保持缺镜像在派发前失败,并按角色返回 ID 和逻辑字节。相同 key 只发一次 GET,未知大小保留为 null。固定 SForge 后端和实际 Docker SDK 的三组回环对照通过。 预检 · 运行收据
  • inventory 在路径解析前按逻辑父目录匹配 --task。循环链接现在按单条不可读统计,重复根保留一次。解析后仍需校验物理收据路径和任务。 路径选择 · 上一版循环问题

对主干的风险 / Risks

P2 · 根内链接绕过任务与收据筛选。 在同一选定根保留正常的 case-a 和 case-b 收据,再在 case-a 路径下放两个名为 runtime-receipt.json 的链接,分别指向 case-b 的收据和一个能通过内容检查的普通 JSON。Python 3.12、3.13、3.14 的实际 CLI 都以 0 退出,--task case-a 同时输出 case-a、case-b 和普通 JSON 中的 sibling-case。省略 --task 也会纳入普通 JSON。解析后只检查根目录包含关系,后续内容检查已使用目标路径的父目录。请在读文件前核对解析后的 runs/<run>/<case>/runtime-receipt.json 和选定 case。只加这项校验的独立对照在三个版本均通过,循环仍计一次。 准入分支

我的整体评价 / Verdict

请求修改。已修复上轮 Python 3.12 循环导致整份清单退出的问题。本轮 585 项受影响测试通过,5 项跳过。standard premerge 的 5 项直接检查、19 项自动检查通过,benchmark 手工门仍在。当前需要完成收据与任务路径校验。真实 Docker daemon 与远端 evaluator 留待对应环境核验。

English verdict: REQUEST_CHANGES. In-root symlinks let the inventory include other tasks and non-receipt files after filtering. Revalidate the resolved receipt layout and task before reading.

Comment thread benchmark/edgebench/image_inventory.py Outdated
except (OSError, RuntimeError):
unresolved_receipts.add(path)
continue
if receipt.is_relative_to(root):

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

[P2] 解析后校验收据路径与所选任务

筛选在解析前检查逻辑路径的父目录。若 runs/alias/case-a/runtime-receipt.json 链到同一根下 runs/other/case-b/runtime-receipt.json,--task case-a 会返回 case-b。同样可读入一个符合 JSON 内容检查的非收据文件。实际模块在 Python 3.12、3.13、3.14 都复现。请在读文件前核对解析后的标准运行收据路径和任务。混合正常收据、两个根内链接、根外链接和循环的对照应只返回选定 case,且循环只计一次。

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator Author

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

Approval conclusion (author-owned PR; GitHub blocks formal self-approval)

动机 / Motivation

比较多次 EdgeBench 运行的操作者,需要知道同一任务当时用了哪一个工作或评测镜像。原预检只确认镜像存在,运行收据没有记录镜像 ID 或逻辑大小。上一版清单还可能沿根内链接读到其他任务或非收据文件。当前提交保留每个角色的观测,并在读取前核对解析后的收据路径和任务。评审覆盖本地预检、运行收据及按显式日志根和任务筛选的只读清单。实际容器运行、远端 evaluator、磁盘增量和内存占用须另行测量。

改动思路 / Approach

复用 Docker SDK 的既有预检和运行收据,在清单内校验解析后的标准路径及任务。评审覆盖本地预检、运行收据及按显式日志根和任务筛选的只读清单。已有收据保留缺失字段的含义,镜像逻辑大小用于版本盘点;缺镜像仍在派发前拒绝。

具体改动 / Changes

评审 59aacc2,PR 基线 73e49c4,12 个路径,+270/−13。实际主干 c44eb15 在这些 runner 路径上无额外改动,合并树干净。对照 既有 worker 契约:native-image-observation 和 legacy-and-malformed-inventory 已独立验证,remote-and-physical-qualification 留给相应环境。

关键代码讲解

  • observe_local_images 复用已有 SDK 查询,把工作和评测镜像的 ID、逻辑大小写入原运行收据。实际 runner 与 Docker SDK 的回环对照读到两种角色、64 字节与未知值;相同标签从两次查询变成一次。两版缺镜像都在派发前退出,且未产生运行收据。预检 · 运行收据
  • inventory 在解析链接后核对 runs/<run>/<case>/runtime-receipt.json,目标仍须属于原日志根和选定 case。相同 case 的别名按同一收据去重,循环路径单独计为不可读。正常旧收据仍计入缺少预检观测的行,版本和角色保持独立。清单

对主干的风险 / Risks

同一份混合日志在 Python 3.12、3.13、3.14 上重放。上一版 --task case-a 返回 A、B 和旁路 JSON;当前仅返回 A,取消筛选后仅返回 A 和 B。循环仍计一次,根外链接与错放的文件都未进入清单。两处历史发现均有对应证据:循环 · 任务范围。八个受影响模块共 586 项通过、5 项跳过,standard premerge 的 5 项直接检查和 19 项自动检查通过,benchmark 人工门仍单独保留。

我的整体评价 / Verdict

认可当前提交。收据可以区分镜像版本,清单按选定任务读取,原生准入和评分边界不变。独立验证使用固定的 SForge、真实 Docker SDK 与回环 HTTP,覆盖实际 runner 到收据;实际容器运行、远端 evaluator、磁盘增量和内存占用须另行测量。

English verdict: APPROVE. The current head preserves native image admission, records role-specific local metadata, and restricts the inventory to canonical receipts for the selected case across supported Python versions.

This branch has not been deployed

No deployments
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.

1 participant