Cohesive.Simulation
- Responsibility
- Generators, property cases, worlds, artifacts, replay, and JSONL provisioning.
- Dependency boundary
- Depends only on Cohesive core.
Building Blocks
Cohesive.Simulation defines deterministic synthetic-data generation, property cases, replayable worlds, retained artifacts, and provider-neutral provisioning over canonical Cohesive shapes.
Typed C# builders are the ordinary authoring surface. Portable simulation documents remain the semantic authority used by tests, scripts, seeders, CI, and other tools. A run retains enough evidence to identify what was generated and whether it can be replayed against the same semantics.
A seed is only one replay coordinate. Generated observations also retain the exact definition identity, revision, fingerprint, scope, interpreter, entropy algorithm, and sequence index. Replay fails closed when those semantics no longer match.
Generators cover constants, inclusive integer ranges, Bernoulli choices, weighted categories, retained provider catalogs, object composition, and correlated records. The same definitions can produce one typed value, a bounded sequence, a population, or an addressable exemplar.
Property cases evaluate an invariant across deterministic generated values. A failed run returns stable diagnostics, coverage, a semantically shrunk counterexample, and a replay token rather than an opaque random failure.
The runner-neutral result stays in the core package. Cohesive.Simulation.Xunit translates it into an xUnit assertion without making the test framework part of simulation semantics.
A world composes named populations and exemplars into a static initial state. Its retained manifest embeds the portable world, root seed, interpreter, entropy algorithm, compiled population projections, and content-addressed artifact identity.
Persisting the manifest before provisioning gives later processes an inspectable source of truth. JSON Lines is the portable reference surface; optional integrations can provision relations between populations or seed storage systems.
Provisioning is bounded and sink-neutral. Stable run and batch identities support reconciliation, but the reference provisioner does not invent retries, delivery semantics, or transactional guarantees a destination cannot prove.