fix: Silently skip identical vocabulary entries during merge#609
Open
isaacschepp wants to merge 13 commits intomainfrom
Open
fix: Silently skip identical vocabulary entries during merge#609isaacschepp wants to merge 13 commits intomainfrom
isaacschepp wants to merge 13 commits intomainfrom
Conversation
When merging two archives that both embed standard vocabularies, identical entries (same key and value) are now silently skipped instead of producing ~230 noisy "duplicate" warnings. Only true conflicts (same key, different value) are reported. Entity duplicates are still always reported since ID collisions are significant regardless of value equality. Closes #273
Deploying genealogix with
|
| Latest commit: |
3cdaa7a
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://f1f27f39.genealogix.pages.dev |
| Branch Preview URL: | https://fix-merge-vocab-noise.genealogix.pages.dev |
Contributor
There was a problem hiding this comment.
Pull request overview
Reduces noise during glx merge by silently skipping identical vocabulary/property entries (same key + reflect.DeepEqual value), while still reporting true conflicts and all entity ID collisions.
Changes:
- Updated
GLXFile.Merge()to return(conflicts []string, identicalSkipped int)and addedmergeMapDedupfor deep-equal vocabulary/property deduping. - Updated CLI merge runner to display conflicts separately and print a summary count of identical vocabulary/property entries skipped.
- Updated/added tests to cover identical-skip vs conflict behavior and adjusted callers for the new merge signature.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| go-glx/types.go | Implements conflict-vs-identical handling during merge; adds mergeMapDedup and returns skipped count. |
| go-glx/types_merge_test.go | Updates merge tests for new return signature; adds coverage for identical-skip and vocab conflicts. |
| go-glx/serializer.go | Updates multi-file deserialization to use new Merge() return signature (currently ignores skipped count). |
| glx/merge_runner.go | Renames merge result fields and prints skipped-identical summary for vocab/property entries. |
| glx/merge_runner_test.go | Updates merge runner tests for renamed conflict field. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
What and why
When merging two archives that both embed standard vocabularies,
glx mergeproduced ~230 noisy "duplicate" warnings for every standard vocabulary entry, burying the useful information about new entities and real conflicts.Now, identical vocabulary/property entries (same key + same value via
reflect.DeepEqual) are silently skipped with a summary count. Only true conflicts (same key, different value) are reported.Entity duplicates are still always reported regardless of value equality.
Before:
After:
Related issues
Closes #273
Testing
Breaking changes
GLXFile.Merge()signature changed from[]stringto([]string, int). This is a library API change but the project is pre-1.0 (beta).