Skip to content

使能checkpoint能力,当前仅stm,可扩展 - #192

Merged
mahaichuan-qq merged 1 commit into
mainfrom
checkpoint_enable
Mar 5, 2026
Merged

使能checkpoint能力,当前仅stm,可扩展#192
mahaichuan-qq merged 1 commit into
mainfrom
checkpoint_enable

Conversation

@mahaichuan-qq

Copy link
Copy Markdown
Collaborator

Summary

  • What does this PR change?
  • Why is this change needed?

Scope (One PR One Thing)

  • Primary objective:
  • Out of scope:
  • I confirm this PR handles a single objective only: [ ] Yes

Changed Files (required)

List all touched files and why each file changed.

File Reason
path/to/file reason

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)

  • Intent PR link (docs-only): ...
  • Intent PR merged into main before this implementation started: [ ] Yes
  • Implementation PR link (this PR): ...

Acceptance Criteria

  • Criteria 1
  • Criteria 2

Acceptance Pack (required)

  • Contract Delta (schema / error semantics / retry dimensions; each as changed or none/n.a + reason):
    • ...
  • Golden Cases (new/updated file names):
    • ...
  • Regression Summary (runner outputs):
    • ...
  • Observability and Failure Localization (start/tool_call/end/fail + run_id/tool_call_id/capability_id/attempt/trace_id + one of error_code/error_type/exception_class/ToolResult.error):
    • ...
  • Structured Review Report attached: [ ] Yes

Test Evidence (required)

  • Local commands run:
    • ...
  • CI links or job names:
    • ...
  • Evidence/output summary:
    • ...

If this PR changes high-risk runtime paths (auth/concurrency/execution control), include risk-matrix evidence.

Risk and Rollback

  • Risk level: Low / Medium / High
  • Main risk points:
  • Rollback plan:

Structured Review Report (required)

Changed Module Boundaries / Public API

  • ...

New State

  • New cache/global/singleton state:
  • Lifecycle and cleanup:

Concurrency / Timeout / Retry

  • New concurrency points:
  • Timeout/retry locations:
  • Upper bounds:

Side Effects and Idempotency

  • Side effects:
  • Anti-duplication strategy:

Coverage and Residual Risk

  • Covered tests/evaluations:
  • Residual risks not covered:

Dependency and Lockfile Changes

  • Lockfile changed in this PR: [ ] Yes [ ] No
  • If yes, manifest updated in same PR (requirements.txt/pyproject.toml/package.json): [ ] Yes [ ] No [ ] N/A

Agent Rules Checklist (required)

Reference: docs/agent_rules.md

  • Only task-related files changed; no opportunistic refactor
  • Public interfaces/data structures unchanged unless explicitly required
  • Tests added/updated and evidence attached
  • Any skip/only/exclude usage is explained and reviewed
  • Merge will be done by approved reviewer (no self-merge auto-ship)

@mahaichuan-qq
mahaichuan-qq merged commit 67de3e0 into main Mar 5, 2026
10 checks passed
@mahaichuan-qq
mahaichuan-qq deleted the checkpoint_enable branch March 5, 2026 02:14

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +132 to +134
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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Comment on lines +210 to +211
def _path_for(self, checkpoint_id: CheckpointId) -> Path:
return self._checkpoint_dir / f"{checkpoint_id}.json"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

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.

1 participant