Agent tools: changed_files lists only the new path of a renamed file

未关闭 适合新手
#298 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@FredApps 已经在做这个了。

开始于 2026年11月17日。

  • #299 来自 @FredApps —— 未关闭

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
88/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
git, typescript
领域
tooling

调研方向

阅读packages/diffci-cli/src/client/agent-selection.ts,并将其中读取变更路径的逻辑与gate-checks.ts和working-tree.ts进行比较;issue称后两者已经传入--no-renames。使用git mv重命名一个已提交的文件来复现,然后调用diffci_changed_files或agentChangedFiles(repo)。当报告的changed_files包含新旧两个路径时,即为完成;issue称引擎选择不受影响。

由索引模型根据 Issue 内容生成。

描述

changedPaths in packages/diffci-cli/src/client/agent-selection.ts runs git diff --name-only without --no-renames. With git's default rename detection, a renamed file is listed only under its new path. So diffci_changed_files (agentChangedFiles) and the changed_files of diffci_select_tests (agentSelection) omit the old path. Anything that imported the old path is affected too. Every other changed-path read in the CLI (gate-checks.ts, working-tree.ts) already passes --no-renames.

Repro: commit src/old.ts, then git mv src/old.ts src/new.ts and call diffci_changed_files (or agentChangedFiles(repo)).

Expected: changed_files is ["src/new.ts", "src/old.ts"].

Actual: changed_files is ["src/new.ts"].

The engine's own selection is not affected. Only the reported changed_files list is.

主要语言
TypeScript
星标
0
派生
4
平均合并
18 小时 41 分钟
30 天内合并 PR
48

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

DiffCI/core 的其他 Issue

查看 DiffCI/core 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。