Skip to content

fix(benchmark): restore task workspace from captured parent directory - #6678

Merged
huangruiteng merged 1 commit into
mainfrom
codex/checkpoint-parent-workspace-20261017
Oct 16, 2026
Merged

huangruiteng merged 1 commit into
mainfrom
codex/checkpoint-parent-workspace-20261017

Conversation

@loopx-agent

Copy link
Copy Markdown
Collaborator

A checkpoint can contain the complete native task workspace inside a captured parent directory. Warm-start preflight currently rejects that point because it requires an exact root-path match, preventing continuation before native registration or model execution.

Resolve exactly one physical task subtree within the verified component in both preflight and restoration. Restore only that subtree, preserve the original receiver image backup, and reject ambiguous, missing, noncanonical or tampered inputs before mutation. This is an existing SForge provider transport fix; artifact integrity, configuration and lineage checks remain with their existing owners. The shared resolver also removes duplicate path selection.

Validation:

  • 70 warm-start tests passed in Linux with the actual Harbor dependency and supported Node runtime, including parent-root restoration, sibling isolation, replay refusal and tamper rejection.
  • macOS focused suite: 61 passed, 9 skipped (Harbor unavailable); adjacent suite: 61 passed, 10 skipped (also no opt-in joint receiver fixture).
  • A retained real checkpoint passed verification and the production workspace materializer in a fresh native task container: 114 file digests and seven auxiliary components matched. The source archive remained unchanged.
  • Ruff and diff checks passed. Semantic inventory advisory found no supported carriers in the changed provider paths; no shared vocabulary was added.

The real probe covers artifact materialization, not a fresh model decision or native evaluation. Active workers were not updated. No frontend, Lark, CLI option, scoring or budget behavior changes.

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; effort=max

Approval conclusion (author-owned PR; GitHub blocks formal self-approval). APPROVE — exact head 40a9bb16f6569a51bd7df5df25bffcefb92998bb.

动机

从完整研究检查点继续工作的研究运行者,需要把封存的任务目录恢复到全新的接收环境。

原来捕获了父目录时,即使任务子目录完整也会因目录根不完全相等而在模型调用前被拒绝;现在只解析并恢复唯一的物理任务子目录,兄弟目录保持原状。

同一个封存产物在基线被拒绝且接收端不变,在本头通过真实 workspace 命令恢复;内容、0600模式、原镜像备份、产物摘要与重放拒绝均已验证。

不引入新执行权、评分、预算或冷却规则,不把文件恢复当作 fresh 模型决策、原生评测或完整研究资格。

真实研究点的新模型决策、原生评测和完整比较仍由现有研究 owner 单独验收;本轮只使用合成目录和产物。

改动思路

复用既有 TypeScript 产物完整性 owner,Python 只负责现有 SForge provider 的路径选择与物化;预检与恢复共享一个局部 resolver,消除两处重复规则。

本 PR 完成已验证产物内唯一任务子树的恢复及隔离反例;新执行准入、会话、Goal/Todo、评测和完整研究验收仍由原 owner 保持。

实际入口为:现有 restore 选项 → WarmStart.verify → TS 完整产物 verify → _workspace_component → 原生新接收环境 → workspace 命令 → 再 verify → 原镜像 backup → 只复制任务子树 → 原会话/上下文/执行 owner。关闭路径不增加准备、澄清或确认步骤。与增加超时、关闭诊断或复制整个父目录相比,这个修复直接处理已复现的传输边界,并保留原本必须存在的结果、权限和恢复检查。最强反对理由是局部成功不足以证明更广运行资格,故本评价不以测试数或恢复文件数替代该验收。

具体改动

完整三路径相对真实 merge-base f184f13b29011fd33753cb1f49c96d1af9730c09 审阅:+111/-12。规格先读的是 benchmark/README.md,不可变修订 f184f13b29011fd33753cb1f49c96d1af9730c09,不是以本次新增说明验证本次实现。

规格逐项:Captured workspace = implemented; Historical authority stays inert = implemented; Bounded full-artifact reads = implemented; Unchanged cold entry = implemented。这些分别由下述实际调用、负例与当前测试验证;更广平台/研究资格不在本次合同的完成声明内。

