Skip to content

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

Closed

Description

@FredApps

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions