What is this bug about?
A feature is about exactly one consistency unit - the given-when-then schema says so outright, and the variant discriminator inside its scope names that unit: an aggregate, a dynamic consistency boundary, a process manager, or a read model.
The resolver ignores all of that. Extension documents are keyed on domain/name, discarding the rest of the scope. Two features named happy-path about two different aggregates are consequently rejected as duplicates:
$ esdm lint
error: esdm/structure/duplicate-name
at model.esdm.yaml:102:7
duplicate feature "happy-path"
note: first defined here (model.esdm.yaml:85:7)
Both features are lint-clean on their own, target different units, and occupy different positions. Nothing about them is duplicate except the truncated key. The practical effect is that the natural naming pattern - one happy-path per unit - is unavailable, and modelers have to disambiguate by hand (order-happy-path, invoice-happy-path).
esdm view truncates the same way: a feature is attached under the domain, as a sibling of subdomains and process managers, even though its scope names a unit two levels deeper.
This is the exact inverse of #19. There, two elements of different kinds at the same position are not recognized as a collision. Here, two elements of the same kind at different positions are merged into one. Both come from the same root cause: the position is not derived from the element's own scope.
domain-story is unaffected - it is genuinely domain-scoped, so domain/name is its correct position.
What needs to be done to fix this bug?
What else should we know?
What is this bug about?
A
featureis about exactly one consistency unit - the given-when-then schema says so outright, and the variant discriminator inside itsscopenames that unit: an aggregate, a dynamic consistency boundary, a process manager, or a read model.The resolver ignores all of that. Extension documents are keyed on
domain/name, discarding the rest of the scope. Two features namedhappy-pathabout two different aggregates are consequently rejected as duplicates:Both features are lint-clean on their own, target different units, and occupy different positions. Nothing about them is duplicate except the truncated key. The practical effect is that the natural naming pattern - one
happy-pathper unit - is unavailable, and modelers have to disambiguate by hand (order-happy-path,invoice-happy-path).esdm viewtruncates the same way: a feature is attached under the domain, as a sibling of subdomains and process managers, even though its scope names a unit two levels deeper.This is the exact inverse of #19. There, two elements of different kinds at the same position are not recognized as a collision. Here, two elements of the same kind at different positions are merged into one. Both come from the same root cause: the position is not derived from the element's own scope.
domain-storyis unaffected - it is genuinely domain-scoped, sodomain/nameis its correct position.What needs to be done to fix this bug?
domain/name. Leave domain-storytelling documents keyed by domain, which is correct for them.featcounter from the domain's stats line to the unit's.What else should we know?
esdm view.