You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CombineFrontmatter silently removes repeated items from every list, even when no keys are being merged #142
PropertyMerger groups every key, including singleton groups (PropertyMerger.cs:47-52), and runs each group through MergePropertyGroup. Any list value is routed to MergeArrayValues (line 158). That method collects items into a HashSet<object> (line 175), which drops duplicates within a single list, not just duplicates across the lists being merged.
Failure scenario
Input document, one frontmatter block, no colliding keys:
---
steps: [mix, wait, mix]scores: [1, 1, 2]
---
With CombineFrontmatter under the default (Conservative) strategy, the output is:
steps: [mix, wait]scores: [1, 2]
With FrontmatterMergeStrategy.None, both lists are preserved. Ordered lists that can legitimately repeat values (recipe steps, scores, playlists, repeated authors/contributors, and so on) lose data just from normalizing a single-block document. Nothing is being merged, so the user gets no warning.
Suggested fix / acceptance criteria
Pass single-key groups through unchanged, since there is nothing to merge.
When several keys really are merged, append the lists in order. Drop an item only if it already came from a different source list (or don't dedupe at all). Never dedupe within one list.
Tests:
A singleton steps: [mix, wait, mix] round-trips unchanged through CombineFrontmatter.
Merging tags: [a, a] with tag: [b] keeps both a entries.
Priority: Medium. It silently drops legitimately repeated list items in the default Conservative strategy, even for a single block with no key collisions. The data loss is quiet but limited to repeated values.
Area / suggested owner:PropertyMerger.cs: singleton grouping (l.47-52) and MergeArrayValues (l.158-175).
Next step: Pass singleton groups through untouched. When merging, concatenate lists in order and never dedupe within a single source list. Add the two tests from the issue.
Activity
matt-edmondson commentedon Sep 27, 2026
Triage
PropertyMerger.cs: singleton grouping (l.47-52) andMergeArrayValues(l.158-175).PropertyMergerPR with a shared round-trip test suite.Generated by Claude Code