[codex] bound deadline process cleanup - #2047
Closed
hqhq1025 wants to merge 1 commit into
Closed
Conversation
Member
|
感谢补上 process cleanup deadline 这一重要的 lifecycle invariant。 这个 patch 的 3 个变更文件全部位于已经删除的 packages/headless。#2605 已将公开 Eval 完整迁移到 packages/eval,并要求执行统一通过 shared executor 与 Runtime Host。对应的 bounded cleanup 也已经在 current packages/eval/harbor/relay_agent.py 中由 TERM/KILL deadline 实现,分别覆盖 trial/process-group cleanup 路径。 因此旧 Headless patch 已无法也无需合入,关闭这个已迁移完成的 PR。如果 current Eval cleanup 仍存在一个具体漏口,欢迎直接针对 packages/eval 的现有 owner 提一个聚焦修复。 Thank you for tightening this lifecycle boundary. packages/headless was retired by #2605, and current packages/eval/harbor/relay_agent.py now owns bounded TERM/KILL cleanup. Since all files changed here belong to the removed Headless implementation and the invariant has moved to Eval, I am closing this PR as superseded. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Root cause
When a pinned CLI reached its task-native deadline, the command wrapper could block replaying buffered output into an abandoned Docker exec pipe. After that was bounded, Claude Code still exposed a second failure mode: the TERM cleanup transport could hang indefinitely. Harbor remained in
n_running_trials=1, never invoked the verifier, and the outer watchdog eventually recorded a false infrastructure failure.The affected run showed Claude output stopping exactly at the task-native deadline while Harbor stayed alive for the full agent + verifier + teardown watchdog window.
Behavior
TERM and KILL remain ordered. If TERM transport fails but KILL succeeds, the original budget-exhausted cancellation propagates and Harbor can grade the deadline workspace. If KILL also fails, cleanup still fails closed as infrastructure because the workspace cannot be proven frozen.
Validation
node --test packages/headless/dist/__tests__/harbor-adapter.test.jspython3 -m py_compile packages/headless/harbor/process_scope.pybiome checkandgit diff --check