Repository navigation
fix(benchmark): enforce shared deadlines within Docker archives - #6714
Conversation
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
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)
HEAD: 55bb3c700cd28318f28d48f77f976437d9f7fd72
动机
显式捕获研究检查点、需要在原截止时间内恢复暂停 writer 的 Docker checkpoint 调用者。旧 Docker SDK process-stream helper 会取消 socket read timeout;控制器只在组件之间检查绝对时钟。单个持续传输的大归档或本地 tar 解包可能继续耗用原本应已到期的捕获窗口。本头让原截止时钟贯穿下载、完整 tar 清单验证、内容读取、过滤和权限恢复,并先关闭当前 daemon reader,再进入既有 writer 恢复;错误或超时不会发表更晚的 native 点。
原验收来自不可变版本 docs/architecture/rfcs/hierarchical-agent-stride-control-v0.md#77-worker-research-state-and-decision-freeze,revision cd148933bb0cb00232cb3cc494f898a171ffe36c;并对照既有 overall roadmap 的 app-first、S5 和执行/评审契约。逐项判断:original_clock:§7.7: one original capture/phase clock, no late substituted point.(implemented);complete_inventory:§7.7: preserve every declared component/witness and validate before accepting.(implemented);writer_ownership:§7.7: control the owned writer barrier and verify release before publishing.(implemented);full_research_continuation:§7.7: mechanical capture does not qualify full native continuation or research gain.(deferred)。
不启动 benchmark 作业,不放大90/30秒原生预算,不把文件快照当作进程/会话恢复,不补采错过的研究点;检查发生在有界 IO 之间,不是任意阻塞文件系统调用的硬抢占保证。完整23,117文件共享卷、真实 Codex 原生接续和长期研究收益仍未资格化;作者报告的六阶段小夹具结果未在本轮重新执行,不能并入本次独立证据。
改动思路
Python 保留 Docker 专属 IO 适配,状态与封存决策仍归既有 typed owner。全清单先验证、再解包;相同 absolute clock 下的读取检查使最可能的下一处 IO 修改有一个局部落点。这是可独立回滚的 provider IO 正确性修复,已跑真实 Linux daemon、原生 HTTP provider 与 typed artifact 路径;更广研究资格并不由本 PR 关闭。
具体改动
4 paths,+269/-19:64 changed Docker provider lines, focused existing archive/worker tests and11 README lines. No new shared protocol owner or runtime module.Use the same remaining deadline for the archive HTTP request and progress checks. Keep full pre-extraction validation and data_filter; preserve ordinary modes, SQLite WAL/journal and original cleanup/seal ordering. No new activation or authority state.
关键代码讲解
_ArchiveReader.read:Checks the same absolute clock around raw tar reads._archive:Owns the HTTP response and retains its read timeout, full inventory validation and mode restoration._archive_component:Carries the same clock through SQLite companions.capture_worker:Passes the original clock through held handoff, components and phase; existing finally restores the owned writer.
对主干的风险
未发现本边界阻塞。Current macOS archive transport19 passed. Current ordinary-user Linux Docker/HTTP native-provider path95 passed in172.48s, including worker/controller and archive modules,0 skips;33 owned containers removed,0 leaks, owned Effect namespace stopped. Same source/fixture negative pair: base2 failed, head2 included in95 passed. Independent no-deadline archive pair retains identical full bytes/modes, rejects the linked inventory before extracting any payload and closes both readers.
On immutable base the download case observes the SDK socket timeout becoming None, and the file-copy case consumes16,842,808 bytes before checking. Head refuses progress on the original clock across download/header/file/filter/mode cases; cancellation, lost transport, disk-full, linked/special/traversal entries and cleanup failures remain errors. These are correctness counterexamples, not measured speedups or a hard filesystem preemption claim.
No new user-facing switch, field or implicit capture. Existing callers still opt into capture through the same owner. No-deadline bytes/modes, unsafe inventory rejection and request arguments match in the same fixture. Direct response.iter_content intentionally retains SDK inactivity timeout even without an explicit deadline; this disclosed transport correction replaces process-stream timeout disabling.
标准premerge为5项直接检查及19项选择检查通过;命令因既有benchmark_sensitive手工评审hold返回1,不能写成绿色合并gate。source advisory先于full-tree语义检查;四路径公开扫描、双语检查及1个DCO提交通过。Linux使用已存在隔离daemon、Python3.12/Node24和固定原生provider071a884,不启动VM、不拉镜像、不运行模型;该原生HTTP测试仍是合成 evaluator,不是真实Codex会话恢复。原基线两项新反例失败和当前95项通过是不同命令,保留各自范围。
不启动 benchmark 作业,不放大90/30秒原生预算,不把文件快照当作进程/会话恢复,不补采错过的研究点;检查发生在有界 IO 之间,不是任意阻塞文件系统调用的硬抢占保证。完整23,117文件共享卷、真实 Codex 原生接续和长期研究收益仍未资格化;作者报告的六阶段小夹具结果未在本轮重新执行,不能并入本次独立证据。
本轮发布结论后的精确头合并就绪检查:merge_state=DIRTY、mergeability=CONFLICTING,ready=false,原因是 merge_state_requires_update。当前代码批准保留;须由作者处理与最新 main 的冲突,再按新头重新验证和评审。benchmark_sensitive 手工 hold 和独立合并授权也继续保留。
我的整体评价
APPROVE。有界重构是一个私有 reader 包装和原 _archive 内聚的 clock check;复用原 native/typed owner,避免第二清单、另一份 deadline 或通用框架。这是可独立回滚的 provider IO 正确性修复,已跑真实 Linux daemon、原生 HTTP provider 与 typed artifact 路径;更广研究资格并不由本 PR 关闭。 benchmark手工hold与单独的维护者合并授权仍保留。
English verdict: APPROVE - HEAD 55bb3c7; original deadline, full-inventory rejection and reader/writer cleanup verified on current real Linux Docker/native HTTP/typed-owner path (95 passed) plus19 macOS cases. Benchmark manual hold and full native/research qualification remain separate.
|
This pull request has merge conflicts with Choose the remote for the base repository, not an out-of-date fork. git fetch upstream
git rebase upstream/main
# Resolve each conflict, git add the resolved files, then git rebase --continue.
git push --force-with-lease origin HEADFor a same-repository clone whose Keep the DCO |
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
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)
HEAD: 641b90cbaff3782ea78dd4c427a5c2394e46b754
动机
这是对已合并版本的补审。641b90c 于本次审阅前已合并;读取到的唯一公开评审绑定 55bb3c7,因此不能把旧批准当作本次集成版本的记录。非阻塞的流程发现是缺少新头审阅记录:本条补齐当前版本审计,后续 head 更新应重新经过精确版本审阅;补审不能倒写成“合并前已验证”。当前没有发现阻塞代码问题。
代码目标仍是让 Docker 归档遵守原有共同期限,避免一次持续传输或解包把 writer barrier 拖过原窗口。依据改动之前的分层研究 RFC §7.7:保留原时钟、完整清单、原生点身份和 barrier 所有权;快照正确性不等于会话恢复或研究收益。该 provider IO 修复是独立可回滚的前置能力,没有新增产品开关或研究准入。
同一捕获身份在归档进度耗尽原时限时及时失败,关闭读者、恢复 writer 且不发布新 artifact;当前真实 Docker/HTTP 路径已核验。
完整原生会话继续工作与研究收益不在这个 IO 切片内,仍需原验收;补审也不补授过去的合并权限。
契约基线:937a011d9d507e499697046bcd86b9db0a925461,原 owner 规范。对照三项:归属边界、失败恢复、更广验收;前两项由本次源码与反例核验,后者保留原 owner 的独立验收。
改动思路
沿既有 capture_worker、native controller 与 typed artifact owner 传递同一个 deadline;Docker/tar 的物理 IO 留在 Python。_ArchiveReader 是贴近原函数的私有读包装,并非另一套清单、状态机或计时 authority。下载改用保留 socket timeout 的 response reader,在进度、header、文件读取、data filter 和模式恢复之间检查原时钟。
选择不改会继续留下原故障;仅扩大 timeout 或每个成员重置时间不能保证原窗口。当前局部 reader seam 足够承接下一次 IO 修改,不需要通用框架、TS 重写或新增 capture 模式。
具体改动
全 PR 四个路径为 checkpoint_worker.py、归档与 worker 两个测试模块、benchmark README,共 +269/-19。_archive 先校验完整成员清单再写 payload,保留 traversal、外部根、重名、link、device 拒绝;data filter 和普通权限位恢复继续生效。_archive_component 的 SQLite WAL/journal、held request、phase file 均用同一 clock;response 在 writer 清理之前关闭。
相较旧审阅头,正常 main 集成保留了新建 research 子目录的完整 capture/restore 用例,以及既有受限 large-local snapshot 调用。worker 三处与 controller 四处使用同一个既有 transport;这不是提高普通 RPC 上限。当前四个 PR 路径与合并后的 main 对应源码一致;新 transport/caller 变化已按当前版本重新验证,而不是继承旧 95 项结果。
本机归档 19 项通过;已有隔离 Linux daemon、普通 UID、固定原生 HTTP provider 与 Node typed owner 上,controller/worker/archive 全套 96 项通过、零跳过。两个当前反例原样放到不可变 base:下载实际观察到 SDK 把 socket timeout 改成 None;file-copy 在报时限前读完超过16MiB。当前两个分支均在完整消费之前停止,关闭 reader、恢复 writer、不发布 artifact,失败 capture 身份不能重用。
对主干的风险
同一合成归档的完整文件树、字节、普通模式、unsafe inventory 预写入拒绝及无 deadline 请求参数均与 base 相等,两边 reader 都关闭。下载在没有显式 deadline 时也不再禁用 SDK socket timeout:这是已披露的 transport 修正,不宣称该 IO 细节完全不变。检查发生在 IO 操作之间,不能硬抢占一个已阻塞的任意文件系统调用。
当前标准 premerge 5 项直接检查、19 项选择检查均通过,无检查失败;命令仍因 benchmark-sensitive 人工 hold 返回1。advisory 在完整语义检查之前执行,其 probe 不覆盖 benchmark 路径的所有动态语义;源 diff 与完整检查分别核验。Ruff、双语检查、四路径公共边界与两个 DCO 提交通过。Linux 本轮34个正向及2个基线反例自有容器均清理,无残留,不停其它 workload。
没有启动 benchmark、付费模型、安装、合并或撤回他人评审。完整23,117成员原生会话接续、真实科学效果与持续运行仍未由本补审验收;作者另外的成熟案例恢复声明不并入独立证据。保持研究与产品原有验收边界。
我的整体评价
APPROVE,作为 641b90c 的合并后完整代码审计结论。当前 IO 修复、集成清单与真实 Docker/native HTTP/typed 路径覆盖成立;邻接重构已采用私有 reader seam,无需扩大边界。缺失的新头审阅记录由本条补齐,原合并时间与 benchmark 人工 hold 继续如实保留;本结论不补授合并或研究执行权限。
English verdict: APPROVE - HEAD 641b90c; post-merge exact-head audit verifies shared deadlines, full inventory and reader/writer cleanup with19 macOS and96 real Linux Docker/native HTTP tests, plus two immutable-base counterexamples. It fills the missing review record without retroactively qualifying the merge or full research continuation.
Problem and result
The Docker SDK process-stream helper disables socket read timeouts. Archive capture also checked the absolute deadline only between components, so a single progressing download or local extraction could keep the writer paused beyond its original window.
The existing Docker archive provider now retains HTTP read timeouts and checks the same absolute deadline between returned chunks, tar headers, file reads, data filtering and permission restoration. It still validates the complete member inventory before extraction and closes the daemon reader before existing writer cleanup. Held decisions, SQLite companions and the phase file share the same clock. This is cooperative checking between IO operations, not hard preemption of an in-flight socket or filesystem call.
The original 90/30-second capture/seal clocks, native point identity, complete inventory, explicit export volume, ordinary permissions, authority boundaries and scoring stay intact. Failure does not publish a later native point or permit retrying the failed capture identity.
Current integration and validation
Current head integrates main through
937a011d9d507e499697046bcd86b9db0a925461with a signed normal merge. The only conflict was adjacent tests: both the progressing-archive deadline regressions and main's dynamically created research-directory capture/restore regression are preserved. Main's bounded large-artifact transport calls remain intact. The PR still changes only the existing Docker provider, its archive/worker tests and the benchmark README.The prior independent approval is scoped to
55bb3c7. This new combined head needs its own review. The earlier six-stage native source/receiver/recapture/Core-Goal drill passed on that earlier source with deterministic local inference; it is not rerun evidence for this head or research benefit. Actual mature-case native reconstruction is being qualified separately. Full 23,117-member native continuation and sustained long-horizon benefit remain open.Owner and delivery boundary
This is bounded Docker-specific provider IO in the existing checkpoint owner. Shared state, manifests and publication authority remain in their existing typed contracts. No new capability, mode, protocol state or automatic capture is added; Python owns Docker/tar IO rather than creating a parallel decision owner.
The related refactor remains one private archive reader wrapper and cohesive checks in the existing function. It gives future IO changes a local deadline seam without another inventory or deadline authority. Current native conversation recovery, Goal/Explore adoption, scientific effect and packaged product delivery retain their independent acceptance.