Skip to content

fix: Silently skip identical vocabulary entries during merge#609

Open
isaacschepp wants to merge 13 commits intomainfrom
fix/merge-vocab-noise
Open

fix: Silently skip identical vocabulary entries during merge#609
isaacschepp wants to merge 13 commits intomainfrom
fix/merge-vocab-noise

Conversation

@isaacschepp
Copy link
Copy Markdown
Collaborator

What and why

When merging two archives that both embed standard vocabularies, glx merge produced ~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:

Duplicates (233 — skipped, destination kept):
  duplicate event_types ID: burial
  duplicate event_types ID: emigration
  ... (230 more lines)
  duplicate persons ID: person-1

After:

Conflicts (1 — skipped, destination kept):
  duplicate persons ID: person-1

230 identical vocabulary/property entries skipped

Related issues

Closes #273

Testing

  • 24 library-level merge tests pass (2 new: identical dedup, conflicting vocab)
  • CLI merge runner tests updated for new field names
  • Full test suite passes

Breaking changes

GLXFile.Merge() signature changed from []string to ([]string, int). This is a library API change but the project is pre-1.0 (beta).

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
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Apr 2, 2026

Deploying genealogix with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3cdaa7a
Status: ✅  Deploy successful!
Preview URL: https://f1f27f39.genealogix.pages.dev
Branch Preview URL: https://fix-merge-vocab-noise.genealogix.pages.dev

View logs

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 added mergeMapDedup for 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.

Copilot AI review requested due to automatic review settings April 2, 2026 15:19
@isaacschepp isaacschepp review requested due to automatic review settings April 2, 2026 15:19
Copilot AI review requested due to automatic review settings April 2, 2026 15:26
@isaacschepp isaacschepp review requested due to automatic review settings April 2, 2026 15:26
Copilot AI review requested due to automatic review settings April 2, 2026 15:39
@isaacschepp isaacschepp review requested due to automatic review settings April 2, 2026 15:39
Copilot AI review requested due to automatic review settings April 2, 2026 15:48
@isaacschepp isaacschepp review requested due to automatic review settings April 2, 2026 15:48
Copilot AI review requested due to automatic review settings April 2, 2026 15:59
@isaacschepp isaacschepp review requested due to automatic review settings April 2, 2026 15:59
Copilot AI review requested due to automatic review settings April 2, 2026 16:16
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot AI review requested due to automatic review settings April 2, 2026 16:29
@isaacschepp isaacschepp review requested due to automatic review settings April 2, 2026 16:29
Copilot AI review requested due to automatic review settings April 2, 2026 16:36
@isaacschepp isaacschepp review requested due to automatic review settings April 2, 2026 16:36
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.

Merge produces 197 duplicate vocabulary warnings when both archives have standard vocabs

2 participants