Skip to content

refactor(cli): 重构提交检视与目标分支闭环 - #940

Merged
CodeCasterX merged 4 commits into
mainfrom
agent-infra-refactor-commit-review-base-flow
Aug 31, 2026
Merged

refactor(cli): 重构提交检视与目标分支闭环 #940
CodeCasterX merged 4 commits into
mainfrom
agent-infra-refactor-commit-review-base-flow

Conversation

@CodeCasterX

Copy link
Copy Markdown
Contributor

Summary

  • unify local checkpoint creation, review evidence, and branch delivery behind task-bound lifecycle contracts
  • persist and validate the delivery target, then record immutable target/reviewed/diff-base evidence
  • add recovery, lease, lifecycle, diagnostics, and regression coverage for the revised workflow

Validation

  • npm test

Closes #936

Generated with AI assistance

@github-actions github-actions Bot added in: cli Module: cli in: templates Module: templates in: core Module: core labels Aug 31, 2026
@CodeCasterX CodeCasterX added this to the 0.9.11 milestone Aug 31, 2026
@CodeCasterX CodeCasterX added type: enhancement A general enhancement and removed in: cli Module: cli in: core Module: core in: templates Module: templates labels Aug 31, 2026
@github-actions github-actions Bot added the in: meta Module: meta (repo internals / CI / test infra) label Aug 31, 2026
@CodeCasterX CodeCasterX self-assigned this Aug 31, 2026
@CodeCasterX

CodeCasterX commented Aug 31, 2026

Copy link
Copy Markdown
Contributor Author

审查摘要

变更摘要

  • code-task 的本地 checkpoint、review-code 的 M/D/R 审查证据,以及 create-pr 的安全交付统一到任务绑定的 lifecycle contract。
  • 新增 durable checkpoint intent、任务分支 lease delivery、目标分支/共同祖先复核,以及 EXDEV 收尾与 GitHub 诊断加固。
  • 同步双语工作流、README 与模板说明,并恢复历史 code-r2.md receipt 的精确字节,保持审计链可验证。

关键技术决策

  • checkpoint 仅本地创建;远端 push 只在 create-pr 的统一 delivery 边界发生。
  • target head 是保存的审查事实,复用既有审查时只比较共同祖先,不以可变 ref 重写历史证据。

审查历程

  • 初次代码审查发现未绑定 delivery target 会被默认值解释(CD-1)。
  • 修复轮补齐显式项目配置、任务绑定与严格 review-fact 校验;第 2 轮代码审查已通过。
  • 第 3 轮发现历史 receipt 被误修改(CD-2);第 4 轮以 Issue artifact 的原始 SHA-256 恢复并通过审查。

测试结果

  • npm test:2675 passed、0 failed、7 skipped。
  • npm run test:smoke:1391 passed、0 failed。

✅ 无需人工校验

本 PR 不包含依赖真实权限、特权宿主或外部环境才能判定正确性的未闭环项目。

PR 代码增减

部分 文件数 新增行 删除行 净增行 旧字节 新字节 净字节
完整 PR diff 78 1700 518 1182

变更集中于 checkpoint/delivery 生命周期实现、对应的状态机回归测试,以及双语文档和下游模板同步;未检测到 rename,亦未见与目标无直接关系的变化。

@CodeCasterX CodeCasterX added in: cli Module: cli in: core Module: core in: templates Module: templates labels Aug 31, 2026
@CodeCasterX CodeCasterX modified the milestones: 0.9.11, 0.9.12 Aug 31, 2026
@CodeCasterX
CodeCasterX force-pushed the agent-infra-refactor-commit-review-base-flow branch from 6ed73c4 to 551833e Compare August 31, 2026 14:22
@CodeCasterX
CodeCasterX merged commit ddd5f2b into main Aug 31, 2026
15 checks passed
@CodeCasterX
CodeCasterX deleted the agent-infra-refactor-commit-review-base-flow branch August 31, 2026 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in: cli Module: cli in: core Module: core in: meta Module: meta (repo internals / CI / test infra) in: templates Module: templates type: enhancement A general enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor: 重构提交检视与目标分支闭环

1 participant