Skip to content

[#4454 Phase 2] Default the event store to closed-shape storage#4458

Merged
jeremydmiller merged 1 commit into
masterfrom
fix/4454-phase-2-closed-shape-event-store-default
May 18, 2026
Merged

[#4454 Phase 2] Default the event store to closed-shape storage#4458
jeremydmiller merged 1 commit into
masterfrom
fix/4454-phase-2-closed-shape-event-store-default

Conversation

@jeremydmiller
Copy link
Copy Markdown
Member

Summary

Phase 2 of #4454. Makes the closed-shape event-document storage adapter the only path and retires the codegen-emitted EventDocumentStorage generator:

  • EventGraph.AttachTypesSynchronously constructs ClosedShapeEventDocumentStorage unconditionally. The UseClosedShapeStorage opt-in (on EventGraph and IEventStoreOptions) is gone.
  • EventDocumentStorageGenerator and its CodeGenerationExtensions partner are deleted.
  • The select-stream-state SQL fragment moves to a new Marten.EventStorage.StreamStateSql.Build(EventGraph) helper that the closed-shape adapter and the Postgres dialect builders share.
  • Test harness drops the env-var sweep: MARTEN_USE_CLOSED_SHAPE_STORAGE + TestsSettings.UseClosedShapeStorage are deleted, and OneOffConfigurationsContext / IntegrationContext / DefaultStoreFixture no longer toggle the flag after configure().
  • The two *-eventsourcing-closed-shape.yml GH Action workflows are deleted — closed-shape is the only path now, so the main event-sourcing lanes already cover it.
  • appending_events_workflow_specs / quick_appending_events_workflow_specs (the only callers of EventDocumentStorageGenerator.GenerateStorage) now construct ClosedShapeEventDocumentStorage directly.

Test plan

  • Build clean (0 errors) across net9.0 + net10.0
  • appending_events_workflow_specs + quick_appending_events_workflow_specs — 52/52 pass
  • Closed-shape bug regression tests (Bug_4411Bug_4428) — 17/17 pass
  • Full EventSourcingTests suite — 1333 pass, 5 pre-existing skips, 0 fail (net10.0)
  • Full CI matrix (the two closed-shape lanes are intentionally retired in this PR)

Part of #4454. Phase 3 (ancillary stores) is next.

🤖 Generated with Claude Code

Removes UseClosedShapeStorage / MARTEN_USE_CLOSED_SHAPE_STORAGE entirely:
the event-document storage adapter is now always ClosedShapeEventDocumentStorage,
EventGraph.AttachTypesSynchronously constructs it unconditionally, and the
runtime-codegen EventDocumentStorageGenerator + its CodeGenerationExtensions
helpers are deleted. The select-stream-state SQL fragment moves to a small
StreamStateSql helper that both the closed-shape adapter and the Postgres
dialect builders call.

Test harness drops the env-var sweep block: OneOffConfigurationsContext /
IntegrationContext / DefaultStoreFixture no longer flip the flag after
configure(), and TestsSettings.UseClosedShapeStorage is gone. Removes the
two redundant closed-shape CI workflow files (jsonnet-pg15 and
systemtextjson-pgLatest) — closed-shape is the only path now, so the
main event-sourcing lanes cover it.

The remaining appending_events_workflow_specs / quick_appending_events_workflow_specs
tests that previously asked EventDocumentStorageGenerator for a builder now
construct ClosedShapeEventDocumentStorage directly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@jeremydmiller jeremydmiller merged commit d9f2d6d into master May 18, 2026
6 checks passed
@jeremydmiller jeremydmiller deleted the fix/4454-phase-2-closed-shape-event-store-default branch May 18, 2026 02:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant