fix(import): refuse a raw date spelled like a generated item or group (improvise-d0n6)

This commit is contained in:
Claude (8jk63-fix)
2026-10-02 20:50:01 -07:00
committed by Edward Langley
parent b516567e58
commit c3e12842c2
3 changed files with 82 additions and 2 deletions
+9 -1
View File
@@ -638,7 +638,15 @@ ones beside it (`Date_Year`, `Date_Quarter`, `Date_Month`):
ungrouped item, with a warning naming the column and the row count, rather
than being dropped. The warning is separate from the split shape's, because
that one reports an absent coordinate and this one a coordinate that is there
and ungrouped.
and ungrouped. **Unless its spelling is one the hierarchy generates**
(improvise-d0n6): a raw `2024-01` or `2024` is the same name as the generated
month or year, so it would join the grouped item and the warning would be
false. The build **refuses**, naming the column and the spellings and pointing
at the split shape. That follows the collision rule below: where two records
would silently be one thing, the user is asked and nothing is defaulted. A
fallback to the split shape was rejected as a silent change of the user's
choice, and a renamed raw item as altering the data. The check is
`Plan::spelling_clash`.
- **Item order is first-seen, not chronological.** Order is a correctness
property here (gotcha 18), and a group need not be contiguous, so a CSV that
is not in date order still nests correctly. It is just drawn in the order