Skip to content

Compliance suite: multi-stream projections #5145

Description

@jeremydmiller

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

The library covers single-stream aggregation (self-aggregating evolve, string identity) and event projections (registration, enrichment). Multi-stream projections — the grouping/slicing half of the projection model — are untested cross-store, and they are the projections most likely to diverge, because slicing decides which shard sees which event.

ProjectionBase + ProjectionLifecycle and ComplianceStoreConfig.AddProjection(ProjectionBase, ProjectionLifecycle) are already in place. The concrete multi-stream base class is per-product, so this needs one global-alias addition in the same style the README already documents for ComplianceEventProjection and ComplianceStringPartyProjectionBase:

global using ComplianceMultiStreamProjectionBase =
    Marten.Events.Aggregation.MultiStreamProjection<Doc, TId>;   // Polecat: its own equivalent

What each store tests today

Marten Polecat
Projections/MultiStreamProjections/* Projections/multi_stream_projection_tests.cs
Projections/inline_aggregation_by_stream_with_multiples.cs Projections/multi_stream_projection_stepthrough_tests.cs
Projections/hiearchy_projection.cs Projections/time_based_multi_stream_projection_tests.cs
Aggregation/aggregates_should_be_registered_as_document_mappings_automatically.cs Projections/aggregate_to_many_tests.cs

Scope

New MultiStreamProjectionCompliance suite:

  1. Slice by a member of the event body — events from N streams land on one document
  2. Slice by tenant / by a computed key
  3. Fan-out: one event contributing to many slices (aggregate_to_many)
  4. Inline vs async producing the same grouped result
  5. An event type no slicer claims is skipped without failing the shard
  6. Deleting a slice from within the projection

Deliberately out of scope here: sharded/partitioned execution and multi-node distribution — storage- and daemon-specific, stays in each repo.

Acceptance

  • Suite enrolled in both stores; new alias documented in the package README alongside the existing four
  • Originals retired for the absorbed behavior in both repos

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