Skip to content

Expose atomic Marten, Wolverine, and integration adapters #44

Description

@woksin

2026-08-30 delivery status

CritterStack PR #65 delivered an independently described/probed Marten adapter with stable source admission, aggregation coverage and deep fact parity against the compatibility adapter. It is deliberately not wired into the production roster yet.

Remaining V1 work: atomic Wolverine adapter, narrow Wolverine–Marten integration adapter, duplicate execution/ID rejection, reversed-order parity, complete compatibility-wrapper parity and CLI #95 roster adoption.


Learning

CritterStackScreenplayAdapter currently interprets Marten and Wolverine under one adapter identity, while its generator facade also composes Vogen. This obscures per-framework admission/version/provenance and pressures future stack combinations into facade ownership.

Desired migration

Add atomic classes in the existing package first:

  • Marten adapter;
  • Wolverine adapter;
  • narrow Wolverine–Marten integration adapter for semantics genuinely expressed by integration APIs;
  • retain CritterStackScreenplayAdapter and existing generator constructors as compatibility wrappers.

Cross-cutting Vogen/validation/value-object adapters remain independent. Atomic adapters never consume one another; neutral Generation derivation performs source-independent joins.

Acceptance criteria

  • Stable distinct adapter identities and implementation versions.
  • Each adapter has independent applicability/admission evidence and contribution provenance.
  • Marten-only execution cannot run Wolverine interpretation; Wolverine-only execution cannot invent Marten persistence.
  • Split-project applications are recognized across the selected application scope.
  • Integration adapter covers only exact coupled APIs and has explicit required capabilities.
  • Compatibility wrapper produces byte-identical current canonical output/diagnostics.
  • Reversed atomic adapter order is byte-identical.
  • Duplicate execution/IDs fail before analysis.
  • Existing public facade/package API remains source/binary compatible.
  • CLI can instantiate the atomic roster exactly once after its profile migration.

Related: Cratis/Screenplay.Generation#17, #29, #3, #4, Cratis/cli#87.

