Enforce repository and read model boundaries - #10
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9bc05f62ad
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| .Where(type => !type.Name.EndsWith( | ||
| ReadModelSuffix, | ||
| StringComparison.Ordinal)) |
There was a problem hiding this comment.
Strip generic arity before checking the read-model suffix
When an Application assembly declares a valid generic model such as PagedReadModel<T> : ReadModel, reflection reports its name as PagedReadModel1, so this check incorrectly fails even though the source-level name ends with ReadModel. The inverse convention has the same normalization gap and therefore would not detect a generic PagedReadModel` that omits the base type; compare the existing repository-name checks, which explicitly remove generic arity before evaluating names.
Useful? React with 👍 / 👎.
Что сделано
PANiXiDA.Core.Applicationдо2.0.5из Add read model abstraction panixida-dotnet-core/application#4;ReadModel;IRepository<,>ограничен aggregate roots, value objects, enumerations и strongly typed IDs без примитивов в предметных параметрах и результатах;IReadRepository<>использует примитивный ID, не принимает Domain-типы и возвращаетReadModelиз дополнительных методов;ReadModelи результатеIQueryHandler<,>;Проверки
dotnet build PANiXiDA.TacticalHeroes.slnx --no-restore— успешно;dotnet format ... --verify-no-changes— успешно;Полный Docker-зависимый прогон локально не завершился из-за внешнего
EOFотregistry-1.docker.ioпри загрузкеaxllent/mailpit:v1.30.4; изменение кода и архитектурные проверки собраны и пройдены отдельно.