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

Đang mở Phù hợp với người mới
#298 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@FredApps đang làm issue này rồi.

Từ ngày 17/11/2026.

  • #299 của @FredApps — đang mở

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
88/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
git, typescript
Lĩnh vực
tooling

Hướng nghiên cứu

Đọc packages/diffci-cli/src/client/agent-selection.ts và so sánh các lần đọc đường dẫn đã thay đổi với gate-checks.ts và working-tree.ts, vốn theo issue đã truyền --no-renames. Tái hiện bằng cách đổi tên một tệp đã commit với git mv, sau đó gọi diffci_changed_files hoặc agentChangedFiles(repo). Hoàn tất khi changed_files được báo cáo bao gồm cả đường dẫn mới và cũ; issue cho biết việc chọn engine không bị ảnh hưởng.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
TypeScript
Star
0
Fork
4
Merge trung bình
18 giờ 41 phút
Pull request đã merge (30 ngày)
48

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của DiffCI/core

Tất cả issue của DiffCI/core

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.