You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Scope generated facts by Marten EventModelName and Wolverine ancillary stores #79
The adapter collapses everything into one model. Mapping EventModelName straight to a Screenplay module would override host-owned placement. A correct design needs explicit store-context discovery, relationship scoping, and diagnostics where ownership is ambiguous. Found while updating to Marten 9.45 / Wolverine 6.45 (#76).
Source/DotNET/CritterStack/Marten/MartenFacts.cs:29 is the Marten discovery entry point. Source/DotNET/CritterStack/CritterStackScreenplayGenerator.cs:111 creates a shared analysis context for the selected projects. No production-source recognition of EventModelName was found. Current discovery therefore does not establish the requested explicit store/event-model ownership boundary.
Root cause / gap
CLR type identity and source placement do not identify which configured store owns a document or relationship. Reusing a module as store identity would override an independent host-owned concern and could merge unrelated stores.
Proposed change
Add store-context discovery for exact Marten configuration and Wolverine ancillary-store routing APIs. Carry stable context identity through relevant facts and relationship resolution without changing folder/module placement. Diagnose unknown, conflicting and multiply matched ownership instead of selecting the first store. Add solution-scope Roslyn fixtures covering two stores, shared CLR types, identical short names, assembly routing, namespace routing and unresolved configuration. Follow existing given fixtures and focused when_*/should_* specifications; include reversed project-order output parity and unchanged single-store output.
Size, risk and release intent
L; high risk because identity and relationship scoping affect many recovered artifacts; minor if existing single-store contracts remain compatible.
Dependencies and blockers
Coordinate identity and composition boundaries with #44. Shared generation contracts may need an explicit store-context representation before this adapter can preserve ownership faithfully.
Partial progress in #119: Marten EventModelName, ancillary stores (AddMartenStore<T>) and [MartenStore] are now detected and reported with a located MARTEN0020 diagnostic, so lost store scope is visible instead of silently merged into one model. No scoping is emitted yet: the shared generation contracts have no store or event-model scope on artifacts and relationships. That is requested in Cratis/Screenplay.Generation#104; this issue stays open until it lands and the adapter can emit the scope.
Scope decision for the generation side (Cratis/Screenplay.Generation#104): Marten event-model and ancillary-store scope will be carried as generator-side provenance, keeping same-named artifacts in different stores distinct and reporting unclear ownership. Generated .play will not express storage ownership; the scope is reported as unsupported in .play, because the Screenplay language has no construct for it yet. Language support is proposed in Cratis/Screenplay#1352.
Activity
woksin commentedon Oct 29, 2026
Analysis and proposed solution
Current behaviour
Source/DotNET/CritterStack/Marten/MartenFacts.cs:29is the Marten discovery entry point.Source/DotNET/CritterStack/CritterStackScreenplayGenerator.cs:111creates a shared analysis context for the selected projects. No production-source recognition ofEventModelNamewas found. Current discovery therefore does not establish the requested explicit store/event-model ownership boundary.Root cause / gap
CLR type identity and source placement do not identify which configured store owns a document or relationship. Reusing a module as store identity would override an independent host-owned concern and could merge unrelated stores.
Proposed change
Add store-context discovery for exact Marten configuration and Wolverine ancillary-store routing APIs. Carry stable context identity through relevant facts and relationship resolution without changing folder/module placement. Diagnose unknown, conflicting and multiply matched ownership instead of selecting the first store. Add solution-scope Roslyn fixtures covering two stores, shared CLR types, identical short names, assembly routing, namespace routing and unresolved configuration. Follow existing
givenfixtures and focusedwhen_*/should_*specifications; include reversed project-order output parity and unchanged single-store output.Size, risk and release intent
L; high risk because identity and relationship scoping affect many recovered artifacts; minor if existing single-store contracts remain compatible.
Dependencies and blockers
Coordinate identity and composition boundaries with #44. Shared generation contracts may need an explicit store-context representation before this adapter can preserve ownership faithfully.
woksin commentedon Nov 21, 2026
Partial progress in #119: Marten
EventModelName, ancillary stores (AddMartenStore<T>) and[MartenStore]are now detected and reported with a locatedMARTEN0020diagnostic, so lost store scope is visible instead of silently merged into one model. No scoping is emitted yet: the shared generation contracts have no store or event-model scope on artifacts and relationships. That is requested in Cratis/Screenplay.Generation#104; this issue stays open until it lands and the adapter can emit the scope.woksin commentedon Nov 21, 2026
Scope decision for the generation side (Cratis/Screenplay.Generation#104): Marten event-model and ancillary-store scope will be carried as generator-side provenance, keeping same-named artifacts in different stores distinct and reporting unclear ownership. Generated
.playwill not express storage ownership; the scope is reported as unsupported in.play, because the Screenplay language has no construct for it yet. Language support is proposed in Cratis/Screenplay#1352.github-actions commentedon Nov 22, 2026
Closed by release v0.29.0.