Activity

  1. woksin commented on Aug 24, 2026

    @woksin
    CollaboratorAuthor

    Prepared the atomic split against the current implementation without changing source:

    • CritterStackScreenplayAdapter is the only current adapter identity and sequentially runs MartenFacts, MartenDocumentFacts, and WolverineFacts for every project.
    • The natural Marten adapter boundary is MartenFacts.Discover() plus MartenDocumentFacts.Discover(); applicability is the existing StoreOptions/IDocumentStore check.
    • The natural Wolverine adapter boundary is WolverineFacts.Discover(); applicability is the existing WolverineOptions check.
    • Wolverine–Marten coupling is currently embedded in WolverineFacts through the exact Wolverine.Marten/HTTP-Marten aggregate, stream, persistence, and legacy attribute APIs. Those checks must move only when they require capabilities from both frameworks; generic Wolverine handlers, validation, messaging, and HTTP behavior stay Wolverine-owned.
    • CritterStackScreenplayGenerator currently defaults to Vogen plus the combined adapter. Its public constructors can remain compatibility facades while the default internal roster becomes Vogen + Marten + Wolverine + exact integration.
    • GenerationResolver sorts contributions but does not reject duplicate adapter identities before analysis. The atomic roster needs a pre-analysis identity/instance validation seam rather than relying on downstream fact conflicts.

    Implementation order after Generation #24–#26:

    1. Add distinct versioned Marten and Wolverine adapters with isolated applicability specs.
    2. Extract only exact coupled API discovery into the integration adapter and declare both capabilities as prerequisites.
    3. Make the combined adapter delegate to the atomic roster while preserving its public identity/output as the compatibility surface.
    4. Prove Marten-only, Wolverine-only, split-project, reversed-order, duplicate-roster rejection, and byte-identical compatibility vectors.
    5. Switch CLI construction to the reviewed atomic source roster exactly once; Vogen remains independent and source-only.
  2. cratis-direct commented on Aug 27, 2026

    @cratis-direct

    Thanks for opening this - it has been received and will be looked at.


    Posted by Stagehand (AI) - an autonomous agent, not a person. Review accordingly.

  3. woksin commented on Aug 27, 2026

    @woksin
    CollaboratorAuthor

    Dependency update: Generation #23 is complete in 0.16.0 and supplies descriptors, structured probes, duplicate rejection, atomic admission, frozen runs, and dispositions. Atomic Marten/Wolverine/integration adapters should follow Generation #19 for source-independent type-use joins. Generation #24 is a sibling report consumer, not a prerequisite. The compatibility facade and generator constructors remain byte/source/binary parity gates.

  4. woksin commented on Aug 28, 2026

    @woksin
    CollaboratorAuthor

    Architecture/parity reconciliation

    The atomic boundary is now frozen against public main 943f2bb... and the 1,022-spec/zero-warning baseline.

    Accepted identities: marten@1.0.0 (EventStore), wolverine@1.0.0 (ApplicationFramework), and wolverine-marten@1.0.0 (Integration), all dual modern/legacy contracts with authored-source/stable-location/semantic-analysis requirements and Generation minimum 0.17. Marten/Wolverine emit granular member/type-use/role facts; no adapter emits TypeUseBinding. Integration applicability requires exact authored allowlisted coupled APIs plus both capability sets across the selected scope.

    Ownership is explicit: ordinary Marten declarations/operations/compiled queries remain Marten-owned even inside Wolverine handlers; generic Wolverine/HTTP/messaging/validation/saga/current JasperFx event-stream/DCB behavior remains Wolverine-owned without Marten; only exact Wolverine.Marten.*, Wolverine.Http.Marten.* and legacy Marten handler-binding wrappers are integration-owned. No adapter invokes another.

    Compatibility decision: keep the existing parameterless generator and all existing constructors on vogen + cratis.critter-stack so public graph evidence/provenance and compilation-only compatibility remain unchanged. Add an explicit atomic roster path; CLI #95 adopts it after public release. Do not put the compatibility wrapper and atomics in one roster.

    Implementation waves: Generation 0.17 lockstep adoption -> replace active local concept binder with unbound aggregate facts + central derivation -> atomic descriptors/probes -> exact integration extraction -> runner-backed roster/duplicate and order gates -> compatibility/canonical/package release. Seven existing source hashes, full diagnostic signatures, public constructors and legacy binary consumer are immutable parity gates.

    Two generic Generation gaps are now tracked upstream rather than hidden in CritterStack: inherited member type-use emission in Generation #48 and exact independent entry-point usage joins in Generation #49. Both are stop conditions for claiming full parity; no adapter-order join or local aggregate rewrite is allowed.

  5. woksin commented on Aug 30, 2026

    @woksin
    CollaboratorAuthor

    Partly addressed in #65: added the independently described/probed Marten adapter with stable source-mapping admission, Marten-only integration filtering, aggregation API coverage, and deep output parity against the existing combined compatibility adapter. The default production generator roster remains unchanged.

    Still open: atomic Wolverine adapter, narrow Wolverine–Marten integration adapter, safe atomic roster composition and duplicate-ID rejection, reversed-order byte parity, compatibility-wrapper aggregate parity, and CLI profile migration.

  6. self-assigned this
    on Aug 30, 2026
  7. woksin commented on Sep 6, 2026

    @woksin
    CollaboratorAuthor

    Program kickoff and scoping have started locally as part of the coordinated end-to-end Screenplay/Stage/Studio/CLI delivery effort tracked in Cratis/Screenplay#174. This issue is in a later/nonblocking lane, not a prerequisite for the first deterministic backend delivery. @woksin is coordinating in dependency order with repository-specific AI corpus instructions and specifications. Existing work/PRs will be reconciled rather than duplicated. This is a kickoff, not a completion claim or a claim that a coding branch exists for this issue; focused progress, verification evidence and blockers will follow here.

  8. woksin commented on Oct 29, 2026

    @woksin
    CollaboratorAuthor

    Analysis and proposed solution

    Current behaviour

    Source/DotNET/CritterStack/CritterStackScreenplayGenerator.cs:49 constructs the default roster from Vogen and the combined Critter Stack adapter. Its composition path still specifically handles that combined adapter at Source/DotNET/CritterStack/CritterStackScreenplayGenerator.cs:120. The issue records delivery of the independently probed Marten adapter, but explicitly retains Wolverine, integration and composition work.

    Root cause / gap

    Independent Marten discovery is only part of the requested migration. Production composition and compatibility behaviour still need proof before replacing the combined identity.

    Proposed change

    Add focused Wolverine and Wolverine–Marten adapters alongside the existing Marten adapter. Keep integration discovery restricted to exact coupled APIs, with explicit capability requirements. Preserve the combined adapter and generator constructors as compatibility wrappers. Extend the existing for_CritterStackScreenplayGenerator specifications with Marten-only, Wolverine-only, split-project and integration-only cases. Add duplicate-ID rejection, reversed-order deterministic output and aggregate compatibility parity specifications, including diagnostics and provenance rather than text alone.

    Size, risk and release intent

    L; high risk because admission, provenance and compatibility boundaries change together; minor if existing public contracts remain compatible.

    Dependencies and blockers

    Coordinate neutral joins with Cratis/Screenplay.Generation#19 and roster adoption with Cratis/cli#95. The delivered Marten subset is not a completion claim for the remaining scope.

  9. removed their assignment
    on Nov 4, 2026
  10. self-assigned this
    on Nov 21, 2026
  11. woksin commented on Nov 21, 2026

    @woksin
    CollaboratorAuthor

    Status after #119: the atomic adapters are not part of that release; this issue stays open.

    What blocks a clean split today:

    • Wolverine discovery emits combined facts. A Wolverine command declaration, its property list and the persistence-derived identity role (IsIdentifier) are built together in WolverineFacts.Handlers, WolverineFacts.StateChange, WolverineFacts.Endpoints and WolverineFacts.Symbols. Filtering whole facts in a new adapter cannot separate the Wolverine member surface from the integration-owned identity, and rebuilding those payloads in a bridge would be the local fact rewriter this issue rules out. The prerequisite is to make shared discovery emit the granular surfaces directly (Wolverine first, then the analogous Marten emitters).
    • The Generation Conclude the source-to-Screenplay Preview foundation #48/Add bounded Wolverine saga evidence #49 checks requested here are still open against the existing vectors. At Screenplay.Generation v0.21.2, DotNetTypeUseFacts accepts only a named type with a known artifact key (no method or parameter entry point), DotNetTypeShapes.PublicReadablePropertiesOf does not walk base types, while the local binder does, and existing specs cover method-backed enum, collection, nullable and compiled-query fields. Those vectors need a decision before the binder can be retired.
    • CLI adoption of separate adapters is tracked in Bump the bundled Critter Stack Screenplay adapter and Generation versions cli#638.

    Suggested order: granular emission in shared Wolverine discovery behind the current specs, then the Generation vector decision, then the adapter roster and CLI adoption.

  12. woksin commented on Nov 21, 2026

    @woksin
    CollaboratorAuthor

    Stage 1 shipped in #121: command and query members and identifiers now resolve through one shared internal model, so Wolverine handlers and HTTP endpoints for the same command produce consistent properties and identities.

    Remaining for this issue: the public atomic adapters. They depend on Screenplay.Generation Cratis/Screenplay.Generation#48 and Cratis/Screenplay.Generation#49, so this issue stays open until those land.

  13. woksin commented on Nov 22, 2026

    @woksin
    CollaboratorAuthor

    Screenplay.Generation 0.22.0 has shipped inherited-member facts and usage joins (Cratis/Screenplay.Generation#48, Cratis/Screenplay.Generation#49). One gap remains before the atomic adapters can reach full parity with the existing facade: the shared inherited-member helper includes only authored base types, while Marten document discovery here also walks metadata and generated bases (a public Id declared on such a base changes document identity). Filtering those bases would break the parity this issue requires, so the adapters wait for an explicit origin policy in the SDK: Cratis/Screenplay.Generation#108. This issue stays open until that lands.

  14. woksin commented on Nov 22, 2026

    @woksin
    CollaboratorAuthor

    Generation 0.23.0 resolves the inherited-member origin gap (Cratis/Screenplay.Generation#108), but two cross-framework parity vectors still cannot be expressed through neutral Generation derivation, and adapters may not consume one another:

    Next here: atomic descriptors/probes and characterization specs that pin both vectors, with the existing facade and constructors unchanged. A parity-complete atomic roster, and CLI adoption, wait for those two contracts to be released.

  15. woksin commented on Nov 22, 2026

    @woksin
    CollaboratorAuthor

    Progress: the first phase landed in #124. It adds characterization specs for the failure-only and compiled-query cases, shared Marten store ownership discovery, and internal probes for the separate Wolverine and Wolverine-with-Marten adapters. The default adapter and its output are unchanged.

    Remaining: granular emission, the public separate adapters, parity with the combined adapter, and documentation. These wait on Cratis/Screenplay.Generation#110 and Cratis/Screenplay.Generation#111. This issue stays open until then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions