Skip to content

feat: isolate developer memorize runs - #700

Open
MrXnneHang wants to merge 3 commits into
mainfrom
review/developer-isolated-runs
Open

MrXnneHang wants to merge 3 commits into
mainfrom
review/developer-isolated-runs

Conversation

@MrXnneHang

Copy link
Copy Markdown
Collaborator

📝 Pull Request Summary

Developer memorize 的固定工作区会让独立调用相互覆盖。本改动为每次 prepare 分配独立 run,并提供明确的提交和丢弃生命周期。

这是供分层评审的 stack 底层,与 xnne-bot 的 #698 使用相同提交。最终合入由 #698 承接;本 PR 用于评审,请勿直接合入。


✅ What does this PR do?

  • 每次 prepare 分配独立 run,支持 1–10 个会话输入,并返回 run-id、workspace、jobs 和 next_command。
  • commit / verify-resources / discard 使用显式 run-id;成功提交后清理整个 run,失败保留以便恢复。
  • 区分后端提交成功但本地清理失败,避免重复提交。
  • 更新 developer 文档和生命周期 ADR。

🤔 Why is this change needed?

独立调用需要隔离临时文件,同时保留明确的后端写入边界。工作区隔离不解决同一后端 RecallFile 的并发覆盖,相关完整演化周期仍需协调串行执行。

实现与讨论:#698。上层 PR 添加 host 主动 memorize 指引;evolve 类型选择由 #697 跟踪。


🔍 Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Refactor / cleanup
  • Other (please explain)

✅ PR Quality Checklist

  • PR title follows an allowed format (for example feat:, fix:, docs:, memory base:)
  • Changes are limited in scope and easy to review
  • Documentation updated where applicable
  • No breaking changes (or clearly documented)
  • Related issues or discussions linked

沿用 #698 对相同提交的验证:699 passed、7 skipped;mypy / pre-commit 通过,Python 3.11 / 3.13 CI 通过。真实 CLI 并行 prepare 已确认工作区独立,commit / discard 清理互不干扰。

本次仅建立评审 stack,没有新增代码改动。


📌 Optional

  • Screenshots or examples added (if applicable)
  • Edge cases considered
  • Follow-up tasks mentioned

MrXnneHang and others added 3 commits September 10, 2026 17:30
Allocate a private directory for each prepare batch and return its run id.
Target commit, resource verification, and explicit discard by that id.
Keep failed backend commits retryable and remove successful runs completely.

Document the CLI migration, executor ownership, and backend conflict boundary.

BREAKING CHANGE: memorize commit and verify-resources require a run id.

Co-authored-by: Codex <codex@openai.com>
AI-Model: gpt-6-astra
Co-authored-by: Codex <codex@openai.com>
AI-Model: gpt-6-astra
Report successful backend submission when snapshot refresh or working-file
cleanup fails, so callers can discard the stopped run instead of resubmitting.
Cover snapshot, job, and directory cleanup failures in regression tests.

Co-authored-by: Codex <codex@openai.com>
AI-Model: gpt-6-astra
@MrXnneHang
MrXnneHang added this pull request to stack #702 September 14, 2026 08:30
@MrXnneHang MrXnneHang changed the title ✨ feat: isolate developer memorize runs feat: isolate developer memorize runs Sep 14, 2026

This branch has not been deployed

No deployments
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