使能checkpoint能力,当前仅stm,可扩展 - #192
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5ef44f5a5e
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| project_path_abs = "D:\\Agent\\realesrgan\\Real-ESRGAN\\realesrgan\\archs" | ||
| output_dir_abs = "D:\\Agent\\realesrgan\\Real-ESRGAN\\realesrgan\\dare" | ||
| workspace_dir_abs = "D:\\Agent\\realesrgan\\Real-ESRGAN\\realesrgan" # 工具沙箱根目录,必须同时包含 project / output |
There was a problem hiding this comment.
Remove machine-specific paths from plan_claude_code example
These hardcoded D:\... assignments make the example ignore user-provided project paths and only work on the author's local directory layout, so the script will fail for most users (especially non-Windows environments) even though it still advertises a configurable project argument. This is a functional regression in the example's core entry flow and should be replaced with values derived from CLI/env inputs.
Useful? React with 👍 / 👎.
| def _path_for(self, checkpoint_id: CheckpointId) -> Path: | ||
| return self._checkpoint_dir / f"{checkpoint_id}.json" |
There was a problem hiding this comment.
Validate checkpoint IDs before building file paths
checkpoint_id is interpolated directly into a filesystem path, and callers like /resume <id> can pass arbitrary strings, so values such as ../other_dir/file or absolute paths can escape the checkpoint directory and cause unintended reads/deletes of arbitrary .json files via get/delete. Restrict IDs to a safe pattern (e.g., hex) before path construction.
Useful? React with 👍 / 👎.
Summary
Scope (One PR One Thing)
Changed Files (required)
List all touched files and why each file changed.
If this PR is a large diff (>300 changed lines), explain why split PRs are not possible and provide a split follow-up plan.
Intent / Implementation Gate (required)
...mainbefore this implementation started: [ ] Yes...Acceptance Criteria
Acceptance Pack (required)
schema/error semantics/retrydimensions; each as changed ornone/n.a + reason):.........start/tool_call/end/fail+run_id/tool_call_id/capability_id/attempt/trace_id+ one oferror_code/error_type/exception_class/ToolResult.error):...Test Evidence (required)
.........If this PR changes high-risk runtime paths (auth/concurrency/execution control), include
risk-matrixevidence.Risk and Rollback
Structured Review Report (required)
Changed Module Boundaries / Public API
...New State
Concurrency / Timeout / Retry
Side Effects and Idempotency
Coverage and Residual Risk
Dependency and Lockfile Changes
requirements.txt/pyproject.toml/package.json): [ ] Yes [ ] No [ ] N/AAgent Rules Checklist (required)
Reference:
docs/agent_rules.mdskip/only/excludeusage is explained and reviewed