Repository navigation
fix(线): 退役不再被失败任务与子线卡住,并能存档脏改动与线根资料 - #86
Merged
Merged
Conversation
- 新增任务终态 abandoned 与 `dyro task abandon <id> --reason`;retire 与退役后读取把 done/abandoned 都视为已结束;start 菜单隐藏 abandoned 与已 close 的任务 - 新增 `dyro line reparent <线> --parent X | --detach`,只改清单 parent,写 reparent 事件 - retire 集成判断依次检查父线、命名基线、default_base、origin/main|master|release;钉死的基线 SHA 不再作目标;未集成提示写明 HEAD 与 origin 跟踪 ref 状态 - retire 新增 `--archive-to`:先存档各仓未提交改动(plumbing 补丁、反向应用核对、.partial 原子落盘)与线根非仓库条目,退役后删除只剩生成说明与空目录的线根 - task close 关闭 failed/abandoned 任务时,脏 worktree 需 `--archive-to`,未合入分支 tip 先保全到 refs/dyro/closed/ - 本线仍有任务 worktree 时拒绝退役;Objective 中的 abandoned 任务按 failed 提示人工处理
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Merged
This branch had an error being deployed
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.
背景
某工作区在退役开发线时反馈了 7 个问题(P1–P7):失败的任务关不掉,导致开发线无法退役;子线不能换父线,导致父线无法退役;线根目录里的资料和工具改出来的脏文件需要手工处理;退役后留下空目录;已合入 release 的线必须手工指定集成目标,相关提示也容易误读。
改动
P1:新增任务终态
abandoned和命令dyro task abandon <id> --reason <原因>,只能从 failed 或 backlog 进入,原因写入 ledger;task status不能直接写入 abandoned。retire 和退役后的任务读取都把 done、abandoned 视为已结束。dyro start菜单不再列出 abandoned 任务,也不再列出已经 close 的任务。Objective 里出现 abandoned 任务时,按 failed 处理,提示需要人工决定。P2:新增
dyro line reparent <线> --parent X | --detach。只改清单里的父线,分支和 worktree 不动;新父线必须包含本线的全部仓库,且不能成环;写入reparent事件。P6/P7:判断"已集成"时,依次检查父线、命名基线、
policy.default_base、origin/main、origin/master、origin/release,第一个包含 HEAD 的 ref 记入操作日志(R3 会再核对一次)。基线是固定 SHA 时不再拿它当目标。未集成时,提示写明 HEAD、检查过的目标,以及本地origin/<分支>跟踪 ref 的状态。P3/P4/P5:
line retire新增--archive-to <目录>。在新的退役操作开始前,先存档各仓的未提交改动,再存档线根目录里的非仓库条目:diff-index导出,不受用户的外部 diff、textconv、颜色等配置影响;写入前核对补丁能否反向应用;先写到.partial临时目录,完整写好后再重命名。--recover一起使用。退役完成后,如果线根目录只剩 Dyro 生成的 AGENTS.md/CLAUDE.md 和空目录,就整个删掉;还有其他条目时保留,并在输出里列出。
task close:关闭 failed/abandoned 任务时,worktree 有未提交改动会拒绝(以前用
--force直接丢弃),需要加--archive-to。未合入的任务分支,删除前先保全到refs/dyro/closed/<任务>/<sha12>。存档目录不能放在任务工作区里。本线还有任务 worktree 时拒绝退役,提示先执行
task close,因为线退役后task close就找不到这条线了。兼容性
task close关闭 failed 任务时,worktree 有未提交改动会被拒绝。验证
uv run ruff check src tests experiments:通过uv run python -m unittest discover -s tests -t .:1386 个测试全部通过(本地 macOS)origin/release、已推送未合入的提示)、--archive-to(含diff.external/color.diff配置、.venv软链、嵌套仓库)、task close存档与分支保全,以及有任务 worktree 时拒绝退役。未包含
line retire --cascade和 unarchive 继续暂缓。