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

Open Beginner friendly
#298 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@FredApps is already working on this.

Since Nov 17, 2026.

  • #299 by @FredApps — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
88/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
git, typescript
Domain
tooling

Research direction

Read packages/diffci-cli/src/client/agent-selection.ts and compare its changed-path reads with gate-checks.ts and working-tree.ts, which the issue says already pass --no-renames. Reproduce with a committed file renamed using git mv, then call diffci_changed_files or agentChangedFiles(repo). Done when the reported changed_files includes both new and old paths; the issue says engine selection is unaffected.

Written by the indexing model from the issue text.

Description

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.

Dominant language
TypeScript
Stars
0
Forks
4
Avg merge
18h 41m
Merged PRs (30d)
48

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from DiffCI/core

All issues in DiffCI/core

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.