Repository navigation
feat(runner): 独立管理交付工作区并统一运行数据路径 - #2
Merged
Merged
Conversation
Centralize Runner data, configuration and runtime roots. Create independent remote clones with private context and commit identity while keeping source checkouts untouched. Keep repository data and records outside installer cleanup, and reject redirected or unowned workspace paths.
Reopen the current checkout and read-only Git metadata beneath the masked Runner data root. Keep sibling tasks, control state and installation snapshots hidden, including from descendant processes.
Route repository inference and explicit --repo selection through one managed clone. Share task control across user checkouts, use canonical state paths, and remove custom-state mutation routing. BREAKING CHANGE: New runs use the Runner data directory. Existing tasks in checkout-local or custom state directories are not resumed or migrated.
Prepare CLI runs in independent clones while preserving direct engine injection. Keep executor fencing, recovery, control actions and read-only observation assertions under the new ownership boundary.
Document managed repository selection, unified paths, task uniqueness and cleanup boundaries. Keep private context in committed remote files and leave user checkouts and historical tasks under user control.
Bind repairability to expected_head_sha so fetched community changes and concurrent tasks do not use stale configuration from the persistent clone checkout. Missing objects or policy never fall back to local files.
Resolve data-home aliases consistently and reject both user working trees and Git metadata directories. Revalidate existing clones so relocating Runner data cannot bypass repository ownership checks.
Avoid scanning descendants after the child has exited and skip discarded adoption scans when no baseline was supplied. Preserve process-group termination and child reaping. Reuse the already validated clone during test preparation.
Point real executor contention probes at managed state and Git roots. Verify uninstall preserves a populated managed repository instead of comparing empty legacy directories.
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.
Runner 之前在用户启动命令的本地仓库中创建分支、运行数据和 worktree,交付收尾也可能改变本地 Git 引用。本 PR 将交付操作移到 Runner 独立管理的远端克隆,用户的文件、索引、分支和 Git 元数据保持不变,交付完成后由用户自行拉取代码。
变更
~/.local/share/agent-run/,支持XDG_DATA_HOME;配置与临时运行文件按生命周期分别保存。--repo OWNER/REPO启动和管理任务;也可从当前仓库只读识别远端。同一用户、仓库和 Parent 复用唯一未完成任务,不因启动目录或本地 clone 不同而重复执行。兼容性
新任务使用 Runner 管理的规范状态目录。旧 checkout 内或自定义目录中的任务不迁移、不恢复、不清理;变更命令不再接受任意
--state-dir,status与history保留显式状态目录的只读排障能力。独立克隆仅使用远端已推送内容,不会自动带入用户本地未推送的修改。验证
make test-full,2943 passed;命令墙钟 266.17 秒。make typecheck通过,已完成工作区写入边界、并发控制和清理行为的独立审查。git diff --check核验通过。请使用普通 merge 合并此 PR,保留提交历史。