fix: import case-only duplicate homes instead of dropping them - #50
Merged
Conversation
The banner now reads Set Homes with a v2 tag under the tagline, and the README uses plain Set Homes for the product and v2 only in the migration section.
This was referenced Aug 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #48
Problem
Set Homes v1 matched home names case sensitively, so one player could hold both
baseandBase. Home names here are unique per player ignoring case, so the importer treated the second one as an existing home and skipped it. Nothing named it, and the dry run did not show it at all, so an admin had no way to know a home was lost.Change
Basearrives asBase2). No home is dropped for a name clash.renamedcount, and "skipped: name exists" is reworded to "skipped: already imported", which is what that path actually means now.NameLedgerinSetHomesV1Importersnapshots the names already in the database before that player's first import and tracks names taken during the run separately. That split is what makes the preview report the same numbers as the confirm that follows it, since a dry run writes nothing.HomesDao.namesFor(UUID)added to back the ledger.patchchangeset is included.Tests
mvn test: 317 tests, 0 failures, 0 skipped. New coverage inSetHomesV1ImporterTest(case-only pair kept with its own location, rename reported and logged, dry run and confirm agree, dry run writes nothing, genuine re-import renames nothing, disambiguated name itself taken later in the file or already in the database, unnamed home vs an existingdefault, both homes reachable by command),ImportReportTestandHomesDaoTest.