Skip to content

Improve Copilot instructions to detect renames/moves#69

Merged
extremeheat merged 1 commit intoPrismarineJS:mainfrom
pau101:feat/diff-rename-detection
Feb 23, 2026
Merged

Improve Copilot instructions to detect renames/moves#69
extremeheat merged 1 commit intoPrismarineJS:mainfrom
pau101:feat/diff-rename-detection

Conversation

@pau101
Copy link
Contributor

@pau101 pau101 commented Feb 22, 2026

Reopened #68 on main.

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 merged commit f1381cd into PrismarineJS:main Feb 23, 2026
32 checks passed
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