关键代码讲解

  • WarmStart.verify 仍在原生注册前验证完整摘要、配置、源与目标身份以及原期限,只将 workspace 定位复用为共同函数。
  • _workspace_component 用路径组成关系代替字符串前缀,要求唯一规范根与真实物理子目录。TypeScript 产物 owner 已拒绝组件内符号链接;此 helper 没有增加第二套完整性或准入权威。
  • restore_workspace 在任何接收端写入前再次验证、检查目标与控制目录,保留原镜像备份,只复制该子树,备份存在即拒绝重用。

完整 warm-start 模块 70 passed,0 skipped;相邻 SForge runtime 258 passed。实际环境有 Harbor0.20.0,SForge 是公开文档固定的 071a884012754127f28f5b84be10f533a42db527,相关模块无本地改写。独立合成产物在同一次探针中先被不可变 base 拒绝、接收端不变,再被当前头的真实 python -m benchmark.runtime.sforge_warm_start workspace 成功恢复。检查了候选字节、0600模式、原镜像备份、兄弟目录不变、封存产物完整性以及第二次恢复拒绝。另验证了新任务不能继承旧点、路径前缀混淆、重复/重叠根、相对路径、遍历、非法ID、缺失目录与符号链接;完整产物 owner 也拒绝注入的链接。

对主干的风险

Ambiguous/missing/noncanonical roots and tampering reject before receiver mutation; lexical sibling prefixes, relative/traversal/invalid IDs, duplicated/overlapping roots, symlink aliases and a newly created task cannot inherit the old capture. Repeat restore refuses the original attempt.

Ruff、真实 merge-base diff hygiene、开发时 semantic inventory advisory 后的完整 semantic drift 检查均通过。advisory 在这些 provider 路径未发现支持的新增词汇载体;空结果不是语义等价证明,判断还依赖完整代码和调用链。维护性 smoke 在两个 PR 各自不可变 base/head 上用同一解释器执行,四次均 exit0,配对输出逐字相同;Canary 预览中的 inherited-failure 注记不符合这次新实测,也没有被当作当前失败或完整 gate 通过。完整14/19所选 Canary 集合仅做了预览,未声称执行通过。

本轮按当前 scoped wait_for_ci=false,没有查询、等待、重跑或取消远端 CI。公开边界扫描没有新增凭据、私人链接、机器路径或原始日志;已有通用开发输出目录示例和标准 guest 路径按其语义核对。真实研究点的新模型决策、原生评测和完整比较仍由现有研究 owner 单独验收;本轮只使用合成目录和产物。 本轮没有安装升级、改活跃运行、调用模型或执行新 benchmark。

我的整体评价

本精确头没有阻塞发现,结论 APPROVE;problem_context=goal_achieved 只关闭本次具名传输缺陷,不关闭父项目资格。long_horizon=preserved,user_experience=improved:原有结果/预算/权威继续由原 owner 保持,受影响的开发或恢复任务可以完成,不增加人的交互轮次。

复用既有 TypeScript 产物完整性 owner,Python 只负责现有 SForge provider 的路径选择与物化;预检与恢复共享一个局部 resolver,消除两处重复规则。

本 PR 完成已验证产物内唯一任务子树的恢复及隔离反例;新执行准入、会话、Goal/Todo、评测和完整研究验收仍由原 owner 保持。

future-facing pass 已应用在同一 provider 边界:保留局部共享构造/选择和既有清理 owner,不为小修复新增状态机、包装层或通用框架。新状态词汇保持 local_only / reuse_existing;现有共享语义 owner 没有迁移。头部变化须重新核验;本 COMMENTED 结论不构成正式自批准,也不授予 merge/admin bypass 或旧 review 处置权。

English verdict: APPROVE — exact-head same-artifact baseline/head evidence proves unique physical task-subtree restoration through the real workspace entrypoint, preserving siblings, backup, integrity and replay refusal.70 warm and258 adjacent tests pass. Fresh model/native research qualification remains separate. Reviewed head 40a9bb16f6569a51bd7df5df25bffcefb92998bb.

@huangruiteng
huangruiteng merged commit b5e3262 into main Oct 16, 2026
19 of 25 checks passed
@huangruiteng
huangruiteng deleted the codex/checkpoint-parent-workspace-20261017 branch October 16, 2026 19:37
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