Repository navigation
fix: Accept read models as bounded-context content. - #74
Merged
Merged
Conversation
A projection-only bounded context derives every view from events owned by other contexts and deliberately has no write side. The rule treated that as a defect and demanded an aggregate or a dynamic-consistency- boundary, pushing modelers towards a placeholder aggregate. Read models now count alongside the two consistency units. Supporting elements such as entities, value objects and actors still do not, since they only carry meaning around one of the three. The rule no longer checks for a consistency unit, so it moves from esdm/modeling/bounded-context-without-consistency-unit to esdm/modeling/bounded-context-without-content. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NcvwY9jPvVp8vLjugRpKnB
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 changed
The rule
esdm/modeling/bounded-context-without-consistency-unitdemanded an Aggregate or a Dynamic Consistency Boundary in every Bounded Context. That misjudges the projection-only context: it derives every view from events owned by other contexts and deliberately has no write side. The rule reported it as a defect and pushed modelers towards adding a placeholder aggregate just to silence the warning.Read models now count as content alongside the two consistency units. Supporting elements (Entities, Value Objects, Actors, Queries) still do not, because they only carry meaning around one of the three.
Since the rule no longer checks for a consistency unit, it is renamed to match what it now verifies:
esdm/modeling/bounded-context-without-contentwarning(unchanged)bounded-context "reporting" has no aggregates, dynamic-consistency-boundaries or read-models#modeling-bounded-context-without-contentThe rename is a breaking change for anyone referring to the old ID. At 0.x that is acceptable, and it was a deliberate call: the name follows the
<subject>-without-<thing>pattern that 34 of the 42modelingrules use, so the ID stays recognizable where it matters most, in the diagnostic itself.Why not a lint-ignore annotation
The alternative on the table was a suppression mechanism (
esdm.io/lint-ignoreplus a reason inmetadata.annotations). It was rejected:metadatais documented inschema/core/v1.yamlas non-semantic, with nothing else in the schema reading it. Making the linter read it would break that contract, and a typo in the key would fail silently.Testing
make qapasses. The rule's tests now cover all three accepted kinds, the projection-only context, and a context holding only supporting elements.🤖 Generated with Claude Code
https://claude.ai/code/session_01NcvwY9jPvVp8vLjugRpKnB