Skip to content

Compliance suite: strong-typed ids, required members and primary-constructor aggregates #5144

Description

@jeremydmiller

Part of #5118 (compliance wave growth), epic #5110.

StringIdentitySingleStreamCompliance (wave 3) covers plain string-keyed aggregation. Two adjacent shape families are still tested twice, independently, in both repos:

  1. Strong-typed identifiers on aggregates (Guid-backed and string-backed wrappers)
  2. Modern C# aggregate shapesrequired members and primary constructors — which exercise the source generator's construction path, not the storage layer

Both run through FetchForWriting<T, TId> / FetchLatest<T, TId> on the shared IEventStoreOperations plus ordinary snapshot registration, so this is portable with no seam addition. The strong-typed id types themselves must be declared in the shared source (they compile per consumer anyway, which the package already requires).

What each store tests today

Marten Polecat
Aggregation/using_guid_based_strong_typed_id_for_aggregate_identity.cs Projections/using_guid_based_strong_typed_id_for_aggregate_identity.cs
Aggregation/using_string_based_strong_typed_id_for_aggregate_identity.cs Projections/using_string_based_strong_typed_id_for_aggregate_identity.cs
Aggregation/strong_typed_identifiers_on_aggregates_must_be_nullable.cs Events/Bug_4214_identity_map_strong_typed_ids.cs
Bug_4542_required_members_primary_ctor.cs Projections/required_member_primary_ctor_projection_tests.cs
Bug_4543_nullable_read_aggregate_param.cs Events/aggregate_type_resolution_tests.cs

The Marten↔Polecat file names here are near-identical — this is the most literal duplication left in the two suites.

Scope

New AggregateIdentityShapeCompliance suite:

  1. Guid-backed strong-typed id: start stream, FetchForWriting<T, TId>, FetchLatest<T, TId>, inline snapshot persisted under the unwrapped value
  2. String-backed strong-typed id: same
  3. The nullability rule (strong_typed_identifiers_on_aggregates_must_be_nullable) — settle whether it is a shared rule or Marten-specific before porting; if shared, it belongs here, if not, it stays in Marten
  4. required-member aggregate builds and evolves
  5. Primary-constructor aggregate builds and evolves
  6. Nullable read-aggregate parameter (Bug_4543)

Acceptance

  • Suite enrolled in both stores, zero capability gates
  • Originals retired in both repos (five files each side)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions