Repository navigation
Preserve scoring when terminal worker capture fails #8593
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
loopx-agent
wants to merge
2
commits into
main
Choose a base branch
from
codex/benchmark-terminal-scorer-seal
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+108
−2
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -168,6 +168,38 @@ def stop_source(self, container): | |
| finally: | ||
| self._persist_receipt() | ||
|
|
||
| def finish_grading(self, grading_status): | ||
| """Seal the drained native registration if the joint export failed.""" | ||
| receipt = self.receipt | ||
| if (grading_status != "complete" or receipt is None | ||
| or not receipt["capture_attempted"] or receipt["capture_succeeded"] | ||
| or receipt.get("source_stopped") is not True | ||
| or "native_scoring_checkpoint" in receipt): | ||
| return | ||
|
|
||
| # This point is captured after grading, with no worker phase clock. | ||
| # It is deliberately not the earlier joint attempt or a resume grant. | ||
| capture_id = uuid.uuid4().hex | ||
| retained = {"capture_id": capture_id, "capture_succeeded": False} | ||
| receipt["native_scoring_checkpoint"] = retained | ||
| self._persist_receipt() | ||
| try: | ||
| from .checkpoint_controller import capture | ||
|
|
||
| retained["capture"] = capture( | ||
| self.supervisor.controller_file, | ||
| token=self.supervisor.token, | ||
| capture_id=capture_id, | ||
| destination=self.receipt_path.parent / f"terminal-native-{capture_id}", | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [P2] 用相对日志目录和有效的绝对导出根启动同一试验,原生评分完成、工作容器已停,回执却记录 ValueError,原生检查点没有写出。原评分记录仍存在,缺的是要交付的独立检查点。 这里用的是回执路径,而 runner 已经将兼容的绝对导出根交给了 supervisor。让补录使用现有已通过校验的绝对检查点导出目录,并在回执中保留实际产物引用。用相对日志目录与独立导出根重跑故障用例。 |
||
| ) | ||
| retained["capture_succeeded"] = True | ||
| except Exception as error: | ||
| # A failed or uncertain export remains evidence, never a retry | ||
| # under a different capture identity or a changed solver outcome. | ||
| retained["error_kind"] = type(error).__name__ | ||
| finally: | ||
| self._persist_receipt() | ||
|
|
||
|
|
||
| def _stop_retained_worker(container, receipt): | ||
| if container.id != receipt["container_id"]: | ||
|
|
||
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[P3] 扩展套件的两个旧用例在 head 报 AttributeError:未启用故障保留时,异常出口仍先读测试替身没有的 task_id。基线通过;只给替身补齐 TaskSpec 的该字段,三项复验通过。把读取收窄到已启用故障保留的路径,或让旧用例提供完整的 TaskSpec 字段;保留原异常断言。