Marten#4471: Inventory test-library projections (audit report)#4485
Merged
Conversation
Phase 2 (PR #4475) made JasperFx.Events.SourceGenerator the only projection-apply path. This audit walks every projection-shaped type across src/EventSourcingTests, src/DaemonTests, src/CoreTests, src/DocumentDbTests, src/MultiTenancyTests, src/PatchingTests, src/samples, and src/DocSamples, and inventories the SG dispatch shape per type. Two SG emission patterns surfaced from a representative dump (-p:EmitCompilerGeneratedFiles=true on EventSourcingTests): Pattern A — projection subclass: SG emits a partial declaration that merges into the user's class. Source must be partial. This is the source of Phase 2's ~80 partial annotations on test-library projection subclasses. Pattern B — self-aggregating aggregate: SG emits a separate sibling `XEvolver` class plus an [assembly: GeneratedEvolver(typeof(X), typeof(XEvolver))] registration. Aggregate type does NOT need partial — the evolver is an independent type calling the aggregate's public methods. Headline counts: 221 projection-subclass types (Pattern-A emit) - 189 partial (SG-merged dispatcher expected) - 30 non-partial with no Apply/Create (no SG emission expected) - 2 non-partial implementing IProjection.ApplyAsync directly (SignalRProducer / KafkaProducer; low-level handlers, no SG emission expected) - 29 explicit Evolve/EvolveAsync override (deliberate SG bypass) - 8 explicit DetermineAction/DetermineActionAsync override (deliberate SG bypass) 18 self-aggregating aggregate types (Pattern-B emit) Total dispatcher emission sites: 239 SG gaps surfaced: 0 Inventory landed under audit/projections-inventory.md. No code changes; this commit is documentation-only. Follow-up: extend Marten.AotSmoke with an automated dispatcher-coverage assertion so future SG regressions trip CI immediately (tracked separately). Refs #4471. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This was referenced May 19, 2026
Closed
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.
Summary
Refs #4471 — pre-9.0 audit of every projection-shaped type across Marten's test libraries against the source-generator-only dispatch path introduced by #276 Phase 2 (PR #4475).
This PR lands the inventory document only. The companion automated dispatcher-coverage regression guard (extending
Marten.AotSmoke) is tracked as a follow-up so it can land in its own PR.What's in the inventory
audit/projections-inventory.md— 239 dispatcher emission sites across the in-scope test projects + samples + DocSamples, classified by SG emission pattern:partialmerge) — SG emits a partial declaration that merges into the user's classpartial(SG dispatcher expected)partialwith no Apply/Create methods (lookup-only — no SG emission expected)IProjection.ApplyAsyncdirectly (SignalRProducer,KafkaProducer— low-level handlers, no SG emission expected)Evolve/EvolveAsync(deliberate SG bypass)DetermineAction/DetermineActionAsync(deliberate SG bypass)XEvolver) — SG emits a separate evolver class plus an[assembly: GeneratedEvolver(typeof(X), typeof(XEvolver))]registration. The aggregate type itself does not needpartial.SG gaps surfaced
Zero. A representative SG-emit dump (
-p:EmitCompilerGeneratedFiles=trueonEventSourcingTests) produced 191.g.csdispatcher files for that project alone. Combined with the green build (CS0260 would surface any non-partial Pattern-A source) and green test runs (any Pattern-B-expected aggregate missing emission would throwInvalidProjectionExceptionat host build), Phase 2's adoption is complete across the test libraries.What this PR does NOT include
Marten.AotSmokeso future SG regressions trip CI. Filed as a follow-up issue.EventSourcingTests 1320/0/7,DaemonTests 183/0/1,CoreTests 444/0/1) remains the source of truth.Refs #4471. Do NOT auto-close — the follow-up regression-guard work is the actual close trigger for the issue.
🤖 Generated with Claude Code