Skip to content

Improve Copilot instructions to detect renames/moves#68

Closed
pau101 wants to merge 1 commit intoPrismarineJS:bumpfrom
pau101:feat/diff-rename-detection
Closed

Improve Copilot instructions to detect renames/moves#68
pau101 wants to merge 1 commit intoPrismarineJS:bumpfrom
pau101:feat/diff-rename-detection

Conversation

@pau101
Copy link
Contributor

@pau101 pau101 commented Feb 15, 2026

In #65, Copilot incorrectly assumed WaterAnimal was removed when it was actually just moved to a different package. To reduce potential repeats of this error this PR does the following:

  1. Update .github/workflows/copilot-setup-steps.yml to use git diff -M50% -l2000 to enable rename detection
    • Specifies default git 50% similarity threshold
    • Sets 2000 file rename limit, skipping detection if exceeded
  2. Update .github/copilot-instructions.md to:
    • Emphasize checking diff files for renames before assuming removal
    • Show example of what renames look like in diffs
    • Reiterate that mc-source/ is not just one set of sources, but multiple, and must be searched in accordingly

This is an extension of my findings for the specific regression fix in #67

An example of this change is the WaterAnimal refactor would instead of being presented as an addition and a removal, which generally share no proximity in diffs, would now appear unified as:

diff --git a/net/minecraft/world/entity/animal/WaterAnimal.java b/net/minecraft/world/entity/animal/fish/WaterAnimal.java
similarity index 98%
rename from net/minecraft/world/entity/animal/WaterAnimal.java
rename to net/minecraft/world/entity/animal/fish/WaterAnimal.java
index e1a4dfafbc..ecff885e13 100644
--- a/net/minecraft/world/entity/animal/WaterAnimal.java
+++ b/net/minecraft/world/entity/animal/fish/WaterAnimal.java
@@ -1,4 +1,4 @@
-package net.minecraft.world.entity.animal;
+package net.minecraft.world.entity.animal.fish;
 
 import net.minecraft.core.BlockPos;
 import net.minecraft.server.level.ServerLevel;

@extremeheat extremeheat changed the base branch from bump to main February 16, 2026 05:18
@extremeheat extremeheat changed the base branch from main to bump February 16, 2026 05:19
@extremeheat extremeheat deleted the branch PrismarineJS:bump February 19, 2026 08:56
@extremeheat
Copy link
Member

Can you reopen on main please?

@pau101 pau101 deleted the feat/diff-rename-detection branch February 22, 2026 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants